servicem8 0.3.3 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.devcontainer/README.md +30 -0
  2. package/bin/mcp-server.js +5 -5
  3. package/bin/mcp-server.js.map +4 -4
  4. package/dist/commonjs/lib/config.d.ts +2 -2
  5. package/dist/commonjs/lib/config.js +2 -2
  6. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  7. package/dist/commonjs/mcp-server/server.js +1 -1
  8. package/dist/esm/lib/config.d.ts +2 -2
  9. package/dist/esm/lib/config.js +2 -2
  10. package/dist/esm/mcp-server/mcp-server.js +1 -1
  11. package/dist/esm/mcp-server/server.js +1 -1
  12. package/docs/sdks/allocationwindows/README.md +433 -0
  13. package/docs/sdks/assets/README.md +364 -0
  14. package/docs/sdks/assettypefields/README.md +456 -0
  15. package/docs/sdks/assettypes/README.md +448 -0
  16. package/docs/sdks/attachments/README.md +441 -0
  17. package/docs/sdks/badges/README.md +460 -0
  18. package/docs/sdks/bundles/README.md +437 -0
  19. package/docs/sdks/categories/README.md +462 -0
  20. package/docs/sdks/clients/README.md +466 -0
  21. package/docs/sdks/companycontacts/README.md +462 -0
  22. package/docs/sdks/emailtemplates/README.md +437 -0
  23. package/docs/sdks/feedback/README.md +437 -0
  24. package/docs/sdks/formfields/README.md +437 -0
  25. package/docs/sdks/formresponses/README.md +461 -0
  26. package/docs/sdks/forms/README.md +437 -0
  27. package/docs/sdks/jobactivities/README.md +490 -0
  28. package/docs/sdks/joballocations/README.md +492 -0
  29. package/docs/sdks/jobchecklists/README.md +477 -0
  30. package/docs/sdks/jobcontacts/README.md +462 -0
  31. package/docs/sdks/jobmaterialbundles/README.md +441 -0
  32. package/docs/sdks/jobmaterials/README.md +478 -0
  33. package/docs/sdks/jobpayments/README.md +445 -0
  34. package/docs/sdks/jobqueues/README.md +458 -0
  35. package/docs/sdks/jobs/README.md +546 -0
  36. package/docs/sdks/knowledgearticles/README.md +452 -0
  37. package/docs/sdks/locations/README.md +462 -0
  38. package/docs/sdks/materials/README.md +466 -0
  39. package/docs/sdks/notes/README.md +445 -0
  40. package/docs/sdks/securityroles/README.md +437 -0
  41. package/docs/sdks/servicem8/README.md +22 -0
  42. package/docs/sdks/smstemplates/README.md +437 -0
  43. package/docs/sdks/staffmembers/README.md +494 -0
  44. package/docs/sdks/staffmessages/README.md +457 -0
  45. package/docs/sdks/tasks/README.md +490 -0
  46. package/docs/sdks/taxrates/README.md +437 -0
  47. package/docs/sdks/vendors/README.md +278 -0
  48. package/jsr.json +1 -1
  49. package/package.json +1 -1
  50. package/src/lib/config.ts +2 -2
  51. package/src/mcp-server/mcp-server.ts +1 -1
  52. package/src/mcp-server/server.ts +1 -1
  53. package/api_fixed.json +0 -14096
