servicem8 0.3.3 → 0.3.7

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,461 @@
1
+ # FormResponses
2
+ (*formResponses*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to Form Responses
7
+
8
+ ### Available Operations
9
+
10
+ * [listFormResponses](#listformresponses) - List all Form Responses
11
+ * [createFormResponses](#createformresponses) - Create a new Form Response
12
+ * [getFormResponses](#getformresponses) - Retrieve a Form Response
13
+ * [updateFormResponses](#updateformresponses) - Update a Form Response
14
+ * [deleteFormResponses](#deleteformresponses) - Delete a Form Response
15
+
16
+ ## listFormResponses
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
+ ### Example Usage
25
+
26
+ ```typescript
27
+ import { ServiceM8 } from "servicem8";
28
+
29
+ const serviceM8 = new ServiceM8({
30
+ security: {
31
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
32
+ },
33
+ });
34
+
35
+ async function run() {
36
+ const result = await serviceM8.formResponses.listFormResponses();
37
+
38
+ // Handle the result
39
+ console.log(result);
40
+ }
41
+
42
+ run();
43
+ ```
44
+
45
+ ### Standalone function
46
+
47
+ The standalone function version of this method:
48
+
49
+ ```typescript
50
+ import { ServiceM8Core } from "servicem8/core.js";
51
+ import { formResponsesListFormResponses } from "servicem8/funcs/formResponsesListFormResponses.js";
52
+
53
+ // Use `ServiceM8Core` for best tree-shaking performance.
54
+ // You can create one instance of it to use across an application.
55
+ const serviceM8 = new ServiceM8Core({
56
+ security: {
57
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
58
+ },
59
+ });
60
+
61
+ async function run() {
62
+ const res = await formResponsesListFormResponses(serviceM8);
63
+
64
+ if (!res.ok) {
65
+ throw res.error;
66
+ }
67
+
68
+ const { value: result } = res;
69
+
70
+ // Handle the result
71
+ console.log(result);
72
+ }
73
+
74
+ run();
75
+ ```
76
+
77
+ ### Parameters
78
+
79
+ | Parameter | Type | Required | Description |
80
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
81
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
82
+ | `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. |
83
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
84
+
85
+ ### Response
86
+
87
+ **Promise\<[operations.ListFormResponsesResponse](../../models/operations/listformresponsesresponse.md)\>**
88
+
89
+ ### Errors
90
+
91
+ | Error Type | Status Code | Content Type |
92
+ | ---------------- | ---------------- | ---------------- |
93
+ | errors.ErrorT | 400 | application/json |
94
+ | errors.APIError | 4XX, 5XX | \*/\* |
95
+
96
+ ## createFormResponses
97
+
98
+
99
+
100
+ #### Record UUID
101
+ 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.
102
+
103
+
104
+
105
+ ### Example Usage
106
+
107
+ ```typescript
108
+ import { ServiceM8 } from "servicem8";
109
+
110
+ const serviceM8 = new ServiceM8({
111
+ security: {
112
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
113
+ },
114
+ });
115
+
116
+ async function run() {
117
+ const result = await serviceM8.formResponses.createFormResponses({
118
+ uuid: "123e4567-31e2-4a09-b726-22b4ddf69b3b",
119
+ formUuid: "123e4567-3f17-486e-9edc-22b4dac0621b",
120
+ staffUuid: "123e4567-e65c-4a61-8020-22b4da53c35b",
121
+ regardingObjectUuid: "123e4567-b9c0-42d6-8c86-22b4dbfdf4db",
122
+ timestamp: "YYYY-MM-DD HH:MM:SS",
123
+ formByStaffUuid: "123e4567-434d-4964-9543-22b4d6d200eb",
124
+ documentAttachmentUuid: "123e4567-9b9d-43c0-966b-22b4d9e25bfb",
125
+ assetUuid: "123e4567-711c-4c33-9b16-22b4d62752fb",
126
+ });
127
+
128
+ // Handle the result
129
+ console.log(result);
130
+ }
131
+
132
+ run();
133
+ ```
134
+
135
+ ### Standalone function
136
+
137
+ The standalone function version of this method:
138
+
139
+ ```typescript
140
+ import { ServiceM8Core } from "servicem8/core.js";
141
+ import { formResponsesCreateFormResponses } from "servicem8/funcs/formResponsesCreateFormResponses.js";
142
+
143
+ // Use `ServiceM8Core` for best tree-shaking performance.
144
+ // You can create one instance of it to use across an application.
145
+ const serviceM8 = new ServiceM8Core({
146
+ security: {
147
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
148
+ },
149
+ });
150
+
151
+ async function run() {
152
+ const res = await formResponsesCreateFormResponses(serviceM8, {
153
+ uuid: "123e4567-31e2-4a09-b726-22b4ddf69b3b",
154
+ formUuid: "123e4567-3f17-486e-9edc-22b4dac0621b",
155
+ staffUuid: "123e4567-e65c-4a61-8020-22b4da53c35b",
156
+ regardingObjectUuid: "123e4567-b9c0-42d6-8c86-22b4dbfdf4db",
157
+ timestamp: "YYYY-MM-DD HH:MM:SS",
158
+ formByStaffUuid: "123e4567-434d-4964-9543-22b4d6d200eb",
159
+ documentAttachmentUuid: "123e4567-9b9d-43c0-966b-22b4d9e25bfb",
160
+ assetUuid: "123e4567-711c-4c33-9b16-22b4d62752fb",
161
+ });
162
+
163
+ if (!res.ok) {
164
+ throw res.error;
165
+ }
166
+
167
+ const { value: result } = res;
168
+
169
+ // Handle the result
170
+ console.log(result);
171
+ }
172
+
173
+ run();
174
+ ```
175
+
176
+ ### Parameters
177
+
178
+ | Parameter | Type | Required | Description |
179
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
180
+ | `request` | [components.FormResponseInput](../../models/components/formresponseinput.md) | :heavy_check_mark: | The request object to use for the request. |
181
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
182
+ | `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. |
183
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
184
+
185
+ ### Response
186
+
187
+ **Promise\<[operations.CreateFormResponsesResponse](../../models/operations/createformresponsesresponse.md)\>**
188
+
189
+ ### Errors
190
+
191
+ | Error Type | Status Code | Content Type |
192
+ | ---------------- | ---------------- | ---------------- |
193
+ | errors.ErrorT | 400 | application/json |
194
+ | errors.APIError | 4XX, 5XX | \*/\* |
195
+
196
+ ## getFormResponses
197
+
198
+ Retrieve a Form Response
199
+
200
+ ### Example Usage
201
+
202
+ ```typescript
203
+ import { ServiceM8 } from "servicem8";
204
+
205
+ const serviceM8 = new ServiceM8({
206
+ security: {
207
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
208
+ },
209
+ });
210
+
211
+ async function run() {
212
+ const result = await serviceM8.formResponses.getFormResponses({
213
+ uuid: "23aea6ea-cca1-4a9f-b754-cf0a7e13a1e5",
214
+ });
215
+
216
+ // Handle the result
217
+ console.log(result);
218
+ }
219
+
220
+ run();
221
+ ```
222
+
223
+ ### Standalone function
224
+
225
+ The standalone function version of this method:
226
+
227
+ ```typescript
228
+ import { ServiceM8Core } from "servicem8/core.js";
229
+ import { formResponsesGetFormResponses } from "servicem8/funcs/formResponsesGetFormResponses.js";
230
+
231
+ // Use `ServiceM8Core` for best tree-shaking performance.
232
+ // You can create one instance of it to use across an application.
233
+ const serviceM8 = new ServiceM8Core({
234
+ security: {
235
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
236
+ },
237
+ });
238
+
239
+ async function run() {
240
+ const res = await formResponsesGetFormResponses(serviceM8, {
241
+ uuid: "23aea6ea-cca1-4a9f-b754-cf0a7e13a1e5",
242
+ });
243
+
244
+ if (!res.ok) {
245
+ throw res.error;
246
+ }
247
+
248
+ const { value: result } = res;
249
+
250
+ // Handle the result
251
+ console.log(result);
252
+ }
253
+
254
+ run();
255
+ ```
256
+
257
+ ### Parameters
258
+
259
+ | Parameter | Type | Required | Description |
260
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
261
+ | `request` | [operations.GetFormResponsesRequest](../../models/operations/getformresponsesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
262
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
263
+ | `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. |
264
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
265
+
266
+ ### Response
267
+
268
+ **Promise\<[operations.GetFormResponsesResponse](../../models/operations/getformresponsesresponse.md)\>**
269
+
270
+ ### Errors
271
+
272
+ | Error Type | Status Code | Content Type |
273
+ | ---------------- | ---------------- | ---------------- |
274
+ | errors.ErrorT | 400 | application/json |
275
+ | errors.APIError | 4XX, 5XX | \*/\* |
276
+
277
+ ## updateFormResponses
278
+
279
+ Update a Form Response
280
+
281
+ ### Example Usage
282
+
283
+ ```typescript
284
+ import { ServiceM8 } from "servicem8";
285
+
286
+ const serviceM8 = new ServiceM8({
287
+ security: {
288
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
289
+ },
290
+ });
291
+
292
+ async function run() {
293
+ const result = await serviceM8.formResponses.updateFormResponses({
294
+ uuid: "7dcb04b7-cd57-4348-a3cc-51da433d11f8",
295
+ formResponse: {
296
+ uuid: "123e4567-31e2-4a09-b726-22b4ddf69b3b",
297
+ formUuid: "123e4567-3f17-486e-9edc-22b4dac0621b",
298
+ staffUuid: "123e4567-e65c-4a61-8020-22b4da53c35b",
299
+ regardingObjectUuid: "123e4567-b9c0-42d6-8c86-22b4dbfdf4db",
300
+ timestamp: "YYYY-MM-DD HH:MM:SS",
301
+ formByStaffUuid: "123e4567-434d-4964-9543-22b4d6d200eb",
302
+ documentAttachmentUuid: "123e4567-9b9d-43c0-966b-22b4d9e25bfb",
303
+ assetUuid: "123e4567-711c-4c33-9b16-22b4d62752fb",
304
+ },
305
+ });
306
+
307
+ // Handle the result
308
+ console.log(result);
309
+ }
310
+
311
+ run();
312
+ ```
313
+
314
+ ### Standalone function
315
+
316
+ The standalone function version of this method:
317
+
318
+ ```typescript
319
+ import { ServiceM8Core } from "servicem8/core.js";
320
+ import { formResponsesUpdateFormResponses } from "servicem8/funcs/formResponsesUpdateFormResponses.js";
321
+
322
+ // Use `ServiceM8Core` for best tree-shaking performance.
323
+ // You can create one instance of it to use across an application.
324
+ const serviceM8 = new ServiceM8Core({
325
+ security: {
326
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
327
+ },
328
+ });
329
+
330
+ async function run() {
331
+ const res = await formResponsesUpdateFormResponses(serviceM8, {
332
+ uuid: "7dcb04b7-cd57-4348-a3cc-51da433d11f8",
333
+ formResponse: {
334
+ uuid: "123e4567-31e2-4a09-b726-22b4ddf69b3b",
335
+ formUuid: "123e4567-3f17-486e-9edc-22b4dac0621b",
336
+ staffUuid: "123e4567-e65c-4a61-8020-22b4da53c35b",
337
+ regardingObjectUuid: "123e4567-b9c0-42d6-8c86-22b4dbfdf4db",
338
+ timestamp: "YYYY-MM-DD HH:MM:SS",
339
+ formByStaffUuid: "123e4567-434d-4964-9543-22b4d6d200eb",
340
+ documentAttachmentUuid: "123e4567-9b9d-43c0-966b-22b4d9e25bfb",
341
+ assetUuid: "123e4567-711c-4c33-9b16-22b4d62752fb",
342
+ },
343
+ });
344
+
345
+ if (!res.ok) {
346
+ throw res.error;
347
+ }
348
+
349
+ const { value: result } = res;
350
+
351
+ // Handle the result
352
+ console.log(result);
353
+ }
354
+
355
+ run();
356
+ ```
357
+
358
+ ### Parameters
359
+
360
+ | Parameter | Type | Required | Description |
361
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
362
+ | `request` | [operations.UpdateFormResponsesRequest](../../models/operations/updateformresponsesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
363
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
364
+ | `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. |
365
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
366
+
367
+ ### Response
368
+
369
+ **Promise\<[operations.UpdateFormResponsesResponse](../../models/operations/updateformresponsesresponse.md)\>**
370
+
371
+ ### Errors
372
+
373
+ | Error Type | Status Code | Content Type |
374
+ | ---------------- | ---------------- | ---------------- |
375
+ | errors.ErrorT | 400 | application/json |
376
+ | errors.APIError | 4XX, 5XX | \*/\* |
377
+
378
+ ## deleteFormResponses
379
+
380
+
381
+
382
+ 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.
383
+
384
+
385
+
386
+ ### Example Usage
387
+
388
+ ```typescript
389
+ import { ServiceM8 } from "servicem8";
390
+
391
+ const serviceM8 = new ServiceM8({
392
+ security: {
393
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
394
+ },
395
+ });
396
+
397
+ async function run() {
398
+ const result = await serviceM8.formResponses.deleteFormResponses({
399
+ uuid: "5f481342-bcc0-451e-8443-dfd912447848",
400
+ });
401
+
402
+ // Handle the result
403
+ console.log(result);
404
+ }
405
+
406
+ run();
407
+ ```
408
+
409
+ ### Standalone function
410
+
411
+ The standalone function version of this method:
412
+
413
+ ```typescript
414
+ import { ServiceM8Core } from "servicem8/core.js";
415
+ import { formResponsesDeleteFormResponses } from "servicem8/funcs/formResponsesDeleteFormResponses.js";
416
+
417
+ // Use `ServiceM8Core` for best tree-shaking performance.
418
+ // You can create one instance of it to use across an application.
419
+ const serviceM8 = new ServiceM8Core({
420
+ security: {
421
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
422
+ },
423
+ });
424
+
425
+ async function run() {
426
+ const res = await formResponsesDeleteFormResponses(serviceM8, {
427
+ uuid: "5f481342-bcc0-451e-8443-dfd912447848",
428
+ });
429
+
430
+ if (!res.ok) {
431
+ throw res.error;
432
+ }
433
+
434
+ const { value: result } = res;
435
+
436
+ // Handle the result
437
+ console.log(result);
438
+ }
439
+
440
+ run();
441
+ ```
442
+
443
+ ### Parameters
444
+
445
+ | Parameter | Type | Required | Description |
446
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
447
+ | `request` | [operations.DeleteFormResponsesRequest](../../models/operations/deleteformresponsesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
448
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
449
+ | `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. |
450
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
451
+
452
+ ### Response
453
+
454
+ **Promise\<[operations.DeleteFormResponsesResponse](../../models/operations/deleteformresponsesresponse.md)\>**
455
+
456
+ ### Errors
457
+
458
+ | Error Type | Status Code | Content Type |
459
+ | ---------------- | ---------------- | ---------------- |
460
+ | errors.ErrorT | 400 | application/json |
461
+ | errors.APIError | 4XX, 5XX | \*/\* |