servicem8 0.3.14 → 0.3.16
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/FUNCTIONS.md +1 -1
- package/README.md +11 -11
- package/api.json +728 -728
- package/bin/mcp-server.js +22 -22
- package/bin/mcp-server.js.map +10 -10
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/env.d.ts +1 -1
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +1 -1
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/security.js +6 -6
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +4 -4
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/security.d.ts +2 -2
- package/dist/commonjs/models/components/security.d.ts.map +1 -1
- package/dist/commonjs/models/components/security.js +2 -2
- package/dist/commonjs/models/components/security.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/env.d.ts +1 -1
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +1 -1
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/security.js +6 -6
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +4 -4
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +2 -2
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/security.d.ts +2 -2
- package/dist/esm/models/components/security.d.ts.map +1 -1
- package/dist/esm/models/components/security.js +2 -2
- package/dist/esm/models/components/security.js.map +1 -1
- package/docs/sdks/allocationwindows/README.md +10 -10
- package/docs/sdks/assets/README.md +8 -8
- package/docs/sdks/assettypefields/README.md +10 -10
- package/docs/sdks/assettypes/README.md +10 -10
- package/docs/sdks/attachments/README.md +10 -10
- package/docs/sdks/badges/README.md +10 -10
- package/docs/sdks/bundles/README.md +10 -10
- package/docs/sdks/categories/README.md +10 -10
- package/docs/sdks/clients/README.md +10 -10
- package/docs/sdks/companycontacts/README.md +10 -10
- package/docs/sdks/emailtemplates/README.md +10 -10
- package/docs/sdks/feedback/README.md +10 -10
- package/docs/sdks/formfields/README.md +10 -10
- package/docs/sdks/formresponses/README.md +10 -10
- package/docs/sdks/forms/README.md +10 -10
- package/docs/sdks/jobactivities/README.md +10 -10
- package/docs/sdks/joballocations/README.md +10 -10
- package/docs/sdks/jobchecklists/README.md +10 -10
- package/docs/sdks/jobcontacts/README.md +10 -10
- package/docs/sdks/jobmaterialbundles/README.md +10 -10
- package/docs/sdks/jobmaterials/README.md +10 -10
- package/docs/sdks/jobpayments/README.md +10 -10
- package/docs/sdks/jobqueues/README.md +10 -10
- package/docs/sdks/jobs/README.md +10 -10
- package/docs/sdks/knowledgearticles/README.md +10 -10
- package/docs/sdks/locations/README.md +10 -10
- package/docs/sdks/materials/README.md +10 -10
- package/docs/sdks/notes/README.md +10 -10
- package/docs/sdks/securityroles/README.md +10 -10
- package/docs/sdks/smstemplates/README.md +10 -10
- package/docs/sdks/staffmembers/README.md +10 -10
- package/docs/sdks/staffmessages/README.md +10 -10
- package/docs/sdks/tasks/README.md +10 -10
- package/docs/sdks/taxrates/README.md +10 -10
- package/docs/sdks/vendors/README.md +6 -6
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/env.ts +2 -2
- package/src/lib/security.ts +6 -6
- package/src/mcp-server/cli/start/command.ts +4 -4
- package/src/mcp-server/cli/start/impl.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/security.ts +4 -4
|
@@ -28,7 +28,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
28
28
|
|
|
29
29
|
const serviceM8 = new ServiceM8({
|
|
30
30
|
security: {
|
|
31
|
-
|
|
31
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -54,7 +54,7 @@ import { smsTemplatesListSMSTemplates } from "servicem8/funcs/smsTemplatesListSM
|
|
|
54
54
|
// You can create one instance of it to use across an application.
|
|
55
55
|
const serviceM8 = new ServiceM8Core({
|
|
56
56
|
security: {
|
|
57
|
-
|
|
57
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -109,7 +109,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
109
109
|
|
|
110
110
|
const serviceM8 = new ServiceM8({
|
|
111
111
|
security: {
|
|
112
|
-
|
|
112
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -138,7 +138,7 @@ import { smsTemplatesCreateSMSTemplates } from "servicem8/funcs/smsTemplatesCrea
|
|
|
138
138
|
// You can create one instance of it to use across an application.
|
|
139
139
|
const serviceM8 = new ServiceM8Core({
|
|
140
140
|
security: {
|
|
141
|
-
|
|
141
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
142
142
|
},
|
|
143
143
|
});
|
|
144
144
|
|
|
@@ -192,7 +192,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
192
192
|
|
|
193
193
|
const serviceM8 = new ServiceM8({
|
|
194
194
|
security: {
|
|
195
|
-
|
|
195
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
196
196
|
},
|
|
197
197
|
});
|
|
198
198
|
|
|
@@ -220,7 +220,7 @@ import { smsTemplatesGetSMSTemplates } from "servicem8/funcs/smsTemplatesGetSMST
|
|
|
220
220
|
// You can create one instance of it to use across an application.
|
|
221
221
|
const serviceM8 = new ServiceM8Core({
|
|
222
222
|
security: {
|
|
223
|
-
|
|
223
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
224
224
|
},
|
|
225
225
|
});
|
|
226
226
|
|
|
@@ -273,7 +273,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
273
273
|
|
|
274
274
|
const serviceM8 = new ServiceM8({
|
|
275
275
|
security: {
|
|
276
|
-
|
|
276
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
277
277
|
},
|
|
278
278
|
});
|
|
279
279
|
|
|
@@ -305,7 +305,7 @@ import { smsTemplatesUpdateSMSTemplates } from "servicem8/funcs/smsTemplatesUpda
|
|
|
305
305
|
// You can create one instance of it to use across an application.
|
|
306
306
|
const serviceM8 = new ServiceM8Core({
|
|
307
307
|
security: {
|
|
308
|
-
|
|
308
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
309
309
|
},
|
|
310
310
|
});
|
|
311
311
|
|
|
@@ -366,7 +366,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
366
366
|
|
|
367
367
|
const serviceM8 = new ServiceM8({
|
|
368
368
|
security: {
|
|
369
|
-
|
|
369
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
370
370
|
},
|
|
371
371
|
});
|
|
372
372
|
|
|
@@ -394,7 +394,7 @@ import { smsTemplatesDeleteSMSTemplates } from "servicem8/funcs/smsTemplatesDele
|
|
|
394
394
|
// You can create one instance of it to use across an application.
|
|
395
395
|
const serviceM8 = new ServiceM8Core({
|
|
396
396
|
security: {
|
|
397
|
-
|
|
397
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
398
398
|
},
|
|
399
399
|
});
|
|
400
400
|
|
|
@@ -33,7 +33,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
33
33
|
|
|
34
34
|
const serviceM8 = new ServiceM8({
|
|
35
35
|
security: {
|
|
36
|
-
|
|
36
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -59,7 +59,7 @@ import { staffMembersListStaffMembers } from "servicem8/funcs/staffMembersListSt
|
|
|
59
59
|
// You can create one instance of it to use across an application.
|
|
60
60
|
const serviceM8 = new ServiceM8Core({
|
|
61
61
|
security: {
|
|
62
|
-
|
|
62
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -119,7 +119,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
119
119
|
|
|
120
120
|
const serviceM8 = new ServiceM8({
|
|
121
121
|
security: {
|
|
122
|
-
|
|
122
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
123
123
|
},
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -156,7 +156,7 @@ import { staffMembersCreateStaffMembers } from "servicem8/funcs/staffMembersCrea
|
|
|
156
156
|
// You can create one instance of it to use across an application.
|
|
157
157
|
const serviceM8 = new ServiceM8Core({
|
|
158
158
|
security: {
|
|
159
|
-
|
|
159
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
160
160
|
},
|
|
161
161
|
});
|
|
162
162
|
|
|
@@ -223,7 +223,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
223
223
|
|
|
224
224
|
const serviceM8 = new ServiceM8({
|
|
225
225
|
security: {
|
|
226
|
-
|
|
226
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
227
227
|
},
|
|
228
228
|
});
|
|
229
229
|
|
|
@@ -251,7 +251,7 @@ import { staffMembersGetStaffMembers } from "servicem8/funcs/staffMembersGetStaf
|
|
|
251
251
|
// You can create one instance of it to use across an application.
|
|
252
252
|
const serviceM8 = new ServiceM8Core({
|
|
253
253
|
security: {
|
|
254
|
-
|
|
254
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
255
255
|
},
|
|
256
256
|
});
|
|
257
257
|
|
|
@@ -309,7 +309,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
309
309
|
|
|
310
310
|
const serviceM8 = new ServiceM8({
|
|
311
311
|
security: {
|
|
312
|
-
|
|
312
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
313
313
|
},
|
|
314
314
|
});
|
|
315
315
|
|
|
@@ -349,7 +349,7 @@ import { staffMembersUpdateStaffMembers } from "servicem8/funcs/staffMembersUpda
|
|
|
349
349
|
// You can create one instance of it to use across an application.
|
|
350
350
|
const serviceM8 = new ServiceM8Core({
|
|
351
351
|
security: {
|
|
352
|
-
|
|
352
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
353
353
|
},
|
|
354
354
|
});
|
|
355
355
|
|
|
@@ -423,7 +423,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
423
423
|
|
|
424
424
|
const serviceM8 = new ServiceM8({
|
|
425
425
|
security: {
|
|
426
|
-
|
|
426
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
427
427
|
},
|
|
428
428
|
});
|
|
429
429
|
|
|
@@ -451,7 +451,7 @@ import { staffMembersDeleteStaffMembers } from "servicem8/funcs/staffMembersDele
|
|
|
451
451
|
// You can create one instance of it to use across an application.
|
|
452
452
|
const serviceM8 = new ServiceM8Core({
|
|
453
453
|
security: {
|
|
454
|
-
|
|
454
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
455
455
|
},
|
|
456
456
|
});
|
|
457
457
|
|
|
@@ -28,7 +28,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
28
28
|
|
|
29
29
|
const serviceM8 = new ServiceM8({
|
|
30
30
|
security: {
|
|
31
|
-
|
|
31
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -54,7 +54,7 @@ import { staffMessagesListStaffMessages } from "servicem8/funcs/staffMessagesLis
|
|
|
54
54
|
// You can create one instance of it to use across an application.
|
|
55
55
|
const serviceM8 = new ServiceM8Core({
|
|
56
56
|
security: {
|
|
57
|
-
|
|
57
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -109,7 +109,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
109
109
|
|
|
110
110
|
const serviceM8 = new ServiceM8({
|
|
111
111
|
security: {
|
|
112
|
-
|
|
112
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -143,7 +143,7 @@ import { staffMessagesCreateStaffMessages } from "servicem8/funcs/staffMessagesC
|
|
|
143
143
|
// You can create one instance of it to use across an application.
|
|
144
144
|
const serviceM8 = new ServiceM8Core({
|
|
145
145
|
security: {
|
|
146
|
-
|
|
146
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
147
147
|
},
|
|
148
148
|
});
|
|
149
149
|
|
|
@@ -202,7 +202,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
202
202
|
|
|
203
203
|
const serviceM8 = new ServiceM8({
|
|
204
204
|
security: {
|
|
205
|
-
|
|
205
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
206
206
|
},
|
|
207
207
|
});
|
|
208
208
|
|
|
@@ -230,7 +230,7 @@ import { staffMessagesGetStaffMessages } from "servicem8/funcs/staffMessagesGetS
|
|
|
230
230
|
// You can create one instance of it to use across an application.
|
|
231
231
|
const serviceM8 = new ServiceM8Core({
|
|
232
232
|
security: {
|
|
233
|
-
|
|
233
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
234
234
|
},
|
|
235
235
|
});
|
|
236
236
|
|
|
@@ -283,7 +283,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
283
283
|
|
|
284
284
|
const serviceM8 = new ServiceM8({
|
|
285
285
|
security: {
|
|
286
|
-
|
|
286
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
287
287
|
},
|
|
288
288
|
});
|
|
289
289
|
|
|
@@ -320,7 +320,7 @@ import { staffMessagesUpdateStaffMessages } from "servicem8/funcs/staffMessagesU
|
|
|
320
320
|
// You can create one instance of it to use across an application.
|
|
321
321
|
const serviceM8 = new ServiceM8Core({
|
|
322
322
|
security: {
|
|
323
|
-
|
|
323
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
324
324
|
},
|
|
325
325
|
});
|
|
326
326
|
|
|
@@ -386,7 +386,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
386
386
|
|
|
387
387
|
const serviceM8 = new ServiceM8({
|
|
388
388
|
security: {
|
|
389
|
-
|
|
389
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
390
390
|
},
|
|
391
391
|
});
|
|
392
392
|
|
|
@@ -414,7 +414,7 @@ import { staffMessagesDeleteStaffMessages } from "servicem8/funcs/staffMessagesD
|
|
|
414
414
|
// You can create one instance of it to use across an application.
|
|
415
415
|
const serviceM8 = new ServiceM8Core({
|
|
416
416
|
security: {
|
|
417
|
-
|
|
417
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
418
418
|
},
|
|
419
419
|
});
|
|
420
420
|
|
|
@@ -33,7 +33,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
33
33
|
|
|
34
34
|
const serviceM8 = new ServiceM8({
|
|
35
35
|
security: {
|
|
36
|
-
|
|
36
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -59,7 +59,7 @@ import { tasksListTasks } from "servicem8/funcs/tasksListTasks.js";
|
|
|
59
59
|
// You can create one instance of it to use across an application.
|
|
60
60
|
const serviceM8 = new ServiceM8Core({
|
|
61
61
|
security: {
|
|
62
|
-
|
|
62
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -119,7 +119,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
119
119
|
|
|
120
120
|
const serviceM8 = new ServiceM8({
|
|
121
121
|
security: {
|
|
122
|
-
|
|
122
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
123
123
|
},
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -155,7 +155,7 @@ import { tasksCreateTasks } from "servicem8/funcs/tasksCreateTasks.js";
|
|
|
155
155
|
// You can create one instance of it to use across an application.
|
|
156
156
|
const serviceM8 = new ServiceM8Core({
|
|
157
157
|
security: {
|
|
158
|
-
|
|
158
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
159
159
|
},
|
|
160
160
|
});
|
|
161
161
|
|
|
@@ -221,7 +221,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
221
221
|
|
|
222
222
|
const serviceM8 = new ServiceM8({
|
|
223
223
|
security: {
|
|
224
|
-
|
|
224
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
225
225
|
},
|
|
226
226
|
});
|
|
227
227
|
|
|
@@ -249,7 +249,7 @@ import { tasksGetTasks } from "servicem8/funcs/tasksGetTasks.js";
|
|
|
249
249
|
// You can create one instance of it to use across an application.
|
|
250
250
|
const serviceM8 = new ServiceM8Core({
|
|
251
251
|
security: {
|
|
252
|
-
|
|
252
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
253
253
|
},
|
|
254
254
|
});
|
|
255
255
|
|
|
@@ -307,7 +307,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
307
307
|
|
|
308
308
|
const serviceM8 = new ServiceM8({
|
|
309
309
|
security: {
|
|
310
|
-
|
|
310
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
311
311
|
},
|
|
312
312
|
});
|
|
313
313
|
|
|
@@ -346,7 +346,7 @@ import { tasksUpdateTasks } from "servicem8/funcs/tasksUpdateTasks.js";
|
|
|
346
346
|
// You can create one instance of it to use across an application.
|
|
347
347
|
const serviceM8 = new ServiceM8Core({
|
|
348
348
|
security: {
|
|
349
|
-
|
|
349
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
350
350
|
},
|
|
351
351
|
});
|
|
352
352
|
|
|
@@ -419,7 +419,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
419
419
|
|
|
420
420
|
const serviceM8 = new ServiceM8({
|
|
421
421
|
security: {
|
|
422
|
-
|
|
422
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
423
423
|
},
|
|
424
424
|
});
|
|
425
425
|
|
|
@@ -447,7 +447,7 @@ import { tasksDeleteTasks } from "servicem8/funcs/tasksDeleteTasks.js";
|
|
|
447
447
|
// You can create one instance of it to use across an application.
|
|
448
448
|
const serviceM8 = new ServiceM8Core({
|
|
449
449
|
security: {
|
|
450
|
-
|
|
450
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
451
451
|
},
|
|
452
452
|
});
|
|
453
453
|
|
|
@@ -28,7 +28,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
28
28
|
|
|
29
29
|
const serviceM8 = new ServiceM8({
|
|
30
30
|
security: {
|
|
31
|
-
|
|
31
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -54,7 +54,7 @@ import { taxRatesListTaxRates } from "servicem8/funcs/taxRatesListTaxRates.js";
|
|
|
54
54
|
// You can create one instance of it to use across an application.
|
|
55
55
|
const serviceM8 = new ServiceM8Core({
|
|
56
56
|
security: {
|
|
57
|
-
|
|
57
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -109,7 +109,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
109
109
|
|
|
110
110
|
const serviceM8 = new ServiceM8({
|
|
111
111
|
security: {
|
|
112
|
-
|
|
112
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -138,7 +138,7 @@ import { taxRatesCreateTaxRates } from "servicem8/funcs/taxRatesCreateTaxRates.j
|
|
|
138
138
|
// You can create one instance of it to use across an application.
|
|
139
139
|
const serviceM8 = new ServiceM8Core({
|
|
140
140
|
security: {
|
|
141
|
-
|
|
141
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
142
142
|
},
|
|
143
143
|
});
|
|
144
144
|
|
|
@@ -192,7 +192,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
192
192
|
|
|
193
193
|
const serviceM8 = new ServiceM8({
|
|
194
194
|
security: {
|
|
195
|
-
|
|
195
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
196
196
|
},
|
|
197
197
|
});
|
|
198
198
|
|
|
@@ -220,7 +220,7 @@ import { taxRatesGetTaxRates } from "servicem8/funcs/taxRatesGetTaxRates.js";
|
|
|
220
220
|
// You can create one instance of it to use across an application.
|
|
221
221
|
const serviceM8 = new ServiceM8Core({
|
|
222
222
|
security: {
|
|
223
|
-
|
|
223
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
224
224
|
},
|
|
225
225
|
});
|
|
226
226
|
|
|
@@ -273,7 +273,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
273
273
|
|
|
274
274
|
const serviceM8 = new ServiceM8({
|
|
275
275
|
security: {
|
|
276
|
-
|
|
276
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
277
277
|
},
|
|
278
278
|
});
|
|
279
279
|
|
|
@@ -305,7 +305,7 @@ import { taxRatesUpdateTaxRates } from "servicem8/funcs/taxRatesUpdateTaxRates.j
|
|
|
305
305
|
// You can create one instance of it to use across an application.
|
|
306
306
|
const serviceM8 = new ServiceM8Core({
|
|
307
307
|
security: {
|
|
308
|
-
|
|
308
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
309
309
|
},
|
|
310
310
|
});
|
|
311
311
|
|
|
@@ -366,7 +366,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
366
366
|
|
|
367
367
|
const serviceM8 = new ServiceM8({
|
|
368
368
|
security: {
|
|
369
|
-
|
|
369
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
370
370
|
},
|
|
371
371
|
});
|
|
372
372
|
|
|
@@ -394,7 +394,7 @@ import { taxRatesDeleteTaxRates } from "servicem8/funcs/taxRatesDeleteTaxRates.j
|
|
|
394
394
|
// You can create one instance of it to use across an application.
|
|
395
395
|
const serviceM8 = new ServiceM8Core({
|
|
396
396
|
security: {
|
|
397
|
-
|
|
397
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
398
398
|
},
|
|
399
399
|
});
|
|
400
400
|
|
|
@@ -33,7 +33,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
33
33
|
|
|
34
34
|
const serviceM8 = new ServiceM8({
|
|
35
35
|
security: {
|
|
36
|
-
|
|
36
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -59,7 +59,7 @@ import { vendorsListVendors } from "servicem8/funcs/vendorsListVendors.js";
|
|
|
59
59
|
// You can create one instance of it to use across an application.
|
|
60
60
|
const serviceM8 = new ServiceM8Core({
|
|
61
61
|
security: {
|
|
62
|
-
|
|
62
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -116,7 +116,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
116
116
|
|
|
117
117
|
const serviceM8 = new ServiceM8({
|
|
118
118
|
security: {
|
|
119
|
-
|
|
119
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
120
120
|
},
|
|
121
121
|
});
|
|
122
122
|
|
|
@@ -144,7 +144,7 @@ import { vendorsGetVendors } from "servicem8/funcs/vendorsGetVendors.js";
|
|
|
144
144
|
// You can create one instance of it to use across an application.
|
|
145
145
|
const serviceM8 = new ServiceM8Core({
|
|
146
146
|
security: {
|
|
147
|
-
|
|
147
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
148
148
|
},
|
|
149
149
|
});
|
|
150
150
|
|
|
@@ -199,7 +199,7 @@ import { ServiceM8 } from "servicem8";
|
|
|
199
199
|
|
|
200
200
|
const serviceM8 = new ServiceM8({
|
|
201
201
|
security: {
|
|
202
|
-
|
|
202
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
203
203
|
},
|
|
204
204
|
});
|
|
205
205
|
|
|
@@ -231,7 +231,7 @@ import { vendorsUpdateVendors } from "servicem8/funcs/vendorsUpdateVendors.js";
|
|
|
231
231
|
// You can create one instance of it to use across an application.
|
|
232
232
|
const serviceM8 = new ServiceM8Core({
|
|
233
233
|
security: {
|
|
234
|
-
|
|
234
|
+
apiKeyAuth: process.env["SERVICEM8_API_KEY_AUTH"] ?? "",
|
|
235
235
|
},
|
|
236
236
|
});
|
|
237
237
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "1.0.0",
|
|
64
|
-
sdkVersion: "0.3.
|
|
64
|
+
sdkVersion: "0.3.16",
|
|
65
65
|
genVersion: "2.593.4",
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.3.16 2.593.4 1.0.0 servicem8",
|
|
67
67
|
} as const;
|
package/src/lib/env.ts
CHANGED
|
@@ -7,15 +7,15 @@ import { dlv } from "./dlv.js";
|
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
|
|
9
9
|
export interface Env {
|
|
10
|
-
SERVICEM8_OAUTH2?: string | undefined;
|
|
11
10
|
SERVICEM8_API_KEY_AUTH?: string | undefined;
|
|
11
|
+
SERVICEM8_OAUTH2?: string | undefined;
|
|
12
12
|
|
|
13
13
|
SERVICEM8_DEBUG?: boolean | undefined;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export const envSchema: z.ZodType<Env, z.ZodTypeDef, unknown> = z.object({
|
|
17
|
-
SERVICEM8_OAUTH2: z.string().optional(),
|
|
18
17
|
SERVICEM8_API_KEY_AUTH: z.string().optional(),
|
|
18
|
+
SERVICEM8_OAUTH2: z.string().optional(),
|
|
19
19
|
|
|
20
20
|
SERVICEM8_DEBUG: z.coerce.boolean().optional(),
|
|
21
21
|
});
|
package/src/lib/security.ts
CHANGED
|
@@ -242,16 +242,16 @@ export function resolveGlobalSecurity(
|
|
|
242
242
|
return resolveSecurity(
|
|
243
243
|
[
|
|
244
244
|
{
|
|
245
|
-
fieldName: "
|
|
246
|
-
type: "
|
|
247
|
-
value: security?.
|
|
245
|
+
fieldName: "X-Api-Key",
|
|
246
|
+
type: "apiKey:header",
|
|
247
|
+
value: security?.apiKeyAuth ?? env().SERVICEM8_API_KEY_AUTH,
|
|
248
248
|
},
|
|
249
249
|
],
|
|
250
250
|
[
|
|
251
251
|
{
|
|
252
|
-
fieldName: "
|
|
253
|
-
type: "
|
|
254
|
-
value: security?.
|
|
252
|
+
fieldName: "Authorization",
|
|
253
|
+
type: "oauth2",
|
|
254
|
+
value: security?.oauth2 ?? env().SERVICEM8_OAUTH2,
|
|
255
255
|
},
|
|
256
256
|
],
|
|
257
257
|
);
|
|
@@ -49,17 +49,17 @@ export const startCommand = buildCommand({
|
|
|
49
49
|
},
|
|
50
50
|
}
|
|
51
51
|
: {}),
|
|
52
|
-
|
|
52
|
+
"api-key-auth": {
|
|
53
53
|
kind: "parsed",
|
|
54
|
-
brief: "Sets the
|
|
54
|
+
brief: "Sets the apiKeyAuth auth field for the API",
|
|
55
55
|
optional: true,
|
|
56
56
|
parse: (value) => {
|
|
57
57
|
return z.string().parse(value);
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
oauth2: {
|
|
61
61
|
kind: "parsed",
|
|
62
|
-
brief: "Sets the
|
|
62
|
+
brief: "Sets the oauth2 auth field for the API",
|
|
63
63
|
optional: true,
|
|
64
64
|
parse: (value) => {
|
|
65
65
|
return z.string().parse(value);
|
|
@@ -19,8 +19,8 @@ interface StartCommandFlags {
|
|
|
19
19
|
readonly port: number;
|
|
20
20
|
readonly tool?: string[];
|
|
21
21
|
readonly scope?: MCPScope[];
|
|
22
|
-
readonly oauth2?: string | undefined;
|
|
23
22
|
readonly "api-key-auth"?: string | undefined;
|
|
23
|
+
readonly oauth2?: string | undefined;
|
|
24
24
|
readonly "server-url"?: string;
|
|
25
25
|
readonly "server-index"?: SDKOptions["serverIdx"];
|
|
26
26
|
readonly "log-level": ConsoleLoggerLevel;
|
|
@@ -51,7 +51,7 @@ async function startStdio(flags: StartCommandFlags) {
|
|
|
51
51
|
logger,
|
|
52
52
|
allowedTools: flags.tool,
|
|
53
53
|
scopes: flags.scope,
|
|
54
|
-
security: {
|
|
54
|
+
security: { apiKeyAuth: flags["api-key-auth"], oauth2: flags.oauth2 },
|
|
55
55
|
serverURL: flags["server-url"],
|
|
56
56
|
serverIdx: flags["server-index"],
|
|
57
57
|
});
|
|
@@ -72,7 +72,7 @@ async function startSSE(flags: StartCommandFlags) {
|
|
|
72
72
|
logger,
|
|
73
73
|
allowedTools: flags.tool,
|
|
74
74
|
scopes: flags.scope,
|
|
75
|
-
security: {
|
|
75
|
+
security: { apiKeyAuth: flags["api-key-auth"], oauth2: flags.oauth2 },
|
|
76
76
|
serverURL: flags["server-url"],
|
|
77
77
|
serverIdx: flags["server-index"],
|
|
78
78
|
});
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type Security = {
|
|
11
|
-
oauth2?: string | undefined;
|
|
12
11
|
apiKeyAuth?: string | undefined;
|
|
12
|
+
oauth2?: string | undefined;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/** @internal */
|
|
@@ -18,14 +18,14 @@ export const Security$inboundSchema: z.ZodType<
|
|
|
18
18
|
z.ZodTypeDef,
|
|
19
19
|
unknown
|
|
20
20
|
> = z.object({
|
|
21
|
-
oauth2: z.string().optional(),
|
|
22
21
|
apiKeyAuth: z.string().optional(),
|
|
22
|
+
oauth2: z.string().optional(),
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
/** @internal */
|
|
26
26
|
export type Security$Outbound = {
|
|
27
|
-
oauth2?: string | undefined;
|
|
28
27
|
apiKeyAuth?: string | undefined;
|
|
28
|
+
oauth2?: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
@@ -34,8 +34,8 @@ export const Security$outboundSchema: z.ZodType<
|
|
|
34
34
|
z.ZodTypeDef,
|
|
35
35
|
Security
|
|
36
36
|
> = z.object({
|
|
37
|
-
oauth2: z.string().optional(),
|
|
38
37
|
apiKeyAuth: z.string().optional(),
|
|
38
|
+
oauth2: z.string().optional(),
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
/**
|