@@ -0,0 +1,458 @@
1
+ # JobQueues
2
+ (*jobQueues*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to Job Queues
7
+
8
+ ### Available Operations
9
+
10
+ * [listJobQueues](#listjobqueues) - List all Job Queues
11
+ * [createJobQueues](#createjobqueues) - Create a new Job Queue
12
+ * [getJobQueues](#getjobqueues) - Retrieve a Job Queue
13
+ * [updateJobQueues](#updatejobqueues) - Update a Job Queue
14
+ * [deleteJobQueues](#deletejobqueues) - Delete a Job Queue
15
+
16
+ ## listJobQueues
17
+
18
+
19
+
20
+ #### Filtering
21
+ This endpoint supports result filtering. For more information on how to filter this request, [go here](/docs/filtering).
22
+
23
+
24
+ #### OAuth Scope
25
+ This endpoint requires the following OAuth scope **read_job_queues**.
26
+
27
+
28
+
29
+ ### Example Usage
30
+
31
+ ```typescript
32
+ import { ServiceM8 } from "servicem8";
33
+
34
+ const serviceM8 = new ServiceM8({
35
+ security: {
36
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
37
+ },
38
+ });
39
+
40
+ async function run() {
41
+ const result = await serviceM8.jobQueues.listJobQueues();
42
+
43
+ // Handle the result
44
+ console.log(result);
45
+ }
46
+
47
+ run();
48
+ ```
49
+
50
+ ### Standalone function
51
+
52
+ The standalone function version of this method:
53
+
54
+ ```typescript
55
+ import { ServiceM8Core } from "servicem8/core.js";
56
+ import { jobQueuesListJobQueues } from "servicem8/funcs/jobQueuesListJobQueues.js";
57
+
58
+ // Use `ServiceM8Core` for best tree-shaking performance.
59
+ // You can create one instance of it to use across an application.
60
+ const serviceM8 = new ServiceM8Core({
61
+ security: {
62
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
63
+ },
64
+ });
65
+
66
+ async function run() {
67
+ const res = await jobQueuesListJobQueues(serviceM8);
68
+
69
+ if (!res.ok) {
70
+ throw res.error;
71
+ }
72
+
73
+ const { value: result } = res;
74
+
75
+ // Handle the result
76
+ console.log(result);
77
+ }
78
+
79
+ run();
80
+ ```
81
+
82
+ ### Parameters
83
+
84
+ | Parameter | Type | Required | Description |
85
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
86
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
87
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
88
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
89
+
90
+ ### Response
91
+
92
+ **Promise\<[operations.ListJobQueuesResponse](../../models/operations/listjobqueuesresponse.md)\>**
93
+
94
+ ### Errors
95
+
96
+ | Error Type | Status Code | Content Type |
97
+ | ---------------- | ---------------- | ---------------- |
98
+ | errors.ErrorT | 400 | application/json |
99
+ | errors.APIError | 4XX, 5XX | \*/\* |
100
+
101
+ ## createJobQueues
102
+
103
+
104
+
105
+ #### OAuth Scope
106
+ This endpoint requires the following OAuth scope **manage_job_queues**.
107
+
108
+
109
+
110
+ #### Record UUID
111
+ 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 response header as x-record-uuid.
112
+
113
+
114
+
115
+ ### Example Usage
116
+
117
+ ```typescript
118
+ import { ServiceM8 } from "servicem8";
119
+
120
+ const serviceM8 = new ServiceM8({
121
+ security: {
122
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
123
+ },
124
+ });
125
+
126
+ async function run() {
127
+ const result = await serviceM8.jobQueues.createJobQueues({
128
+ uuid: "123e4567-f486-4258-ba96-22b4d5701abb",
129
+ });
130
+
131
+ // Handle the result
132
+ console.log(result);
133
+ }
134
+
135
+ run();
136
+ ```
137
+
138
+ ### Standalone function
139
+
140
+ The standalone function version of this method:
141
+
142
+ ```typescript
143
+ import { ServiceM8Core } from "servicem8/core.js";
144
+ import { jobQueuesCreateJobQueues } from "servicem8/funcs/jobQueuesCreateJobQueues.js";
145
+
146
+ // Use `ServiceM8Core` for best tree-shaking performance.
147
+ // You can create one instance of it to use across an application.
148
+ const serviceM8 = new ServiceM8Core({
149
+ security: {
150
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
151
+ },
152
+ });
153
+
154
+ async function run() {
155
+ const res = await jobQueuesCreateJobQueues(serviceM8, {
156
+ uuid: "123e4567-f486-4258-ba96-22b4d5701abb",
157
+ });
158
+
159
+ if (!res.ok) {
160
+ throw res.error;
161
+ }
162
+
163
+ const { value: result } = res;
164
+
165
+ // Handle the result
166
+ console.log(result);
167
+ }
168
+
169
+ run();
170
+ ```
171
+
172
+ ### Parameters
173
+
174
+ | Parameter | Type | Required | Description |
175
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
176
+ | `request` | [components.QueueInput](../../models/components/queueinput.md) | :heavy_check_mark: | The request object to use for the request. |
177
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
178
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
179
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
180
+
181
+ ### Response
182
+
183
+ **Promise\<[operations.CreateJobQueuesResponse](../../models/operations/createjobqueuesresponse.md)\>**
184
+
185
+ ### Errors
186
+
187
+ | Error Type | Status Code | Content Type |
188
+ | ---------------- | ---------------- | ---------------- |
189
+ | errors.ErrorT | 400 | application/json |
190
+ | errors.APIError | 4XX, 5XX | \*/\* |
191
+
192
+ ## getJobQueues
193
+
194
+
195
+
196
+ #### OAuth Scope
197
+ This endpoint requires the following OAuth scope **read_job_queues**.
198
+
199
+
200
+
201
+ ### Example Usage
202
+
203
+ ```typescript
204
+ import { ServiceM8 } from "servicem8";
205
+
206
+ const serviceM8 = new ServiceM8({
207
+ security: {
208
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
209
+ },
210
+ });
211
+
212
+ async function run() {
213
+ const result = await serviceM8.jobQueues.getJobQueues({
214
+ uuid: "01a98529-6f8e-4d0f-a6f8-868464b87282",
215
+ });
216
+
217
+ // Handle the result
218
+ console.log(result);
219
+ }
220
+
221
+ run();
222
+ ```
223
+
224
+ ### Standalone function
225
+
226
+ The standalone function version of this method:
227
+
228
+ ```typescript
229
+ import { ServiceM8Core } from "servicem8/core.js";
230
+ import { jobQueuesGetJobQueues } from "servicem8/funcs/jobQueuesGetJobQueues.js";
231
+
232
+ // Use `ServiceM8Core` for best tree-shaking performance.
233
+ // You can create one instance of it to use across an application.
234
+ const serviceM8 = new ServiceM8Core({
235
+ security: {
236
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
237
+ },
238
+ });
239
+
240
+ async function run() {
241
+ const res = await jobQueuesGetJobQueues(serviceM8, {
242
+ uuid: "01a98529-6f8e-4d0f-a6f8-868464b87282",
243
+ });
244
+
245
+ if (!res.ok) {
246
+ throw res.error;
247
+ }
248
+
249
+ const { value: result } = res;
250
+
251
+ // Handle the result
252
+ console.log(result);
253
+ }
254
+
255
+ run();
256
+ ```
257
+
258
+ ### Parameters
259
+
260
+ | Parameter | Type | Required | Description |
261
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
262
+ | `request` | [operations.GetJobQueuesRequest](../../models/operations/getjobqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
263
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
264
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
265
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
266
+
267
+ ### Response
268
+
269
+ **Promise\<[operations.GetJobQueuesResponse](../../models/operations/getjobqueuesresponse.md)\>**
270
+
271
+ ### Errors
272
+
273
+ | Error Type | Status Code | Content Type |
274
+ | ---------------- | ---------------- | ---------------- |
275
+ | errors.ErrorT | 400 | application/json |
276
+ | errors.APIError | 4XX, 5XX | \*/\* |
277
+
278
+ ## updateJobQueues
279
+
280
+
281
+
282
+ #### OAuth Scope
283
+ This endpoint requires the following OAuth scope **manage_job_queues**.
284
+
285
+
286
+
287
+ ### Example Usage
288
+
289
+ ```typescript
290
+ import { ServiceM8 } from "servicem8";
291
+
292
+ const serviceM8 = new ServiceM8({
293
+ security: {
294
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
295
+ },
296
+ });
297
+
298
+ async function run() {
299
+ const result = await serviceM8.jobQueues.updateJobQueues({
300
+ uuid: "d287af2c-d1ab-4ee5-b67b-edcd853636ea",
301
+ queue: {
302
+ uuid: "123e4567-f486-4258-ba96-22b4d5701abb",
303
+ },
304
+ });
305
+
306
+ // Handle the result
307
+ console.log(result);
308
+ }
309
+
310
+ run();
311
+ ```
312
+
313
+ ### Standalone function
314
+
315
+ The standalone function version of this method:
316
+
317
+ ```typescript
318
+ import { ServiceM8Core } from "servicem8/core.js";
319
+ import { jobQueuesUpdateJobQueues } from "servicem8/funcs/jobQueuesUpdateJobQueues.js";
320
+
321
+ // Use `ServiceM8Core` for best tree-shaking performance.
322
+ // You can create one instance of it to use across an application.
323
+ const serviceM8 = new ServiceM8Core({
324
+ security: {
325
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
326
+ },
327
+ });
328
+
329
+ async function run() {
330
+ const res = await jobQueuesUpdateJobQueues(serviceM8, {
331
+ uuid: "d287af2c-d1ab-4ee5-b67b-edcd853636ea",
332
+ queue: {
333
+ uuid: "123e4567-f486-4258-ba96-22b4d5701abb",
334
+ },
335
+ });
336
+
337
+ if (!res.ok) {
338
+ throw res.error;
339
+ }
340
+
341
+ const { value: result } = res;
342
+
343
+ // Handle the result
344
+ console.log(result);
345
+ }
346
+
347
+ run();
348
+ ```
349
+
350
+ ### Parameters
351
+
352
+ | Parameter | Type | Required | Description |
353
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
354
+ | `request` | [operations.UpdateJobQueuesRequest](../../models/operations/updatejobqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
355
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
356
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
357
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
358
+
359
+ ### Response
360
+
361
+ **Promise\<[operations.UpdateJobQueuesResponse](../../models/operations/updatejobqueuesresponse.md)\>**
362
+
363
+ ### Errors
364
+
365
+ | Error Type | Status Code | Content Type |
366
+ | ---------------- | ---------------- | ---------------- |
367
+ | errors.ErrorT | 400 | application/json |
368
+ | errors.APIError | 4XX, 5XX | \*/\* |
369
+
370
+ ## deleteJobQueues
371
+
372
+
373
+
374
+ In ServiceM8, records are never deleted, but are archived. Archived records will remain accessible via the API as (active = 0), however will no longer be visible in UI. Archived records can be restored to active by setting the record active field to 1.
375
+
376
+
377
+
378
+ #### OAuth Scope
379
+ This endpoint requires the following OAuth scope **manage_job_queues**.
380
+
381
+
382
+
383
+ ### Example Usage
384
+
385
+ ```typescript
386
+ import { ServiceM8 } from "servicem8";
387
+
388
+ const serviceM8 = new ServiceM8({
389
+ security: {
390
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
391
+ },
392
+ });
393
+
394
+ async function run() {
395
+ const result = await serviceM8.jobQueues.deleteJobQueues({
396
+ uuid: "612f531f-f06f-4ccc-994e-07e0a67d569f",
397
+ });
398
+
399
+ // Handle the result
400
+ console.log(result);
401
+ }
402
+
403
+ run();
404
+ ```
405
+
406
+ ### Standalone function
407
+
408
+ The standalone function version of this method:
409
+
410
+ ```typescript
411
+ import { ServiceM8Core } from "servicem8/core.js";
412
+ import { jobQueuesDeleteJobQueues } from "servicem8/funcs/jobQueuesDeleteJobQueues.js";
413
+
414
+ // Use `ServiceM8Core` for best tree-shaking performance.
415
+ // You can create one instance of it to use across an application.
416
+ const serviceM8 = new ServiceM8Core({
417
+ security: {
418
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
419
+ },
420
+ });
421
+
422
+ async function run() {
423
+ const res = await jobQueuesDeleteJobQueues(serviceM8, {
424
+ uuid: "612f531f-f06f-4ccc-994e-07e0a67d569f",
425
+ });
426
+
427
+ if (!res.ok) {
428
+ throw res.error;
429
+ }
430
+
431
+ const { value: result } = res;
432
+
433
+ // Handle the result
434
+ console.log(result);
435
+ }
436
+
437
+ run();
438
+ ```
439
+
440
+ ### Parameters
441
+
442
+ | Parameter | Type | Required | Description |
443
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
444
+ | `request` | [operations.DeleteJobQueuesRequest](../../models/operations/deletejobqueuesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
445
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
446
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
447
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
448
+
449
+ ### Response
450
+
451
+ **Promise\<[operations.DeleteJobQueuesResponse](../../models/operations/deletejobqueuesresponse.md)\>**
452
+
453
+ ### Errors
454
+
455
+ | Error Type | Status Code | Content Type |
456
+ | ---------------- | ---------------- | ---------------- |
457
+ | errors.ErrorT | 400 | application/json |
458
+ | errors.APIError | 4XX, 5XX | \*/\* |