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,456 @@
1
+ # AssetTypeFields
2
+ (*assetTypeFields*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to Asset Type Fields
7
+
8
+ ### Available Operations
9
+
10
+ * [listAssetTypeFields](#listassettypefields) - List all Asset Type Fields
11
+ * [createAssetTypeFields](#createassettypefields) - Create a new Asset Type Field
12
+ * [getAssetTypeFields](#getassettypefields) - Retrieve an Asset Type Field
13
+ * [updateAssetTypeFields](#updateassettypefields) - Update an Asset Type Field
14
+ * [deleteAssetTypeFields](#deleteassettypefields) - Delete an Asset Type Field
15
+
16
+ ## listAssetTypeFields
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_assets**.
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.assetTypeFields.listAssetTypeFields();
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 { assetTypeFieldsListAssetTypeFields } from "servicem8/funcs/assetTypeFieldsListAssetTypeFields.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 assetTypeFieldsListAssetTypeFields(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.ListAssetTypeFieldsResponse](../../models/operations/listassettypefieldsresponse.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
+ ## createAssetTypeFields
102
+
103
+
104
+
105
+ #### OAuth Scope
106
+ This endpoint requires the following OAuth scope **manage_assets**.
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.assetTypeFields.createAssetTypeFields({
128
+ uuid: "123e4567-373e-4ed8-9329-22b4d78b0d1b",
129
+ assetTypeUuid: "123e4567-2b94-4270-8f91-22b4de23bcbb",
130
+ name: "<value>",
131
+ });
132
+
133
+ // Handle the result
134
+ console.log(result);
135
+ }
136
+
137
+ run();
138
+ ```
139
+
140
+ ### Standalone function
141
+
142
+ The standalone function version of this method:
143
+
144
+ ```typescript
145
+ import { ServiceM8Core } from "servicem8/core.js";
146
+ import { assetTypeFieldsCreateAssetTypeFields } from "servicem8/funcs/assetTypeFieldsCreateAssetTypeFields.js";
147
+
148
+ // Use `ServiceM8Core` for best tree-shaking performance.
149
+ // You can create one instance of it to use across an application.
150
+ const serviceM8 = new ServiceM8Core({
151
+ security: {
152
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
153
+ },
154
+ });
155
+
156
+ async function run() {
157
+ const res = await assetTypeFieldsCreateAssetTypeFields(serviceM8, {
158
+ uuid: "123e4567-373e-4ed8-9329-22b4d78b0d1b",
159
+ assetTypeUuid: "123e4567-2b94-4270-8f91-22b4de23bcbb",
160
+ name: "<value>",
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.AssetTypeFieldInput](../../models/components/assettypefieldinput.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.CreateAssetTypeFieldsResponse](../../models/operations/createassettypefieldsresponse.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
+ ## getAssetTypeFields
197
+
198
+
199
+
200
+ #### OAuth Scope
201
+ This endpoint requires the following OAuth scope **read_assets**.
202
+
203
+
204
+
205
+ ### Example Usage
206
+
207
+ ```typescript
208
+ import { ServiceM8 } from "servicem8";
209
+
210
+ const serviceM8 = new ServiceM8({
211
+ security: {
212
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
213
+ },
214
+ });
215
+
216
+ async function run() {
217
+ const result = await serviceM8.assetTypeFields.getAssetTypeFields({
218
+ uuid: "9f043044-07d3-499c-b070-95e848797216",
219
+ });
220
+
221
+ // Handle the result
222
+ console.log(result);
223
+ }
224
+
225
+ run();
226
+ ```
227
+
228
+ ### Standalone function
229
+
230
+ The standalone function version of this method:
231
+
232
+ ```typescript
233
+ import { ServiceM8Core } from "servicem8/core.js";
234
+ import { assetTypeFieldsGetAssetTypeFields } from "servicem8/funcs/assetTypeFieldsGetAssetTypeFields.js";
235
+
236
+ // Use `ServiceM8Core` for best tree-shaking performance.
237
+ // You can create one instance of it to use across an application.
238
+ const serviceM8 = new ServiceM8Core({
239
+ security: {
240
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
241
+ },
242
+ });
243
+
244
+ async function run() {
245
+ const res = await assetTypeFieldsGetAssetTypeFields(serviceM8, {
246
+ uuid: "9f043044-07d3-499c-b070-95e848797216",
247
+ });
248
+
249
+ if (!res.ok) {
250
+ throw res.error;
251
+ }
252
+
253
+ const { value: result } = res;
254
+
255
+ // Handle the result
256
+ console.log(result);
257
+ }
258
+
259
+ run();
260
+ ```
261
+
262
+ ### Parameters
263
+
264
+ | Parameter | Type | Required | Description |
265
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
266
+ | `request` | [operations.GetAssetTypeFieldsRequest](../../models/operations/getassettypefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
267
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
268
+ | `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. |
269
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
270
+
271
+ ### Response
272
+
273
+ **Promise\<[operations.GetAssetTypeFieldsResponse](../../models/operations/getassettypefieldsresponse.md)\>**
274
+
275
+ ### Errors
276
+
277
+ | Error Type | Status Code | Content Type |
278
+ | ---------------- | ---------------- | ---------------- |
279
+ | errors.ErrorT | 400 | application/json |
280
+ | errors.APIError | 4XX, 5XX | \*/\* |
281
+
282
+ ## updateAssetTypeFields
283
+
284
+ Update an Asset Type Field
285
+
286
+ ### Example Usage
287
+
288
+ ```typescript
289
+ import { ServiceM8 } from "servicem8";
290
+
291
+ const serviceM8 = new ServiceM8({
292
+ security: {
293
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
294
+ },
295
+ });
296
+
297
+ async function run() {
298
+ const result = await serviceM8.assetTypeFields.updateAssetTypeFields({
299
+ uuid: "7960c3d6-88a5-4b27-885f-3b0ffe3d7503",
300
+ assetTypeField: {
301
+ uuid: "123e4567-373e-4ed8-9329-22b4d78b0d1b",
302
+ assetTypeUuid: "123e4567-2b94-4270-8f91-22b4de23bcbb",
303
+ name: "<value>",
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 { assetTypeFieldsUpdateAssetTypeFields } from "servicem8/funcs/assetTypeFieldsUpdateAssetTypeFields.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 assetTypeFieldsUpdateAssetTypeFields(serviceM8, {
332
+ uuid: "7960c3d6-88a5-4b27-885f-3b0ffe3d7503",
333
+ assetTypeField: {
334
+ uuid: "123e4567-373e-4ed8-9329-22b4d78b0d1b",
335
+ assetTypeUuid: "123e4567-2b94-4270-8f91-22b4de23bcbb",
336
+ name: "<value>",
337
+ },
338
+ });
339
+
340
+ if (!res.ok) {
341
+ throw res.error;
342
+ }
343
+
344
+ const { value: result } = res;
345
+
346
+ // Handle the result
347
+ console.log(result);
348
+ }
349
+
350
+ run();
351
+ ```
352
+
353
+ ### Parameters
354
+
355
+ | Parameter | Type | Required | Description |
356
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
357
+ | `request` | [operations.UpdateAssetTypeFieldsRequest](../../models/operations/updateassettypefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
358
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
359
+ | `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. |
360
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
361
+
362
+ ### Response
363
+
364
+ **Promise\<[operations.UpdateAssetTypeFieldsResponse](../../models/operations/updateassettypefieldsresponse.md)\>**
365
+
366
+ ### Errors
367
+
368
+ | Error Type | Status Code | Content Type |
369
+ | ---------------- | ---------------- | ---------------- |
370
+ | errors.ErrorT | 400 | application/json |
371
+ | errors.APIError | 4XX, 5XX | \*/\* |
372
+
373
+ ## deleteAssetTypeFields
374
+
375
+
376
+
377
+ 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.
378
+
379
+
380
+
381
+ ### Example Usage
382
+
383
+ ```typescript
384
+ import { ServiceM8 } from "servicem8";
385
+
386
+ const serviceM8 = new ServiceM8({
387
+ security: {
388
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
389
+ },
390
+ });
391
+
392
+ async function run() {
393
+ const result = await serviceM8.assetTypeFields.deleteAssetTypeFields({
394
+ uuid: "6eaa3a2a-f0bb-45f4-8709-d5dc24746c38",
395
+ });
396
+
397
+ // Handle the result
398
+ console.log(result);
399
+ }
400
+
401
+ run();
402
+ ```
403
+
404
+ ### Standalone function
405
+
406
+ The standalone function version of this method:
407
+
408
+ ```typescript
409
+ import { ServiceM8Core } from "servicem8/core.js";
410
+ import { assetTypeFieldsDeleteAssetTypeFields } from "servicem8/funcs/assetTypeFieldsDeleteAssetTypeFields.js";
411
+
412
+ // Use `ServiceM8Core` for best tree-shaking performance.
413
+ // You can create one instance of it to use across an application.
414
+ const serviceM8 = new ServiceM8Core({
415
+ security: {
416
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
417
+ },
418
+ });
419
+
420
+ async function run() {
421
+ const res = await assetTypeFieldsDeleteAssetTypeFields(serviceM8, {
422
+ uuid: "6eaa3a2a-f0bb-45f4-8709-d5dc24746c38",
423
+ });
424
+
425
+ if (!res.ok) {
426
+ throw res.error;
427
+ }
428
+
429
+ const { value: result } = res;
430
+
431
+ // Handle the result
432
+ console.log(result);
433
+ }
434
+
435
+ run();
436
+ ```
437
+
438
+ ### Parameters
439
+
440
+ | Parameter | Type | Required | Description |
441
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
442
+ | `request` | [operations.DeleteAssetTypeFieldsRequest](../../models/operations/deleteassettypefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
443
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
444
+ | `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. |
445
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
446
+
447
+ ### Response
448
+
449
+ **Promise\<[operations.DeleteAssetTypeFieldsResponse](../../models/operations/deleteassettypefieldsresponse.md)\>**
450
+
451
+ ### Errors
452
+
453
+ | Error Type | Status Code | Content Type |
454
+ | ---------------- | ---------------- | ---------------- |
455
+ | errors.ErrorT | 400 | application/json |
456
+ | errors.APIError | 4XX, 5XX | \*/\* |