servicem8 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/api.json +1076 -629
- package/bin/mcp-server.js +1358 -531
- package/bin/mcp-server.js.map +24 -8
- 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 +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- 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/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/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 +54 -0
- package/dist/commonjs/sdk/jobtemplates.d.ts.map +1 -1
- package/dist/commonjs/sdk/jobtemplates.js +68 -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/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 +2 -2
- package/dist/esm/lib/config.js +2 -2
- 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/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/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 +54 -0
- package/dist/esm/sdk/jobtemplates.d.ts.map +1 -1
- package/dist/esm/sdk/jobtemplates.js +68 -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 +431 -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/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 +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +20 -10
- 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/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 +107 -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.
|
|
34208
|
+
sdkVersion: "0.9.1",
|
|
34209
34209
|
genVersion: "2.656.5",
|
|
34210
|
-
userAgent: "speakeasy-sdk/typescript 0.9.
|
|
34210
|
+
userAgent: "speakeasy-sdk/typescript 0.9.1 2.656.5 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(() => {
|
|
@@ -40947,6 +41002,7 @@ var init_components = __esm(() => {
|
|
|
40947
41002
|
init_jobmaterial();
|
|
40948
41003
|
init_jobmaterialbundle();
|
|
40949
41004
|
init_jobpayment();
|
|
41005
|
+
init_jobtemplate();
|
|
40950
41006
|
init_jobtemplateoverrides();
|
|
40951
41007
|
init_knowledgearticle();
|
|
40952
41008
|
init_location();
|
|
@@ -42230,6 +42286,51 @@ var init_createjobs = __esm(() => {
|
|
|
42230
42286
|
})(CreateJobsResponse$ ||= {});
|
|
42231
42287
|
});
|
|
42232
42288
|
|
|
42289
|
+
// src/models/operations/createjobtemplates.ts
|
|
42290
|
+
var CreateJobTemplatesResponseResult$inboundSchema, CreateJobTemplatesResponseResult$outboundSchema, CreateJobTemplatesResponseResult$, CreateJobTemplatesResponse$inboundSchema, CreateJobTemplatesResponse$outboundSchema, CreateJobTemplatesResponse$;
|
|
42291
|
+
var init_createjobtemplates = __esm(() => {
|
|
42292
|
+
init_esm();
|
|
42293
|
+
init_primitives();
|
|
42294
|
+
init_components();
|
|
42295
|
+
CreateJobTemplatesResponseResult$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
42296
|
+
CreateJobTemplatesResponseResult$outboundSchema = unionType([
|
|
42297
|
+
Result$outboundSchema,
|
|
42298
|
+
ErrorT$outboundSchema
|
|
42299
|
+
]);
|
|
42300
|
+
((CreateJobTemplatesResponseResult$) => {
|
|
42301
|
+
CreateJobTemplatesResponseResult$.inboundSchema = CreateJobTemplatesResponseResult$inboundSchema;
|
|
42302
|
+
CreateJobTemplatesResponseResult$.outboundSchema = CreateJobTemplatesResponseResult$outboundSchema;
|
|
42303
|
+
})(CreateJobTemplatesResponseResult$ ||= {});
|
|
42304
|
+
CreateJobTemplatesResponse$inboundSchema = objectType({
|
|
42305
|
+
Headers: recordType(arrayType(stringType())),
|
|
42306
|
+
Result: unionType([
|
|
42307
|
+
Result$inboundSchema,
|
|
42308
|
+
ErrorT$inboundSchema
|
|
42309
|
+
])
|
|
42310
|
+
}).transform((v2) => {
|
|
42311
|
+
return remap(v2, {
|
|
42312
|
+
Headers: "headers",
|
|
42313
|
+
Result: "result"
|
|
42314
|
+
});
|
|
42315
|
+
});
|
|
42316
|
+
CreateJobTemplatesResponse$outboundSchema = objectType({
|
|
42317
|
+
headers: recordType(arrayType(stringType())),
|
|
42318
|
+
result: unionType([
|
|
42319
|
+
Result$outboundSchema,
|
|
42320
|
+
ErrorT$outboundSchema
|
|
42321
|
+
])
|
|
42322
|
+
}).transform((v2) => {
|
|
42323
|
+
return remap(v2, {
|
|
42324
|
+
headers: "Headers",
|
|
42325
|
+
result: "Result"
|
|
42326
|
+
});
|
|
42327
|
+
});
|
|
42328
|
+
((CreateJobTemplatesResponse$) => {
|
|
42329
|
+
CreateJobTemplatesResponse$.inboundSchema = CreateJobTemplatesResponse$inboundSchema;
|
|
42330
|
+
CreateJobTemplatesResponse$.outboundSchema = CreateJobTemplatesResponse$outboundSchema;
|
|
42331
|
+
})(CreateJobTemplatesResponse$ ||= {});
|
|
42332
|
+
});
|
|
42333
|
+
|
|
42233
42334
|
// src/models/operations/createknowledgearticles.ts
|
|
42234
42335
|
var CreateKnowledgeArticlesResponseResult$inboundSchema, CreateKnowledgeArticlesResponseResult$outboundSchema, CreateKnowledgeArticlesResponseResult$, CreateKnowledgeArticlesResponse$inboundSchema, CreateKnowledgeArticlesResponse$outboundSchema, CreateKnowledgeArticlesResponse$;
|
|
42235
42336
|
var init_createknowledgearticles = __esm(() => {
|
|
@@ -43304,6 +43405,32 @@ var init_deletejobs = __esm(() => {
|
|
|
43304
43405
|
})(DeleteJobsResponse$ ||= {});
|
|
43305
43406
|
});
|
|
43306
43407
|
|
|
43408
|
+
// src/models/operations/deletejobtemplates.ts
|
|
43409
|
+
var DeleteJobTemplatesRequest$inboundSchema, DeleteJobTemplatesRequest$outboundSchema, DeleteJobTemplatesRequest$, DeleteJobTemplatesResponse$inboundSchema, DeleteJobTemplatesResponse$outboundSchema, DeleteJobTemplatesResponse$;
|
|
43410
|
+
var init_deletejobtemplates = __esm(() => {
|
|
43411
|
+
init_esm();
|
|
43412
|
+
init_components();
|
|
43413
|
+
DeleteJobTemplatesRequest$inboundSchema = objectType({
|
|
43414
|
+
uuid: stringType()
|
|
43415
|
+
});
|
|
43416
|
+
DeleteJobTemplatesRequest$outboundSchema = objectType({
|
|
43417
|
+
uuid: stringType()
|
|
43418
|
+
});
|
|
43419
|
+
((DeleteJobTemplatesRequest$) => {
|
|
43420
|
+
DeleteJobTemplatesRequest$.inboundSchema = DeleteJobTemplatesRequest$inboundSchema;
|
|
43421
|
+
DeleteJobTemplatesRequest$.outboundSchema = DeleteJobTemplatesRequest$outboundSchema;
|
|
43422
|
+
})(DeleteJobTemplatesRequest$ ||= {});
|
|
43423
|
+
DeleteJobTemplatesResponse$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
43424
|
+
DeleteJobTemplatesResponse$outboundSchema = unionType([
|
|
43425
|
+
Result$outboundSchema,
|
|
43426
|
+
ErrorT$outboundSchema
|
|
43427
|
+
]);
|
|
43428
|
+
((DeleteJobTemplatesResponse$) => {
|
|
43429
|
+
DeleteJobTemplatesResponse$.inboundSchema = DeleteJobTemplatesResponse$inboundSchema;
|
|
43430
|
+
DeleteJobTemplatesResponse$.outboundSchema = DeleteJobTemplatesResponse$outboundSchema;
|
|
43431
|
+
})(DeleteJobTemplatesResponse$ ||= {});
|
|
43432
|
+
});
|
|
43433
|
+
|
|
43307
43434
|
// src/models/operations/deleteknowledgearticles.ts
|
|
43308
43435
|
var DeleteKnowledgeArticlesRequest$inboundSchema, DeleteKnowledgeArticlesRequest$outboundSchema, DeleteKnowledgeArticlesRequest$, DeleteKnowledgeArticlesResponse$inboundSchema, DeleteKnowledgeArticlesResponse$outboundSchema, DeleteKnowledgeArticlesResponse$;
|
|
43309
43436
|
var init_deleteknowledgearticles = __esm(() => {
|
|
@@ -44273,6 +44400,35 @@ var init_getjobs = __esm(() => {
|
|
|
44273
44400
|
})(GetJobsResponse$ ||= {});
|
|
44274
44401
|
});
|
|
44275
44402
|
|
|
44403
|
+
// src/models/operations/getjobtemplates.ts
|
|
44404
|
+
var GetJobTemplatesRequest$inboundSchema, GetJobTemplatesRequest$outboundSchema, GetJobTemplatesRequest$, GetJobTemplatesResponse$inboundSchema, GetJobTemplatesResponse$outboundSchema, GetJobTemplatesResponse$;
|
|
44405
|
+
var init_getjobtemplates = __esm(() => {
|
|
44406
|
+
init_esm();
|
|
44407
|
+
init_components();
|
|
44408
|
+
GetJobTemplatesRequest$inboundSchema = objectType({
|
|
44409
|
+
uuid: stringType()
|
|
44410
|
+
});
|
|
44411
|
+
GetJobTemplatesRequest$outboundSchema = objectType({
|
|
44412
|
+
uuid: stringType()
|
|
44413
|
+
});
|
|
44414
|
+
((GetJobTemplatesRequest$) => {
|
|
44415
|
+
GetJobTemplatesRequest$.inboundSchema = GetJobTemplatesRequest$inboundSchema;
|
|
44416
|
+
GetJobTemplatesRequest$.outboundSchema = GetJobTemplatesRequest$outboundSchema;
|
|
44417
|
+
})(GetJobTemplatesRequest$ ||= {});
|
|
44418
|
+
GetJobTemplatesResponse$inboundSchema = unionType([
|
|
44419
|
+
JobTemplate$inboundSchema,
|
|
44420
|
+
ErrorT$inboundSchema
|
|
44421
|
+
]);
|
|
44422
|
+
GetJobTemplatesResponse$outboundSchema = unionType([
|
|
44423
|
+
JobTemplate$outboundSchema,
|
|
44424
|
+
ErrorT$outboundSchema
|
|
44425
|
+
]);
|
|
44426
|
+
((GetJobTemplatesResponse$) => {
|
|
44427
|
+
GetJobTemplatesResponse$.inboundSchema = GetJobTemplatesResponse$inboundSchema;
|
|
44428
|
+
GetJobTemplatesResponse$.outboundSchema = GetJobTemplatesResponse$outboundSchema;
|
|
44429
|
+
})(GetJobTemplatesResponse$ ||= {});
|
|
44430
|
+
});
|
|
44431
|
+
|
|
44276
44432
|
// src/models/operations/getknowledgearticles.ts
|
|
44277
44433
|
var GetKnowledgeArticlesRequest$inboundSchema, GetKnowledgeArticlesRequest$outboundSchema, GetKnowledgeArticlesRequest$, GetKnowledgeArticlesResponse$inboundSchema, GetKnowledgeArticlesResponse$outboundSchema, GetKnowledgeArticlesResponse$;
|
|
44278
44434
|
var init_getknowledgearticles = __esm(() => {
|
|
@@ -45093,6 +45249,25 @@ var init_listjobs = __esm(() => {
|
|
|
45093
45249
|
})(ListJobsResponse$ ||= {});
|
|
45094
45250
|
});
|
|
45095
45251
|
|
|
45252
|
+
// src/models/operations/listjobtemplates.ts
|
|
45253
|
+
var ListJobTemplatesResponse$inboundSchema, ListJobTemplatesResponse$outboundSchema, ListJobTemplatesResponse$;
|
|
45254
|
+
var init_listjobtemplates = __esm(() => {
|
|
45255
|
+
init_esm();
|
|
45256
|
+
init_components();
|
|
45257
|
+
ListJobTemplatesResponse$inboundSchema = unionType([
|
|
45258
|
+
ErrorT$inboundSchema,
|
|
45259
|
+
arrayType(JobTemplate$inboundSchema)
|
|
45260
|
+
]);
|
|
45261
|
+
ListJobTemplatesResponse$outboundSchema = unionType([
|
|
45262
|
+
ErrorT$outboundSchema,
|
|
45263
|
+
arrayType(JobTemplate$outboundSchema)
|
|
45264
|
+
]);
|
|
45265
|
+
((ListJobTemplatesResponse$) => {
|
|
45266
|
+
ListJobTemplatesResponse$.inboundSchema = ListJobTemplatesResponse$inboundSchema;
|
|
45267
|
+
ListJobTemplatesResponse$.outboundSchema = ListJobTemplatesResponse$outboundSchema;
|
|
45268
|
+
})(ListJobTemplatesResponse$ ||= {});
|
|
45269
|
+
});
|
|
45270
|
+
|
|
45096
45271
|
// src/models/operations/listknowledgearticles.ts
|
|
45097
45272
|
var ListKnowledgeArticlesResponse$inboundSchema, ListKnowledgeArticlesResponse$outboundSchema, ListKnowledgeArticlesResponse$;
|
|
45098
45273
|
var init_listknowledgearticles = __esm(() => {
|
|
@@ -46270,6 +46445,43 @@ var init_updatejobs = __esm(() => {
|
|
|
46270
46445
|
})(UpdateJobsResponse$ ||= {});
|
|
46271
46446
|
});
|
|
46272
46447
|
|
|
46448
|
+
// src/models/operations/updatejobtemplates.ts
|
|
46449
|
+
var UpdateJobTemplatesRequest$inboundSchema, UpdateJobTemplatesRequest$outboundSchema, UpdateJobTemplatesRequest$, UpdateJobTemplatesResponse$inboundSchema, UpdateJobTemplatesResponse$outboundSchema, UpdateJobTemplatesResponse$;
|
|
46450
|
+
var init_updatejobtemplates = __esm(() => {
|
|
46451
|
+
init_esm();
|
|
46452
|
+
init_primitives();
|
|
46453
|
+
init_components();
|
|
46454
|
+
UpdateJobTemplatesRequest$inboundSchema = objectType({
|
|
46455
|
+
uuid: stringType(),
|
|
46456
|
+
JobTemplate: JobTemplateInput$inboundSchema
|
|
46457
|
+
}).transform((v2) => {
|
|
46458
|
+
return remap(v2, {
|
|
46459
|
+
JobTemplate: "jobTemplate"
|
|
46460
|
+
});
|
|
46461
|
+
});
|
|
46462
|
+
UpdateJobTemplatesRequest$outboundSchema = objectType({
|
|
46463
|
+
uuid: stringType(),
|
|
46464
|
+
jobTemplate: JobTemplateInput$outboundSchema
|
|
46465
|
+
}).transform((v2) => {
|
|
46466
|
+
return remap(v2, {
|
|
46467
|
+
jobTemplate: "JobTemplate"
|
|
46468
|
+
});
|
|
46469
|
+
});
|
|
46470
|
+
((UpdateJobTemplatesRequest$) => {
|
|
46471
|
+
UpdateJobTemplatesRequest$.inboundSchema = UpdateJobTemplatesRequest$inboundSchema;
|
|
46472
|
+
UpdateJobTemplatesRequest$.outboundSchema = UpdateJobTemplatesRequest$outboundSchema;
|
|
46473
|
+
})(UpdateJobTemplatesRequest$ ||= {});
|
|
46474
|
+
UpdateJobTemplatesResponse$inboundSchema = unionType([Result$inboundSchema, ErrorT$inboundSchema]);
|
|
46475
|
+
UpdateJobTemplatesResponse$outboundSchema = unionType([
|
|
46476
|
+
Result$outboundSchema,
|
|
46477
|
+
ErrorT$outboundSchema
|
|
46478
|
+
]);
|
|
46479
|
+
((UpdateJobTemplatesResponse$) => {
|
|
46480
|
+
UpdateJobTemplatesResponse$.inboundSchema = UpdateJobTemplatesResponse$inboundSchema;
|
|
46481
|
+
UpdateJobTemplatesResponse$.outboundSchema = UpdateJobTemplatesResponse$outboundSchema;
|
|
46482
|
+
})(UpdateJobTemplatesResponse$ ||= {});
|
|
46483
|
+
});
|
|
46484
|
+
|
|
46273
46485
|
// src/models/operations/updateknowledgearticles.ts
|
|
46274
46486
|
var UpdateKnowledgeArticlesRequest$inboundSchema, UpdateKnowledgeArticlesRequest$outboundSchema, UpdateKnowledgeArticlesRequest$, UpdateKnowledgeArticlesResponse$inboundSchema, UpdateKnowledgeArticlesResponse$outboundSchema, UpdateKnowledgeArticlesResponse$;
|
|
46275
46487
|
var init_updateknowledgearticles = __esm(() => {
|
|
@@ -46707,6 +46919,7 @@ var init_operations = __esm(() => {
|
|
|
46707
46919
|
init_createjobpayments();
|
|
46708
46920
|
init_createjobqueues();
|
|
46709
46921
|
init_createjobs();
|
|
46922
|
+
init_createjobtemplates();
|
|
46710
46923
|
init_createknowledgearticles();
|
|
46711
46924
|
init_createlocations();
|
|
46712
46925
|
init_creatematerials();
|
|
@@ -46741,6 +46954,7 @@ var init_operations = __esm(() => {
|
|
|
46741
46954
|
init_deletejobpayments();
|
|
46742
46955
|
init_deletejobqueues();
|
|
46743
46956
|
init_deletejobs();
|
|
46957
|
+
init_deletejobtemplates();
|
|
46744
46958
|
init_deleteknowledgearticles();
|
|
46745
46959
|
init_deletelocations();
|
|
46746
46960
|
init_deletematerials();
|
|
@@ -46777,6 +46991,7 @@ var init_operations = __esm(() => {
|
|
|
46777
46991
|
init_getjobpayments();
|
|
46778
46992
|
init_getjobqueues();
|
|
46779
46993
|
init_getjobs();
|
|
46994
|
+
init_getjobtemplates();
|
|
46780
46995
|
init_getknowledgearticles();
|
|
46781
46996
|
init_getlocations();
|
|
46782
46997
|
init_getmaterials();
|
|
@@ -46814,6 +47029,7 @@ var init_operations = __esm(() => {
|
|
|
46814
47029
|
init_listjobpayments();
|
|
46815
47030
|
init_listjobqueues();
|
|
46816
47031
|
init_listjobs();
|
|
47032
|
+
init_listjobtemplates();
|
|
46817
47033
|
init_listknowledgearticles();
|
|
46818
47034
|
init_listlocations();
|
|
46819
47035
|
init_listmaterials();
|
|
@@ -46852,6 +47068,7 @@ var init_operations = __esm(() => {
|
|
|
46852
47068
|
init_updatejobpayments();
|
|
46853
47069
|
init_updatejobqueues();
|
|
46854
47070
|
init_updatejobs();
|
|
47071
|
+
init_updatejobtemplates();
|
|
46855
47072
|
init_updateknowledgearticles();
|
|
46856
47073
|
init_updatelocations();
|
|
46857
47074
|
init_updatematerials();
|
|
@@ -61911,18 +62128,18 @@ This endpoint requires the following OAuth scope **manage_jobs**.`,
|
|
|
61911
62128
|
};
|
|
61912
62129
|
});
|
|
61913
62130
|
|
|
61914
|
-
// src/funcs/
|
|
61915
|
-
function
|
|
62131
|
+
// src/funcs/jobTemplatesCreateJobTemplates.ts
|
|
62132
|
+
function jobTemplatesCreateJobTemplates(client, request, options) {
|
|
61916
62133
|
return new APIPromise($do129(client, request, options));
|
|
61917
62134
|
}
|
|
61918
62135
|
async function $do129(client, request, options) {
|
|
61919
|
-
const parsed = safeParse(request, (value) =>
|
|
62136
|
+
const parsed = safeParse(request, (value) => JobTemplateInput$outboundSchema.parse(value), "Input validation failed");
|
|
61920
62137
|
if (!parsed.ok) {
|
|
61921
62138
|
return [parsed, { status: "invalid" }];
|
|
61922
62139
|
}
|
|
61923
62140
|
const payload = parsed.value;
|
|
61924
62141
|
const body = encodeJSON("body", payload, { explode: true });
|
|
61925
|
-
const path = pathToFunc("/
|
|
62142
|
+
const path = pathToFunc("/jobtemplate.json")();
|
|
61926
62143
|
const headers = new Headers(compactMap({
|
|
61927
62144
|
"Content-Type": "application/json",
|
|
61928
62145
|
Accept: "application/json"
|
|
@@ -61932,7 +62149,7 @@ async function $do129(client, request, options) {
|
|
|
61932
62149
|
const context = {
|
|
61933
62150
|
options: client._options,
|
|
61934
62151
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
61935
|
-
operationID: "
|
|
62152
|
+
operationID: "createJobTemplates",
|
|
61936
62153
|
oAuth2Scopes: [],
|
|
61937
62154
|
resolvedSecurity: requestSecurity,
|
|
61938
62155
|
securitySource: client._options.security,
|
|
@@ -61975,16 +62192,18 @@ async function $do129(client, request, options) {
|
|
|
61975
62192
|
const responseFields = {
|
|
61976
62193
|
HttpMeta: { Response: response, Request: req }
|
|
61977
62194
|
};
|
|
61978
|
-
const [result2] = await match(json(200,
|
|
62195
|
+
const [result2] = await match(json(200, CreateJobTemplatesResponse$inboundSchema, {
|
|
61979
62196
|
hdrs: true,
|
|
61980
62197
|
key: "Result"
|
|
61981
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
62198
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateJobTemplatesResponse$inboundSchema, {
|
|
62199
|
+
key: "Result"
|
|
62200
|
+
}))(response, req, { extraFields: responseFields });
|
|
61982
62201
|
if (!result2.ok) {
|
|
61983
62202
|
return [result2, { status: "complete", request: req, response }];
|
|
61984
62203
|
}
|
|
61985
62204
|
return [result2, { status: "complete", request: req, response }];
|
|
61986
62205
|
}
|
|
61987
|
-
var
|
|
62206
|
+
var init_jobTemplatesCreateJobTemplates = __esm(() => {
|
|
61988
62207
|
init_encodings();
|
|
61989
62208
|
init_matchers();
|
|
61990
62209
|
init_primitives();
|
|
@@ -61997,23 +62216,23 @@ var init_knowledgeArticlesCreateKnowledgeArticles = __esm(() => {
|
|
|
61997
62216
|
init_async();
|
|
61998
62217
|
});
|
|
61999
62218
|
|
|
62000
|
-
// src/mcp-server/tools/
|
|
62001
|
-
var args105, tool$
|
|
62002
|
-
var
|
|
62003
|
-
|
|
62219
|
+
// src/mcp-server/tools/jobTemplatesCreateJobTemplates.ts
|
|
62220
|
+
var args105, tool$jobTemplatesCreateJobTemplates;
|
|
62221
|
+
var init_jobTemplatesCreateJobTemplates2 = __esm(() => {
|
|
62222
|
+
init_jobTemplatesCreateJobTemplates();
|
|
62004
62223
|
init_components();
|
|
62005
62224
|
init_tools();
|
|
62006
62225
|
args105 = {
|
|
62007
|
-
request:
|
|
62226
|
+
request: JobTemplateInput$inboundSchema
|
|
62008
62227
|
};
|
|
62009
|
-
tool$
|
|
62010
|
-
name: "
|
|
62011
|
-
description: `Create a new
|
|
62228
|
+
tool$jobTemplatesCreateJobTemplates = {
|
|
62229
|
+
name: "job-templates-create-job-templates",
|
|
62230
|
+
description: `Create a new Job Template
|
|
62012
62231
|
|
|
62013
62232
|
|
|
62014
62233
|
|
|
62015
62234
|
#### OAuth Scope
|
|
62016
|
-
This endpoint requires the following OAuth scope **
|
|
62235
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62017
62236
|
|
|
62018
62237
|
|
|
62019
62238
|
|
|
@@ -62023,7 +62242,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62023
62242
|
`,
|
|
62024
62243
|
args: args105,
|
|
62025
62244
|
tool: async (client, args106, ctx) => {
|
|
62026
|
-
const [result2, apiCall] = await
|
|
62245
|
+
const [result2, apiCall] = await jobTemplatesCreateJobTemplates(client, args106.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62027
62246
|
if (!result2.ok) {
|
|
62028
62247
|
return {
|
|
62029
62248
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62036,12 +62255,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62036
62255
|
};
|
|
62037
62256
|
});
|
|
62038
62257
|
|
|
62039
|
-
// src/funcs/
|
|
62040
|
-
function
|
|
62258
|
+
// src/funcs/jobTemplatesDeleteJobTemplates.ts
|
|
62259
|
+
function jobTemplatesDeleteJobTemplates(client, request, options) {
|
|
62041
62260
|
return new APIPromise($do130(client, request, options));
|
|
62042
62261
|
}
|
|
62043
62262
|
async function $do130(client, request, options) {
|
|
62044
|
-
const parsed = safeParse(request, (value) =>
|
|
62263
|
+
const parsed = safeParse(request, (value) => DeleteJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62045
62264
|
if (!parsed.ok) {
|
|
62046
62265
|
return [parsed, { status: "invalid" }];
|
|
62047
62266
|
}
|
|
@@ -62053,7 +62272,7 @@ async function $do130(client, request, options) {
|
|
|
62053
62272
|
charEncoding: "percent"
|
|
62054
62273
|
})
|
|
62055
62274
|
};
|
|
62056
|
-
const path = pathToFunc("/
|
|
62275
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62057
62276
|
const headers = new Headers(compactMap({
|
|
62058
62277
|
Accept: "application/json"
|
|
62059
62278
|
}));
|
|
@@ -62062,7 +62281,7 @@ async function $do130(client, request, options) {
|
|
|
62062
62281
|
const context = {
|
|
62063
62282
|
options: client._options,
|
|
62064
62283
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62065
|
-
operationID: "
|
|
62284
|
+
operationID: "deleteJobTemplates",
|
|
62066
62285
|
oAuth2Scopes: [],
|
|
62067
62286
|
resolvedSecurity: requestSecurity,
|
|
62068
62287
|
securitySource: client._options.security,
|
|
@@ -62105,13 +62324,13 @@ async function $do130(client, request, options) {
|
|
|
62105
62324
|
const responseFields = {
|
|
62106
62325
|
HttpMeta: { Response: response, Request: req }
|
|
62107
62326
|
};
|
|
62108
|
-
const [result2] = await match(json(200,
|
|
62327
|
+
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
62328
|
if (!result2.ok) {
|
|
62110
62329
|
return [result2, { status: "complete", request: req, response }];
|
|
62111
62330
|
}
|
|
62112
62331
|
return [result2, { status: "complete", request: req, response }];
|
|
62113
62332
|
}
|
|
62114
|
-
var
|
|
62333
|
+
var init_jobTemplatesDeleteJobTemplates = __esm(() => {
|
|
62115
62334
|
init_encodings();
|
|
62116
62335
|
init_matchers();
|
|
62117
62336
|
init_primitives();
|
|
@@ -62123,18 +62342,18 @@ var init_knowledgeArticlesDeleteKnowledgeArticles = __esm(() => {
|
|
|
62123
62342
|
init_async();
|
|
62124
62343
|
});
|
|
62125
62344
|
|
|
62126
|
-
// src/mcp-server/tools/
|
|
62127
|
-
var args106, tool$
|
|
62128
|
-
var
|
|
62129
|
-
|
|
62345
|
+
// src/mcp-server/tools/jobTemplatesDeleteJobTemplates.ts
|
|
62346
|
+
var args106, tool$jobTemplatesDeleteJobTemplates;
|
|
62347
|
+
var init_jobTemplatesDeleteJobTemplates2 = __esm(() => {
|
|
62348
|
+
init_jobTemplatesDeleteJobTemplates();
|
|
62130
62349
|
init_operations();
|
|
62131
62350
|
init_tools();
|
|
62132
62351
|
args106 = {
|
|
62133
|
-
request:
|
|
62352
|
+
request: DeleteJobTemplatesRequest$inboundSchema
|
|
62134
62353
|
};
|
|
62135
|
-
tool$
|
|
62136
|
-
name: "
|
|
62137
|
-
description: `Delete a
|
|
62354
|
+
tool$jobTemplatesDeleteJobTemplates = {
|
|
62355
|
+
name: "job-templates-delete-job-templates",
|
|
62356
|
+
description: `Delete a Job Template
|
|
62138
62357
|
|
|
62139
62358
|
|
|
62140
62359
|
|
|
@@ -62143,12 +62362,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
62143
62362
|
|
|
62144
62363
|
|
|
62145
62364
|
#### OAuth Scope
|
|
62146
|
-
This endpoint requires the following OAuth scope **
|
|
62365
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62147
62366
|
|
|
62148
62367
|
`,
|
|
62149
62368
|
args: args106,
|
|
62150
62369
|
tool: async (client, args107, ctx) => {
|
|
62151
|
-
const [result2, apiCall] = await
|
|
62370
|
+
const [result2, apiCall] = await jobTemplatesDeleteJobTemplates(client, args107.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62152
62371
|
if (!result2.ok) {
|
|
62153
62372
|
return {
|
|
62154
62373
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62161,12 +62380,12 @@ This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
|
62161
62380
|
};
|
|
62162
62381
|
});
|
|
62163
62382
|
|
|
62164
|
-
// src/funcs/
|
|
62165
|
-
function
|
|
62383
|
+
// src/funcs/jobTemplatesGetJobTemplates.ts
|
|
62384
|
+
function jobTemplatesGetJobTemplates(client, request, options) {
|
|
62166
62385
|
return new APIPromise($do131(client, request, options));
|
|
62167
62386
|
}
|
|
62168
62387
|
async function $do131(client, request, options) {
|
|
62169
|
-
const parsed = safeParse(request, (value) =>
|
|
62388
|
+
const parsed = safeParse(request, (value) => GetJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62170
62389
|
if (!parsed.ok) {
|
|
62171
62390
|
return [parsed, { status: "invalid" }];
|
|
62172
62391
|
}
|
|
@@ -62178,7 +62397,7 @@ async function $do131(client, request, options) {
|
|
|
62178
62397
|
charEncoding: "percent"
|
|
62179
62398
|
})
|
|
62180
62399
|
};
|
|
62181
|
-
const path = pathToFunc("/
|
|
62400
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62182
62401
|
const headers = new Headers(compactMap({
|
|
62183
62402
|
Accept: "application/json"
|
|
62184
62403
|
}));
|
|
@@ -62187,7 +62406,7 @@ async function $do131(client, request, options) {
|
|
|
62187
62406
|
const context = {
|
|
62188
62407
|
options: client._options,
|
|
62189
62408
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62190
|
-
operationID: "
|
|
62409
|
+
operationID: "getJobTemplates",
|
|
62191
62410
|
oAuth2Scopes: [],
|
|
62192
62411
|
resolvedSecurity: requestSecurity,
|
|
62193
62412
|
securitySource: client._options.security,
|
|
@@ -62230,13 +62449,13 @@ async function $do131(client, request, options) {
|
|
|
62230
62449
|
const responseFields = {
|
|
62231
62450
|
HttpMeta: { Response: response, Request: req }
|
|
62232
62451
|
};
|
|
62233
|
-
const [result2] = await match(json(200,
|
|
62452
|
+
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
62453
|
if (!result2.ok) {
|
|
62235
62454
|
return [result2, { status: "complete", request: req, response }];
|
|
62236
62455
|
}
|
|
62237
62456
|
return [result2, { status: "complete", request: req, response }];
|
|
62238
62457
|
}
|
|
62239
|
-
var
|
|
62458
|
+
var init_jobTemplatesGetJobTemplates = __esm(() => {
|
|
62240
62459
|
init_encodings();
|
|
62241
62460
|
init_matchers();
|
|
62242
62461
|
init_primitives();
|
|
@@ -62248,28 +62467,28 @@ var init_knowledgeArticlesGetKnowledgeArticles = __esm(() => {
|
|
|
62248
62467
|
init_async();
|
|
62249
62468
|
});
|
|
62250
62469
|
|
|
62251
|
-
// src/mcp-server/tools/
|
|
62252
|
-
var args107, tool$
|
|
62253
|
-
var
|
|
62254
|
-
|
|
62470
|
+
// src/mcp-server/tools/jobTemplatesGetJobTemplates.ts
|
|
62471
|
+
var args107, tool$jobTemplatesGetJobTemplates;
|
|
62472
|
+
var init_jobTemplatesGetJobTemplates2 = __esm(() => {
|
|
62473
|
+
init_jobTemplatesGetJobTemplates();
|
|
62255
62474
|
init_operations();
|
|
62256
62475
|
init_tools();
|
|
62257
62476
|
args107 = {
|
|
62258
|
-
request:
|
|
62477
|
+
request: GetJobTemplatesRequest$inboundSchema
|
|
62259
62478
|
};
|
|
62260
|
-
tool$
|
|
62261
|
-
name: "
|
|
62262
|
-
description: `Retrieve a
|
|
62479
|
+
tool$jobTemplatesGetJobTemplates = {
|
|
62480
|
+
name: "job-templates-get-job-templates",
|
|
62481
|
+
description: `Retrieve a Job Template
|
|
62263
62482
|
|
|
62264
62483
|
|
|
62265
62484
|
|
|
62266
62485
|
#### OAuth Scope
|
|
62267
|
-
This endpoint requires the following OAuth scope **
|
|
62486
|
+
This endpoint requires the following OAuth scope **read_jobs**.
|
|
62268
62487
|
|
|
62269
62488
|
`,
|
|
62270
62489
|
args: args107,
|
|
62271
62490
|
tool: async (client, args108, ctx) => {
|
|
62272
|
-
const [result2, apiCall] = await
|
|
62491
|
+
const [result2, apiCall] = await jobTemplatesGetJobTemplates(client, args108.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62273
62492
|
if (!result2.ok) {
|
|
62274
62493
|
return {
|
|
62275
62494
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62282,12 +62501,12 @@ This endpoint requires the following OAuth scope **read_knowledge**.
|
|
|
62282
62501
|
};
|
|
62283
62502
|
});
|
|
62284
62503
|
|
|
62285
|
-
// src/funcs/
|
|
62286
|
-
function
|
|
62504
|
+
// src/funcs/jobTemplatesListJobTemplates.ts
|
|
62505
|
+
function jobTemplatesListJobTemplates(client, options) {
|
|
62287
62506
|
return new APIPromise($do132(client, options));
|
|
62288
62507
|
}
|
|
62289
62508
|
async function $do132(client, options) {
|
|
62290
|
-
const path = pathToFunc("/
|
|
62509
|
+
const path = pathToFunc("/jobtemplate.json")();
|
|
62291
62510
|
const headers = new Headers(compactMap({
|
|
62292
62511
|
Accept: "application/json"
|
|
62293
62512
|
}));
|
|
@@ -62296,7 +62515,7 @@ async function $do132(client, options) {
|
|
|
62296
62515
|
const context = {
|
|
62297
62516
|
options: client._options,
|
|
62298
62517
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62299
|
-
operationID: "
|
|
62518
|
+
operationID: "listJobTemplates",
|
|
62300
62519
|
oAuth2Scopes: [],
|
|
62301
62520
|
resolvedSecurity: requestSecurity,
|
|
62302
62521
|
securitySource: client._options.security,
|
|
@@ -62338,13 +62557,13 @@ async function $do132(client, options) {
|
|
|
62338
62557
|
const responseFields = {
|
|
62339
62558
|
HttpMeta: { Response: response, Request: req }
|
|
62340
62559
|
};
|
|
62341
|
-
const [result2] = await match(json(200,
|
|
62560
|
+
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
62561
|
if (!result2.ok) {
|
|
62343
62562
|
return [result2, { status: "complete", request: req, response }];
|
|
62344
62563
|
}
|
|
62345
62564
|
return [result2, { status: "complete", request: req, response }];
|
|
62346
62565
|
}
|
|
62347
|
-
var
|
|
62566
|
+
var init_jobTemplatesListJobTemplates = __esm(() => {
|
|
62348
62567
|
init_matchers();
|
|
62349
62568
|
init_primitives();
|
|
62350
62569
|
init_security();
|
|
@@ -62354,14 +62573,14 @@ var init_knowledgeArticlesListKnowledgeArticles = __esm(() => {
|
|
|
62354
62573
|
init_async();
|
|
62355
62574
|
});
|
|
62356
62575
|
|
|
62357
|
-
// src/mcp-server/tools/
|
|
62358
|
-
var tool$
|
|
62359
|
-
var
|
|
62360
|
-
|
|
62576
|
+
// src/mcp-server/tools/jobTemplatesListJobTemplates.ts
|
|
62577
|
+
var tool$jobTemplatesListJobTemplates;
|
|
62578
|
+
var init_jobTemplatesListJobTemplates2 = __esm(() => {
|
|
62579
|
+
init_jobTemplatesListJobTemplates();
|
|
62361
62580
|
init_tools();
|
|
62362
|
-
tool$
|
|
62363
|
-
name: "
|
|
62364
|
-
description: `List all
|
|
62581
|
+
tool$jobTemplatesListJobTemplates = {
|
|
62582
|
+
name: "job-templates-list-job-templates",
|
|
62583
|
+
description: `List all Job Templates
|
|
62365
62584
|
|
|
62366
62585
|
|
|
62367
62586
|
|
|
@@ -62370,11 +62589,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
62370
62589
|
|
|
62371
62590
|
|
|
62372
62591
|
#### OAuth Scope
|
|
62373
|
-
This endpoint requires the following OAuth scope **
|
|
62592
|
+
This endpoint requires the following OAuth scope **read_jobs**.
|
|
62374
62593
|
|
|
62375
62594
|
`,
|
|
62376
62595
|
tool: async (client, ctx) => {
|
|
62377
|
-
const [result2, apiCall] = await
|
|
62596
|
+
const [result2, apiCall] = await jobTemplatesListJobTemplates(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62378
62597
|
if (!result2.ok) {
|
|
62379
62598
|
return {
|
|
62380
62599
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62387,24 +62606,24 @@ This endpoint requires the following OAuth scope **read_knowledge**.
|
|
|
62387
62606
|
};
|
|
62388
62607
|
});
|
|
62389
62608
|
|
|
62390
|
-
// src/funcs/
|
|
62391
|
-
function
|
|
62609
|
+
// src/funcs/jobTemplatesUpdateJobTemplates.ts
|
|
62610
|
+
function jobTemplatesUpdateJobTemplates(client, request, options) {
|
|
62392
62611
|
return new APIPromise($do133(client, request, options));
|
|
62393
62612
|
}
|
|
62394
62613
|
async function $do133(client, request, options) {
|
|
62395
|
-
const parsed = safeParse(request, (value) =>
|
|
62614
|
+
const parsed = safeParse(request, (value) => UpdateJobTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62396
62615
|
if (!parsed.ok) {
|
|
62397
62616
|
return [parsed, { status: "invalid" }];
|
|
62398
62617
|
}
|
|
62399
62618
|
const payload = parsed.value;
|
|
62400
|
-
const body = encodeJSON("body", payload.
|
|
62619
|
+
const body = encodeJSON("body", payload.JobTemplate, { explode: true });
|
|
62401
62620
|
const pathParams = {
|
|
62402
62621
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
62403
62622
|
explode: false,
|
|
62404
62623
|
charEncoding: "percent"
|
|
62405
62624
|
})
|
|
62406
62625
|
};
|
|
62407
|
-
const path = pathToFunc("/
|
|
62626
|
+
const path = pathToFunc("/jobtemplate/{uuid}.json")(pathParams);
|
|
62408
62627
|
const headers = new Headers(compactMap({
|
|
62409
62628
|
"Content-Type": "application/json",
|
|
62410
62629
|
Accept: "application/json"
|
|
@@ -62414,7 +62633,7 @@ async function $do133(client, request, options) {
|
|
|
62414
62633
|
const context = {
|
|
62415
62634
|
options: client._options,
|
|
62416
62635
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62417
|
-
operationID: "
|
|
62636
|
+
operationID: "updateJobTemplates",
|
|
62418
62637
|
oAuth2Scopes: [],
|
|
62419
62638
|
resolvedSecurity: requestSecurity,
|
|
62420
62639
|
securitySource: client._options.security,
|
|
@@ -62457,13 +62676,13 @@ async function $do133(client, request, options) {
|
|
|
62457
62676
|
const responseFields = {
|
|
62458
62677
|
HttpMeta: { Response: response, Request: req }
|
|
62459
62678
|
};
|
|
62460
|
-
const [result2] = await match(json(200,
|
|
62679
|
+
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
62680
|
if (!result2.ok) {
|
|
62462
62681
|
return [result2, { status: "complete", request: req, response }];
|
|
62463
62682
|
}
|
|
62464
62683
|
return [result2, { status: "complete", request: req, response }];
|
|
62465
62684
|
}
|
|
62466
|
-
var
|
|
62685
|
+
var init_jobTemplatesUpdateJobTemplates = __esm(() => {
|
|
62467
62686
|
init_encodings();
|
|
62468
62687
|
init_matchers();
|
|
62469
62688
|
init_primitives();
|
|
@@ -62475,28 +62694,28 @@ var init_knowledgeArticlesUpdateKnowledgeArticles = __esm(() => {
|
|
|
62475
62694
|
init_async();
|
|
62476
62695
|
});
|
|
62477
62696
|
|
|
62478
|
-
// src/mcp-server/tools/
|
|
62479
|
-
var args108, tool$
|
|
62480
|
-
var
|
|
62481
|
-
|
|
62697
|
+
// src/mcp-server/tools/jobTemplatesUpdateJobTemplates.ts
|
|
62698
|
+
var args108, tool$jobTemplatesUpdateJobTemplates;
|
|
62699
|
+
var init_jobTemplatesUpdateJobTemplates2 = __esm(() => {
|
|
62700
|
+
init_jobTemplatesUpdateJobTemplates();
|
|
62482
62701
|
init_operations();
|
|
62483
62702
|
init_tools();
|
|
62484
62703
|
args108 = {
|
|
62485
|
-
request:
|
|
62704
|
+
request: UpdateJobTemplatesRequest$inboundSchema
|
|
62486
62705
|
};
|
|
62487
|
-
tool$
|
|
62488
|
-
name: "
|
|
62489
|
-
description: `Update a
|
|
62706
|
+
tool$jobTemplatesUpdateJobTemplates = {
|
|
62707
|
+
name: "job-templates-update-job-templates",
|
|
62708
|
+
description: `Update a Job Template
|
|
62490
62709
|
|
|
62491
62710
|
|
|
62492
62711
|
|
|
62493
62712
|
#### OAuth Scope
|
|
62494
|
-
This endpoint requires the following OAuth scope **
|
|
62713
|
+
This endpoint requires the following OAuth scope **manage_jobs**.
|
|
62495
62714
|
|
|
62496
62715
|
`,
|
|
62497
62716
|
args: args108,
|
|
62498
62717
|
tool: async (client, args109, ctx) => {
|
|
62499
|
-
const [result2, apiCall] = await
|
|
62718
|
+
const [result2, apiCall] = await jobTemplatesUpdateJobTemplates(client, args109.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62500
62719
|
if (!result2.ok) {
|
|
62501
62720
|
return {
|
|
62502
62721
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62509,18 +62728,18 @@ This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
|
62509
62728
|
};
|
|
62510
62729
|
});
|
|
62511
62730
|
|
|
62512
|
-
// src/funcs/
|
|
62513
|
-
function
|
|
62731
|
+
// src/funcs/knowledgeArticlesCreateKnowledgeArticles.ts
|
|
62732
|
+
function knowledgeArticlesCreateKnowledgeArticles(client, request, options) {
|
|
62514
62733
|
return new APIPromise($do134(client, request, options));
|
|
62515
62734
|
}
|
|
62516
62735
|
async function $do134(client, request, options) {
|
|
62517
|
-
const parsed = safeParse(request, (value) =>
|
|
62736
|
+
const parsed = safeParse(request, (value) => KnowledgeArticleInput$outboundSchema.parse(value), "Input validation failed");
|
|
62518
62737
|
if (!parsed.ok) {
|
|
62519
62738
|
return [parsed, { status: "invalid" }];
|
|
62520
62739
|
}
|
|
62521
62740
|
const payload = parsed.value;
|
|
62522
62741
|
const body = encodeJSON("body", payload, { explode: true });
|
|
62523
|
-
const path = pathToFunc("/
|
|
62742
|
+
const path = pathToFunc("/knowledgearticle.json")();
|
|
62524
62743
|
const headers = new Headers(compactMap({
|
|
62525
62744
|
"Content-Type": "application/json",
|
|
62526
62745
|
Accept: "application/json"
|
|
@@ -62530,7 +62749,7 @@ async function $do134(client, request, options) {
|
|
|
62530
62749
|
const context = {
|
|
62531
62750
|
options: client._options,
|
|
62532
62751
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62533
|
-
operationID: "
|
|
62752
|
+
operationID: "createKnowledgeArticles",
|
|
62534
62753
|
oAuth2Scopes: [],
|
|
62535
62754
|
resolvedSecurity: requestSecurity,
|
|
62536
62755
|
securitySource: client._options.security,
|
|
@@ -62573,18 +62792,16 @@ async function $do134(client, request, options) {
|
|
|
62573
62792
|
const responseFields = {
|
|
62574
62793
|
HttpMeta: { Response: response, Request: req }
|
|
62575
62794
|
};
|
|
62576
|
-
const [result2] = await match(json(200,
|
|
62795
|
+
const [result2] = await match(json(200, CreateKnowledgeArticlesResponse$inboundSchema, {
|
|
62577
62796
|
hdrs: true,
|
|
62578
62797
|
key: "Result"
|
|
62579
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
62580
|
-
key: "Result"
|
|
62581
|
-
}))(response, req, { extraFields: responseFields });
|
|
62798
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateKnowledgeArticlesResponse$inboundSchema, { key: "Result" }))(response, req, { extraFields: responseFields });
|
|
62582
62799
|
if (!result2.ok) {
|
|
62583
62800
|
return [result2, { status: "complete", request: req, response }];
|
|
62584
62801
|
}
|
|
62585
62802
|
return [result2, { status: "complete", request: req, response }];
|
|
62586
62803
|
}
|
|
62587
|
-
var
|
|
62804
|
+
var init_knowledgeArticlesCreateKnowledgeArticles = __esm(() => {
|
|
62588
62805
|
init_encodings();
|
|
62589
62806
|
init_matchers();
|
|
62590
62807
|
init_primitives();
|
|
@@ -62597,23 +62814,23 @@ var init_locationsCreateLocations = __esm(() => {
|
|
|
62597
62814
|
init_async();
|
|
62598
62815
|
});
|
|
62599
62816
|
|
|
62600
|
-
// src/mcp-server/tools/
|
|
62601
|
-
var args109, tool$
|
|
62602
|
-
var
|
|
62603
|
-
|
|
62817
|
+
// src/mcp-server/tools/knowledgeArticlesCreateKnowledgeArticles.ts
|
|
62818
|
+
var args109, tool$knowledgeArticlesCreateKnowledgeArticles;
|
|
62819
|
+
var init_knowledgeArticlesCreateKnowledgeArticles2 = __esm(() => {
|
|
62820
|
+
init_knowledgeArticlesCreateKnowledgeArticles();
|
|
62604
62821
|
init_components();
|
|
62605
62822
|
init_tools();
|
|
62606
62823
|
args109 = {
|
|
62607
|
-
request:
|
|
62824
|
+
request: KnowledgeArticleInput$inboundSchema
|
|
62608
62825
|
};
|
|
62609
|
-
tool$
|
|
62610
|
-
name: "
|
|
62611
|
-
description: `Create a new
|
|
62826
|
+
tool$knowledgeArticlesCreateKnowledgeArticles = {
|
|
62827
|
+
name: "knowledge-articles-create-knowledge-articles",
|
|
62828
|
+
description: `Create a new Knowledge Article
|
|
62612
62829
|
|
|
62613
62830
|
|
|
62614
62831
|
|
|
62615
62832
|
#### OAuth Scope
|
|
62616
|
-
This endpoint requires the following OAuth scope **
|
|
62833
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
62617
62834
|
|
|
62618
62835
|
|
|
62619
62836
|
|
|
@@ -62623,7 +62840,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62623
62840
|
`,
|
|
62624
62841
|
args: args109,
|
|
62625
62842
|
tool: async (client, args110, ctx) => {
|
|
62626
|
-
const [result2, apiCall] = await
|
|
62843
|
+
const [result2, apiCall] = await knowledgeArticlesCreateKnowledgeArticles(client, args110.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62627
62844
|
if (!result2.ok) {
|
|
62628
62845
|
return {
|
|
62629
62846
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62636,12 +62853,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
62636
62853
|
};
|
|
62637
62854
|
});
|
|
62638
62855
|
|
|
62639
|
-
// src/funcs/
|
|
62640
|
-
function
|
|
62856
|
+
// src/funcs/knowledgeArticlesDeleteKnowledgeArticles.ts
|
|
62857
|
+
function knowledgeArticlesDeleteKnowledgeArticles(client, request, options) {
|
|
62641
62858
|
return new APIPromise($do135(client, request, options));
|
|
62642
62859
|
}
|
|
62643
62860
|
async function $do135(client, request, options) {
|
|
62644
|
-
const parsed = safeParse(request, (value) =>
|
|
62861
|
+
const parsed = safeParse(request, (value) => DeleteKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62645
62862
|
if (!parsed.ok) {
|
|
62646
62863
|
return [parsed, { status: "invalid" }];
|
|
62647
62864
|
}
|
|
@@ -62653,7 +62870,7 @@ async function $do135(client, request, options) {
|
|
|
62653
62870
|
charEncoding: "percent"
|
|
62654
62871
|
})
|
|
62655
62872
|
};
|
|
62656
|
-
const path = pathToFunc("/
|
|
62873
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
62657
62874
|
const headers = new Headers(compactMap({
|
|
62658
62875
|
Accept: "application/json"
|
|
62659
62876
|
}));
|
|
@@ -62662,7 +62879,7 @@ async function $do135(client, request, options) {
|
|
|
62662
62879
|
const context = {
|
|
62663
62880
|
options: client._options,
|
|
62664
62881
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62665
|
-
operationID: "
|
|
62882
|
+
operationID: "deleteKnowledgeArticles",
|
|
62666
62883
|
oAuth2Scopes: [],
|
|
62667
62884
|
resolvedSecurity: requestSecurity,
|
|
62668
62885
|
securitySource: client._options.security,
|
|
@@ -62705,13 +62922,13 @@ async function $do135(client, request, options) {
|
|
|
62705
62922
|
const responseFields = {
|
|
62706
62923
|
HttpMeta: { Response: response, Request: req }
|
|
62707
62924
|
};
|
|
62708
|
-
const [result2] = await match(json(200,
|
|
62925
|
+
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
62926
|
if (!result2.ok) {
|
|
62710
62927
|
return [result2, { status: "complete", request: req, response }];
|
|
62711
62928
|
}
|
|
62712
62929
|
return [result2, { status: "complete", request: req, response }];
|
|
62713
62930
|
}
|
|
62714
|
-
var
|
|
62931
|
+
var init_knowledgeArticlesDeleteKnowledgeArticles = __esm(() => {
|
|
62715
62932
|
init_encodings();
|
|
62716
62933
|
init_matchers();
|
|
62717
62934
|
init_primitives();
|
|
@@ -62723,18 +62940,18 @@ var init_locationsDeleteLocations = __esm(() => {
|
|
|
62723
62940
|
init_async();
|
|
62724
62941
|
});
|
|
62725
62942
|
|
|
62726
|
-
// src/mcp-server/tools/
|
|
62727
|
-
var args110, tool$
|
|
62728
|
-
var
|
|
62729
|
-
|
|
62943
|
+
// src/mcp-server/tools/knowledgeArticlesDeleteKnowledgeArticles.ts
|
|
62944
|
+
var args110, tool$knowledgeArticlesDeleteKnowledgeArticles;
|
|
62945
|
+
var init_knowledgeArticlesDeleteKnowledgeArticles2 = __esm(() => {
|
|
62946
|
+
init_knowledgeArticlesDeleteKnowledgeArticles();
|
|
62730
62947
|
init_operations();
|
|
62731
62948
|
init_tools();
|
|
62732
62949
|
args110 = {
|
|
62733
|
-
request:
|
|
62950
|
+
request: DeleteKnowledgeArticlesRequest$inboundSchema
|
|
62734
62951
|
};
|
|
62735
|
-
tool$
|
|
62736
|
-
name: "
|
|
62737
|
-
description: `Delete a
|
|
62952
|
+
tool$knowledgeArticlesDeleteKnowledgeArticles = {
|
|
62953
|
+
name: "knowledge-articles-delete-knowledge-articles",
|
|
62954
|
+
description: `Delete a Knowledge Article
|
|
62738
62955
|
|
|
62739
62956
|
|
|
62740
62957
|
|
|
@@ -62743,12 +62960,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
62743
62960
|
|
|
62744
62961
|
|
|
62745
62962
|
#### OAuth Scope
|
|
62746
|
-
This endpoint requires the following OAuth scope **
|
|
62963
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
62747
62964
|
|
|
62748
62965
|
`,
|
|
62749
62966
|
args: args110,
|
|
62750
62967
|
tool: async (client, args111, ctx) => {
|
|
62751
|
-
const [result2, apiCall] = await
|
|
62968
|
+
const [result2, apiCall] = await knowledgeArticlesDeleteKnowledgeArticles(client, args111.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62752
62969
|
if (!result2.ok) {
|
|
62753
62970
|
return {
|
|
62754
62971
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62761,12 +62978,12 @@ This endpoint requires the following OAuth scope **manage_locations**.
|
|
|
62761
62978
|
};
|
|
62762
62979
|
});
|
|
62763
62980
|
|
|
62764
|
-
// src/funcs/
|
|
62765
|
-
function
|
|
62981
|
+
// src/funcs/knowledgeArticlesGetKnowledgeArticles.ts
|
|
62982
|
+
function knowledgeArticlesGetKnowledgeArticles(client, request, options) {
|
|
62766
62983
|
return new APIPromise($do136(client, request, options));
|
|
62767
62984
|
}
|
|
62768
62985
|
async function $do136(client, request, options) {
|
|
62769
|
-
const parsed = safeParse(request, (value) =>
|
|
62986
|
+
const parsed = safeParse(request, (value) => GetKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62770
62987
|
if (!parsed.ok) {
|
|
62771
62988
|
return [parsed, { status: "invalid" }];
|
|
62772
62989
|
}
|
|
@@ -62778,7 +62995,7 @@ async function $do136(client, request, options) {
|
|
|
62778
62995
|
charEncoding: "percent"
|
|
62779
62996
|
})
|
|
62780
62997
|
};
|
|
62781
|
-
const path = pathToFunc("/
|
|
62998
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
62782
62999
|
const headers = new Headers(compactMap({
|
|
62783
63000
|
Accept: "application/json"
|
|
62784
63001
|
}));
|
|
@@ -62787,7 +63004,7 @@ async function $do136(client, request, options) {
|
|
|
62787
63004
|
const context = {
|
|
62788
63005
|
options: client._options,
|
|
62789
63006
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62790
|
-
operationID: "
|
|
63007
|
+
operationID: "getKnowledgeArticles",
|
|
62791
63008
|
oAuth2Scopes: [],
|
|
62792
63009
|
resolvedSecurity: requestSecurity,
|
|
62793
63010
|
securitySource: client._options.security,
|
|
@@ -62830,13 +63047,13 @@ async function $do136(client, request, options) {
|
|
|
62830
63047
|
const responseFields = {
|
|
62831
63048
|
HttpMeta: { Response: response, Request: req }
|
|
62832
63049
|
};
|
|
62833
|
-
const [result2] = await match(json(200,
|
|
63050
|
+
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
63051
|
if (!result2.ok) {
|
|
62835
63052
|
return [result2, { status: "complete", request: req, response }];
|
|
62836
63053
|
}
|
|
62837
63054
|
return [result2, { status: "complete", request: req, response }];
|
|
62838
63055
|
}
|
|
62839
|
-
var
|
|
63056
|
+
var init_knowledgeArticlesGetKnowledgeArticles = __esm(() => {
|
|
62840
63057
|
init_encodings();
|
|
62841
63058
|
init_matchers();
|
|
62842
63059
|
init_primitives();
|
|
@@ -62848,28 +63065,28 @@ var init_locationsGetLocations = __esm(() => {
|
|
|
62848
63065
|
init_async();
|
|
62849
63066
|
});
|
|
62850
63067
|
|
|
62851
|
-
// src/mcp-server/tools/
|
|
62852
|
-
var args111, tool$
|
|
62853
|
-
var
|
|
62854
|
-
|
|
63068
|
+
// src/mcp-server/tools/knowledgeArticlesGetKnowledgeArticles.ts
|
|
63069
|
+
var args111, tool$knowledgeArticlesGetKnowledgeArticles;
|
|
63070
|
+
var init_knowledgeArticlesGetKnowledgeArticles2 = __esm(() => {
|
|
63071
|
+
init_knowledgeArticlesGetKnowledgeArticles();
|
|
62855
63072
|
init_operations();
|
|
62856
63073
|
init_tools();
|
|
62857
63074
|
args111 = {
|
|
62858
|
-
request:
|
|
63075
|
+
request: GetKnowledgeArticlesRequest$inboundSchema
|
|
62859
63076
|
};
|
|
62860
|
-
tool$
|
|
62861
|
-
name: "
|
|
62862
|
-
description: `Retrieve a
|
|
63077
|
+
tool$knowledgeArticlesGetKnowledgeArticles = {
|
|
63078
|
+
name: "knowledge-articles-get-knowledge-articles",
|
|
63079
|
+
description: `Retrieve a Knowledge Article
|
|
62863
63080
|
|
|
62864
63081
|
|
|
62865
63082
|
|
|
62866
63083
|
#### OAuth Scope
|
|
62867
|
-
This endpoint requires the following OAuth scope **
|
|
63084
|
+
This endpoint requires the following OAuth scope **read_knowledge**.
|
|
62868
63085
|
|
|
62869
63086
|
`,
|
|
62870
63087
|
args: args111,
|
|
62871
63088
|
tool: async (client, args112, ctx) => {
|
|
62872
|
-
const [result2, apiCall] = await
|
|
63089
|
+
const [result2, apiCall] = await knowledgeArticlesGetKnowledgeArticles(client, args112.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62873
63090
|
if (!result2.ok) {
|
|
62874
63091
|
return {
|
|
62875
63092
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62882,12 +63099,12 @@ This endpoint requires the following OAuth scope **read_locations**.
|
|
|
62882
63099
|
};
|
|
62883
63100
|
});
|
|
62884
63101
|
|
|
62885
|
-
// src/funcs/
|
|
62886
|
-
function
|
|
63102
|
+
// src/funcs/knowledgeArticlesListKnowledgeArticles.ts
|
|
63103
|
+
function knowledgeArticlesListKnowledgeArticles(client, options) {
|
|
62887
63104
|
return new APIPromise($do137(client, options));
|
|
62888
63105
|
}
|
|
62889
63106
|
async function $do137(client, options) {
|
|
62890
|
-
const path = pathToFunc("/
|
|
63107
|
+
const path = pathToFunc("/knowledgearticle.json")();
|
|
62891
63108
|
const headers = new Headers(compactMap({
|
|
62892
63109
|
Accept: "application/json"
|
|
62893
63110
|
}));
|
|
@@ -62896,7 +63113,7 @@ async function $do137(client, options) {
|
|
|
62896
63113
|
const context = {
|
|
62897
63114
|
options: client._options,
|
|
62898
63115
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
62899
|
-
operationID: "
|
|
63116
|
+
operationID: "listKnowledgeArticles",
|
|
62900
63117
|
oAuth2Scopes: [],
|
|
62901
63118
|
resolvedSecurity: requestSecurity,
|
|
62902
63119
|
securitySource: client._options.security,
|
|
@@ -62938,13 +63155,13 @@ async function $do137(client, options) {
|
|
|
62938
63155
|
const responseFields = {
|
|
62939
63156
|
HttpMeta: { Response: response, Request: req }
|
|
62940
63157
|
};
|
|
62941
|
-
const [result2] = await match(json(200,
|
|
63158
|
+
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
63159
|
if (!result2.ok) {
|
|
62943
63160
|
return [result2, { status: "complete", request: req, response }];
|
|
62944
63161
|
}
|
|
62945
63162
|
return [result2, { status: "complete", request: req, response }];
|
|
62946
63163
|
}
|
|
62947
|
-
var
|
|
63164
|
+
var init_knowledgeArticlesListKnowledgeArticles = __esm(() => {
|
|
62948
63165
|
init_matchers();
|
|
62949
63166
|
init_primitives();
|
|
62950
63167
|
init_security();
|
|
@@ -62954,14 +63171,14 @@ var init_locationsListLocations = __esm(() => {
|
|
|
62954
63171
|
init_async();
|
|
62955
63172
|
});
|
|
62956
63173
|
|
|
62957
|
-
// src/mcp-server/tools/
|
|
62958
|
-
var tool$
|
|
62959
|
-
var
|
|
62960
|
-
|
|
63174
|
+
// src/mcp-server/tools/knowledgeArticlesListKnowledgeArticles.ts
|
|
63175
|
+
var tool$knowledgeArticlesListKnowledgeArticles;
|
|
63176
|
+
var init_knowledgeArticlesListKnowledgeArticles2 = __esm(() => {
|
|
63177
|
+
init_knowledgeArticlesListKnowledgeArticles();
|
|
62961
63178
|
init_tools();
|
|
62962
|
-
tool$
|
|
62963
|
-
name: "
|
|
62964
|
-
description: `List all
|
|
63179
|
+
tool$knowledgeArticlesListKnowledgeArticles = {
|
|
63180
|
+
name: "knowledge-articles-list-knowledge-articles",
|
|
63181
|
+
description: `List all Knowledge Articles
|
|
62965
63182
|
|
|
62966
63183
|
|
|
62967
63184
|
|
|
@@ -62970,11 +63187,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
62970
63187
|
|
|
62971
63188
|
|
|
62972
63189
|
#### OAuth Scope
|
|
62973
|
-
This endpoint requires the following OAuth scope **
|
|
63190
|
+
This endpoint requires the following OAuth scope **read_knowledge**.
|
|
62974
63191
|
|
|
62975
63192
|
`,
|
|
62976
63193
|
tool: async (client, ctx) => {
|
|
62977
|
-
const [result2, apiCall] = await
|
|
63194
|
+
const [result2, apiCall] = await knowledgeArticlesListKnowledgeArticles(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
62978
63195
|
if (!result2.ok) {
|
|
62979
63196
|
return {
|
|
62980
63197
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -62987,24 +63204,24 @@ This endpoint requires the following OAuth scope **read_locations**.
|
|
|
62987
63204
|
};
|
|
62988
63205
|
});
|
|
62989
63206
|
|
|
62990
|
-
// src/funcs/
|
|
62991
|
-
function
|
|
63207
|
+
// src/funcs/knowledgeArticlesUpdateKnowledgeArticles.ts
|
|
63208
|
+
function knowledgeArticlesUpdateKnowledgeArticles(client, request, options) {
|
|
62992
63209
|
return new APIPromise($do138(client, request, options));
|
|
62993
63210
|
}
|
|
62994
63211
|
async function $do138(client, request, options) {
|
|
62995
|
-
const parsed = safeParse(request, (value) =>
|
|
63212
|
+
const parsed = safeParse(request, (value) => UpdateKnowledgeArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
62996
63213
|
if (!parsed.ok) {
|
|
62997
63214
|
return [parsed, { status: "invalid" }];
|
|
62998
63215
|
}
|
|
62999
63216
|
const payload = parsed.value;
|
|
63000
|
-
const body = encodeJSON("body", payload.
|
|
63217
|
+
const body = encodeJSON("body", payload.KnowledgeArticle, { explode: true });
|
|
63001
63218
|
const pathParams = {
|
|
63002
63219
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
63003
63220
|
explode: false,
|
|
63004
63221
|
charEncoding: "percent"
|
|
63005
63222
|
})
|
|
63006
63223
|
};
|
|
63007
|
-
const path = pathToFunc("/
|
|
63224
|
+
const path = pathToFunc("/knowledgearticle/{uuid}.json")(pathParams);
|
|
63008
63225
|
const headers = new Headers(compactMap({
|
|
63009
63226
|
"Content-Type": "application/json",
|
|
63010
63227
|
Accept: "application/json"
|
|
@@ -63014,7 +63231,7 @@ async function $do138(client, request, options) {
|
|
|
63014
63231
|
const context = {
|
|
63015
63232
|
options: client._options,
|
|
63016
63233
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63017
|
-
operationID: "
|
|
63234
|
+
operationID: "updateKnowledgeArticles",
|
|
63018
63235
|
oAuth2Scopes: [],
|
|
63019
63236
|
resolvedSecurity: requestSecurity,
|
|
63020
63237
|
securitySource: client._options.security,
|
|
@@ -63057,13 +63274,13 @@ async function $do138(client, request, options) {
|
|
|
63057
63274
|
const responseFields = {
|
|
63058
63275
|
HttpMeta: { Response: response, Request: req }
|
|
63059
63276
|
};
|
|
63060
|
-
const [result2] = await match(json(200,
|
|
63277
|
+
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
63278
|
if (!result2.ok) {
|
|
63062
63279
|
return [result2, { status: "complete", request: req, response }];
|
|
63063
63280
|
}
|
|
63064
63281
|
return [result2, { status: "complete", request: req, response }];
|
|
63065
63282
|
}
|
|
63066
|
-
var
|
|
63283
|
+
var init_knowledgeArticlesUpdateKnowledgeArticles = __esm(() => {
|
|
63067
63284
|
init_encodings();
|
|
63068
63285
|
init_matchers();
|
|
63069
63286
|
init_primitives();
|
|
@@ -63075,28 +63292,28 @@ var init_locationsUpdateLocations = __esm(() => {
|
|
|
63075
63292
|
init_async();
|
|
63076
63293
|
});
|
|
63077
63294
|
|
|
63078
|
-
// src/mcp-server/tools/
|
|
63079
|
-
var args112, tool$
|
|
63080
|
-
var
|
|
63081
|
-
|
|
63295
|
+
// src/mcp-server/tools/knowledgeArticlesUpdateKnowledgeArticles.ts
|
|
63296
|
+
var args112, tool$knowledgeArticlesUpdateKnowledgeArticles;
|
|
63297
|
+
var init_knowledgeArticlesUpdateKnowledgeArticles2 = __esm(() => {
|
|
63298
|
+
init_knowledgeArticlesUpdateKnowledgeArticles();
|
|
63082
63299
|
init_operations();
|
|
63083
63300
|
init_tools();
|
|
63084
63301
|
args112 = {
|
|
63085
|
-
request:
|
|
63302
|
+
request: UpdateKnowledgeArticlesRequest$inboundSchema
|
|
63086
63303
|
};
|
|
63087
|
-
tool$
|
|
63088
|
-
name: "
|
|
63089
|
-
description: `Update a
|
|
63304
|
+
tool$knowledgeArticlesUpdateKnowledgeArticles = {
|
|
63305
|
+
name: "knowledge-articles-update-knowledge-articles",
|
|
63306
|
+
description: `Update a Knowledge Article
|
|
63090
63307
|
|
|
63091
63308
|
|
|
63092
63309
|
|
|
63093
63310
|
#### OAuth Scope
|
|
63094
|
-
This endpoint requires the following OAuth scope **
|
|
63311
|
+
This endpoint requires the following OAuth scope **manage_knowledge**.
|
|
63095
63312
|
|
|
63096
63313
|
`,
|
|
63097
63314
|
args: args112,
|
|
63098
63315
|
tool: async (client, args113, ctx) => {
|
|
63099
|
-
const [result2, apiCall] = await
|
|
63316
|
+
const [result2, apiCall] = await knowledgeArticlesUpdateKnowledgeArticles(client, args113.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63100
63317
|
if (!result2.ok) {
|
|
63101
63318
|
return {
|
|
63102
63319
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63109,18 +63326,18 @@ This endpoint requires the following OAuth scope **manage_locations**.
|
|
|
63109
63326
|
};
|
|
63110
63327
|
});
|
|
63111
63328
|
|
|
63112
|
-
// src/funcs/
|
|
63113
|
-
function
|
|
63329
|
+
// src/funcs/locationsCreateLocations.ts
|
|
63330
|
+
function locationsCreateLocations(client, request, options) {
|
|
63114
63331
|
return new APIPromise($do139(client, request, options));
|
|
63115
63332
|
}
|
|
63116
63333
|
async function $do139(client, request, options) {
|
|
63117
|
-
const parsed = safeParse(request, (value) =>
|
|
63334
|
+
const parsed = safeParse(request, (value) => LocationInput$outboundSchema.parse(value), "Input validation failed");
|
|
63118
63335
|
if (!parsed.ok) {
|
|
63119
63336
|
return [parsed, { status: "invalid" }];
|
|
63120
63337
|
}
|
|
63121
63338
|
const payload = parsed.value;
|
|
63122
63339
|
const body = encodeJSON("body", payload, { explode: true });
|
|
63123
|
-
const path = pathToFunc("/
|
|
63340
|
+
const path = pathToFunc("/location.json")();
|
|
63124
63341
|
const headers = new Headers(compactMap({
|
|
63125
63342
|
"Content-Type": "application/json",
|
|
63126
63343
|
Accept: "application/json"
|
|
@@ -63130,7 +63347,7 @@ async function $do139(client, request, options) {
|
|
|
63130
63347
|
const context = {
|
|
63131
63348
|
options: client._options,
|
|
63132
63349
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63133
|
-
operationID: "
|
|
63350
|
+
operationID: "createLocations",
|
|
63134
63351
|
oAuth2Scopes: [],
|
|
63135
63352
|
resolvedSecurity: requestSecurity,
|
|
63136
63353
|
securitySource: client._options.security,
|
|
@@ -63173,10 +63390,10 @@ async function $do139(client, request, options) {
|
|
|
63173
63390
|
const responseFields = {
|
|
63174
63391
|
HttpMeta: { Response: response, Request: req }
|
|
63175
63392
|
};
|
|
63176
|
-
const [result2] = await match(json(200,
|
|
63393
|
+
const [result2] = await match(json(200, CreateLocationsResponse$inboundSchema, {
|
|
63177
63394
|
hdrs: true,
|
|
63178
63395
|
key: "Result"
|
|
63179
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
63396
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateLocationsResponse$inboundSchema, {
|
|
63180
63397
|
key: "Result"
|
|
63181
63398
|
}))(response, req, { extraFields: responseFields });
|
|
63182
63399
|
if (!result2.ok) {
|
|
@@ -63184,7 +63401,7 @@ async function $do139(client, request, options) {
|
|
|
63184
63401
|
}
|
|
63185
63402
|
return [result2, { status: "complete", request: req, response }];
|
|
63186
63403
|
}
|
|
63187
|
-
var
|
|
63404
|
+
var init_locationsCreateLocations = __esm(() => {
|
|
63188
63405
|
init_encodings();
|
|
63189
63406
|
init_matchers();
|
|
63190
63407
|
init_primitives();
|
|
@@ -63197,23 +63414,23 @@ var init_materialsCreateMaterials = __esm(() => {
|
|
|
63197
63414
|
init_async();
|
|
63198
63415
|
});
|
|
63199
63416
|
|
|
63200
|
-
// src/mcp-server/tools/
|
|
63201
|
-
var args113, tool$
|
|
63202
|
-
var
|
|
63203
|
-
|
|
63417
|
+
// src/mcp-server/tools/locationsCreateLocations.ts
|
|
63418
|
+
var args113, tool$locationsCreateLocations;
|
|
63419
|
+
var init_locationsCreateLocations2 = __esm(() => {
|
|
63420
|
+
init_locationsCreateLocations();
|
|
63204
63421
|
init_components();
|
|
63205
63422
|
init_tools();
|
|
63206
63423
|
args113 = {
|
|
63207
|
-
request:
|
|
63424
|
+
request: LocationInput$inboundSchema
|
|
63208
63425
|
};
|
|
63209
|
-
tool$
|
|
63210
|
-
name: "
|
|
63211
|
-
description: `Create a new
|
|
63426
|
+
tool$locationsCreateLocations = {
|
|
63427
|
+
name: "locations-create-locations",
|
|
63428
|
+
description: `Create a new Location
|
|
63212
63429
|
|
|
63213
63430
|
|
|
63214
63431
|
|
|
63215
63432
|
#### OAuth Scope
|
|
63216
|
-
This endpoint requires the following OAuth scope **
|
|
63433
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63217
63434
|
|
|
63218
63435
|
|
|
63219
63436
|
|
|
@@ -63223,7 +63440,7 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63223
63440
|
`,
|
|
63224
63441
|
args: args113,
|
|
63225
63442
|
tool: async (client, args114, ctx) => {
|
|
63226
|
-
const [result2, apiCall] = await
|
|
63443
|
+
const [result2, apiCall] = await locationsCreateLocations(client, args114.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63227
63444
|
if (!result2.ok) {
|
|
63228
63445
|
return {
|
|
63229
63446
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63236,12 +63453,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63236
63453
|
};
|
|
63237
63454
|
});
|
|
63238
63455
|
|
|
63239
|
-
// src/funcs/
|
|
63240
|
-
function
|
|
63456
|
+
// src/funcs/locationsDeleteLocations.ts
|
|
63457
|
+
function locationsDeleteLocations(client, request, options) {
|
|
63241
63458
|
return new APIPromise($do140(client, request, options));
|
|
63242
63459
|
}
|
|
63243
63460
|
async function $do140(client, request, options) {
|
|
63244
|
-
const parsed = safeParse(request, (value) =>
|
|
63461
|
+
const parsed = safeParse(request, (value) => DeleteLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63245
63462
|
if (!parsed.ok) {
|
|
63246
63463
|
return [parsed, { status: "invalid" }];
|
|
63247
63464
|
}
|
|
@@ -63253,7 +63470,7 @@ async function $do140(client, request, options) {
|
|
|
63253
63470
|
charEncoding: "percent"
|
|
63254
63471
|
})
|
|
63255
63472
|
};
|
|
63256
|
-
const path = pathToFunc("/
|
|
63473
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63257
63474
|
const headers = new Headers(compactMap({
|
|
63258
63475
|
Accept: "application/json"
|
|
63259
63476
|
}));
|
|
@@ -63262,7 +63479,7 @@ async function $do140(client, request, options) {
|
|
|
63262
63479
|
const context = {
|
|
63263
63480
|
options: client._options,
|
|
63264
63481
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63265
|
-
operationID: "
|
|
63482
|
+
operationID: "deleteLocations",
|
|
63266
63483
|
oAuth2Scopes: [],
|
|
63267
63484
|
resolvedSecurity: requestSecurity,
|
|
63268
63485
|
securitySource: client._options.security,
|
|
@@ -63305,13 +63522,13 @@ async function $do140(client, request, options) {
|
|
|
63305
63522
|
const responseFields = {
|
|
63306
63523
|
HttpMeta: { Response: response, Request: req }
|
|
63307
63524
|
};
|
|
63308
|
-
const [result2] = await match(json(200,
|
|
63525
|
+
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
63526
|
if (!result2.ok) {
|
|
63310
63527
|
return [result2, { status: "complete", request: req, response }];
|
|
63311
63528
|
}
|
|
63312
63529
|
return [result2, { status: "complete", request: req, response }];
|
|
63313
63530
|
}
|
|
63314
|
-
var
|
|
63531
|
+
var init_locationsDeleteLocations = __esm(() => {
|
|
63315
63532
|
init_encodings();
|
|
63316
63533
|
init_matchers();
|
|
63317
63534
|
init_primitives();
|
|
@@ -63323,18 +63540,18 @@ var init_materialsDeleteMaterials = __esm(() => {
|
|
|
63323
63540
|
init_async();
|
|
63324
63541
|
});
|
|
63325
63542
|
|
|
63326
|
-
// src/mcp-server/tools/
|
|
63327
|
-
var args114, tool$
|
|
63328
|
-
var
|
|
63329
|
-
|
|
63543
|
+
// src/mcp-server/tools/locationsDeleteLocations.ts
|
|
63544
|
+
var args114, tool$locationsDeleteLocations;
|
|
63545
|
+
var init_locationsDeleteLocations2 = __esm(() => {
|
|
63546
|
+
init_locationsDeleteLocations();
|
|
63330
63547
|
init_operations();
|
|
63331
63548
|
init_tools();
|
|
63332
63549
|
args114 = {
|
|
63333
|
-
request:
|
|
63550
|
+
request: DeleteLocationsRequest$inboundSchema
|
|
63334
63551
|
};
|
|
63335
|
-
tool$
|
|
63336
|
-
name: "
|
|
63337
|
-
description: `Delete a
|
|
63552
|
+
tool$locationsDeleteLocations = {
|
|
63553
|
+
name: "locations-delete-locations",
|
|
63554
|
+
description: `Delete a Location
|
|
63338
63555
|
|
|
63339
63556
|
|
|
63340
63557
|
|
|
@@ -63343,12 +63560,12 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
63343
63560
|
|
|
63344
63561
|
|
|
63345
63562
|
#### OAuth Scope
|
|
63346
|
-
This endpoint requires the following OAuth scope **
|
|
63563
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63347
63564
|
|
|
63348
63565
|
`,
|
|
63349
63566
|
args: args114,
|
|
63350
63567
|
tool: async (client, args115, ctx) => {
|
|
63351
|
-
const [result2, apiCall] = await
|
|
63568
|
+
const [result2, apiCall] = await locationsDeleteLocations(client, args115.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63352
63569
|
if (!result2.ok) {
|
|
63353
63570
|
return {
|
|
63354
63571
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63361,12 +63578,12 @@ This endpoint requires the following OAuth scope **manage_inventory**.
|
|
|
63361
63578
|
};
|
|
63362
63579
|
});
|
|
63363
63580
|
|
|
63364
|
-
// src/funcs/
|
|
63365
|
-
function
|
|
63581
|
+
// src/funcs/locationsGetLocations.ts
|
|
63582
|
+
function locationsGetLocations(client, request, options) {
|
|
63366
63583
|
return new APIPromise($do141(client, request, options));
|
|
63367
63584
|
}
|
|
63368
63585
|
async function $do141(client, request, options) {
|
|
63369
|
-
const parsed = safeParse(request, (value) =>
|
|
63586
|
+
const parsed = safeParse(request, (value) => GetLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63370
63587
|
if (!parsed.ok) {
|
|
63371
63588
|
return [parsed, { status: "invalid" }];
|
|
63372
63589
|
}
|
|
@@ -63378,7 +63595,7 @@ async function $do141(client, request, options) {
|
|
|
63378
63595
|
charEncoding: "percent"
|
|
63379
63596
|
})
|
|
63380
63597
|
};
|
|
63381
|
-
const path = pathToFunc("/
|
|
63598
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63382
63599
|
const headers = new Headers(compactMap({
|
|
63383
63600
|
Accept: "application/json"
|
|
63384
63601
|
}));
|
|
@@ -63387,7 +63604,7 @@ async function $do141(client, request, options) {
|
|
|
63387
63604
|
const context = {
|
|
63388
63605
|
options: client._options,
|
|
63389
63606
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63390
|
-
operationID: "
|
|
63607
|
+
operationID: "getLocations",
|
|
63391
63608
|
oAuth2Scopes: [],
|
|
63392
63609
|
resolvedSecurity: requestSecurity,
|
|
63393
63610
|
securitySource: client._options.security,
|
|
@@ -63430,13 +63647,13 @@ async function $do141(client, request, options) {
|
|
|
63430
63647
|
const responseFields = {
|
|
63431
63648
|
HttpMeta: { Response: response, Request: req }
|
|
63432
63649
|
};
|
|
63433
|
-
const [result2] = await match(json(200,
|
|
63650
|
+
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
63651
|
if (!result2.ok) {
|
|
63435
63652
|
return [result2, { status: "complete", request: req, response }];
|
|
63436
63653
|
}
|
|
63437
63654
|
return [result2, { status: "complete", request: req, response }];
|
|
63438
63655
|
}
|
|
63439
|
-
var
|
|
63656
|
+
var init_locationsGetLocations = __esm(() => {
|
|
63440
63657
|
init_encodings();
|
|
63441
63658
|
init_matchers();
|
|
63442
63659
|
init_primitives();
|
|
@@ -63448,28 +63665,28 @@ var init_materialsGetMaterials = __esm(() => {
|
|
|
63448
63665
|
init_async();
|
|
63449
63666
|
});
|
|
63450
63667
|
|
|
63451
|
-
// src/mcp-server/tools/
|
|
63452
|
-
var args115, tool$
|
|
63453
|
-
var
|
|
63454
|
-
|
|
63668
|
+
// src/mcp-server/tools/locationsGetLocations.ts
|
|
63669
|
+
var args115, tool$locationsGetLocations;
|
|
63670
|
+
var init_locationsGetLocations2 = __esm(() => {
|
|
63671
|
+
init_locationsGetLocations();
|
|
63455
63672
|
init_operations();
|
|
63456
63673
|
init_tools();
|
|
63457
63674
|
args115 = {
|
|
63458
|
-
request:
|
|
63675
|
+
request: GetLocationsRequest$inboundSchema
|
|
63459
63676
|
};
|
|
63460
|
-
tool$
|
|
63461
|
-
name: "
|
|
63462
|
-
description: `Retrieve a
|
|
63677
|
+
tool$locationsGetLocations = {
|
|
63678
|
+
name: "locations-get-locations",
|
|
63679
|
+
description: `Retrieve a Location
|
|
63463
63680
|
|
|
63464
63681
|
|
|
63465
63682
|
|
|
63466
63683
|
#### OAuth Scope
|
|
63467
|
-
This endpoint requires the following OAuth scope **
|
|
63684
|
+
This endpoint requires the following OAuth scope **read_locations**.
|
|
63468
63685
|
|
|
63469
63686
|
`,
|
|
63470
63687
|
args: args115,
|
|
63471
63688
|
tool: async (client, args116, ctx) => {
|
|
63472
|
-
const [result2, apiCall] = await
|
|
63689
|
+
const [result2, apiCall] = await locationsGetLocations(client, args116.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63473
63690
|
if (!result2.ok) {
|
|
63474
63691
|
return {
|
|
63475
63692
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63482,12 +63699,12 @@ This endpoint requires the following OAuth scope **read_inventory**.
|
|
|
63482
63699
|
};
|
|
63483
63700
|
});
|
|
63484
63701
|
|
|
63485
|
-
// src/funcs/
|
|
63486
|
-
function
|
|
63702
|
+
// src/funcs/locationsListLocations.ts
|
|
63703
|
+
function locationsListLocations(client, options) {
|
|
63487
63704
|
return new APIPromise($do142(client, options));
|
|
63488
63705
|
}
|
|
63489
63706
|
async function $do142(client, options) {
|
|
63490
|
-
const path = pathToFunc("/
|
|
63707
|
+
const path = pathToFunc("/location.json")();
|
|
63491
63708
|
const headers = new Headers(compactMap({
|
|
63492
63709
|
Accept: "application/json"
|
|
63493
63710
|
}));
|
|
@@ -63496,7 +63713,7 @@ async function $do142(client, options) {
|
|
|
63496
63713
|
const context = {
|
|
63497
63714
|
options: client._options,
|
|
63498
63715
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63499
|
-
operationID: "
|
|
63716
|
+
operationID: "listLocations",
|
|
63500
63717
|
oAuth2Scopes: [],
|
|
63501
63718
|
resolvedSecurity: requestSecurity,
|
|
63502
63719
|
securitySource: client._options.security,
|
|
@@ -63538,13 +63755,13 @@ async function $do142(client, options) {
|
|
|
63538
63755
|
const responseFields = {
|
|
63539
63756
|
HttpMeta: { Response: response, Request: req }
|
|
63540
63757
|
};
|
|
63541
|
-
const [result2] = await match(json(200,
|
|
63758
|
+
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
63759
|
if (!result2.ok) {
|
|
63543
63760
|
return [result2, { status: "complete", request: req, response }];
|
|
63544
63761
|
}
|
|
63545
63762
|
return [result2, { status: "complete", request: req, response }];
|
|
63546
63763
|
}
|
|
63547
|
-
var
|
|
63764
|
+
var init_locationsListLocations = __esm(() => {
|
|
63548
63765
|
init_matchers();
|
|
63549
63766
|
init_primitives();
|
|
63550
63767
|
init_security();
|
|
@@ -63554,14 +63771,14 @@ var init_materialsListMaterials = __esm(() => {
|
|
|
63554
63771
|
init_async();
|
|
63555
63772
|
});
|
|
63556
63773
|
|
|
63557
|
-
// src/mcp-server/tools/
|
|
63558
|
-
var tool$
|
|
63559
|
-
var
|
|
63560
|
-
|
|
63774
|
+
// src/mcp-server/tools/locationsListLocations.ts
|
|
63775
|
+
var tool$locationsListLocations;
|
|
63776
|
+
var init_locationsListLocations2 = __esm(() => {
|
|
63777
|
+
init_locationsListLocations();
|
|
63561
63778
|
init_tools();
|
|
63562
|
-
tool$
|
|
63563
|
-
name: "
|
|
63564
|
-
description: `List all
|
|
63779
|
+
tool$locationsListLocations = {
|
|
63780
|
+
name: "locations-list-locations",
|
|
63781
|
+
description: `List all Locations
|
|
63565
63782
|
|
|
63566
63783
|
|
|
63567
63784
|
|
|
@@ -63570,11 +63787,11 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
63570
63787
|
|
|
63571
63788
|
|
|
63572
63789
|
#### OAuth Scope
|
|
63573
|
-
This endpoint requires the following OAuth scope **
|
|
63790
|
+
This endpoint requires the following OAuth scope **read_locations**.
|
|
63574
63791
|
|
|
63575
63792
|
`,
|
|
63576
63793
|
tool: async (client, ctx) => {
|
|
63577
|
-
const [result2, apiCall] = await
|
|
63794
|
+
const [result2, apiCall] = await locationsListLocations(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63578
63795
|
if (!result2.ok) {
|
|
63579
63796
|
return {
|
|
63580
63797
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63587,24 +63804,24 @@ This endpoint requires the following OAuth scope **read_inventory**.
|
|
|
63587
63804
|
};
|
|
63588
63805
|
});
|
|
63589
63806
|
|
|
63590
|
-
// src/funcs/
|
|
63591
|
-
function
|
|
63807
|
+
// src/funcs/locationsUpdateLocations.ts
|
|
63808
|
+
function locationsUpdateLocations(client, request, options) {
|
|
63592
63809
|
return new APIPromise($do143(client, request, options));
|
|
63593
63810
|
}
|
|
63594
63811
|
async function $do143(client, request, options) {
|
|
63595
|
-
const parsed = safeParse(request, (value) =>
|
|
63812
|
+
const parsed = safeParse(request, (value) => UpdateLocationsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63596
63813
|
if (!parsed.ok) {
|
|
63597
63814
|
return [parsed, { status: "invalid" }];
|
|
63598
63815
|
}
|
|
63599
63816
|
const payload = parsed.value;
|
|
63600
|
-
const body = encodeJSON("body", payload.
|
|
63817
|
+
const body = encodeJSON("body", payload.Location, { explode: true });
|
|
63601
63818
|
const pathParams = {
|
|
63602
63819
|
uuid: encodeSimple("uuid", payload.uuid, {
|
|
63603
63820
|
explode: false,
|
|
63604
63821
|
charEncoding: "percent"
|
|
63605
63822
|
})
|
|
63606
63823
|
};
|
|
63607
|
-
const path = pathToFunc("/
|
|
63824
|
+
const path = pathToFunc("/location/{uuid}.json")(pathParams);
|
|
63608
63825
|
const headers = new Headers(compactMap({
|
|
63609
63826
|
"Content-Type": "application/json",
|
|
63610
63827
|
Accept: "application/json"
|
|
@@ -63614,7 +63831,7 @@ async function $do143(client, request, options) {
|
|
|
63614
63831
|
const context = {
|
|
63615
63832
|
options: client._options,
|
|
63616
63833
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63617
|
-
operationID: "
|
|
63834
|
+
operationID: "updateLocations",
|
|
63618
63835
|
oAuth2Scopes: [],
|
|
63619
63836
|
resolvedSecurity: requestSecurity,
|
|
63620
63837
|
securitySource: client._options.security,
|
|
@@ -63657,13 +63874,13 @@ async function $do143(client, request, options) {
|
|
|
63657
63874
|
const responseFields = {
|
|
63658
63875
|
HttpMeta: { Response: response, Request: req }
|
|
63659
63876
|
};
|
|
63660
|
-
const [result2] = await match(json(200,
|
|
63877
|
+
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
63878
|
if (!result2.ok) {
|
|
63662
63879
|
return [result2, { status: "complete", request: req, response }];
|
|
63663
63880
|
}
|
|
63664
63881
|
return [result2, { status: "complete", request: req, response }];
|
|
63665
63882
|
}
|
|
63666
|
-
var
|
|
63883
|
+
var init_locationsUpdateLocations = __esm(() => {
|
|
63667
63884
|
init_encodings();
|
|
63668
63885
|
init_matchers();
|
|
63669
63886
|
init_primitives();
|
|
@@ -63675,28 +63892,28 @@ var init_materialsUpdateMaterials = __esm(() => {
|
|
|
63675
63892
|
init_async();
|
|
63676
63893
|
});
|
|
63677
63894
|
|
|
63678
|
-
// src/mcp-server/tools/
|
|
63679
|
-
var args116, tool$
|
|
63680
|
-
var
|
|
63681
|
-
|
|
63895
|
+
// src/mcp-server/tools/locationsUpdateLocations.ts
|
|
63896
|
+
var args116, tool$locationsUpdateLocations;
|
|
63897
|
+
var init_locationsUpdateLocations2 = __esm(() => {
|
|
63898
|
+
init_locationsUpdateLocations();
|
|
63682
63899
|
init_operations();
|
|
63683
63900
|
init_tools();
|
|
63684
63901
|
args116 = {
|
|
63685
|
-
request:
|
|
63902
|
+
request: UpdateLocationsRequest$inboundSchema
|
|
63686
63903
|
};
|
|
63687
|
-
tool$
|
|
63688
|
-
name: "
|
|
63689
|
-
description: `Update a
|
|
63904
|
+
tool$locationsUpdateLocations = {
|
|
63905
|
+
name: "locations-update-locations",
|
|
63906
|
+
description: `Update a Location
|
|
63690
63907
|
|
|
63691
63908
|
|
|
63692
63909
|
|
|
63693
63910
|
#### OAuth Scope
|
|
63694
|
-
This endpoint requires the following OAuth scope **
|
|
63911
|
+
This endpoint requires the following OAuth scope **manage_locations**.
|
|
63695
63912
|
|
|
63696
63913
|
`,
|
|
63697
63914
|
args: args116,
|
|
63698
63915
|
tool: async (client, args117, ctx) => {
|
|
63699
|
-
const [result2, apiCall] = await
|
|
63916
|
+
const [result2, apiCall] = await locationsUpdateLocations(client, args117.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63700
63917
|
if (!result2.ok) {
|
|
63701
63918
|
return {
|
|
63702
63919
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63709,18 +63926,18 @@ This endpoint requires the following OAuth scope **manage_inventory**.
|
|
|
63709
63926
|
};
|
|
63710
63927
|
});
|
|
63711
63928
|
|
|
63712
|
-
// src/funcs/
|
|
63713
|
-
function
|
|
63929
|
+
// src/funcs/materialsCreateMaterials.ts
|
|
63930
|
+
function materialsCreateMaterials(client, request, options) {
|
|
63714
63931
|
return new APIPromise($do144(client, request, options));
|
|
63715
63932
|
}
|
|
63716
63933
|
async function $do144(client, request, options) {
|
|
63717
|
-
const parsed = safeParse(request, (value) =>
|
|
63934
|
+
const parsed = safeParse(request, (value) => MaterialInput$outboundSchema.parse(value), "Input validation failed");
|
|
63718
63935
|
if (!parsed.ok) {
|
|
63719
63936
|
return [parsed, { status: "invalid" }];
|
|
63720
63937
|
}
|
|
63721
63938
|
const payload = parsed.value;
|
|
63722
63939
|
const body = encodeJSON("body", payload, { explode: true });
|
|
63723
|
-
const path = pathToFunc("/
|
|
63940
|
+
const path = pathToFunc("/material.json")();
|
|
63724
63941
|
const headers = new Headers(compactMap({
|
|
63725
63942
|
"Content-Type": "application/json",
|
|
63726
63943
|
Accept: "application/json"
|
|
@@ -63730,7 +63947,7 @@ async function $do144(client, request, options) {
|
|
|
63730
63947
|
const context = {
|
|
63731
63948
|
options: client._options,
|
|
63732
63949
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63733
|
-
operationID: "
|
|
63950
|
+
operationID: "createMaterials",
|
|
63734
63951
|
oAuth2Scopes: [],
|
|
63735
63952
|
resolvedSecurity: requestSecurity,
|
|
63736
63953
|
securitySource: client._options.security,
|
|
@@ -63773,10 +63990,10 @@ async function $do144(client, request, options) {
|
|
|
63773
63990
|
const responseFields = {
|
|
63774
63991
|
HttpMeta: { Response: response, Request: req }
|
|
63775
63992
|
};
|
|
63776
|
-
const [result2] = await match(json(200,
|
|
63993
|
+
const [result2] = await match(json(200, CreateMaterialsResponse$inboundSchema, {
|
|
63777
63994
|
hdrs: true,
|
|
63778
63995
|
key: "Result"
|
|
63779
|
-
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default",
|
|
63996
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateMaterialsResponse$inboundSchema, {
|
|
63780
63997
|
key: "Result"
|
|
63781
63998
|
}))(response, req, { extraFields: responseFields });
|
|
63782
63999
|
if (!result2.ok) {
|
|
@@ -63784,7 +64001,7 @@ async function $do144(client, request, options) {
|
|
|
63784
64001
|
}
|
|
63785
64002
|
return [result2, { status: "complete", request: req, response }];
|
|
63786
64003
|
}
|
|
63787
|
-
var
|
|
64004
|
+
var init_materialsCreateMaterials = __esm(() => {
|
|
63788
64005
|
init_encodings();
|
|
63789
64006
|
init_matchers();
|
|
63790
64007
|
init_primitives();
|
|
@@ -63797,28 +64014,33 @@ var init_notesCreateNotes = __esm(() => {
|
|
|
63797
64014
|
init_async();
|
|
63798
64015
|
});
|
|
63799
64016
|
|
|
63800
|
-
// src/mcp-server/tools/
|
|
63801
|
-
var args117, tool$
|
|
63802
|
-
var
|
|
63803
|
-
|
|
64017
|
+
// src/mcp-server/tools/materialsCreateMaterials.ts
|
|
64018
|
+
var args117, tool$materialsCreateMaterials;
|
|
64019
|
+
var init_materialsCreateMaterials2 = __esm(() => {
|
|
64020
|
+
init_materialsCreateMaterials();
|
|
63804
64021
|
init_components();
|
|
63805
64022
|
init_tools();
|
|
63806
64023
|
args117 = {
|
|
63807
|
-
request:
|
|
64024
|
+
request: MaterialInput$inboundSchema
|
|
63808
64025
|
};
|
|
63809
|
-
tool$
|
|
63810
|
-
name: "
|
|
63811
|
-
description: `Create a new
|
|
64026
|
+
tool$materialsCreateMaterials = {
|
|
64027
|
+
name: "materials-create-materials",
|
|
64028
|
+
description: `Create a new Material
|
|
63812
64029
|
|
|
63813
64030
|
|
|
63814
64031
|
|
|
64032
|
+
#### OAuth Scope
|
|
64033
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64034
|
+
|
|
64035
|
+
|
|
64036
|
+
|
|
63815
64037
|
#### Record UUID
|
|
63816
64038
|
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
64039
|
|
|
63818
64040
|
`,
|
|
63819
64041
|
args: args117,
|
|
63820
64042
|
tool: async (client, args118, ctx) => {
|
|
63821
|
-
const [result2, apiCall] = await
|
|
64043
|
+
const [result2, apiCall] = await materialsCreateMaterials(client, args118.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63822
64044
|
if (!result2.ok) {
|
|
63823
64045
|
return {
|
|
63824
64046
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63831,12 +64053,12 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
63831
64053
|
};
|
|
63832
64054
|
});
|
|
63833
64055
|
|
|
63834
|
-
// src/funcs/
|
|
63835
|
-
function
|
|
64056
|
+
// src/funcs/materialsDeleteMaterials.ts
|
|
64057
|
+
function materialsDeleteMaterials(client, request, options) {
|
|
63836
64058
|
return new APIPromise($do145(client, request, options));
|
|
63837
64059
|
}
|
|
63838
64060
|
async function $do145(client, request, options) {
|
|
63839
|
-
const parsed = safeParse(request, (value) =>
|
|
64061
|
+
const parsed = safeParse(request, (value) => DeleteMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63840
64062
|
if (!parsed.ok) {
|
|
63841
64063
|
return [parsed, { status: "invalid" }];
|
|
63842
64064
|
}
|
|
@@ -63848,7 +64070,7 @@ async function $do145(client, request, options) {
|
|
|
63848
64070
|
charEncoding: "percent"
|
|
63849
64071
|
})
|
|
63850
64072
|
};
|
|
63851
|
-
const path = pathToFunc("/
|
|
64073
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
63852
64074
|
const headers = new Headers(compactMap({
|
|
63853
64075
|
Accept: "application/json"
|
|
63854
64076
|
}));
|
|
@@ -63857,7 +64079,602 @@ async function $do145(client, request, options) {
|
|
|
63857
64079
|
const context = {
|
|
63858
64080
|
options: client._options,
|
|
63859
64081
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
63860
|
-
operationID: "
|
|
64082
|
+
operationID: "deleteMaterials",
|
|
64083
|
+
oAuth2Scopes: [],
|
|
64084
|
+
resolvedSecurity: requestSecurity,
|
|
64085
|
+
securitySource: client._options.security,
|
|
64086
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64087
|
+
strategy: "backoff",
|
|
64088
|
+
backoff: {
|
|
64089
|
+
initialInterval: 500,
|
|
64090
|
+
maxInterval: 60000,
|
|
64091
|
+
exponent: 1.5,
|
|
64092
|
+
maxElapsedTime: 3600000
|
|
64093
|
+
},
|
|
64094
|
+
retryConnectionErrors: true
|
|
64095
|
+
},
|
|
64096
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64097
|
+
};
|
|
64098
|
+
const requestRes = client._createRequest(context, {
|
|
64099
|
+
security: requestSecurity,
|
|
64100
|
+
method: "DELETE",
|
|
64101
|
+
baseURL: options?.serverURL,
|
|
64102
|
+
path,
|
|
64103
|
+
headers,
|
|
64104
|
+
body,
|
|
64105
|
+
userAgent: client._options.userAgent,
|
|
64106
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64107
|
+
}, options);
|
|
64108
|
+
if (!requestRes.ok) {
|
|
64109
|
+
return [requestRes, { status: "invalid" }];
|
|
64110
|
+
}
|
|
64111
|
+
const req = requestRes.value;
|
|
64112
|
+
const doResult = await client._do(req, {
|
|
64113
|
+
context,
|
|
64114
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64115
|
+
retryConfig: context.retryConfig,
|
|
64116
|
+
retryCodes: context.retryCodes
|
|
64117
|
+
});
|
|
64118
|
+
if (!doResult.ok) {
|
|
64119
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64120
|
+
}
|
|
64121
|
+
const response = doResult.value;
|
|
64122
|
+
const responseFields = {
|
|
64123
|
+
HttpMeta: { Response: response, Request: req }
|
|
64124
|
+
};
|
|
64125
|
+
const [result2] = await match(json(200, DeleteMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", DeleteMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64126
|
+
if (!result2.ok) {
|
|
64127
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64128
|
+
}
|
|
64129
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64130
|
+
}
|
|
64131
|
+
var init_materialsDeleteMaterials = __esm(() => {
|
|
64132
|
+
init_encodings();
|
|
64133
|
+
init_matchers();
|
|
64134
|
+
init_primitives();
|
|
64135
|
+
init_schemas();
|
|
64136
|
+
init_security();
|
|
64137
|
+
init_url();
|
|
64138
|
+
init_errors2();
|
|
64139
|
+
init_operations();
|
|
64140
|
+
init_async();
|
|
64141
|
+
});
|
|
64142
|
+
|
|
64143
|
+
// src/mcp-server/tools/materialsDeleteMaterials.ts
|
|
64144
|
+
var args118, tool$materialsDeleteMaterials;
|
|
64145
|
+
var init_materialsDeleteMaterials2 = __esm(() => {
|
|
64146
|
+
init_materialsDeleteMaterials();
|
|
64147
|
+
init_operations();
|
|
64148
|
+
init_tools();
|
|
64149
|
+
args118 = {
|
|
64150
|
+
request: DeleteMaterialsRequest$inboundSchema
|
|
64151
|
+
};
|
|
64152
|
+
tool$materialsDeleteMaterials = {
|
|
64153
|
+
name: "materials-delete-materials",
|
|
64154
|
+
description: `Delete a Material
|
|
64155
|
+
|
|
64156
|
+
|
|
64157
|
+
|
|
64158
|
+
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\`.
|
|
64159
|
+
|
|
64160
|
+
|
|
64161
|
+
|
|
64162
|
+
#### OAuth Scope
|
|
64163
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64164
|
+
|
|
64165
|
+
`,
|
|
64166
|
+
args: args118,
|
|
64167
|
+
tool: async (client, args119, ctx) => {
|
|
64168
|
+
const [result2, apiCall] = await materialsDeleteMaterials(client, args119.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64169
|
+
if (!result2.ok) {
|
|
64170
|
+
return {
|
|
64171
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64172
|
+
isError: true
|
|
64173
|
+
};
|
|
64174
|
+
}
|
|
64175
|
+
const value = result2.value;
|
|
64176
|
+
return formatResult(value, apiCall);
|
|
64177
|
+
}
|
|
64178
|
+
};
|
|
64179
|
+
});
|
|
64180
|
+
|
|
64181
|
+
// src/funcs/materialsGetMaterials.ts
|
|
64182
|
+
function materialsGetMaterials(client, request, options) {
|
|
64183
|
+
return new APIPromise($do146(client, request, options));
|
|
64184
|
+
}
|
|
64185
|
+
async function $do146(client, request, options) {
|
|
64186
|
+
const parsed = safeParse(request, (value) => GetMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64187
|
+
if (!parsed.ok) {
|
|
64188
|
+
return [parsed, { status: "invalid" }];
|
|
64189
|
+
}
|
|
64190
|
+
const payload = parsed.value;
|
|
64191
|
+
const body = null;
|
|
64192
|
+
const pathParams = {
|
|
64193
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64194
|
+
explode: false,
|
|
64195
|
+
charEncoding: "percent"
|
|
64196
|
+
})
|
|
64197
|
+
};
|
|
64198
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
64199
|
+
const headers = new Headers(compactMap({
|
|
64200
|
+
Accept: "application/json"
|
|
64201
|
+
}));
|
|
64202
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64203
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64204
|
+
const context = {
|
|
64205
|
+
options: client._options,
|
|
64206
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64207
|
+
operationID: "getMaterials",
|
|
64208
|
+
oAuth2Scopes: [],
|
|
64209
|
+
resolvedSecurity: requestSecurity,
|
|
64210
|
+
securitySource: client._options.security,
|
|
64211
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64212
|
+
strategy: "backoff",
|
|
64213
|
+
backoff: {
|
|
64214
|
+
initialInterval: 500,
|
|
64215
|
+
maxInterval: 60000,
|
|
64216
|
+
exponent: 1.5,
|
|
64217
|
+
maxElapsedTime: 3600000
|
|
64218
|
+
},
|
|
64219
|
+
retryConnectionErrors: true
|
|
64220
|
+
},
|
|
64221
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64222
|
+
};
|
|
64223
|
+
const requestRes = client._createRequest(context, {
|
|
64224
|
+
security: requestSecurity,
|
|
64225
|
+
method: "GET",
|
|
64226
|
+
baseURL: options?.serverURL,
|
|
64227
|
+
path,
|
|
64228
|
+
headers,
|
|
64229
|
+
body,
|
|
64230
|
+
userAgent: client._options.userAgent,
|
|
64231
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64232
|
+
}, options);
|
|
64233
|
+
if (!requestRes.ok) {
|
|
64234
|
+
return [requestRes, { status: "invalid" }];
|
|
64235
|
+
}
|
|
64236
|
+
const req = requestRes.value;
|
|
64237
|
+
const doResult = await client._do(req, {
|
|
64238
|
+
context,
|
|
64239
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64240
|
+
retryConfig: context.retryConfig,
|
|
64241
|
+
retryCodes: context.retryCodes
|
|
64242
|
+
});
|
|
64243
|
+
if (!doResult.ok) {
|
|
64244
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64245
|
+
}
|
|
64246
|
+
const response = doResult.value;
|
|
64247
|
+
const responseFields = {
|
|
64248
|
+
HttpMeta: { Response: response, Request: req }
|
|
64249
|
+
};
|
|
64250
|
+
const [result2] = await match(json(200, GetMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", GetMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64251
|
+
if (!result2.ok) {
|
|
64252
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64253
|
+
}
|
|
64254
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64255
|
+
}
|
|
64256
|
+
var init_materialsGetMaterials = __esm(() => {
|
|
64257
|
+
init_encodings();
|
|
64258
|
+
init_matchers();
|
|
64259
|
+
init_primitives();
|
|
64260
|
+
init_schemas();
|
|
64261
|
+
init_security();
|
|
64262
|
+
init_url();
|
|
64263
|
+
init_errors2();
|
|
64264
|
+
init_operations();
|
|
64265
|
+
init_async();
|
|
64266
|
+
});
|
|
64267
|
+
|
|
64268
|
+
// src/mcp-server/tools/materialsGetMaterials.ts
|
|
64269
|
+
var args119, tool$materialsGetMaterials;
|
|
64270
|
+
var init_materialsGetMaterials2 = __esm(() => {
|
|
64271
|
+
init_materialsGetMaterials();
|
|
64272
|
+
init_operations();
|
|
64273
|
+
init_tools();
|
|
64274
|
+
args119 = {
|
|
64275
|
+
request: GetMaterialsRequest$inboundSchema
|
|
64276
|
+
};
|
|
64277
|
+
tool$materialsGetMaterials = {
|
|
64278
|
+
name: "materials-get-materials",
|
|
64279
|
+
description: `Retrieve a Material
|
|
64280
|
+
|
|
64281
|
+
|
|
64282
|
+
|
|
64283
|
+
#### OAuth Scope
|
|
64284
|
+
This endpoint requires the following OAuth scope **read_inventory**.
|
|
64285
|
+
|
|
64286
|
+
`,
|
|
64287
|
+
args: args119,
|
|
64288
|
+
tool: async (client, args120, ctx) => {
|
|
64289
|
+
const [result2, apiCall] = await materialsGetMaterials(client, args120.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64290
|
+
if (!result2.ok) {
|
|
64291
|
+
return {
|
|
64292
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64293
|
+
isError: true
|
|
64294
|
+
};
|
|
64295
|
+
}
|
|
64296
|
+
const value = result2.value;
|
|
64297
|
+
return formatResult(value, apiCall);
|
|
64298
|
+
}
|
|
64299
|
+
};
|
|
64300
|
+
});
|
|
64301
|
+
|
|
64302
|
+
// src/funcs/materialsListMaterials.ts
|
|
64303
|
+
function materialsListMaterials(client, options) {
|
|
64304
|
+
return new APIPromise($do147(client, options));
|
|
64305
|
+
}
|
|
64306
|
+
async function $do147(client, options) {
|
|
64307
|
+
const path = pathToFunc("/material.json")();
|
|
64308
|
+
const headers = new Headers(compactMap({
|
|
64309
|
+
Accept: "application/json"
|
|
64310
|
+
}));
|
|
64311
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64312
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64313
|
+
const context = {
|
|
64314
|
+
options: client._options,
|
|
64315
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64316
|
+
operationID: "listMaterials",
|
|
64317
|
+
oAuth2Scopes: [],
|
|
64318
|
+
resolvedSecurity: requestSecurity,
|
|
64319
|
+
securitySource: client._options.security,
|
|
64320
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64321
|
+
strategy: "backoff",
|
|
64322
|
+
backoff: {
|
|
64323
|
+
initialInterval: 500,
|
|
64324
|
+
maxInterval: 60000,
|
|
64325
|
+
exponent: 1.5,
|
|
64326
|
+
maxElapsedTime: 3600000
|
|
64327
|
+
},
|
|
64328
|
+
retryConnectionErrors: true
|
|
64329
|
+
},
|
|
64330
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64331
|
+
};
|
|
64332
|
+
const requestRes = client._createRequest(context, {
|
|
64333
|
+
security: requestSecurity,
|
|
64334
|
+
method: "GET",
|
|
64335
|
+
baseURL: options?.serverURL,
|
|
64336
|
+
path,
|
|
64337
|
+
headers,
|
|
64338
|
+
userAgent: client._options.userAgent,
|
|
64339
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64340
|
+
}, options);
|
|
64341
|
+
if (!requestRes.ok) {
|
|
64342
|
+
return [requestRes, { status: "invalid" }];
|
|
64343
|
+
}
|
|
64344
|
+
const req = requestRes.value;
|
|
64345
|
+
const doResult = await client._do(req, {
|
|
64346
|
+
context,
|
|
64347
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64348
|
+
retryConfig: context.retryConfig,
|
|
64349
|
+
retryCodes: context.retryCodes
|
|
64350
|
+
});
|
|
64351
|
+
if (!doResult.ok) {
|
|
64352
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64353
|
+
}
|
|
64354
|
+
const response = doResult.value;
|
|
64355
|
+
const responseFields = {
|
|
64356
|
+
HttpMeta: { Response: response, Request: req }
|
|
64357
|
+
};
|
|
64358
|
+
const [result2] = await match(json(200, ListMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", ListMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64359
|
+
if (!result2.ok) {
|
|
64360
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64361
|
+
}
|
|
64362
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64363
|
+
}
|
|
64364
|
+
var init_materialsListMaterials = __esm(() => {
|
|
64365
|
+
init_matchers();
|
|
64366
|
+
init_primitives();
|
|
64367
|
+
init_security();
|
|
64368
|
+
init_url();
|
|
64369
|
+
init_errors2();
|
|
64370
|
+
init_operations();
|
|
64371
|
+
init_async();
|
|
64372
|
+
});
|
|
64373
|
+
|
|
64374
|
+
// src/mcp-server/tools/materialsListMaterials.ts
|
|
64375
|
+
var tool$materialsListMaterials;
|
|
64376
|
+
var init_materialsListMaterials2 = __esm(() => {
|
|
64377
|
+
init_materialsListMaterials();
|
|
64378
|
+
init_tools();
|
|
64379
|
+
tool$materialsListMaterials = {
|
|
64380
|
+
name: "materials-list-materials",
|
|
64381
|
+
description: `List all Materials
|
|
64382
|
+
|
|
64383
|
+
|
|
64384
|
+
|
|
64385
|
+
#### Filtering
|
|
64386
|
+
This endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).
|
|
64387
|
+
|
|
64388
|
+
|
|
64389
|
+
#### OAuth Scope
|
|
64390
|
+
This endpoint requires the following OAuth scope **read_inventory**.
|
|
64391
|
+
|
|
64392
|
+
`,
|
|
64393
|
+
tool: async (client, ctx) => {
|
|
64394
|
+
const [result2, apiCall] = await materialsListMaterials(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64395
|
+
if (!result2.ok) {
|
|
64396
|
+
return {
|
|
64397
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64398
|
+
isError: true
|
|
64399
|
+
};
|
|
64400
|
+
}
|
|
64401
|
+
const value = result2.value;
|
|
64402
|
+
return formatResult(value, apiCall);
|
|
64403
|
+
}
|
|
64404
|
+
};
|
|
64405
|
+
});
|
|
64406
|
+
|
|
64407
|
+
// src/funcs/materialsUpdateMaterials.ts
|
|
64408
|
+
function materialsUpdateMaterials(client, request, options) {
|
|
64409
|
+
return new APIPromise($do148(client, request, options));
|
|
64410
|
+
}
|
|
64411
|
+
async function $do148(client, request, options) {
|
|
64412
|
+
const parsed = safeParse(request, (value) => UpdateMaterialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64413
|
+
if (!parsed.ok) {
|
|
64414
|
+
return [parsed, { status: "invalid" }];
|
|
64415
|
+
}
|
|
64416
|
+
const payload = parsed.value;
|
|
64417
|
+
const body = encodeJSON("body", payload.Material, { explode: true });
|
|
64418
|
+
const pathParams = {
|
|
64419
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64420
|
+
explode: false,
|
|
64421
|
+
charEncoding: "percent"
|
|
64422
|
+
})
|
|
64423
|
+
};
|
|
64424
|
+
const path = pathToFunc("/material/{uuid}.json")(pathParams);
|
|
64425
|
+
const headers = new Headers(compactMap({
|
|
64426
|
+
"Content-Type": "application/json",
|
|
64427
|
+
Accept: "application/json"
|
|
64428
|
+
}));
|
|
64429
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64430
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64431
|
+
const context = {
|
|
64432
|
+
options: client._options,
|
|
64433
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64434
|
+
operationID: "updateMaterials",
|
|
64435
|
+
oAuth2Scopes: [],
|
|
64436
|
+
resolvedSecurity: requestSecurity,
|
|
64437
|
+
securitySource: client._options.security,
|
|
64438
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64439
|
+
strategy: "backoff",
|
|
64440
|
+
backoff: {
|
|
64441
|
+
initialInterval: 500,
|
|
64442
|
+
maxInterval: 60000,
|
|
64443
|
+
exponent: 1.5,
|
|
64444
|
+
maxElapsedTime: 3600000
|
|
64445
|
+
},
|
|
64446
|
+
retryConnectionErrors: true
|
|
64447
|
+
},
|
|
64448
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64449
|
+
};
|
|
64450
|
+
const requestRes = client._createRequest(context, {
|
|
64451
|
+
security: requestSecurity,
|
|
64452
|
+
method: "POST",
|
|
64453
|
+
baseURL: options?.serverURL,
|
|
64454
|
+
path,
|
|
64455
|
+
headers,
|
|
64456
|
+
body,
|
|
64457
|
+
userAgent: client._options.userAgent,
|
|
64458
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64459
|
+
}, options);
|
|
64460
|
+
if (!requestRes.ok) {
|
|
64461
|
+
return [requestRes, { status: "invalid" }];
|
|
64462
|
+
}
|
|
64463
|
+
const req = requestRes.value;
|
|
64464
|
+
const doResult = await client._do(req, {
|
|
64465
|
+
context,
|
|
64466
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64467
|
+
retryConfig: context.retryConfig,
|
|
64468
|
+
retryCodes: context.retryCodes
|
|
64469
|
+
});
|
|
64470
|
+
if (!doResult.ok) {
|
|
64471
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64472
|
+
}
|
|
64473
|
+
const response = doResult.value;
|
|
64474
|
+
const responseFields = {
|
|
64475
|
+
HttpMeta: { Response: response, Request: req }
|
|
64476
|
+
};
|
|
64477
|
+
const [result2] = await match(json(200, UpdateMaterialsResponse$inboundSchema), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", UpdateMaterialsResponse$inboundSchema))(response, req, { extraFields: responseFields });
|
|
64478
|
+
if (!result2.ok) {
|
|
64479
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64480
|
+
}
|
|
64481
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64482
|
+
}
|
|
64483
|
+
var init_materialsUpdateMaterials = __esm(() => {
|
|
64484
|
+
init_encodings();
|
|
64485
|
+
init_matchers();
|
|
64486
|
+
init_primitives();
|
|
64487
|
+
init_schemas();
|
|
64488
|
+
init_security();
|
|
64489
|
+
init_url();
|
|
64490
|
+
init_errors2();
|
|
64491
|
+
init_operations();
|
|
64492
|
+
init_async();
|
|
64493
|
+
});
|
|
64494
|
+
|
|
64495
|
+
// src/mcp-server/tools/materialsUpdateMaterials.ts
|
|
64496
|
+
var args120, tool$materialsUpdateMaterials;
|
|
64497
|
+
var init_materialsUpdateMaterials2 = __esm(() => {
|
|
64498
|
+
init_materialsUpdateMaterials();
|
|
64499
|
+
init_operations();
|
|
64500
|
+
init_tools();
|
|
64501
|
+
args120 = {
|
|
64502
|
+
request: UpdateMaterialsRequest$inboundSchema
|
|
64503
|
+
};
|
|
64504
|
+
tool$materialsUpdateMaterials = {
|
|
64505
|
+
name: "materials-update-materials",
|
|
64506
|
+
description: `Update a Material
|
|
64507
|
+
|
|
64508
|
+
|
|
64509
|
+
|
|
64510
|
+
#### OAuth Scope
|
|
64511
|
+
This endpoint requires the following OAuth scope **manage_inventory**.
|
|
64512
|
+
|
|
64513
|
+
`,
|
|
64514
|
+
args: args120,
|
|
64515
|
+
tool: async (client, args121, ctx) => {
|
|
64516
|
+
const [result2, apiCall] = await materialsUpdateMaterials(client, args121.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64517
|
+
if (!result2.ok) {
|
|
64518
|
+
return {
|
|
64519
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64520
|
+
isError: true
|
|
64521
|
+
};
|
|
64522
|
+
}
|
|
64523
|
+
const value = result2.value;
|
|
64524
|
+
return formatResult(value, apiCall);
|
|
64525
|
+
}
|
|
64526
|
+
};
|
|
64527
|
+
});
|
|
64528
|
+
|
|
64529
|
+
// src/funcs/notesCreateNotes.ts
|
|
64530
|
+
function notesCreateNotes(client, request, options) {
|
|
64531
|
+
return new APIPromise($do149(client, request, options));
|
|
64532
|
+
}
|
|
64533
|
+
async function $do149(client, request, options) {
|
|
64534
|
+
const parsed = safeParse(request, (value) => NoteInput$outboundSchema.parse(value), "Input validation failed");
|
|
64535
|
+
if (!parsed.ok) {
|
|
64536
|
+
return [parsed, { status: "invalid" }];
|
|
64537
|
+
}
|
|
64538
|
+
const payload = parsed.value;
|
|
64539
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
64540
|
+
const path = pathToFunc("/note.json")();
|
|
64541
|
+
const headers = new Headers(compactMap({
|
|
64542
|
+
"Content-Type": "application/json",
|
|
64543
|
+
Accept: "application/json"
|
|
64544
|
+
}));
|
|
64545
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64546
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64547
|
+
const context = {
|
|
64548
|
+
options: client._options,
|
|
64549
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64550
|
+
operationID: "createNotes",
|
|
64551
|
+
oAuth2Scopes: [],
|
|
64552
|
+
resolvedSecurity: requestSecurity,
|
|
64553
|
+
securitySource: client._options.security,
|
|
64554
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
64555
|
+
strategy: "backoff",
|
|
64556
|
+
backoff: {
|
|
64557
|
+
initialInterval: 500,
|
|
64558
|
+
maxInterval: 60000,
|
|
64559
|
+
exponent: 1.5,
|
|
64560
|
+
maxElapsedTime: 3600000
|
|
64561
|
+
},
|
|
64562
|
+
retryConnectionErrors: true
|
|
64563
|
+
},
|
|
64564
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
64565
|
+
};
|
|
64566
|
+
const requestRes = client._createRequest(context, {
|
|
64567
|
+
security: requestSecurity,
|
|
64568
|
+
method: "POST",
|
|
64569
|
+
baseURL: options?.serverURL,
|
|
64570
|
+
path,
|
|
64571
|
+
headers,
|
|
64572
|
+
body,
|
|
64573
|
+
userAgent: client._options.userAgent,
|
|
64574
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
64575
|
+
}, options);
|
|
64576
|
+
if (!requestRes.ok) {
|
|
64577
|
+
return [requestRes, { status: "invalid" }];
|
|
64578
|
+
}
|
|
64579
|
+
const req = requestRes.value;
|
|
64580
|
+
const doResult = await client._do(req, {
|
|
64581
|
+
context,
|
|
64582
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
64583
|
+
retryConfig: context.retryConfig,
|
|
64584
|
+
retryCodes: context.retryCodes
|
|
64585
|
+
});
|
|
64586
|
+
if (!doResult.ok) {
|
|
64587
|
+
return [doResult, { status: "request-error", request: req }];
|
|
64588
|
+
}
|
|
64589
|
+
const response = doResult.value;
|
|
64590
|
+
const responseFields = {
|
|
64591
|
+
HttpMeta: { Response: response, Request: req }
|
|
64592
|
+
};
|
|
64593
|
+
const [result2] = await match(json(200, CreateNotesResponse$inboundSchema, {
|
|
64594
|
+
hdrs: true,
|
|
64595
|
+
key: "Result"
|
|
64596
|
+
}), jsonErr(400, ErrorT$inboundSchema2), fail("4XX"), fail("5XX"), json("default", CreateNotesResponse$inboundSchema, {
|
|
64597
|
+
key: "Result"
|
|
64598
|
+
}))(response, req, { extraFields: responseFields });
|
|
64599
|
+
if (!result2.ok) {
|
|
64600
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64601
|
+
}
|
|
64602
|
+
return [result2, { status: "complete", request: req, response }];
|
|
64603
|
+
}
|
|
64604
|
+
var init_notesCreateNotes = __esm(() => {
|
|
64605
|
+
init_encodings();
|
|
64606
|
+
init_matchers();
|
|
64607
|
+
init_primitives();
|
|
64608
|
+
init_schemas();
|
|
64609
|
+
init_security();
|
|
64610
|
+
init_url();
|
|
64611
|
+
init_components();
|
|
64612
|
+
init_errors2();
|
|
64613
|
+
init_operations();
|
|
64614
|
+
init_async();
|
|
64615
|
+
});
|
|
64616
|
+
|
|
64617
|
+
// src/mcp-server/tools/notesCreateNotes.ts
|
|
64618
|
+
var args121, tool$notesCreateNotes;
|
|
64619
|
+
var init_notesCreateNotes2 = __esm(() => {
|
|
64620
|
+
init_notesCreateNotes();
|
|
64621
|
+
init_components();
|
|
64622
|
+
init_tools();
|
|
64623
|
+
args121 = {
|
|
64624
|
+
request: NoteInput$inboundSchema
|
|
64625
|
+
};
|
|
64626
|
+
tool$notesCreateNotes = {
|
|
64627
|
+
name: "notes-create-notes",
|
|
64628
|
+
description: `Create a new Note
|
|
64629
|
+
|
|
64630
|
+
|
|
64631
|
+
|
|
64632
|
+
#### Record UUID
|
|
64633
|
+
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.
|
|
64634
|
+
|
|
64635
|
+
`,
|
|
64636
|
+
args: args121,
|
|
64637
|
+
tool: async (client, args122, ctx) => {
|
|
64638
|
+
const [result2, apiCall] = await notesCreateNotes(client, args122.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64639
|
+
if (!result2.ok) {
|
|
64640
|
+
return {
|
|
64641
|
+
content: [{ type: "text", text: result2.error.message }],
|
|
64642
|
+
isError: true
|
|
64643
|
+
};
|
|
64644
|
+
}
|
|
64645
|
+
const value = result2.value.result;
|
|
64646
|
+
return formatResult(value, apiCall);
|
|
64647
|
+
}
|
|
64648
|
+
};
|
|
64649
|
+
});
|
|
64650
|
+
|
|
64651
|
+
// src/funcs/notesDeleteNotes.ts
|
|
64652
|
+
function notesDeleteNotes(client, request, options) {
|
|
64653
|
+
return new APIPromise($do150(client, request, options));
|
|
64654
|
+
}
|
|
64655
|
+
async function $do150(client, request, options) {
|
|
64656
|
+
const parsed = safeParse(request, (value) => DeleteNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64657
|
+
if (!parsed.ok) {
|
|
64658
|
+
return [parsed, { status: "invalid" }];
|
|
64659
|
+
}
|
|
64660
|
+
const payload = parsed.value;
|
|
64661
|
+
const body = null;
|
|
64662
|
+
const pathParams = {
|
|
64663
|
+
uuid: encodeSimple("uuid", payload.uuid, {
|
|
64664
|
+
explode: false,
|
|
64665
|
+
charEncoding: "percent"
|
|
64666
|
+
})
|
|
64667
|
+
};
|
|
64668
|
+
const path = pathToFunc("/note/{uuid}.json")(pathParams);
|
|
64669
|
+
const headers = new Headers(compactMap({
|
|
64670
|
+
Accept: "application/json"
|
|
64671
|
+
}));
|
|
64672
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
64673
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
64674
|
+
const context = {
|
|
64675
|
+
options: client._options,
|
|
64676
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
64677
|
+
operationID: "deleteNotes",
|
|
63861
64678
|
oAuth2Scopes: [],
|
|
63862
64679
|
resolvedSecurity: requestSecurity,
|
|
63863
64680
|
securitySource: client._options.security,
|
|
@@ -63919,12 +64736,12 @@ var init_notesDeleteNotes = __esm(() => {
|
|
|
63919
64736
|
});
|
|
63920
64737
|
|
|
63921
64738
|
// src/mcp-server/tools/notesDeleteNotes.ts
|
|
63922
|
-
var
|
|
64739
|
+
var args122, tool$notesDeleteNotes;
|
|
63923
64740
|
var init_notesDeleteNotes2 = __esm(() => {
|
|
63924
64741
|
init_notesDeleteNotes();
|
|
63925
64742
|
init_operations();
|
|
63926
64743
|
init_tools();
|
|
63927
|
-
|
|
64744
|
+
args122 = {
|
|
63928
64745
|
request: DeleteNotesRequest$inboundSchema
|
|
63929
64746
|
};
|
|
63930
64747
|
tool$notesDeleteNotes = {
|
|
@@ -63936,9 +64753,9 @@ var init_notesDeleteNotes2 = __esm(() => {
|
|
|
63936
64753
|
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
64754
|
|
|
63938
64755
|
`,
|
|
63939
|
-
args:
|
|
63940
|
-
tool: async (client,
|
|
63941
|
-
const [result2, apiCall] = await notesDeleteNotes(client,
|
|
64756
|
+
args: args122,
|
|
64757
|
+
tool: async (client, args123, ctx) => {
|
|
64758
|
+
const [result2, apiCall] = await notesDeleteNotes(client, args123.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63942
64759
|
if (!result2.ok) {
|
|
63943
64760
|
return {
|
|
63944
64761
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -63953,9 +64770,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
63953
64770
|
|
|
63954
64771
|
// src/funcs/notesGetNotes.ts
|
|
63955
64772
|
function notesGetNotes(client, request, options) {
|
|
63956
|
-
return new APIPromise($
|
|
64773
|
+
return new APIPromise($do151(client, request, options));
|
|
63957
64774
|
}
|
|
63958
|
-
async function $
|
|
64775
|
+
async function $do151(client, request, options) {
|
|
63959
64776
|
const parsed = safeParse(request, (value) => GetNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63960
64777
|
if (!parsed.ok) {
|
|
63961
64778
|
return [parsed, { status: "invalid" }];
|
|
@@ -64039,20 +64856,20 @@ var init_notesGetNotes = __esm(() => {
|
|
|
64039
64856
|
});
|
|
64040
64857
|
|
|
64041
64858
|
// src/mcp-server/tools/notesGetNotes.ts
|
|
64042
|
-
var
|
|
64859
|
+
var args123, tool$notesGetNotes;
|
|
64043
64860
|
var init_notesGetNotes2 = __esm(() => {
|
|
64044
64861
|
init_notesGetNotes();
|
|
64045
64862
|
init_operations();
|
|
64046
64863
|
init_tools();
|
|
64047
|
-
|
|
64864
|
+
args123 = {
|
|
64048
64865
|
request: GetNotesRequest$inboundSchema
|
|
64049
64866
|
};
|
|
64050
64867
|
tool$notesGetNotes = {
|
|
64051
64868
|
name: "notes-get-notes",
|
|
64052
64869
|
description: `Retrieve a Note`,
|
|
64053
|
-
args:
|
|
64054
|
-
tool: async (client,
|
|
64055
|
-
const [result2, apiCall] = await notesGetNotes(client,
|
|
64870
|
+
args: args123,
|
|
64871
|
+
tool: async (client, args124, ctx) => {
|
|
64872
|
+
const [result2, apiCall] = await notesGetNotes(client, args124.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64056
64873
|
if (!result2.ok) {
|
|
64057
64874
|
return {
|
|
64058
64875
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64067,9 +64884,9 @@ var init_notesGetNotes2 = __esm(() => {
|
|
|
64067
64884
|
|
|
64068
64885
|
// src/funcs/notesListNotes.ts
|
|
64069
64886
|
function notesListNotes(client, options) {
|
|
64070
|
-
return new APIPromise($
|
|
64887
|
+
return new APIPromise($do152(client, options));
|
|
64071
64888
|
}
|
|
64072
|
-
async function $
|
|
64889
|
+
async function $do152(client, options) {
|
|
64073
64890
|
const path = pathToFunc("/note.json")();
|
|
64074
64891
|
const headers = new Headers(compactMap({
|
|
64075
64892
|
Accept: "application/json"
|
|
@@ -64167,9 +64984,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
64167
64984
|
|
|
64168
64985
|
// src/funcs/notesUpdateNotes.ts
|
|
64169
64986
|
function notesUpdateNotes(client, request, options) {
|
|
64170
|
-
return new APIPromise($
|
|
64987
|
+
return new APIPromise($do153(client, request, options));
|
|
64171
64988
|
}
|
|
64172
|
-
async function $
|
|
64989
|
+
async function $do153(client, request, options) {
|
|
64173
64990
|
const parsed = safeParse(request, (value) => UpdateNotesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64174
64991
|
if (!parsed.ok) {
|
|
64175
64992
|
return [parsed, { status: "invalid" }];
|
|
@@ -64254,20 +65071,20 @@ var init_notesUpdateNotes = __esm(() => {
|
|
|
64254
65071
|
});
|
|
64255
65072
|
|
|
64256
65073
|
// src/mcp-server/tools/notesUpdateNotes.ts
|
|
64257
|
-
var
|
|
65074
|
+
var args124, tool$notesUpdateNotes;
|
|
64258
65075
|
var init_notesUpdateNotes2 = __esm(() => {
|
|
64259
65076
|
init_notesUpdateNotes();
|
|
64260
65077
|
init_operations();
|
|
64261
65078
|
init_tools();
|
|
64262
|
-
|
|
65079
|
+
args124 = {
|
|
64263
65080
|
request: UpdateNotesRequest$inboundSchema
|
|
64264
65081
|
};
|
|
64265
65082
|
tool$notesUpdateNotes = {
|
|
64266
65083
|
name: "notes-update-notes",
|
|
64267
65084
|
description: `Update a Note`,
|
|
64268
|
-
args:
|
|
64269
|
-
tool: async (client,
|
|
64270
|
-
const [result2, apiCall] = await notesUpdateNotes(client,
|
|
65085
|
+
args: args124,
|
|
65086
|
+
tool: async (client, args125, ctx) => {
|
|
65087
|
+
const [result2, apiCall] = await notesUpdateNotes(client, args125.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64271
65088
|
if (!result2.ok) {
|
|
64272
65089
|
return {
|
|
64273
65090
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64282,9 +65099,9 @@ var init_notesUpdateNotes2 = __esm(() => {
|
|
|
64282
65099
|
|
|
64283
65100
|
// src/funcs/searchGeneralSearch.ts
|
|
64284
65101
|
function searchGeneralSearch(client, request, options) {
|
|
64285
|
-
return new APIPromise($
|
|
65102
|
+
return new APIPromise($do154(client, request, options));
|
|
64286
65103
|
}
|
|
64287
|
-
async function $
|
|
65104
|
+
async function $do154(client, request, options) {
|
|
64288
65105
|
const parsed = safeParse(request, (value) => GeneralSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64289
65106
|
if (!parsed.ok) {
|
|
64290
65107
|
return [parsed, { status: "invalid" }];
|
|
@@ -64368,12 +65185,12 @@ var init_searchGeneralSearch = __esm(() => {
|
|
|
64368
65185
|
});
|
|
64369
65186
|
|
|
64370
65187
|
// src/mcp-server/tools/searchGeneralSearch.ts
|
|
64371
|
-
var
|
|
65188
|
+
var args125, tool$searchGeneralSearch;
|
|
64372
65189
|
var init_searchGeneralSearch2 = __esm(() => {
|
|
64373
65190
|
init_searchGeneralSearch();
|
|
64374
65191
|
init_operations();
|
|
64375
65192
|
init_tools();
|
|
64376
|
-
|
|
65193
|
+
args125 = {
|
|
64377
65194
|
request: GeneralSearchRequest$inboundSchema
|
|
64378
65195
|
};
|
|
64379
65196
|
tool$searchGeneralSearch = {
|
|
@@ -64381,9 +65198,9 @@ var init_searchGeneralSearch2 = __esm(() => {
|
|
|
64381
65198
|
description: `Search across multiple object types
|
|
64382
65199
|
|
|
64383
65200
|
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,
|
|
65201
|
+
args: args125,
|
|
65202
|
+
tool: async (client, args126, ctx) => {
|
|
65203
|
+
const [result2, apiCall] = await searchGeneralSearch(client, args126.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64387
65204
|
if (!result2.ok) {
|
|
64388
65205
|
return {
|
|
64389
65206
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64398,9 +65215,9 @@ Performs a text search across jobs, companies, and materials. Returns combined r
|
|
|
64398
65215
|
|
|
64399
65216
|
// src/funcs/searchJobEmbeddingSearch.ts
|
|
64400
65217
|
function searchJobEmbeddingSearch(client, request, options) {
|
|
64401
|
-
return new APIPromise($
|
|
65218
|
+
return new APIPromise($do155(client, request, options));
|
|
64402
65219
|
}
|
|
64403
|
-
async function $
|
|
65220
|
+
async function $do155(client, request, options) {
|
|
64404
65221
|
const parsed = safeParse(request, (value) => JobEmbeddingSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64405
65222
|
if (!parsed.ok) {
|
|
64406
65223
|
return [parsed, { status: "invalid" }];
|
|
@@ -64485,12 +65302,12 @@ var init_searchJobEmbeddingSearch = __esm(() => {
|
|
|
64485
65302
|
});
|
|
64486
65303
|
|
|
64487
65304
|
// src/mcp-server/tools/searchJobEmbeddingSearch.ts
|
|
64488
|
-
var
|
|
65305
|
+
var args126, tool$searchJobEmbeddingSearch;
|
|
64489
65306
|
var init_searchJobEmbeddingSearch2 = __esm(() => {
|
|
64490
65307
|
init_searchJobEmbeddingSearch();
|
|
64491
65308
|
init_operations();
|
|
64492
65309
|
init_tools();
|
|
64493
|
-
|
|
65310
|
+
args126 = {
|
|
64494
65311
|
request: JobEmbeddingSearchRequest$inboundSchema
|
|
64495
65312
|
};
|
|
64496
65313
|
tool$searchJobEmbeddingSearch = {
|
|
@@ -64498,9 +65315,9 @@ var init_searchJobEmbeddingSearch2 = __esm(() => {
|
|
|
64498
65315
|
description: `Semantic search for jobs
|
|
64499
65316
|
|
|
64500
65317
|
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,
|
|
65318
|
+
args: args126,
|
|
65319
|
+
tool: async (client, args127, ctx) => {
|
|
65320
|
+
const [result2, apiCall] = await searchJobEmbeddingSearch(client, args127.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64504
65321
|
if (!result2.ok) {
|
|
64505
65322
|
return {
|
|
64506
65323
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64515,9 +65332,9 @@ Performs semantic/embedding-based search on job content. This uses AI to find jo
|
|
|
64515
65332
|
|
|
64516
65333
|
// src/funcs/searchObjectSearch.ts
|
|
64517
65334
|
function searchObjectSearch(client, request, options) {
|
|
64518
|
-
return new APIPromise($
|
|
65335
|
+
return new APIPromise($do156(client, request, options));
|
|
64519
65336
|
}
|
|
64520
|
-
async function $
|
|
65337
|
+
async function $do156(client, request, options) {
|
|
64521
65338
|
const parsed = safeParse(request, (value) => ObjectSearchRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64522
65339
|
if (!parsed.ok) {
|
|
64523
65340
|
return [parsed, { status: "invalid" }];
|
|
@@ -64607,12 +65424,12 @@ var init_searchObjectSearch = __esm(() => {
|
|
|
64607
65424
|
});
|
|
64608
65425
|
|
|
64609
65426
|
// src/mcp-server/tools/searchObjectSearch.ts
|
|
64610
|
-
var
|
|
65427
|
+
var args127, tool$searchObjectSearch;
|
|
64611
65428
|
var init_searchObjectSearch2 = __esm(() => {
|
|
64612
65429
|
init_searchObjectSearch();
|
|
64613
65430
|
init_operations();
|
|
64614
65431
|
init_tools();
|
|
64615
|
-
|
|
65432
|
+
args127 = {
|
|
64616
65433
|
request: ObjectSearchRequest$inboundSchema
|
|
64617
65434
|
};
|
|
64618
65435
|
tool$searchObjectSearch = {
|
|
@@ -64620,9 +65437,9 @@ var init_searchObjectSearch2 = __esm(() => {
|
|
|
64620
65437
|
description: `Search within a specific object type
|
|
64621
65438
|
|
|
64622
65439
|
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,
|
|
65440
|
+
args: args127,
|
|
65441
|
+
tool: async (client, args128, ctx) => {
|
|
65442
|
+
const [result2, apiCall] = await searchObjectSearch(client, args128.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64626
65443
|
if (!result2.ok) {
|
|
64627
65444
|
return {
|
|
64628
65445
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64637,9 +65454,9 @@ Performs a text search within a specific object type. Supported types: job, comp
|
|
|
64637
65454
|
|
|
64638
65455
|
// src/funcs/securityRolesCreateSecurityRoles.ts
|
|
64639
65456
|
function securityRolesCreateSecurityRoles(client, request, options) {
|
|
64640
|
-
return new APIPromise($
|
|
65457
|
+
return new APIPromise($do157(client, request, options));
|
|
64641
65458
|
}
|
|
64642
|
-
async function $
|
|
65459
|
+
async function $do157(client, request, options) {
|
|
64643
65460
|
const parsed = safeParse(request, (value) => SecurityRoleInput$outboundSchema.parse(value), "Input validation failed");
|
|
64644
65461
|
if (!parsed.ok) {
|
|
64645
65462
|
return [parsed, { status: "invalid" }];
|
|
@@ -64724,12 +65541,12 @@ var init_securityRolesCreateSecurityRoles = __esm(() => {
|
|
|
64724
65541
|
});
|
|
64725
65542
|
|
|
64726
65543
|
// src/mcp-server/tools/securityRolesCreateSecurityRoles.ts
|
|
64727
|
-
var
|
|
65544
|
+
var args128, tool$securityRolesCreateSecurityRoles;
|
|
64728
65545
|
var init_securityRolesCreateSecurityRoles2 = __esm(() => {
|
|
64729
65546
|
init_securityRolesCreateSecurityRoles();
|
|
64730
65547
|
init_components();
|
|
64731
65548
|
init_tools();
|
|
64732
|
-
|
|
65549
|
+
args128 = {
|
|
64733
65550
|
request: SecurityRoleInput$inboundSchema
|
|
64734
65551
|
};
|
|
64735
65552
|
tool$securityRolesCreateSecurityRoles = {
|
|
@@ -64742,9 +65559,9 @@ var init_securityRolesCreateSecurityRoles2 = __esm(() => {
|
|
|
64742
65559
|
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
65560
|
|
|
64744
65561
|
`,
|
|
64745
|
-
args:
|
|
64746
|
-
tool: async (client,
|
|
64747
|
-
const [result2, apiCall] = await securityRolesCreateSecurityRoles(client,
|
|
65562
|
+
args: args128,
|
|
65563
|
+
tool: async (client, args129, ctx) => {
|
|
65564
|
+
const [result2, apiCall] = await securityRolesCreateSecurityRoles(client, args129.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64748
65565
|
if (!result2.ok) {
|
|
64749
65566
|
return {
|
|
64750
65567
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64759,9 +65576,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
64759
65576
|
|
|
64760
65577
|
// src/funcs/securityRolesDeleteSecurityRoles.ts
|
|
64761
65578
|
function securityRolesDeleteSecurityRoles(client, request, options) {
|
|
64762
|
-
return new APIPromise($
|
|
65579
|
+
return new APIPromise($do158(client, request, options));
|
|
64763
65580
|
}
|
|
64764
|
-
async function $
|
|
65581
|
+
async function $do158(client, request, options) {
|
|
64765
65582
|
const parsed = safeParse(request, (value) => DeleteSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64766
65583
|
if (!parsed.ok) {
|
|
64767
65584
|
return [parsed, { status: "invalid" }];
|
|
@@ -64845,12 +65662,12 @@ var init_securityRolesDeleteSecurityRoles = __esm(() => {
|
|
|
64845
65662
|
});
|
|
64846
65663
|
|
|
64847
65664
|
// src/mcp-server/tools/securityRolesDeleteSecurityRoles.ts
|
|
64848
|
-
var
|
|
65665
|
+
var args129, tool$securityRolesDeleteSecurityRoles;
|
|
64849
65666
|
var init_securityRolesDeleteSecurityRoles2 = __esm(() => {
|
|
64850
65667
|
init_securityRolesDeleteSecurityRoles();
|
|
64851
65668
|
init_operations();
|
|
64852
65669
|
init_tools();
|
|
64853
|
-
|
|
65670
|
+
args129 = {
|
|
64854
65671
|
request: DeleteSecurityRolesRequest$inboundSchema
|
|
64855
65672
|
};
|
|
64856
65673
|
tool$securityRolesDeleteSecurityRoles = {
|
|
@@ -64862,9 +65679,9 @@ var init_securityRolesDeleteSecurityRoles2 = __esm(() => {
|
|
|
64862
65679
|
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
65680
|
|
|
64864
65681
|
`,
|
|
64865
|
-
args:
|
|
64866
|
-
tool: async (client,
|
|
64867
|
-
const [result2, apiCall] = await securityRolesDeleteSecurityRoles(client,
|
|
65682
|
+
args: args129,
|
|
65683
|
+
tool: async (client, args130, ctx) => {
|
|
65684
|
+
const [result2, apiCall] = await securityRolesDeleteSecurityRoles(client, args130.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64868
65685
|
if (!result2.ok) {
|
|
64869
65686
|
return {
|
|
64870
65687
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64879,9 +65696,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
64879
65696
|
|
|
64880
65697
|
// src/funcs/securityRolesGetSecurityRoles.ts
|
|
64881
65698
|
function securityRolesGetSecurityRoles(client, request, options) {
|
|
64882
|
-
return new APIPromise($
|
|
65699
|
+
return new APIPromise($do159(client, request, options));
|
|
64883
65700
|
}
|
|
64884
|
-
async function $
|
|
65701
|
+
async function $do159(client, request, options) {
|
|
64885
65702
|
const parsed = safeParse(request, (value) => GetSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
64886
65703
|
if (!parsed.ok) {
|
|
64887
65704
|
return [parsed, { status: "invalid" }];
|
|
@@ -64965,20 +65782,20 @@ var init_securityRolesGetSecurityRoles = __esm(() => {
|
|
|
64965
65782
|
});
|
|
64966
65783
|
|
|
64967
65784
|
// src/mcp-server/tools/securityRolesGetSecurityRoles.ts
|
|
64968
|
-
var
|
|
65785
|
+
var args130, tool$securityRolesGetSecurityRoles;
|
|
64969
65786
|
var init_securityRolesGetSecurityRoles2 = __esm(() => {
|
|
64970
65787
|
init_securityRolesGetSecurityRoles();
|
|
64971
65788
|
init_operations();
|
|
64972
65789
|
init_tools();
|
|
64973
|
-
|
|
65790
|
+
args130 = {
|
|
64974
65791
|
request: GetSecurityRolesRequest$inboundSchema
|
|
64975
65792
|
};
|
|
64976
65793
|
tool$securityRolesGetSecurityRoles = {
|
|
64977
65794
|
name: "security-roles-get-security-roles",
|
|
64978
65795
|
description: `Retrieve a Security Role`,
|
|
64979
|
-
args:
|
|
64980
|
-
tool: async (client,
|
|
64981
|
-
const [result2, apiCall] = await securityRolesGetSecurityRoles(client,
|
|
65796
|
+
args: args130,
|
|
65797
|
+
tool: async (client, args131, ctx) => {
|
|
65798
|
+
const [result2, apiCall] = await securityRolesGetSecurityRoles(client, args131.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
64982
65799
|
if (!result2.ok) {
|
|
64983
65800
|
return {
|
|
64984
65801
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -64993,9 +65810,9 @@ var init_securityRolesGetSecurityRoles2 = __esm(() => {
|
|
|
64993
65810
|
|
|
64994
65811
|
// src/funcs/securityRolesListSecurityRoles.ts
|
|
64995
65812
|
function securityRolesListSecurityRoles(client, options) {
|
|
64996
|
-
return new APIPromise($
|
|
65813
|
+
return new APIPromise($do160(client, options));
|
|
64997
65814
|
}
|
|
64998
|
-
async function $
|
|
65815
|
+
async function $do160(client, options) {
|
|
64999
65816
|
const path = pathToFunc("/securityrole.json")();
|
|
65000
65817
|
const headers = new Headers(compactMap({
|
|
65001
65818
|
Accept: "application/json"
|
|
@@ -65093,9 +65910,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
65093
65910
|
|
|
65094
65911
|
// src/funcs/securityRolesUpdateSecurityRoles.ts
|
|
65095
65912
|
function securityRolesUpdateSecurityRoles(client, request, options) {
|
|
65096
|
-
return new APIPromise($
|
|
65913
|
+
return new APIPromise($do161(client, request, options));
|
|
65097
65914
|
}
|
|
65098
|
-
async function $
|
|
65915
|
+
async function $do161(client, request, options) {
|
|
65099
65916
|
const parsed = safeParse(request, (value) => UpdateSecurityRolesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65100
65917
|
if (!parsed.ok) {
|
|
65101
65918
|
return [parsed, { status: "invalid" }];
|
|
@@ -65180,20 +65997,20 @@ var init_securityRolesUpdateSecurityRoles = __esm(() => {
|
|
|
65180
65997
|
});
|
|
65181
65998
|
|
|
65182
65999
|
// src/mcp-server/tools/securityRolesUpdateSecurityRoles.ts
|
|
65183
|
-
var
|
|
66000
|
+
var args131, tool$securityRolesUpdateSecurityRoles;
|
|
65184
66001
|
var init_securityRolesUpdateSecurityRoles2 = __esm(() => {
|
|
65185
66002
|
init_securityRolesUpdateSecurityRoles();
|
|
65186
66003
|
init_operations();
|
|
65187
66004
|
init_tools();
|
|
65188
|
-
|
|
66005
|
+
args131 = {
|
|
65189
66006
|
request: UpdateSecurityRolesRequest$inboundSchema
|
|
65190
66007
|
};
|
|
65191
66008
|
tool$securityRolesUpdateSecurityRoles = {
|
|
65192
66009
|
name: "security-roles-update-security-roles",
|
|
65193
66010
|
description: `Update a Security Role`,
|
|
65194
|
-
args:
|
|
65195
|
-
tool: async (client,
|
|
65196
|
-
const [result2, apiCall] = await securityRolesUpdateSecurityRoles(client,
|
|
66011
|
+
args: args131,
|
|
66012
|
+
tool: async (client, args132, ctx) => {
|
|
66013
|
+
const [result2, apiCall] = await securityRolesUpdateSecurityRoles(client, args132.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65197
66014
|
if (!result2.ok) {
|
|
65198
66015
|
return {
|
|
65199
66016
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65208,9 +66025,9 @@ var init_securityRolesUpdateSecurityRoles2 = __esm(() => {
|
|
|
65208
66025
|
|
|
65209
66026
|
// src/funcs/smsTemplatesCreateSMSTemplates.ts
|
|
65210
66027
|
function smsTemplatesCreateSMSTemplates(client, request, options) {
|
|
65211
|
-
return new APIPromise($
|
|
66028
|
+
return new APIPromise($do162(client, request, options));
|
|
65212
66029
|
}
|
|
65213
|
-
async function $
|
|
66030
|
+
async function $do162(client, request, options) {
|
|
65214
66031
|
const parsed = safeParse(request, (value) => SmsTemplateInput$outboundSchema.parse(value), "Input validation failed");
|
|
65215
66032
|
if (!parsed.ok) {
|
|
65216
66033
|
return [parsed, { status: "invalid" }];
|
|
@@ -65295,12 +66112,12 @@ var init_smsTemplatesCreateSMSTemplates = __esm(() => {
|
|
|
65295
66112
|
});
|
|
65296
66113
|
|
|
65297
66114
|
// src/mcp-server/tools/smsTemplatesCreateSMSTemplates.ts
|
|
65298
|
-
var
|
|
66115
|
+
var args132, tool$smsTemplatesCreateSMSTemplates;
|
|
65299
66116
|
var init_smsTemplatesCreateSMSTemplates2 = __esm(() => {
|
|
65300
66117
|
init_smsTemplatesCreateSMSTemplates();
|
|
65301
66118
|
init_components();
|
|
65302
66119
|
init_tools();
|
|
65303
|
-
|
|
66120
|
+
args132 = {
|
|
65304
66121
|
request: SmsTemplateInput$inboundSchema
|
|
65305
66122
|
};
|
|
65306
66123
|
tool$smsTemplatesCreateSMSTemplates = {
|
|
@@ -65313,9 +66130,9 @@ var init_smsTemplatesCreateSMSTemplates2 = __esm(() => {
|
|
|
65313
66130
|
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
66131
|
|
|
65315
66132
|
`,
|
|
65316
|
-
args:
|
|
65317
|
-
tool: async (client,
|
|
65318
|
-
const [result2, apiCall] = await smsTemplatesCreateSMSTemplates(client,
|
|
66133
|
+
args: args132,
|
|
66134
|
+
tool: async (client, args133, ctx) => {
|
|
66135
|
+
const [result2, apiCall] = await smsTemplatesCreateSMSTemplates(client, args133.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65319
66136
|
if (!result2.ok) {
|
|
65320
66137
|
return {
|
|
65321
66138
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65330,9 +66147,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
65330
66147
|
|
|
65331
66148
|
// src/funcs/smsTemplatesDeleteSMSTemplates.ts
|
|
65332
66149
|
function smsTemplatesDeleteSMSTemplates(client, request, options) {
|
|
65333
|
-
return new APIPromise($
|
|
66150
|
+
return new APIPromise($do163(client, request, options));
|
|
65334
66151
|
}
|
|
65335
|
-
async function $
|
|
66152
|
+
async function $do163(client, request, options) {
|
|
65336
66153
|
const parsed = safeParse(request, (value) => DeleteSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65337
66154
|
if (!parsed.ok) {
|
|
65338
66155
|
return [parsed, { status: "invalid" }];
|
|
@@ -65416,12 +66233,12 @@ var init_smsTemplatesDeleteSMSTemplates = __esm(() => {
|
|
|
65416
66233
|
});
|
|
65417
66234
|
|
|
65418
66235
|
// src/mcp-server/tools/smsTemplatesDeleteSMSTemplates.ts
|
|
65419
|
-
var
|
|
66236
|
+
var args133, tool$smsTemplatesDeleteSMSTemplates;
|
|
65420
66237
|
var init_smsTemplatesDeleteSMSTemplates2 = __esm(() => {
|
|
65421
66238
|
init_smsTemplatesDeleteSMSTemplates();
|
|
65422
66239
|
init_operations();
|
|
65423
66240
|
init_tools();
|
|
65424
|
-
|
|
66241
|
+
args133 = {
|
|
65425
66242
|
request: DeleteSMSTemplatesRequest$inboundSchema
|
|
65426
66243
|
};
|
|
65427
66244
|
tool$smsTemplatesDeleteSMSTemplates = {
|
|
@@ -65433,9 +66250,9 @@ var init_smsTemplatesDeleteSMSTemplates2 = __esm(() => {
|
|
|
65433
66250
|
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
66251
|
|
|
65435
66252
|
`,
|
|
65436
|
-
args:
|
|
65437
|
-
tool: async (client,
|
|
65438
|
-
const [result2, apiCall] = await smsTemplatesDeleteSMSTemplates(client,
|
|
66253
|
+
args: args133,
|
|
66254
|
+
tool: async (client, args134, ctx) => {
|
|
66255
|
+
const [result2, apiCall] = await smsTemplatesDeleteSMSTemplates(client, args134.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65439
66256
|
if (!result2.ok) {
|
|
65440
66257
|
return {
|
|
65441
66258
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65450,9 +66267,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
65450
66267
|
|
|
65451
66268
|
// src/funcs/smsTemplatesGetSMSTemplates.ts
|
|
65452
66269
|
function smsTemplatesGetSMSTemplates(client, request, options) {
|
|
65453
|
-
return new APIPromise($
|
|
66270
|
+
return new APIPromise($do164(client, request, options));
|
|
65454
66271
|
}
|
|
65455
|
-
async function $
|
|
66272
|
+
async function $do164(client, request, options) {
|
|
65456
66273
|
const parsed = safeParse(request, (value) => GetSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65457
66274
|
if (!parsed.ok) {
|
|
65458
66275
|
return [parsed, { status: "invalid" }];
|
|
@@ -65536,20 +66353,20 @@ var init_smsTemplatesGetSMSTemplates = __esm(() => {
|
|
|
65536
66353
|
});
|
|
65537
66354
|
|
|
65538
66355
|
// src/mcp-server/tools/smsTemplatesGetSMSTemplates.ts
|
|
65539
|
-
var
|
|
66356
|
+
var args134, tool$smsTemplatesGetSMSTemplates;
|
|
65540
66357
|
var init_smsTemplatesGetSMSTemplates2 = __esm(() => {
|
|
65541
66358
|
init_smsTemplatesGetSMSTemplates();
|
|
65542
66359
|
init_operations();
|
|
65543
66360
|
init_tools();
|
|
65544
|
-
|
|
66361
|
+
args134 = {
|
|
65545
66362
|
request: GetSMSTemplatesRequest$inboundSchema
|
|
65546
66363
|
};
|
|
65547
66364
|
tool$smsTemplatesGetSMSTemplates = {
|
|
65548
66365
|
name: "SMS-templates-get-SMS-templates",
|
|
65549
66366
|
description: `Retrieve a SMS Template`,
|
|
65550
|
-
args:
|
|
65551
|
-
tool: async (client,
|
|
65552
|
-
const [result2, apiCall] = await smsTemplatesGetSMSTemplates(client,
|
|
66367
|
+
args: args134,
|
|
66368
|
+
tool: async (client, args135, ctx) => {
|
|
66369
|
+
const [result2, apiCall] = await smsTemplatesGetSMSTemplates(client, args135.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65553
66370
|
if (!result2.ok) {
|
|
65554
66371
|
return {
|
|
65555
66372
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65564,9 +66381,9 @@ var init_smsTemplatesGetSMSTemplates2 = __esm(() => {
|
|
|
65564
66381
|
|
|
65565
66382
|
// src/funcs/smsTemplatesListSMSTemplates.ts
|
|
65566
66383
|
function smsTemplatesListSMSTemplates(client, options) {
|
|
65567
|
-
return new APIPromise($
|
|
66384
|
+
return new APIPromise($do165(client, options));
|
|
65568
66385
|
}
|
|
65569
|
-
async function $
|
|
66386
|
+
async function $do165(client, options) {
|
|
65570
66387
|
const path = pathToFunc("/smstemplate.json")();
|
|
65571
66388
|
const headers = new Headers(compactMap({
|
|
65572
66389
|
Accept: "application/json"
|
|
@@ -65664,9 +66481,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
65664
66481
|
|
|
65665
66482
|
// src/funcs/smsTemplatesUpdateSMSTemplates.ts
|
|
65666
66483
|
function smsTemplatesUpdateSMSTemplates(client, request, options) {
|
|
65667
|
-
return new APIPromise($
|
|
66484
|
+
return new APIPromise($do166(client, request, options));
|
|
65668
66485
|
}
|
|
65669
|
-
async function $
|
|
66486
|
+
async function $do166(client, request, options) {
|
|
65670
66487
|
const parsed = safeParse(request, (value) => UpdateSMSTemplatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65671
66488
|
if (!parsed.ok) {
|
|
65672
66489
|
return [parsed, { status: "invalid" }];
|
|
@@ -65751,20 +66568,20 @@ var init_smsTemplatesUpdateSMSTemplates = __esm(() => {
|
|
|
65751
66568
|
});
|
|
65752
66569
|
|
|
65753
66570
|
// src/mcp-server/tools/smsTemplatesUpdateSMSTemplates.ts
|
|
65754
|
-
var
|
|
66571
|
+
var args135, tool$smsTemplatesUpdateSMSTemplates;
|
|
65755
66572
|
var init_smsTemplatesUpdateSMSTemplates2 = __esm(() => {
|
|
65756
66573
|
init_smsTemplatesUpdateSMSTemplates();
|
|
65757
66574
|
init_operations();
|
|
65758
66575
|
init_tools();
|
|
65759
|
-
|
|
66576
|
+
args135 = {
|
|
65760
66577
|
request: UpdateSMSTemplatesRequest$inboundSchema
|
|
65761
66578
|
};
|
|
65762
66579
|
tool$smsTemplatesUpdateSMSTemplates = {
|
|
65763
66580
|
name: "SMS-templates-update-SMS-templates",
|
|
65764
66581
|
description: `Update a SMS Template`,
|
|
65765
|
-
args:
|
|
65766
|
-
tool: async (client,
|
|
65767
|
-
const [result2, apiCall] = await smsTemplatesUpdateSMSTemplates(client,
|
|
66582
|
+
args: args135,
|
|
66583
|
+
tool: async (client, args136, ctx) => {
|
|
66584
|
+
const [result2, apiCall] = await smsTemplatesUpdateSMSTemplates(client, args136.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65768
66585
|
if (!result2.ok) {
|
|
65769
66586
|
return {
|
|
65770
66587
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65779,9 +66596,9 @@ var init_smsTemplatesUpdateSMSTemplates2 = __esm(() => {
|
|
|
65779
66596
|
|
|
65780
66597
|
// src/funcs/staffMembersCreateStaffMembers.ts
|
|
65781
66598
|
function staffMembersCreateStaffMembers(client, request, options) {
|
|
65782
|
-
return new APIPromise($
|
|
66599
|
+
return new APIPromise($do167(client, request, options));
|
|
65783
66600
|
}
|
|
65784
|
-
async function $
|
|
66601
|
+
async function $do167(client, request, options) {
|
|
65785
66602
|
const parsed = safeParse(request, (value) => StaffInput$outboundSchema.parse(value), "Input validation failed");
|
|
65786
66603
|
if (!parsed.ok) {
|
|
65787
66604
|
return [parsed, { status: "invalid" }];
|
|
@@ -65866,12 +66683,12 @@ var init_staffMembersCreateStaffMembers = __esm(() => {
|
|
|
65866
66683
|
});
|
|
65867
66684
|
|
|
65868
66685
|
// src/mcp-server/tools/staffMembersCreateStaffMembers.ts
|
|
65869
|
-
var
|
|
66686
|
+
var args136, tool$staffMembersCreateStaffMembers;
|
|
65870
66687
|
var init_staffMembersCreateStaffMembers2 = __esm(() => {
|
|
65871
66688
|
init_staffMembersCreateStaffMembers();
|
|
65872
66689
|
init_components();
|
|
65873
66690
|
init_tools();
|
|
65874
|
-
|
|
66691
|
+
args136 = {
|
|
65875
66692
|
request: StaffInput$inboundSchema
|
|
65876
66693
|
};
|
|
65877
66694
|
tool$staffMembersCreateStaffMembers = {
|
|
@@ -65889,9 +66706,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
65889
66706
|
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
66707
|
|
|
65891
66708
|
`,
|
|
65892
|
-
args:
|
|
65893
|
-
tool: async (client,
|
|
65894
|
-
const [result2, apiCall] = await staffMembersCreateStaffMembers(client,
|
|
66709
|
+
args: args136,
|
|
66710
|
+
tool: async (client, args137, ctx) => {
|
|
66711
|
+
const [result2, apiCall] = await staffMembersCreateStaffMembers(client, args137.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
65895
66712
|
if (!result2.ok) {
|
|
65896
66713
|
return {
|
|
65897
66714
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -65906,9 +66723,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
65906
66723
|
|
|
65907
66724
|
// src/funcs/staffMembersDeleteStaffMembers.ts
|
|
65908
66725
|
function staffMembersDeleteStaffMembers(client, request, options) {
|
|
65909
|
-
return new APIPromise($
|
|
66726
|
+
return new APIPromise($do168(client, request, options));
|
|
65910
66727
|
}
|
|
65911
|
-
async function $
|
|
66728
|
+
async function $do168(client, request, options) {
|
|
65912
66729
|
const parsed = safeParse(request, (value) => DeleteStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65913
66730
|
if (!parsed.ok) {
|
|
65914
66731
|
return [parsed, { status: "invalid" }];
|
|
@@ -65992,12 +66809,12 @@ var init_staffMembersDeleteStaffMembers = __esm(() => {
|
|
|
65992
66809
|
});
|
|
65993
66810
|
|
|
65994
66811
|
// src/mcp-server/tools/staffMembersDeleteStaffMembers.ts
|
|
65995
|
-
var
|
|
66812
|
+
var args137, tool$staffMembersDeleteStaffMembers;
|
|
65996
66813
|
var init_staffMembersDeleteStaffMembers2 = __esm(() => {
|
|
65997
66814
|
init_staffMembersDeleteStaffMembers();
|
|
65998
66815
|
init_operations();
|
|
65999
66816
|
init_tools();
|
|
66000
|
-
|
|
66817
|
+
args137 = {
|
|
66001
66818
|
request: DeleteStaffMembersRequest$inboundSchema
|
|
66002
66819
|
};
|
|
66003
66820
|
tool$staffMembersDeleteStaffMembers = {
|
|
@@ -66014,9 +66831,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
66014
66831
|
This endpoint requires the following OAuth scope **manage_staff**.
|
|
66015
66832
|
|
|
66016
66833
|
`,
|
|
66017
|
-
args:
|
|
66018
|
-
tool: async (client,
|
|
66019
|
-
const [result2, apiCall] = await staffMembersDeleteStaffMembers(client,
|
|
66834
|
+
args: args137,
|
|
66835
|
+
tool: async (client, args138, ctx) => {
|
|
66836
|
+
const [result2, apiCall] = await staffMembersDeleteStaffMembers(client, args138.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66020
66837
|
if (!result2.ok) {
|
|
66021
66838
|
return {
|
|
66022
66839
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66031,9 +66848,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
66031
66848
|
|
|
66032
66849
|
// src/funcs/staffMembersGetStaffMembers.ts
|
|
66033
66850
|
function staffMembersGetStaffMembers(client, request, options) {
|
|
66034
|
-
return new APIPromise($
|
|
66851
|
+
return new APIPromise($do169(client, request, options));
|
|
66035
66852
|
}
|
|
66036
|
-
async function $
|
|
66853
|
+
async function $do169(client, request, options) {
|
|
66037
66854
|
const parsed = safeParse(request, (value) => GetStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66038
66855
|
if (!parsed.ok) {
|
|
66039
66856
|
return [parsed, { status: "invalid" }];
|
|
@@ -66117,12 +66934,12 @@ var init_staffMembersGetStaffMembers = __esm(() => {
|
|
|
66117
66934
|
});
|
|
66118
66935
|
|
|
66119
66936
|
// src/mcp-server/tools/staffMembersGetStaffMembers.ts
|
|
66120
|
-
var
|
|
66937
|
+
var args138, tool$staffMembersGetStaffMembers;
|
|
66121
66938
|
var init_staffMembersGetStaffMembers2 = __esm(() => {
|
|
66122
66939
|
init_staffMembersGetStaffMembers();
|
|
66123
66940
|
init_operations();
|
|
66124
66941
|
init_tools();
|
|
66125
|
-
|
|
66942
|
+
args138 = {
|
|
66126
66943
|
request: GetStaffMembersRequest$inboundSchema
|
|
66127
66944
|
};
|
|
66128
66945
|
tool$staffMembersGetStaffMembers = {
|
|
@@ -66135,9 +66952,9 @@ var init_staffMembersGetStaffMembers2 = __esm(() => {
|
|
|
66135
66952
|
This endpoint requires the following OAuth scope **read_staff**.
|
|
66136
66953
|
|
|
66137
66954
|
`,
|
|
66138
|
-
args:
|
|
66139
|
-
tool: async (client,
|
|
66140
|
-
const [result2, apiCall] = await staffMembersGetStaffMembers(client,
|
|
66955
|
+
args: args138,
|
|
66956
|
+
tool: async (client, args139, ctx) => {
|
|
66957
|
+
const [result2, apiCall] = await staffMembersGetStaffMembers(client, args139.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66141
66958
|
if (!result2.ok) {
|
|
66142
66959
|
return {
|
|
66143
66960
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66152,9 +66969,9 @@ This endpoint requires the following OAuth scope **read_staff**.
|
|
|
66152
66969
|
|
|
66153
66970
|
// src/funcs/staffMembersListStaffMembers.ts
|
|
66154
66971
|
function staffMembersListStaffMembers(client, options) {
|
|
66155
|
-
return new APIPromise($
|
|
66972
|
+
return new APIPromise($do170(client, options));
|
|
66156
66973
|
}
|
|
66157
|
-
async function $
|
|
66974
|
+
async function $do170(client, options) {
|
|
66158
66975
|
const path = pathToFunc("/staff.json")();
|
|
66159
66976
|
const headers = new Headers(compactMap({
|
|
66160
66977
|
Accept: "application/json"
|
|
@@ -66257,9 +67074,9 @@ This endpoint requires the following OAuth scope **read_staff**.
|
|
|
66257
67074
|
|
|
66258
67075
|
// src/funcs/staffMembersUpdateStaffMembers.ts
|
|
66259
67076
|
function staffMembersUpdateStaffMembers(client, request, options) {
|
|
66260
|
-
return new APIPromise($
|
|
67077
|
+
return new APIPromise($do171(client, request, options));
|
|
66261
67078
|
}
|
|
66262
|
-
async function $
|
|
67079
|
+
async function $do171(client, request, options) {
|
|
66263
67080
|
const parsed = safeParse(request, (value) => UpdateStaffMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66264
67081
|
if (!parsed.ok) {
|
|
66265
67082
|
return [parsed, { status: "invalid" }];
|
|
@@ -66344,12 +67161,12 @@ var init_staffMembersUpdateStaffMembers = __esm(() => {
|
|
|
66344
67161
|
});
|
|
66345
67162
|
|
|
66346
67163
|
// src/mcp-server/tools/staffMembersUpdateStaffMembers.ts
|
|
66347
|
-
var
|
|
67164
|
+
var args139, tool$staffMembersUpdateStaffMembers;
|
|
66348
67165
|
var init_staffMembersUpdateStaffMembers2 = __esm(() => {
|
|
66349
67166
|
init_staffMembersUpdateStaffMembers();
|
|
66350
67167
|
init_operations();
|
|
66351
67168
|
init_tools();
|
|
66352
|
-
|
|
67169
|
+
args139 = {
|
|
66353
67170
|
request: UpdateStaffMembersRequest$inboundSchema
|
|
66354
67171
|
};
|
|
66355
67172
|
tool$staffMembersUpdateStaffMembers = {
|
|
@@ -66362,9 +67179,9 @@ var init_staffMembersUpdateStaffMembers2 = __esm(() => {
|
|
|
66362
67179
|
This endpoint requires the following OAuth scope **manage_staff**.
|
|
66363
67180
|
|
|
66364
67181
|
`,
|
|
66365
|
-
args:
|
|
66366
|
-
tool: async (client,
|
|
66367
|
-
const [result2, apiCall] = await staffMembersUpdateStaffMembers(client,
|
|
67182
|
+
args: args139,
|
|
67183
|
+
tool: async (client, args140, ctx) => {
|
|
67184
|
+
const [result2, apiCall] = await staffMembersUpdateStaffMembers(client, args140.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66368
67185
|
if (!result2.ok) {
|
|
66369
67186
|
return {
|
|
66370
67187
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66379,9 +67196,9 @@ This endpoint requires the following OAuth scope **manage_staff**.
|
|
|
66379
67196
|
|
|
66380
67197
|
// src/funcs/staffMessagesCreateStaffMessages.ts
|
|
66381
67198
|
function staffMessagesCreateStaffMessages(client, request, options) {
|
|
66382
|
-
return new APIPromise($
|
|
67199
|
+
return new APIPromise($do172(client, request, options));
|
|
66383
67200
|
}
|
|
66384
|
-
async function $
|
|
67201
|
+
async function $do172(client, request, options) {
|
|
66385
67202
|
const parsed = safeParse(request, (value) => StaffMessageInput$outboundSchema.parse(value), "Input validation failed");
|
|
66386
67203
|
if (!parsed.ok) {
|
|
66387
67204
|
return [parsed, { status: "invalid" }];
|
|
@@ -66466,12 +67283,12 @@ var init_staffMessagesCreateStaffMessages = __esm(() => {
|
|
|
66466
67283
|
});
|
|
66467
67284
|
|
|
66468
67285
|
// src/mcp-server/tools/staffMessagesCreateStaffMessages.ts
|
|
66469
|
-
var
|
|
67286
|
+
var args140, tool$staffMessagesCreateStaffMessages;
|
|
66470
67287
|
var init_staffMessagesCreateStaffMessages2 = __esm(() => {
|
|
66471
67288
|
init_staffMessagesCreateStaffMessages();
|
|
66472
67289
|
init_components();
|
|
66473
67290
|
init_tools();
|
|
66474
|
-
|
|
67291
|
+
args140 = {
|
|
66475
67292
|
request: StaffMessageInput$inboundSchema
|
|
66476
67293
|
};
|
|
66477
67294
|
tool$staffMessagesCreateStaffMessages = {
|
|
@@ -66484,9 +67301,9 @@ var init_staffMessagesCreateStaffMessages2 = __esm(() => {
|
|
|
66484
67301
|
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
67302
|
|
|
66486
67303
|
`,
|
|
66487
|
-
args:
|
|
66488
|
-
tool: async (client,
|
|
66489
|
-
const [result2, apiCall] = await staffMessagesCreateStaffMessages(client,
|
|
67304
|
+
args: args140,
|
|
67305
|
+
tool: async (client, args141, ctx) => {
|
|
67306
|
+
const [result2, apiCall] = await staffMessagesCreateStaffMessages(client, args141.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66490
67307
|
if (!result2.ok) {
|
|
66491
67308
|
return {
|
|
66492
67309
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66501,9 +67318,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
66501
67318
|
|
|
66502
67319
|
// src/funcs/staffMessagesDeleteStaffMessages.ts
|
|
66503
67320
|
function staffMessagesDeleteStaffMessages(client, request, options) {
|
|
66504
|
-
return new APIPromise($
|
|
67321
|
+
return new APIPromise($do173(client, request, options));
|
|
66505
67322
|
}
|
|
66506
|
-
async function $
|
|
67323
|
+
async function $do173(client, request, options) {
|
|
66507
67324
|
const parsed = safeParse(request, (value) => DeleteStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66508
67325
|
if (!parsed.ok) {
|
|
66509
67326
|
return [parsed, { status: "invalid" }];
|
|
@@ -66587,12 +67404,12 @@ var init_staffMessagesDeleteStaffMessages = __esm(() => {
|
|
|
66587
67404
|
});
|
|
66588
67405
|
|
|
66589
67406
|
// src/mcp-server/tools/staffMessagesDeleteStaffMessages.ts
|
|
66590
|
-
var
|
|
67407
|
+
var args141, tool$staffMessagesDeleteStaffMessages;
|
|
66591
67408
|
var init_staffMessagesDeleteStaffMessages2 = __esm(() => {
|
|
66592
67409
|
init_staffMessagesDeleteStaffMessages();
|
|
66593
67410
|
init_operations();
|
|
66594
67411
|
init_tools();
|
|
66595
|
-
|
|
67412
|
+
args141 = {
|
|
66596
67413
|
request: DeleteStaffMessagesRequest$inboundSchema
|
|
66597
67414
|
};
|
|
66598
67415
|
tool$staffMessagesDeleteStaffMessages = {
|
|
@@ -66604,9 +67421,9 @@ var init_staffMessagesDeleteStaffMessages2 = __esm(() => {
|
|
|
66604
67421
|
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
67422
|
|
|
66606
67423
|
`,
|
|
66607
|
-
args:
|
|
66608
|
-
tool: async (client,
|
|
66609
|
-
const [result2, apiCall] = await staffMessagesDeleteStaffMessages(client,
|
|
67424
|
+
args: args141,
|
|
67425
|
+
tool: async (client, args142, ctx) => {
|
|
67426
|
+
const [result2, apiCall] = await staffMessagesDeleteStaffMessages(client, args142.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66610
67427
|
if (!result2.ok) {
|
|
66611
67428
|
return {
|
|
66612
67429
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66621,9 +67438,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
66621
67438
|
|
|
66622
67439
|
// src/funcs/staffMessagesGetStaffMessages.ts
|
|
66623
67440
|
function staffMessagesGetStaffMessages(client, request, options) {
|
|
66624
|
-
return new APIPromise($
|
|
67441
|
+
return new APIPromise($do174(client, request, options));
|
|
66625
67442
|
}
|
|
66626
|
-
async function $
|
|
67443
|
+
async function $do174(client, request, options) {
|
|
66627
67444
|
const parsed = safeParse(request, (value) => GetStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66628
67445
|
if (!parsed.ok) {
|
|
66629
67446
|
return [parsed, { status: "invalid" }];
|
|
@@ -66707,20 +67524,20 @@ var init_staffMessagesGetStaffMessages = __esm(() => {
|
|
|
66707
67524
|
});
|
|
66708
67525
|
|
|
66709
67526
|
// src/mcp-server/tools/staffMessagesGetStaffMessages.ts
|
|
66710
|
-
var
|
|
67527
|
+
var args142, tool$staffMessagesGetStaffMessages;
|
|
66711
67528
|
var init_staffMessagesGetStaffMessages2 = __esm(() => {
|
|
66712
67529
|
init_staffMessagesGetStaffMessages();
|
|
66713
67530
|
init_operations();
|
|
66714
67531
|
init_tools();
|
|
66715
|
-
|
|
67532
|
+
args142 = {
|
|
66716
67533
|
request: GetStaffMessagesRequest$inboundSchema
|
|
66717
67534
|
};
|
|
66718
67535
|
tool$staffMessagesGetStaffMessages = {
|
|
66719
67536
|
name: "staff-messages-get-staff-messages",
|
|
66720
67537
|
description: `Retrieve a Staff Message`,
|
|
66721
|
-
args:
|
|
66722
|
-
tool: async (client,
|
|
66723
|
-
const [result2, apiCall] = await staffMessagesGetStaffMessages(client,
|
|
67538
|
+
args: args142,
|
|
67539
|
+
tool: async (client, args143, ctx) => {
|
|
67540
|
+
const [result2, apiCall] = await staffMessagesGetStaffMessages(client, args143.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66724
67541
|
if (!result2.ok) {
|
|
66725
67542
|
return {
|
|
66726
67543
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66735,9 +67552,9 @@ var init_staffMessagesGetStaffMessages2 = __esm(() => {
|
|
|
66735
67552
|
|
|
66736
67553
|
// src/funcs/staffMessagesListStaffMessages.ts
|
|
66737
67554
|
function staffMessagesListStaffMessages(client, options) {
|
|
66738
|
-
return new APIPromise($
|
|
67555
|
+
return new APIPromise($do175(client, options));
|
|
66739
67556
|
}
|
|
66740
|
-
async function $
|
|
67557
|
+
async function $do175(client, options) {
|
|
66741
67558
|
const path = pathToFunc("/staffmessage.json")();
|
|
66742
67559
|
const headers = new Headers(compactMap({
|
|
66743
67560
|
Accept: "application/json"
|
|
@@ -66835,9 +67652,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
66835
67652
|
|
|
66836
67653
|
// src/funcs/staffMessagesUpdateStaffMessages.ts
|
|
66837
67654
|
function staffMessagesUpdateStaffMessages(client, request, options) {
|
|
66838
|
-
return new APIPromise($
|
|
67655
|
+
return new APIPromise($do176(client, request, options));
|
|
66839
67656
|
}
|
|
66840
|
-
async function $
|
|
67657
|
+
async function $do176(client, request, options) {
|
|
66841
67658
|
const parsed = safeParse(request, (value) => UpdateStaffMessagesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
66842
67659
|
if (!parsed.ok) {
|
|
66843
67660
|
return [parsed, { status: "invalid" }];
|
|
@@ -66922,20 +67739,20 @@ var init_staffMessagesUpdateStaffMessages = __esm(() => {
|
|
|
66922
67739
|
});
|
|
66923
67740
|
|
|
66924
67741
|
// src/mcp-server/tools/staffMessagesUpdateStaffMessages.ts
|
|
66925
|
-
var
|
|
67742
|
+
var args143, tool$staffMessagesUpdateStaffMessages;
|
|
66926
67743
|
var init_staffMessagesUpdateStaffMessages2 = __esm(() => {
|
|
66927
67744
|
init_staffMessagesUpdateStaffMessages();
|
|
66928
67745
|
init_operations();
|
|
66929
67746
|
init_tools();
|
|
66930
|
-
|
|
67747
|
+
args143 = {
|
|
66931
67748
|
request: UpdateStaffMessagesRequest$inboundSchema
|
|
66932
67749
|
};
|
|
66933
67750
|
tool$staffMessagesUpdateStaffMessages = {
|
|
66934
67751
|
name: "staff-messages-update-staff-messages",
|
|
66935
67752
|
description: `Update a Staff Message`,
|
|
66936
|
-
args:
|
|
66937
|
-
tool: async (client,
|
|
66938
|
-
const [result2, apiCall] = await staffMessagesUpdateStaffMessages(client,
|
|
67753
|
+
args: args143,
|
|
67754
|
+
tool: async (client, args144, ctx) => {
|
|
67755
|
+
const [result2, apiCall] = await staffMessagesUpdateStaffMessages(client, args144.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
66939
67756
|
if (!result2.ok) {
|
|
66940
67757
|
return {
|
|
66941
67758
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -66950,9 +67767,9 @@ var init_staffMessagesUpdateStaffMessages2 = __esm(() => {
|
|
|
66950
67767
|
|
|
66951
67768
|
// src/funcs/tasksCreateTasks.ts
|
|
66952
67769
|
function tasksCreateTasks(client, request, options) {
|
|
66953
|
-
return new APIPromise($
|
|
67770
|
+
return new APIPromise($do177(client, request, options));
|
|
66954
67771
|
}
|
|
66955
|
-
async function $
|
|
67772
|
+
async function $do177(client, request, options) {
|
|
66956
67773
|
const parsed = safeParse(request, (value) => TaskInput$outboundSchema.parse(value), "Input validation failed");
|
|
66957
67774
|
if (!parsed.ok) {
|
|
66958
67775
|
return [parsed, { status: "invalid" }];
|
|
@@ -67037,12 +67854,12 @@ var init_tasksCreateTasks = __esm(() => {
|
|
|
67037
67854
|
});
|
|
67038
67855
|
|
|
67039
67856
|
// src/mcp-server/tools/tasksCreateTasks.ts
|
|
67040
|
-
var
|
|
67857
|
+
var args144, tool$tasksCreateTasks;
|
|
67041
67858
|
var init_tasksCreateTasks2 = __esm(() => {
|
|
67042
67859
|
init_tasksCreateTasks();
|
|
67043
67860
|
init_components();
|
|
67044
67861
|
init_tools();
|
|
67045
|
-
|
|
67862
|
+
args144 = {
|
|
67046
67863
|
request: TaskInput$inboundSchema
|
|
67047
67864
|
};
|
|
67048
67865
|
tool$tasksCreateTasks = {
|
|
@@ -67060,9 +67877,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67060
67877
|
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
67878
|
|
|
67062
67879
|
`,
|
|
67063
|
-
args:
|
|
67064
|
-
tool: async (client,
|
|
67065
|
-
const [result2, apiCall] = await tasksCreateTasks(client,
|
|
67880
|
+
args: args144,
|
|
67881
|
+
tool: async (client, args145, ctx) => {
|
|
67882
|
+
const [result2, apiCall] = await tasksCreateTasks(client, args145.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67066
67883
|
if (!result2.ok) {
|
|
67067
67884
|
return {
|
|
67068
67885
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67077,9 +67894,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
67077
67894
|
|
|
67078
67895
|
// src/funcs/tasksDeleteTasks.ts
|
|
67079
67896
|
function tasksDeleteTasks(client, request, options) {
|
|
67080
|
-
return new APIPromise($
|
|
67897
|
+
return new APIPromise($do178(client, request, options));
|
|
67081
67898
|
}
|
|
67082
|
-
async function $
|
|
67899
|
+
async function $do178(client, request, options) {
|
|
67083
67900
|
const parsed = safeParse(request, (value) => DeleteTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67084
67901
|
if (!parsed.ok) {
|
|
67085
67902
|
return [parsed, { status: "invalid" }];
|
|
@@ -67163,12 +67980,12 @@ var init_tasksDeleteTasks = __esm(() => {
|
|
|
67163
67980
|
});
|
|
67164
67981
|
|
|
67165
67982
|
// src/mcp-server/tools/tasksDeleteTasks.ts
|
|
67166
|
-
var
|
|
67983
|
+
var args145, tool$tasksDeleteTasks;
|
|
67167
67984
|
var init_tasksDeleteTasks2 = __esm(() => {
|
|
67168
67985
|
init_tasksDeleteTasks();
|
|
67169
67986
|
init_operations();
|
|
67170
67987
|
init_tools();
|
|
67171
|
-
|
|
67988
|
+
args145 = {
|
|
67172
67989
|
request: DeleteTasksRequest$inboundSchema
|
|
67173
67990
|
};
|
|
67174
67991
|
tool$tasksDeleteTasks = {
|
|
@@ -67185,9 +68002,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
67185
68002
|
This endpoint requires the following OAuth scope **manage_tasks**.
|
|
67186
68003
|
|
|
67187
68004
|
`,
|
|
67188
|
-
args:
|
|
67189
|
-
tool: async (client,
|
|
67190
|
-
const [result2, apiCall] = await tasksDeleteTasks(client,
|
|
68005
|
+
args: args145,
|
|
68006
|
+
tool: async (client, args146, ctx) => {
|
|
68007
|
+
const [result2, apiCall] = await tasksDeleteTasks(client, args146.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67191
68008
|
if (!result2.ok) {
|
|
67192
68009
|
return {
|
|
67193
68010
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67202,9 +68019,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67202
68019
|
|
|
67203
68020
|
// src/funcs/tasksGetTasks.ts
|
|
67204
68021
|
function tasksGetTasks(client, request, options) {
|
|
67205
|
-
return new APIPromise($
|
|
68022
|
+
return new APIPromise($do179(client, request, options));
|
|
67206
68023
|
}
|
|
67207
|
-
async function $
|
|
68024
|
+
async function $do179(client, request, options) {
|
|
67208
68025
|
const parsed = safeParse(request, (value) => GetTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67209
68026
|
if (!parsed.ok) {
|
|
67210
68027
|
return [parsed, { status: "invalid" }];
|
|
@@ -67288,12 +68105,12 @@ var init_tasksGetTasks = __esm(() => {
|
|
|
67288
68105
|
});
|
|
67289
68106
|
|
|
67290
68107
|
// src/mcp-server/tools/tasksGetTasks.ts
|
|
67291
|
-
var
|
|
68108
|
+
var args146, tool$tasksGetTasks;
|
|
67292
68109
|
var init_tasksGetTasks2 = __esm(() => {
|
|
67293
68110
|
init_tasksGetTasks();
|
|
67294
68111
|
init_operations();
|
|
67295
68112
|
init_tools();
|
|
67296
|
-
|
|
68113
|
+
args146 = {
|
|
67297
68114
|
request: GetTasksRequest$inboundSchema
|
|
67298
68115
|
};
|
|
67299
68116
|
tool$tasksGetTasks = {
|
|
@@ -67306,9 +68123,9 @@ var init_tasksGetTasks2 = __esm(() => {
|
|
|
67306
68123
|
This endpoint requires the following OAuth scope **read_tasks**.
|
|
67307
68124
|
|
|
67308
68125
|
`,
|
|
67309
|
-
args:
|
|
67310
|
-
tool: async (client,
|
|
67311
|
-
const [result2, apiCall] = await tasksGetTasks(client,
|
|
68126
|
+
args: args146,
|
|
68127
|
+
tool: async (client, args147, ctx) => {
|
|
68128
|
+
const [result2, apiCall] = await tasksGetTasks(client, args147.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67312
68129
|
if (!result2.ok) {
|
|
67313
68130
|
return {
|
|
67314
68131
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67323,9 +68140,9 @@ This endpoint requires the following OAuth scope **read_tasks**.
|
|
|
67323
68140
|
|
|
67324
68141
|
// src/funcs/tasksListTasks.ts
|
|
67325
68142
|
function tasksListTasks(client, options) {
|
|
67326
|
-
return new APIPromise($
|
|
68143
|
+
return new APIPromise($do180(client, options));
|
|
67327
68144
|
}
|
|
67328
|
-
async function $
|
|
68145
|
+
async function $do180(client, options) {
|
|
67329
68146
|
const path = pathToFunc("/task.json")();
|
|
67330
68147
|
const headers = new Headers(compactMap({
|
|
67331
68148
|
Accept: "application/json"
|
|
@@ -67428,9 +68245,9 @@ This endpoint requires the following OAuth scope **read_tasks**.
|
|
|
67428
68245
|
|
|
67429
68246
|
// src/funcs/tasksUpdateTasks.ts
|
|
67430
68247
|
function tasksUpdateTasks(client, request, options) {
|
|
67431
|
-
return new APIPromise($
|
|
68248
|
+
return new APIPromise($do181(client, request, options));
|
|
67432
68249
|
}
|
|
67433
|
-
async function $
|
|
68250
|
+
async function $do181(client, request, options) {
|
|
67434
68251
|
const parsed = safeParse(request, (value) => UpdateTasksRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67435
68252
|
if (!parsed.ok) {
|
|
67436
68253
|
return [parsed, { status: "invalid" }];
|
|
@@ -67515,12 +68332,12 @@ var init_tasksUpdateTasks = __esm(() => {
|
|
|
67515
68332
|
});
|
|
67516
68333
|
|
|
67517
68334
|
// src/mcp-server/tools/tasksUpdateTasks.ts
|
|
67518
|
-
var
|
|
68335
|
+
var args147, tool$tasksUpdateTasks;
|
|
67519
68336
|
var init_tasksUpdateTasks2 = __esm(() => {
|
|
67520
68337
|
init_tasksUpdateTasks();
|
|
67521
68338
|
init_operations();
|
|
67522
68339
|
init_tools();
|
|
67523
|
-
|
|
68340
|
+
args147 = {
|
|
67524
68341
|
request: UpdateTasksRequest$inboundSchema
|
|
67525
68342
|
};
|
|
67526
68343
|
tool$tasksUpdateTasks = {
|
|
@@ -67533,9 +68350,9 @@ var init_tasksUpdateTasks2 = __esm(() => {
|
|
|
67533
68350
|
This endpoint requires the following OAuth scope **manage_tasks**.
|
|
67534
68351
|
|
|
67535
68352
|
`,
|
|
67536
|
-
args:
|
|
67537
|
-
tool: async (client,
|
|
67538
|
-
const [result2, apiCall] = await tasksUpdateTasks(client,
|
|
68353
|
+
args: args147,
|
|
68354
|
+
tool: async (client, args148, ctx) => {
|
|
68355
|
+
const [result2, apiCall] = await tasksUpdateTasks(client, args148.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67539
68356
|
if (!result2.ok) {
|
|
67540
68357
|
return {
|
|
67541
68358
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67550,9 +68367,9 @@ This endpoint requires the following OAuth scope **manage_tasks**.
|
|
|
67550
68367
|
|
|
67551
68368
|
// src/funcs/taxRatesCreateTaxRates.ts
|
|
67552
68369
|
function taxRatesCreateTaxRates(client, request, options) {
|
|
67553
|
-
return new APIPromise($
|
|
68370
|
+
return new APIPromise($do182(client, request, options));
|
|
67554
68371
|
}
|
|
67555
|
-
async function $
|
|
68372
|
+
async function $do182(client, request, options) {
|
|
67556
68373
|
const parsed = safeParse(request, (value) => TaxRateInput$outboundSchema.parse(value), "Input validation failed");
|
|
67557
68374
|
if (!parsed.ok) {
|
|
67558
68375
|
return [parsed, { status: "invalid" }];
|
|
@@ -67637,12 +68454,12 @@ var init_taxRatesCreateTaxRates = __esm(() => {
|
|
|
67637
68454
|
});
|
|
67638
68455
|
|
|
67639
68456
|
// src/mcp-server/tools/taxRatesCreateTaxRates.ts
|
|
67640
|
-
var
|
|
68457
|
+
var args148, tool$taxRatesCreateTaxRates;
|
|
67641
68458
|
var init_taxRatesCreateTaxRates2 = __esm(() => {
|
|
67642
68459
|
init_taxRatesCreateTaxRates();
|
|
67643
68460
|
init_components();
|
|
67644
68461
|
init_tools();
|
|
67645
|
-
|
|
68462
|
+
args148 = {
|
|
67646
68463
|
request: TaxRateInput$inboundSchema
|
|
67647
68464
|
};
|
|
67648
68465
|
tool$taxRatesCreateTaxRates = {
|
|
@@ -67655,9 +68472,9 @@ var init_taxRatesCreateTaxRates2 = __esm(() => {
|
|
|
67655
68472
|
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
68473
|
|
|
67657
68474
|
`,
|
|
67658
|
-
args:
|
|
67659
|
-
tool: async (client,
|
|
67660
|
-
const [result2, apiCall] = await taxRatesCreateTaxRates(client,
|
|
68475
|
+
args: args148,
|
|
68476
|
+
tool: async (client, args149, ctx) => {
|
|
68477
|
+
const [result2, apiCall] = await taxRatesCreateTaxRates(client, args149.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67661
68478
|
if (!result2.ok) {
|
|
67662
68479
|
return {
|
|
67663
68480
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67672,9 +68489,9 @@ UUID is optional for record creation. If no UUID is supplied, a UUID will be aut
|
|
|
67672
68489
|
|
|
67673
68490
|
// src/funcs/taxRatesDeleteTaxRates.ts
|
|
67674
68491
|
function taxRatesDeleteTaxRates(client, request, options) {
|
|
67675
|
-
return new APIPromise($
|
|
68492
|
+
return new APIPromise($do183(client, request, options));
|
|
67676
68493
|
}
|
|
67677
|
-
async function $
|
|
68494
|
+
async function $do183(client, request, options) {
|
|
67678
68495
|
const parsed = safeParse(request, (value) => DeleteTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67679
68496
|
if (!parsed.ok) {
|
|
67680
68497
|
return [parsed, { status: "invalid" }];
|
|
@@ -67758,12 +68575,12 @@ var init_taxRatesDeleteTaxRates = __esm(() => {
|
|
|
67758
68575
|
});
|
|
67759
68576
|
|
|
67760
68577
|
// src/mcp-server/tools/taxRatesDeleteTaxRates.ts
|
|
67761
|
-
var
|
|
68578
|
+
var args149, tool$taxRatesDeleteTaxRates;
|
|
67762
68579
|
var init_taxRatesDeleteTaxRates2 = __esm(() => {
|
|
67763
68580
|
init_taxRatesDeleteTaxRates();
|
|
67764
68581
|
init_operations();
|
|
67765
68582
|
init_tools();
|
|
67766
|
-
|
|
68583
|
+
args149 = {
|
|
67767
68584
|
request: DeleteTaxRatesRequest$inboundSchema
|
|
67768
68585
|
};
|
|
67769
68586
|
tool$taxRatesDeleteTaxRates = {
|
|
@@ -67775,9 +68592,9 @@ var init_taxRatesDeleteTaxRates2 = __esm(() => {
|
|
|
67775
68592
|
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
68593
|
|
|
67777
68594
|
`,
|
|
67778
|
-
args:
|
|
67779
|
-
tool: async (client,
|
|
67780
|
-
const [result2, apiCall] = await taxRatesDeleteTaxRates(client,
|
|
68595
|
+
args: args149,
|
|
68596
|
+
tool: async (client, args150, ctx) => {
|
|
68597
|
+
const [result2, apiCall] = await taxRatesDeleteTaxRates(client, args150.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67781
68598
|
if (!result2.ok) {
|
|
67782
68599
|
return {
|
|
67783
68600
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67792,9 +68609,9 @@ In ServiceM8, deleting a record sets its \`active\` field to \`0\`. Inactive rec
|
|
|
67792
68609
|
|
|
67793
68610
|
// src/funcs/taxRatesGetTaxRates.ts
|
|
67794
68611
|
function taxRatesGetTaxRates(client, request, options) {
|
|
67795
|
-
return new APIPromise($
|
|
68612
|
+
return new APIPromise($do184(client, request, options));
|
|
67796
68613
|
}
|
|
67797
|
-
async function $
|
|
68614
|
+
async function $do184(client, request, options) {
|
|
67798
68615
|
const parsed = safeParse(request, (value) => GetTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
67799
68616
|
if (!parsed.ok) {
|
|
67800
68617
|
return [parsed, { status: "invalid" }];
|
|
@@ -67878,20 +68695,20 @@ var init_taxRatesGetTaxRates = __esm(() => {
|
|
|
67878
68695
|
});
|
|
67879
68696
|
|
|
67880
68697
|
// src/mcp-server/tools/taxRatesGetTaxRates.ts
|
|
67881
|
-
var
|
|
68698
|
+
var args150, tool$taxRatesGetTaxRates;
|
|
67882
68699
|
var init_taxRatesGetTaxRates2 = __esm(() => {
|
|
67883
68700
|
init_taxRatesGetTaxRates();
|
|
67884
68701
|
init_operations();
|
|
67885
68702
|
init_tools();
|
|
67886
|
-
|
|
68703
|
+
args150 = {
|
|
67887
68704
|
request: GetTaxRatesRequest$inboundSchema
|
|
67888
68705
|
};
|
|
67889
68706
|
tool$taxRatesGetTaxRates = {
|
|
67890
68707
|
name: "tax-rates-get-tax-rates",
|
|
67891
68708
|
description: `Retrieve a Tax Rate`,
|
|
67892
|
-
args:
|
|
67893
|
-
tool: async (client,
|
|
67894
|
-
const [result2, apiCall] = await taxRatesGetTaxRates(client,
|
|
68709
|
+
args: args150,
|
|
68710
|
+
tool: async (client, args151, ctx) => {
|
|
68711
|
+
const [result2, apiCall] = await taxRatesGetTaxRates(client, args151.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
67895
68712
|
if (!result2.ok) {
|
|
67896
68713
|
return {
|
|
67897
68714
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -67906,9 +68723,9 @@ var init_taxRatesGetTaxRates2 = __esm(() => {
|
|
|
67906
68723
|
|
|
67907
68724
|
// src/funcs/taxRatesListTaxRates.ts
|
|
67908
68725
|
function taxRatesListTaxRates(client, options) {
|
|
67909
|
-
return new APIPromise($
|
|
68726
|
+
return new APIPromise($do185(client, options));
|
|
67910
68727
|
}
|
|
67911
|
-
async function $
|
|
68728
|
+
async function $do185(client, options) {
|
|
67912
68729
|
const path = pathToFunc("/taxrate.json")();
|
|
67913
68730
|
const headers = new Headers(compactMap({
|
|
67914
68731
|
Accept: "application/json"
|
|
@@ -68006,9 +68823,9 @@ This endpoint supports result filtering. For more information on how to filter t
|
|
|
68006
68823
|
|
|
68007
68824
|
// src/funcs/taxRatesUpdateTaxRates.ts
|
|
68008
68825
|
function taxRatesUpdateTaxRates(client, request, options) {
|
|
68009
|
-
return new APIPromise($
|
|
68826
|
+
return new APIPromise($do186(client, request, options));
|
|
68010
68827
|
}
|
|
68011
|
-
async function $
|
|
68828
|
+
async function $do186(client, request, options) {
|
|
68012
68829
|
const parsed = safeParse(request, (value) => UpdateTaxRatesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68013
68830
|
if (!parsed.ok) {
|
|
68014
68831
|
return [parsed, { status: "invalid" }];
|
|
@@ -68093,20 +68910,20 @@ var init_taxRatesUpdateTaxRates = __esm(() => {
|
|
|
68093
68910
|
});
|
|
68094
68911
|
|
|
68095
68912
|
// src/mcp-server/tools/taxRatesUpdateTaxRates.ts
|
|
68096
|
-
var
|
|
68913
|
+
var args151, tool$taxRatesUpdateTaxRates;
|
|
68097
68914
|
var init_taxRatesUpdateTaxRates2 = __esm(() => {
|
|
68098
68915
|
init_taxRatesUpdateTaxRates();
|
|
68099
68916
|
init_operations();
|
|
68100
68917
|
init_tools();
|
|
68101
|
-
|
|
68918
|
+
args151 = {
|
|
68102
68919
|
request: UpdateTaxRatesRequest$inboundSchema
|
|
68103
68920
|
};
|
|
68104
68921
|
tool$taxRatesUpdateTaxRates = {
|
|
68105
68922
|
name: "tax-rates-update-tax-rates",
|
|
68106
68923
|
description: `Update a Tax Rate`,
|
|
68107
|
-
args:
|
|
68108
|
-
tool: async (client,
|
|
68109
|
-
const [result2, apiCall] = await taxRatesUpdateTaxRates(client,
|
|
68924
|
+
args: args151,
|
|
68925
|
+
tool: async (client, args152, ctx) => {
|
|
68926
|
+
const [result2, apiCall] = await taxRatesUpdateTaxRates(client, args152.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68110
68927
|
if (!result2.ok) {
|
|
68111
68928
|
return {
|
|
68112
68929
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68121,9 +68938,9 @@ var init_taxRatesUpdateTaxRates2 = __esm(() => {
|
|
|
68121
68938
|
|
|
68122
68939
|
// src/funcs/vendorsGetVendors.ts
|
|
68123
68940
|
function vendorsGetVendors(client, request, options) {
|
|
68124
|
-
return new APIPromise($
|
|
68941
|
+
return new APIPromise($do187(client, request, options));
|
|
68125
68942
|
}
|
|
68126
|
-
async function $
|
|
68943
|
+
async function $do187(client, request, options) {
|
|
68127
68944
|
const parsed = safeParse(request, (value) => GetVendorsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68128
68945
|
if (!parsed.ok) {
|
|
68129
68946
|
return [parsed, { status: "invalid" }];
|
|
@@ -68207,12 +69024,12 @@ var init_vendorsGetVendors = __esm(() => {
|
|
|
68207
69024
|
});
|
|
68208
69025
|
|
|
68209
69026
|
// src/mcp-server/tools/vendorsGetVendors.ts
|
|
68210
|
-
var
|
|
69027
|
+
var args152, tool$vendorsGetVendors;
|
|
68211
69028
|
var init_vendorsGetVendors2 = __esm(() => {
|
|
68212
69029
|
init_vendorsGetVendors();
|
|
68213
69030
|
init_operations();
|
|
68214
69031
|
init_tools();
|
|
68215
|
-
|
|
69032
|
+
args152 = {
|
|
68216
69033
|
request: GetVendorsRequest$inboundSchema
|
|
68217
69034
|
};
|
|
68218
69035
|
tool$vendorsGetVendors = {
|
|
@@ -68227,9 +69044,9 @@ Vendor account information
|
|
|
68227
69044
|
This endpoint requires the following OAuth scope **vendor**.
|
|
68228
69045
|
|
|
68229
69046
|
`,
|
|
68230
|
-
args:
|
|
68231
|
-
tool: async (client,
|
|
68232
|
-
const [result2, apiCall] = await vendorsGetVendors(client,
|
|
69047
|
+
args: args152,
|
|
69048
|
+
tool: async (client, args153, ctx) => {
|
|
69049
|
+
const [result2, apiCall] = await vendorsGetVendors(client, args153.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68233
69050
|
if (!result2.ok) {
|
|
68234
69051
|
return {
|
|
68235
69052
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68244,9 +69061,9 @@ This endpoint requires the following OAuth scope **vendor**.
|
|
|
68244
69061
|
|
|
68245
69062
|
// src/funcs/vendorsListVendors.ts
|
|
68246
69063
|
function vendorsListVendors(client, options) {
|
|
68247
|
-
return new APIPromise($
|
|
69064
|
+
return new APIPromise($do188(client, options));
|
|
68248
69065
|
}
|
|
68249
|
-
async function $
|
|
69066
|
+
async function $do188(client, options) {
|
|
68250
69067
|
const path = pathToFunc("/vendor.json")();
|
|
68251
69068
|
const headers = new Headers(compactMap({
|
|
68252
69069
|
Accept: "application/json"
|
|
@@ -68351,9 +69168,9 @@ This endpoint requires the following OAuth scope **vendor**.
|
|
|
68351
69168
|
|
|
68352
69169
|
// src/funcs/vendorsUpdateVendors.ts
|
|
68353
69170
|
function vendorsUpdateVendors(client, request, options) {
|
|
68354
|
-
return new APIPromise($
|
|
69171
|
+
return new APIPromise($do189(client, request, options));
|
|
68355
69172
|
}
|
|
68356
|
-
async function $
|
|
69173
|
+
async function $do189(client, request, options) {
|
|
68357
69174
|
const parsed = safeParse(request, (value) => UpdateVendorsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
68358
69175
|
if (!parsed.ok) {
|
|
68359
69176
|
return [parsed, { status: "invalid" }];
|
|
@@ -68438,12 +69255,12 @@ var init_vendorsUpdateVendors = __esm(() => {
|
|
|
68438
69255
|
});
|
|
68439
69256
|
|
|
68440
69257
|
// src/mcp-server/tools/vendorsUpdateVendors.ts
|
|
68441
|
-
var
|
|
69258
|
+
var args153, tool$vendorsUpdateVendors;
|
|
68442
69259
|
var init_vendorsUpdateVendors2 = __esm(() => {
|
|
68443
69260
|
init_vendorsUpdateVendors();
|
|
68444
69261
|
init_operations();
|
|
68445
69262
|
init_tools();
|
|
68446
|
-
|
|
69263
|
+
args153 = {
|
|
68447
69264
|
request: UpdateVendorsRequest$inboundSchema
|
|
68448
69265
|
};
|
|
68449
69266
|
tool$vendorsUpdateVendors = {
|
|
@@ -68453,9 +69270,9 @@ var init_vendorsUpdateVendors2 = __esm(() => {
|
|
|
68453
69270
|
Vendor account information
|
|
68454
69271
|
|
|
68455
69272
|
`,
|
|
68456
|
-
args:
|
|
68457
|
-
tool: async (client,
|
|
68458
|
-
const [result2, apiCall] = await vendorsUpdateVendors(client,
|
|
69273
|
+
args: args153,
|
|
69274
|
+
tool: async (client, args154, ctx) => {
|
|
69275
|
+
const [result2, apiCall] = await vendorsUpdateVendors(client, args154.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
68459
69276
|
if (!result2.ok) {
|
|
68460
69277
|
return {
|
|
68461
69278
|
content: [{ type: "text", text: result2.error.message }],
|
|
@@ -68472,7 +69289,7 @@ Vendor account information
|
|
|
68472
69289
|
function createMCPServer(deps) {
|
|
68473
69290
|
const server = new McpServer({
|
|
68474
69291
|
name: "ServiceM8",
|
|
68475
|
-
version: "0.9.
|
|
69292
|
+
version: "0.9.1"
|
|
68476
69293
|
});
|
|
68477
69294
|
const client = new ServiceM8Core({
|
|
68478
69295
|
security: deps.security,
|
|
@@ -68555,6 +69372,14 @@ function createMCPServer(deps) {
|
|
|
68555
69372
|
tool(tool$formResponsesGetFormResponses);
|
|
68556
69373
|
tool(tool$formResponsesUpdateFormResponses);
|
|
68557
69374
|
tool(tool$formResponsesDeleteFormResponses);
|
|
69375
|
+
tool(tool$inboxListInboxMessages);
|
|
69376
|
+
tool(tool$inboxGetInboxMessage);
|
|
69377
|
+
tool(tool$inboxMarkInboxMessageAsRead);
|
|
69378
|
+
tool(tool$inboxArchiveInboxMessage);
|
|
69379
|
+
tool(tool$inboxSnoozeInboxMessage);
|
|
69380
|
+
tool(tool$inboxConvertInboxMessageToJob);
|
|
69381
|
+
tool(tool$inboxAttachInboxMessageToJob);
|
|
69382
|
+
tool(tool$inboxAddNoteToInboxMessage);
|
|
68558
69383
|
tool(tool$jobsListJobs);
|
|
68559
69384
|
tool(tool$jobsCreateJobs);
|
|
68560
69385
|
tool(tool$jobsGetJobs);
|
|
@@ -68595,6 +69420,12 @@ function createMCPServer(deps) {
|
|
|
68595
69420
|
tool(tool$jobPaymentsGetJobPayments);
|
|
68596
69421
|
tool(tool$jobPaymentsUpdateJobPayments);
|
|
68597
69422
|
tool(tool$jobPaymentsDeleteJobPayments);
|
|
69423
|
+
tool(tool$jobTemplatesListJobTemplates);
|
|
69424
|
+
tool(tool$jobTemplatesCreateJobTemplates);
|
|
69425
|
+
tool(tool$jobTemplatesGetJobTemplates);
|
|
69426
|
+
tool(tool$jobTemplatesUpdateJobTemplates);
|
|
69427
|
+
tool(tool$jobTemplatesDeleteJobTemplates);
|
|
69428
|
+
tool(tool$jobTemplatesCreateJobFromTemplate);
|
|
68598
69429
|
tool(tool$knowledgeArticlesListKnowledgeArticles);
|
|
68599
69430
|
tool(tool$knowledgeArticlesCreateKnowledgeArticles);
|
|
68600
69431
|
tool(tool$knowledgeArticlesGetKnowledgeArticles);
|
|
@@ -68658,15 +69489,6 @@ function createMCPServer(deps) {
|
|
|
68658
69489
|
tool(tool$vendorsListVendors);
|
|
68659
69490
|
tool(tool$vendorsGetVendors);
|
|
68660
69491
|
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
69492
|
tool(tool$searchGeneralSearch);
|
|
68671
69493
|
tool(tool$searchObjectSearch);
|
|
68672
69494
|
tool(tool$searchJobEmbeddingSearch);
|
|
@@ -68805,6 +69627,11 @@ var init_server2 = __esm(() => {
|
|
|
68805
69627
|
init_jobsListJobs2();
|
|
68806
69628
|
init_jobsUpdateJobs2();
|
|
68807
69629
|
init_jobTemplatesCreateJobFromTemplate2();
|
|
69630
|
+
init_jobTemplatesCreateJobTemplates2();
|
|
69631
|
+
init_jobTemplatesDeleteJobTemplates2();
|
|
69632
|
+
init_jobTemplatesGetJobTemplates2();
|
|
69633
|
+
init_jobTemplatesListJobTemplates2();
|
|
69634
|
+
init_jobTemplatesUpdateJobTemplates2();
|
|
68808
69635
|
init_knowledgeArticlesCreateKnowledgeArticles2();
|
|
68809
69636
|
init_knowledgeArticlesDeleteKnowledgeArticles2();
|
|
68810
69637
|
init_knowledgeArticlesGetKnowledgeArticles2();
|
|
@@ -70043,7 +70870,7 @@ var routes = an({
|
|
|
70043
70870
|
var app = He(routes, {
|
|
70044
70871
|
name: "mcp",
|
|
70045
70872
|
versionInfo: {
|
|
70046
|
-
currentVersion: "0.9.
|
|
70873
|
+
currentVersion: "0.9.1"
|
|
70047
70874
|
}
|
|
70048
70875
|
});
|
|
70049
70876
|
zt(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -70051,5 +70878,5 @@ export {
|
|
|
70051
70878
|
app
|
|
70052
70879
|
};
|
|
70053
70880
|
|
|
70054
|
-
//# debugId=
|
|
70881
|
+
//# debugId=65AFF8013893B42164756E2164756E21
|
|
70055
70882
|
//# sourceMappingURL=mcp-server.js.map
|