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,457 @@
1
+ # StaffMessages
2
+ (*staffMessages*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to Staff Messages
7
+
8
+ ### Available Operations
9
+
10
+ * [listStaffMessages](#liststaffmessages) - List all Staff Messages
11
+ * [createStaffMessages](#createstaffmessages) - Create a new Staff Message
12
+ * [getStaffMessages](#getstaffmessages) - Retrieve a Staff Message
13
+ * [updateStaffMessages](#updatestaffmessages) - Update a Staff Message
14
+ * [deleteStaffMessages](#deletestaffmessages) - Delete a Staff Message
15
+
16
+ ## listStaffMessages
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.staffMessages.listStaffMessages();
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 { staffMessagesListStaffMessages } from "servicem8/funcs/staffMessagesListStaffMessages.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 staffMessagesListStaffMessages(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.ListStaffMessagesResponse](../../models/operations/liststaffmessagesresponse.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
+ ## createStaffMessages
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.staffMessages.createStaffMessages({
118
+ uuid: "123e4567-c5ae-4b7f-bf27-22b4d522b80b",
119
+ fromStaffUuid: "123e4567-edd0-44db-adc5-22b4d8b4f77b",
120
+ toStaffUuid: "123e4567-e13c-4b39-8d92-22b4decfb17b",
121
+ sentTimestamp: "YYYY-MM-DD HH:MM:SS",
122
+ deliveredTimestamp: "YYYY-MM-DD HH:MM:SS",
123
+ readTimestamp: "YYYY-MM-DD HH:MM:SS",
124
+ regardingJobUuid: "123e4567-3eab-41bd-8680-22b4d4ef38ab",
125
+ });
126
+
127
+ // Handle the result
128
+ console.log(result);
129
+ }
130
+
131
+ run();
132
+ ```
133
+
134
+ ### Standalone function
135
+
136
+ The standalone function version of this method:
137
+
138
+ ```typescript
139
+ import { ServiceM8Core } from "servicem8/core.js";
140
+ import { staffMessagesCreateStaffMessages } from "servicem8/funcs/staffMessagesCreateStaffMessages.js";
141
+
142
+ // Use `ServiceM8Core` for best tree-shaking performance.
143
+ // You can create one instance of it to use across an application.
144
+ const serviceM8 = new ServiceM8Core({
145
+ security: {
146
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
147
+ },
148
+ });
149
+
150
+ async function run() {
151
+ const res = await staffMessagesCreateStaffMessages(serviceM8, {
152
+ uuid: "123e4567-c5ae-4b7f-bf27-22b4d522b80b",
153
+ fromStaffUuid: "123e4567-edd0-44db-adc5-22b4d8b4f77b",
154
+ toStaffUuid: "123e4567-e13c-4b39-8d92-22b4decfb17b",
155
+ sentTimestamp: "YYYY-MM-DD HH:MM:SS",
156
+ deliveredTimestamp: "YYYY-MM-DD HH:MM:SS",
157
+ readTimestamp: "YYYY-MM-DD HH:MM:SS",
158
+ regardingJobUuid: "123e4567-3eab-41bd-8680-22b4d4ef38ab",
159
+ });
160
+
161
+ if (!res.ok) {
162
+ throw res.error;
163
+ }
164
+
165
+ const { value: result } = res;
166
+
167
+ // Handle the result
168
+ console.log(result);
169
+ }
170
+
171
+ run();
172
+ ```
173
+
174
+ ### Parameters
175
+
176
+ | Parameter | Type | Required | Description |
177
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
178
+ | `request` | [components.StaffMessageInput](../../models/components/staffmessageinput.md) | :heavy_check_mark: | The request object to use for the request. |
179
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
180
+ | `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. |
181
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
182
+
183
+ ### Response
184
+
185
+ **Promise\<[operations.CreateStaffMessagesResponse](../../models/operations/createstaffmessagesresponse.md)\>**
186
+
187
+ ### Errors
188
+
189
+ | Error Type | Status Code | Content Type |
190
+ | ---------------- | ---------------- | ---------------- |
191
+ | errors.ErrorT | 400 | application/json |
192
+ | errors.APIError | 4XX, 5XX | \*/\* |
193
+
194
+ ## getStaffMessages
195
+
196
+ Retrieve a Staff Message
197
+
198
+ ### Example Usage
199
+
200
+ ```typescript
201
+ import { ServiceM8 } from "servicem8";
202
+
203
+ const serviceM8 = new ServiceM8({
204
+ security: {
205
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
206
+ },
207
+ });
208
+
209
+ async function run() {
210
+ const result = await serviceM8.staffMessages.getStaffMessages({
211
+ uuid: "3b5bea69-86fe-4ecc-bd6d-6cf454d8243a",
212
+ });
213
+
214
+ // Handle the result
215
+ console.log(result);
216
+ }
217
+
218
+ run();
219
+ ```
220
+
221
+ ### Standalone function
222
+
223
+ The standalone function version of this method:
224
+
225
+ ```typescript
226
+ import { ServiceM8Core } from "servicem8/core.js";
227
+ import { staffMessagesGetStaffMessages } from "servicem8/funcs/staffMessagesGetStaffMessages.js";
228
+
229
+ // Use `ServiceM8Core` for best tree-shaking performance.
230
+ // You can create one instance of it to use across an application.
231
+ const serviceM8 = new ServiceM8Core({
232
+ security: {
233
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
234
+ },
235
+ });
236
+
237
+ async function run() {
238
+ const res = await staffMessagesGetStaffMessages(serviceM8, {
239
+ uuid: "3b5bea69-86fe-4ecc-bd6d-6cf454d8243a",
240
+ });
241
+
242
+ if (!res.ok) {
243
+ throw res.error;
244
+ }
245
+
246
+ const { value: result } = res;
247
+
248
+ // Handle the result
249
+ console.log(result);
250
+ }
251
+
252
+ run();
253
+ ```
254
+
255
+ ### Parameters
256
+
257
+ | Parameter | Type | Required | Description |
258
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
259
+ | `request` | [operations.GetStaffMessagesRequest](../../models/operations/getstaffmessagesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
260
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
261
+ | `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. |
262
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
263
+
264
+ ### Response
265
+
266
+ **Promise\<[operations.GetStaffMessagesResponse](../../models/operations/getstaffmessagesresponse.md)\>**
267
+
268
+ ### Errors
269
+
270
+ | Error Type | Status Code | Content Type |
271
+ | ---------------- | ---------------- | ---------------- |
272
+ | errors.ErrorT | 400 | application/json |
273
+ | errors.APIError | 4XX, 5XX | \*/\* |
274
+
275
+ ## updateStaffMessages
276
+
277
+ Update a Staff Message
278
+
279
+ ### Example Usage
280
+
281
+ ```typescript
282
+ import { ServiceM8 } from "servicem8";
283
+
284
+ const serviceM8 = new ServiceM8({
285
+ security: {
286
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
287
+ },
288
+ });
289
+
290
+ async function run() {
291
+ const result = await serviceM8.staffMessages.updateStaffMessages({
292
+ uuid: "54e8cd62-dfaa-493b-9c99-d85d9f753cf3",
293
+ staffMessage: {
294
+ uuid: "123e4567-c5ae-4b7f-bf27-22b4d522b80b",
295
+ fromStaffUuid: "123e4567-edd0-44db-adc5-22b4d8b4f77b",
296
+ toStaffUuid: "123e4567-e13c-4b39-8d92-22b4decfb17b",
297
+ sentTimestamp: "YYYY-MM-DD HH:MM:SS",
298
+ deliveredTimestamp: "YYYY-MM-DD HH:MM:SS",
299
+ readTimestamp: "YYYY-MM-DD HH:MM:SS",
300
+ regardingJobUuid: "123e4567-3eab-41bd-8680-22b4d4ef38ab",
301
+ },
302
+ });
303
+
304
+ // Handle the result
305
+ console.log(result);
306
+ }
307
+
308
+ run();
309
+ ```
310
+
311
+ ### Standalone function
312
+
313
+ The standalone function version of this method:
314
+
315
+ ```typescript
316
+ import { ServiceM8Core } from "servicem8/core.js";
317
+ import { staffMessagesUpdateStaffMessages } from "servicem8/funcs/staffMessagesUpdateStaffMessages.js";
318
+
319
+ // Use `ServiceM8Core` for best tree-shaking performance.
320
+ // You can create one instance of it to use across an application.
321
+ const serviceM8 = new ServiceM8Core({
322
+ security: {
323
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
324
+ },
325
+ });
326
+
327
+ async function run() {
328
+ const res = await staffMessagesUpdateStaffMessages(serviceM8, {
329
+ uuid: "54e8cd62-dfaa-493b-9c99-d85d9f753cf3",
330
+ staffMessage: {
331
+ uuid: "123e4567-c5ae-4b7f-bf27-22b4d522b80b",
332
+ fromStaffUuid: "123e4567-edd0-44db-adc5-22b4d8b4f77b",
333
+ toStaffUuid: "123e4567-e13c-4b39-8d92-22b4decfb17b",
334
+ sentTimestamp: "YYYY-MM-DD HH:MM:SS",
335
+ deliveredTimestamp: "YYYY-MM-DD HH:MM:SS",
336
+ readTimestamp: "YYYY-MM-DD HH:MM:SS",
337
+ regardingJobUuid: "123e4567-3eab-41bd-8680-22b4d4ef38ab",
338
+ },
339
+ });
340
+
341
+ if (!res.ok) {
342
+ throw res.error;
343
+ }
344
+
345
+ const { value: result } = res;
346
+
347
+ // Handle the result
348
+ console.log(result);
349
+ }
350
+
351
+ run();
352
+ ```
353
+
354
+ ### Parameters
355
+
356
+ | Parameter | Type | Required | Description |
357
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
358
+ | `request` | [operations.UpdateStaffMessagesRequest](../../models/operations/updatestaffmessagesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
359
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
360
+ | `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. |
361
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
362
+
363
+ ### Response
364
+
365
+ **Promise\<[operations.UpdateStaffMessagesResponse](../../models/operations/updatestaffmessagesresponse.md)\>**
366
+
367
+ ### Errors
368
+
369
+ | Error Type | Status Code | Content Type |
370
+ | ---------------- | ---------------- | ---------------- |
371
+ | errors.ErrorT | 400 | application/json |
372
+ | errors.APIError | 4XX, 5XX | \*/\* |
373
+
374
+ ## deleteStaffMessages
375
+
376
+
377
+
378
+ 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.
379
+
380
+
381
+
382
+ ### Example Usage
383
+
384
+ ```typescript
385
+ import { ServiceM8 } from "servicem8";
386
+
387
+ const serviceM8 = new ServiceM8({
388
+ security: {
389
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
390
+ },
391
+ });
392
+
393
+ async function run() {
394
+ const result = await serviceM8.staffMessages.deleteStaffMessages({
395
+ uuid: "0efc6e9c-501e-4c1e-94db-8216c30a68d8",
396
+ });
397
+
398
+ // Handle the result
399
+ console.log(result);
400
+ }
401
+
402
+ run();
403
+ ```
404
+
405
+ ### Standalone function
406
+
407
+ The standalone function version of this method:
408
+
409
+ ```typescript
410
+ import { ServiceM8Core } from "servicem8/core.js";
411
+ import { staffMessagesDeleteStaffMessages } from "servicem8/funcs/staffMessagesDeleteStaffMessages.js";
412
+
413
+ // Use `ServiceM8Core` for best tree-shaking performance.
414
+ // You can create one instance of it to use across an application.
415
+ const serviceM8 = new ServiceM8Core({
416
+ security: {
417
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
418
+ },
419
+ });
420
+
421
+ async function run() {
422
+ const res = await staffMessagesDeleteStaffMessages(serviceM8, {
423
+ uuid: "0efc6e9c-501e-4c1e-94db-8216c30a68d8",
424
+ });
425
+
426
+ if (!res.ok) {
427
+ throw res.error;
428
+ }
429
+
430
+ const { value: result } = res;
431
+
432
+ // Handle the result
433
+ console.log(result);
434
+ }
435
+
436
+ run();
437
+ ```
438
+
439
+ ### Parameters
440
+
441
+ | Parameter | Type | Required | Description |
442
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
443
+ | `request` | [operations.DeleteStaffMessagesRequest](../../models/operations/deletestaffmessagesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
444
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
445
+ | `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. |
446
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
447
+
448
+ ### Response
449
+
450
+ **Promise\<[operations.DeleteStaffMessagesResponse](../../models/operations/deletestaffmessagesresponse.md)\>**
451
+
452
+ ### Errors
453
+
454
+ | Error Type | Status Code | Content Type |
455
+ | ---------------- | ---------------- | ---------------- |
456
+ | errors.ErrorT | 400 | application/json |
457
+ | errors.APIError | 4XX, 5XX | \*/\* |