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,445 @@
1
+ # JobPayments
2
+ (*jobPayments*)
3
+
4
+ ## Overview
5
+
6
+ Operations related to Job Payments
7
+
8
+ ### Available Operations
9
+
10
+ * [listJobPayments](#listjobpayments) - List all Job Payments
11
+ * [createJobPayments](#createjobpayments) - Create a new Job Payment
12
+ * [getJobPayments](#getjobpayments) - Retrieve a Job Payment
13
+ * [updateJobPayments](#updatejobpayments) - Update a Job Payment
14
+ * [deleteJobPayments](#deletejobpayments) - Delete a Job Payment
15
+
16
+ ## listJobPayments
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.jobPayments.listJobPayments();
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 { jobPaymentsListJobPayments } from "servicem8/funcs/jobPaymentsListJobPayments.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 jobPaymentsListJobPayments(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.ListJobPaymentsResponse](../../models/operations/listjobpaymentsresponse.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
+ ## createJobPayments
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.jobPayments.createJobPayments({
118
+ uuid: "123e4567-5b50-4de2-88f3-22b4d7ea930b",
119
+ jobUuid: "123e4567-c40f-41fb-99a3-22b4d013729b",
120
+ actionedByUuid: "123e4567-aa6d-446a-b459-22b4d17361ab",
121
+ attachmentUuid: "123e4567-80c6-476a-a046-22b4d5cbf27b",
122
+ });
123
+
124
+ // Handle the result
125
+ console.log(result);
126
+ }
127
+
128
+ run();
129
+ ```
130
+
131
+ ### Standalone function
132
+
133
+ The standalone function version of this method:
134
+
135
+ ```typescript
136
+ import { ServiceM8Core } from "servicem8/core.js";
137
+ import { jobPaymentsCreateJobPayments } from "servicem8/funcs/jobPaymentsCreateJobPayments.js";
138
+
139
+ // Use `ServiceM8Core` for best tree-shaking performance.
140
+ // You can create one instance of it to use across an application.
141
+ const serviceM8 = new ServiceM8Core({
142
+ security: {
143
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
144
+ },
145
+ });
146
+
147
+ async function run() {
148
+ const res = await jobPaymentsCreateJobPayments(serviceM8, {
149
+ uuid: "123e4567-5b50-4de2-88f3-22b4d7ea930b",
150
+ jobUuid: "123e4567-c40f-41fb-99a3-22b4d013729b",
151
+ actionedByUuid: "123e4567-aa6d-446a-b459-22b4d17361ab",
152
+ attachmentUuid: "123e4567-80c6-476a-a046-22b4d5cbf27b",
153
+ });
154
+
155
+ if (!res.ok) {
156
+ throw res.error;
157
+ }
158
+
159
+ const { value: result } = res;
160
+
161
+ // Handle the result
162
+ console.log(result);
163
+ }
164
+
165
+ run();
166
+ ```
167
+
168
+ ### Parameters
169
+
170
+ | Parameter | Type | Required | Description |
171
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
172
+ | `request` | [components.JobPaymentInput](../../models/components/jobpaymentinput.md) | :heavy_check_mark: | The request object to use for the request. |
173
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
174
+ | `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. |
175
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
176
+
177
+ ### Response
178
+
179
+ **Promise\<[operations.CreateJobPaymentsResponse](../../models/operations/createjobpaymentsresponse.md)\>**
180
+
181
+ ### Errors
182
+
183
+ | Error Type | Status Code | Content Type |
184
+ | ---------------- | ---------------- | ---------------- |
185
+ | errors.ErrorT | 400 | application/json |
186
+ | errors.APIError | 4XX, 5XX | \*/\* |
187
+
188
+ ## getJobPayments
189
+
190
+ Retrieve a Job Payment
191
+
192
+ ### Example Usage
193
+
194
+ ```typescript
195
+ import { ServiceM8 } from "servicem8";
196
+
197
+ const serviceM8 = new ServiceM8({
198
+ security: {
199
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
200
+ },
201
+ });
202
+
203
+ async function run() {
204
+ const result = await serviceM8.jobPayments.getJobPayments({
205
+ uuid: "552a589e-4936-496e-aab9-3793675d46d1",
206
+ });
207
+
208
+ // Handle the result
209
+ console.log(result);
210
+ }
211
+
212
+ run();
213
+ ```
214
+
215
+ ### Standalone function
216
+
217
+ The standalone function version of this method:
218
+
219
+ ```typescript
220
+ import { ServiceM8Core } from "servicem8/core.js";
221
+ import { jobPaymentsGetJobPayments } from "servicem8/funcs/jobPaymentsGetJobPayments.js";
222
+
223
+ // Use `ServiceM8Core` for best tree-shaking performance.
224
+ // You can create one instance of it to use across an application.
225
+ const serviceM8 = new ServiceM8Core({
226
+ security: {
227
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
228
+ },
229
+ });
230
+
231
+ async function run() {
232
+ const res = await jobPaymentsGetJobPayments(serviceM8, {
233
+ uuid: "552a589e-4936-496e-aab9-3793675d46d1",
234
+ });
235
+
236
+ if (!res.ok) {
237
+ throw res.error;
238
+ }
239
+
240
+ const { value: result } = res;
241
+
242
+ // Handle the result
243
+ console.log(result);
244
+ }
245
+
246
+ run();
247
+ ```
248
+
249
+ ### Parameters
250
+
251
+ | Parameter | Type | Required | Description |
252
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
253
+ | `request` | [operations.GetJobPaymentsRequest](../../models/operations/getjobpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
254
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
255
+ | `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. |
256
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
257
+
258
+ ### Response
259
+
260
+ **Promise\<[operations.GetJobPaymentsResponse](../../models/operations/getjobpaymentsresponse.md)\>**
261
+
262
+ ### Errors
263
+
264
+ | Error Type | Status Code | Content Type |
265
+ | ---------------- | ---------------- | ---------------- |
266
+ | errors.ErrorT | 400 | application/json |
267
+ | errors.APIError | 4XX, 5XX | \*/\* |
268
+
269
+ ## updateJobPayments
270
+
271
+ Update a Job Payment
272
+
273
+ ### Example Usage
274
+
275
+ ```typescript
276
+ import { ServiceM8 } from "servicem8";
277
+
278
+ const serviceM8 = new ServiceM8({
279
+ security: {
280
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
281
+ },
282
+ });
283
+
284
+ async function run() {
285
+ const result = await serviceM8.jobPayments.updateJobPayments({
286
+ uuid: "36c546b9-82d3-4037-9679-5abf07f6588b",
287
+ jobPayment: {
288
+ uuid: "123e4567-5b50-4de2-88f3-22b4d7ea930b",
289
+ jobUuid: "123e4567-c40f-41fb-99a3-22b4d013729b",
290
+ actionedByUuid: "123e4567-aa6d-446a-b459-22b4d17361ab",
291
+ attachmentUuid: "123e4567-80c6-476a-a046-22b4d5cbf27b",
292
+ },
293
+ });
294
+
295
+ // Handle the result
296
+ console.log(result);
297
+ }
298
+
299
+ run();
300
+ ```
301
+
302
+ ### Standalone function
303
+
304
+ The standalone function version of this method:
305
+
306
+ ```typescript
307
+ import { ServiceM8Core } from "servicem8/core.js";
308
+ import { jobPaymentsUpdateJobPayments } from "servicem8/funcs/jobPaymentsUpdateJobPayments.js";
309
+
310
+ // Use `ServiceM8Core` for best tree-shaking performance.
311
+ // You can create one instance of it to use across an application.
312
+ const serviceM8 = new ServiceM8Core({
313
+ security: {
314
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
315
+ },
316
+ });
317
+
318
+ async function run() {
319
+ const res = await jobPaymentsUpdateJobPayments(serviceM8, {
320
+ uuid: "36c546b9-82d3-4037-9679-5abf07f6588b",
321
+ jobPayment: {
322
+ uuid: "123e4567-5b50-4de2-88f3-22b4d7ea930b",
323
+ jobUuid: "123e4567-c40f-41fb-99a3-22b4d013729b",
324
+ actionedByUuid: "123e4567-aa6d-446a-b459-22b4d17361ab",
325
+ attachmentUuid: "123e4567-80c6-476a-a046-22b4d5cbf27b",
326
+ },
327
+ });
328
+
329
+ if (!res.ok) {
330
+ throw res.error;
331
+ }
332
+
333
+ const { value: result } = res;
334
+
335
+ // Handle the result
336
+ console.log(result);
337
+ }
338
+
339
+ run();
340
+ ```
341
+
342
+ ### Parameters
343
+
344
+ | Parameter | Type | Required | Description |
345
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
346
+ | `request` | [operations.UpdateJobPaymentsRequest](../../models/operations/updatejobpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
347
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
348
+ | `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. |
349
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
350
+
351
+ ### Response
352
+
353
+ **Promise\<[operations.UpdateJobPaymentsResponse](../../models/operations/updatejobpaymentsresponse.md)\>**
354
+
355
+ ### Errors
356
+
357
+ | Error Type | Status Code | Content Type |
358
+ | ---------------- | ---------------- | ---------------- |
359
+ | errors.ErrorT | 400 | application/json |
360
+ | errors.APIError | 4XX, 5XX | \*/\* |
361
+
362
+ ## deleteJobPayments
363
+
364
+
365
+
366
+ 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.
367
+
368
+
369
+
370
+ ### Example Usage
371
+
372
+ ```typescript
373
+ import { ServiceM8 } from "servicem8";
374
+
375
+ const serviceM8 = new ServiceM8({
376
+ security: {
377
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
378
+ },
379
+ });
380
+
381
+ async function run() {
382
+ const result = await serviceM8.jobPayments.deleteJobPayments({
383
+ uuid: "a8fd9b7a-987c-44bd-8323-5031e735b404",
384
+ });
385
+
386
+ // Handle the result
387
+ console.log(result);
388
+ }
389
+
390
+ run();
391
+ ```
392
+
393
+ ### Standalone function
394
+
395
+ The standalone function version of this method:
396
+
397
+ ```typescript
398
+ import { ServiceM8Core } from "servicem8/core.js";
399
+ import { jobPaymentsDeleteJobPayments } from "servicem8/funcs/jobPaymentsDeleteJobPayments.js";
400
+
401
+ // Use `ServiceM8Core` for best tree-shaking performance.
402
+ // You can create one instance of it to use across an application.
403
+ const serviceM8 = new ServiceM8Core({
404
+ security: {
405
+ oauth2: process.env["SERVICEM8_OAUTH2"] ?? "",
406
+ },
407
+ });
408
+
409
+ async function run() {
410
+ const res = await jobPaymentsDeleteJobPayments(serviceM8, {
411
+ uuid: "a8fd9b7a-987c-44bd-8323-5031e735b404",
412
+ });
413
+
414
+ if (!res.ok) {
415
+ throw res.error;
416
+ }
417
+
418
+ const { value: result } = res;
419
+
420
+ // Handle the result
421
+ console.log(result);
422
+ }
423
+
424
+ run();
425
+ ```
426
+
427
+ ### Parameters
428
+
429
+ | Parameter | Type | Required | Description |
430
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
431
+ | `request` | [operations.DeleteJobPaymentsRequest](../../models/operations/deletejobpaymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
432
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
433
+ | `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. |
434
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
435
+
436
+ ### Response
437
+
438
+ **Promise\<[operations.DeleteJobPaymentsResponse](../../models/operations/deletejobpaymentsresponse.md)\>**
439
+
440
+ ### Errors
441
+
442
+ | Error Type | Status Code | Content Type |
443
+ | ---------------- | ---------------- | ---------------- |
444
+ | errors.ErrorT | 400 | application/json |
445
+ | errors.APIError | 4XX, 5XX | \*/\* |