servicem8 0.9.49 → 0.9.50
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.
- package/README.md +15 -2
- package/api.json +1567 -600
- package/bin/mcp-server.js +1219 -374
- package/bin/mcp-server.js.map +28 -12
- package/dist/commonjs/funcs/suppliersCreateSuppliers.d.ts +24 -0
- package/dist/commonjs/funcs/suppliersCreateSuppliers.d.ts.map +1 -0
- package/dist/commonjs/funcs/suppliersCreateSuppliers.js +136 -0
- package/dist/commonjs/funcs/suppliersCreateSuppliers.js.map +1 -0
- package/dist/commonjs/funcs/suppliersDeleteSuppliers.d.ts +23 -0
- package/dist/commonjs/funcs/suppliersDeleteSuppliers.d.ts.map +1 -0
- package/dist/commonjs/funcs/suppliersDeleteSuppliers.js +137 -0
- package/dist/commonjs/funcs/suppliersDeleteSuppliers.js.map +1 -0
- package/dist/commonjs/funcs/suppliersGetSuppliers.d.ts +21 -0
- package/dist/commonjs/funcs/suppliersGetSuppliers.d.ts.map +1 -0
- package/dist/commonjs/funcs/suppliersGetSuppliers.js +135 -0
- package/dist/commonjs/funcs/suppliersGetSuppliers.js.map +1 -0
- package/dist/commonjs/funcs/suppliersListSuppliers.d.ts +23 -0
- package/dist/commonjs/funcs/suppliersListSuppliers.d.ts.map +1 -0
- package/dist/commonjs/funcs/suppliersListSuppliers.js +123 -0
- package/dist/commonjs/funcs/suppliersListSuppliers.js.map +1 -0
- package/dist/commonjs/funcs/suppliersUpdateSuppliers.d.ts +21 -0
- package/dist/commonjs/funcs/suppliersUpdateSuppliers.d.ts.map +1 -0
- package/dist/commonjs/funcs/suppliersUpdateSuppliers.js +136 -0
- package/dist/commonjs/funcs/suppliersUpdateSuppliers.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +11 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/suppliersCreateSuppliers.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/suppliersCreateSuppliers.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersCreateSuppliers.js +74 -0
- package/dist/commonjs/mcp-server/tools/suppliersCreateSuppliers.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersDeleteSuppliers.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/suppliersDeleteSuppliers.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersDeleteSuppliers.js +73 -0
- package/dist/commonjs/mcp-server/tools/suppliersDeleteSuppliers.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersGetSuppliers.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/suppliersGetSuppliers.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersGetSuppliers.js +69 -0
- package/dist/commonjs/mcp-server/tools/suppliersGetSuppliers.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersListSuppliers.d.ts +3 -0
- package/dist/commonjs/mcp-server/tools/suppliersListSuppliers.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersListSuppliers.js +35 -0
- package/dist/commonjs/mcp-server/tools/suppliersListSuppliers.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersUpdateSuppliers.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/suppliersUpdateSuppliers.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/suppliersUpdateSuppliers.js +69 -0
- package/dist/commonjs/mcp-server/tools/suppliersUpdateSuppliers.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/job.d.ts +8 -8
- package/dist/commonjs/models/components/job.d.ts.map +1 -1
- package/dist/commonjs/models/components/job.js +13 -14
- package/dist/commonjs/models/components/job.js.map +1 -1
- package/dist/commonjs/models/components/supplier.d.ts +180 -0
- package/dist/commonjs/models/components/supplier.d.ts.map +1 -0
- package/dist/commonjs/models/components/supplier.js +174 -0
- package/dist/commonjs/models/components/supplier.js.map +1 -0
- package/dist/commonjs/models/components/suppliercreate.d.ts +62 -0
- package/dist/commonjs/models/components/suppliercreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/suppliercreate.js +92 -0
- package/dist/commonjs/models/components/suppliercreate.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/operations/convertinboxmessagetojob.d.ts +5 -2
- package/dist/commonjs/models/operations/convertinboxmessagetojob.d.ts.map +1 -1
- package/dist/commonjs/models/operations/convertinboxmessagetojob.js +2 -2
- package/dist/commonjs/models/operations/convertinboxmessagetojob.js.map +1 -1
- package/dist/commonjs/models/operations/createjobfromtemplate.d.ts +3 -3
- package/dist/commonjs/models/operations/createjobfromtemplate.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createjobfromtemplate.js +2 -4
- package/dist/commonjs/models/operations/createjobfromtemplate.js.map +1 -1
- package/dist/commonjs/models/operations/createsuppliers.d.ts +36 -0
- package/dist/commonjs/models/operations/createsuppliers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createsuppliers.js +83 -0
- package/dist/commonjs/models/operations/createsuppliers.js.map +1 -0
- package/dist/commonjs/models/operations/deletesuppliers.d.ts +32 -0
- package/dist/commonjs/models/operations/deletesuppliers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletesuppliers.js +69 -0
- package/dist/commonjs/models/operations/deletesuppliers.js.map +1 -0
- package/dist/commonjs/models/operations/getsuppliers.d.ts +32 -0
- package/dist/commonjs/models/operations/getsuppliers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getsuppliers.js +69 -0
- package/dist/commonjs/models/operations/getsuppliers.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/updatesuppliers.d.ts +38 -0
- package/dist/commonjs/models/operations/updatesuppliers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatesuppliers.js +81 -0
- package/dist/commonjs/models/operations/updatesuppliers.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/suppliers.d.ts +59 -0
- package/dist/commonjs/sdk/suppliers.d.ts.map +1 -0
- package/dist/commonjs/sdk/suppliers.js +80 -0
- package/dist/commonjs/sdk/suppliers.js.map +1 -0
- package/dist/esm/funcs/suppliersCreateSuppliers.d.ts +24 -0
- package/dist/esm/funcs/suppliersCreateSuppliers.d.ts.map +1 -0
- package/dist/esm/funcs/suppliersCreateSuppliers.js +100 -0
- package/dist/esm/funcs/suppliersCreateSuppliers.js.map +1 -0
- package/dist/esm/funcs/suppliersDeleteSuppliers.d.ts +23 -0
- package/dist/esm/funcs/suppliersDeleteSuppliers.d.ts.map +1 -0
- package/dist/esm/funcs/suppliersDeleteSuppliers.js +101 -0
- package/dist/esm/funcs/suppliersDeleteSuppliers.js.map +1 -0
- package/dist/esm/funcs/suppliersGetSuppliers.d.ts +21 -0
- package/dist/esm/funcs/suppliersGetSuppliers.d.ts.map +1 -0
- package/dist/esm/funcs/suppliersGetSuppliers.js +99 -0
- package/dist/esm/funcs/suppliersGetSuppliers.js.map +1 -0
- package/dist/esm/funcs/suppliersListSuppliers.d.ts +23 -0
- package/dist/esm/funcs/suppliersListSuppliers.d.ts.map +1 -0
- package/dist/esm/funcs/suppliersListSuppliers.js +87 -0
- package/dist/esm/funcs/suppliersListSuppliers.js.map +1 -0
- package/dist/esm/funcs/suppliersUpdateSuppliers.d.ts +21 -0
- package/dist/esm/funcs/suppliersUpdateSuppliers.d.ts.map +1 -0
- package/dist/esm/funcs/suppliersUpdateSuppliers.js +100 -0
- package/dist/esm/funcs/suppliersUpdateSuppliers.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +11 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/suppliersCreateSuppliers.d.ts +8 -0
- package/dist/esm/mcp-server/tools/suppliersCreateSuppliers.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersCreateSuppliers.js +38 -0
- package/dist/esm/mcp-server/tools/suppliersCreateSuppliers.js.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersDeleteSuppliers.d.ts +8 -0
- package/dist/esm/mcp-server/tools/suppliersDeleteSuppliers.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersDeleteSuppliers.js +37 -0
- package/dist/esm/mcp-server/tools/suppliersDeleteSuppliers.js.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersGetSuppliers.d.ts +8 -0
- package/dist/esm/mcp-server/tools/suppliersGetSuppliers.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersGetSuppliers.js +33 -0
- package/dist/esm/mcp-server/tools/suppliersGetSuppliers.js.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersListSuppliers.d.ts +3 -0
- package/dist/esm/mcp-server/tools/suppliersListSuppliers.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersListSuppliers.js +32 -0
- package/dist/esm/mcp-server/tools/suppliersListSuppliers.js.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersUpdateSuppliers.d.ts +8 -0
- package/dist/esm/mcp-server/tools/suppliersUpdateSuppliers.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/suppliersUpdateSuppliers.js +33 -0
- package/dist/esm/mcp-server/tools/suppliersUpdateSuppliers.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/job.d.ts +8 -8
- package/dist/esm/models/components/job.d.ts.map +1 -1
- package/dist/esm/models/components/job.js +12 -13
- package/dist/esm/models/components/job.js.map +1 -1
- package/dist/esm/models/components/supplier.d.ts +180 -0
- package/dist/esm/models/components/supplier.d.ts.map +1 -0
- package/dist/esm/models/components/supplier.js +136 -0
- package/dist/esm/models/components/supplier.js.map +1 -0
- package/dist/esm/models/components/suppliercreate.d.ts +62 -0
- package/dist/esm/models/components/suppliercreate.d.ts.map +1 -0
- package/dist/esm/models/components/suppliercreate.js +54 -0
- package/dist/esm/models/components/suppliercreate.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/operations/convertinboxmessagetojob.d.ts +5 -2
- package/dist/esm/models/operations/convertinboxmessagetojob.d.ts.map +1 -1
- package/dist/esm/models/operations/convertinboxmessagetojob.js +2 -2
- package/dist/esm/models/operations/convertinboxmessagetojob.js.map +1 -1
- package/dist/esm/models/operations/createjobfromtemplate.d.ts +3 -3
- package/dist/esm/models/operations/createjobfromtemplate.d.ts.map +1 -1
- package/dist/esm/models/operations/createjobfromtemplate.js +2 -4
- package/dist/esm/models/operations/createjobfromtemplate.js.map +1 -1
- package/dist/esm/models/operations/createsuppliers.d.ts +36 -0
- package/dist/esm/models/operations/createsuppliers.d.ts.map +1 -0
- package/dist/esm/models/operations/createsuppliers.js +45 -0
- package/dist/esm/models/operations/createsuppliers.js.map +1 -0
- package/dist/esm/models/operations/deletesuppliers.d.ts +32 -0
- package/dist/esm/models/operations/deletesuppliers.d.ts.map +1 -0
- package/dist/esm/models/operations/deletesuppliers.js +31 -0
- package/dist/esm/models/operations/deletesuppliers.js.map +1 -0
- package/dist/esm/models/operations/getsuppliers.d.ts +32 -0
- package/dist/esm/models/operations/getsuppliers.d.ts.map +1 -0
- package/dist/esm/models/operations/getsuppliers.js +31 -0
- package/dist/esm/models/operations/getsuppliers.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/updatesuppliers.d.ts +38 -0
- package/dist/esm/models/operations/updatesuppliers.d.ts.map +1 -0
- package/dist/esm/models/operations/updatesuppliers.js +43 -0
- package/dist/esm/models/operations/updatesuppliers.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/suppliers.d.ts +59 -0
- package/dist/esm/sdk/suppliers.d.ts.map +1 -0
- package/dist/esm/sdk/suppliers.js +76 -0
- package/dist/esm/sdk/suppliers.js.map +1 -0
- package/docs/sdks/allocationwindows/README.md +4 -4
- package/docs/sdks/assets/README.md +4 -4
- package/docs/sdks/assettypefields/README.md +4 -4
- package/docs/sdks/assettypes/README.md +4 -4
- package/docs/sdks/attachments/README.md +12 -12
- package/docs/sdks/badges/README.md +12 -12
- package/docs/sdks/bundles/README.md +4 -4
- package/docs/sdks/categories/README.md +4 -4
- package/docs/sdks/clients/README.md +8 -8
- package/docs/sdks/companycontacts/README.md +8 -8
- package/docs/sdks/documenttemplates/README.md +4 -4
- package/docs/sdks/emailtemplates/README.md +4 -4
- package/docs/sdks/feedback/README.md +8 -8
- package/docs/sdks/formfields/README.md +8 -8
- package/docs/sdks/formresponses/README.md +28 -28
- package/docs/sdks/forms/README.md +8 -8
- package/docs/sdks/inbox/README.md +2 -0
- package/docs/sdks/jobactivities/README.md +16 -16
- package/docs/sdks/joballocations/README.md +20 -20
- package/docs/sdks/jobchecklists/README.md +28 -28
- package/docs/sdks/jobcontacts/README.md +8 -8
- package/docs/sdks/jobmaterialbundles/README.md +12 -12
- package/docs/sdks/jobmaterials/README.md +20 -20
- package/docs/sdks/jobpayments/README.md +16 -16
- package/docs/sdks/jobqueues/README.md +4 -4
- package/docs/sdks/jobs/README.md +28 -28
- package/docs/sdks/knowledgearticles/README.md +4 -4
- package/docs/sdks/locations/README.md +4 -4
- package/docs/sdks/materials/README.md +8 -8
- package/docs/sdks/notes/README.md +12 -12
- package/docs/sdks/smstemplates/README.md +4 -4
- package/docs/sdks/staffmembers/README.md +16 -16
- package/docs/sdks/staffmessages/README.md +16 -16
- package/docs/sdks/suppliers/README.md +466 -0
- package/docs/sdks/tasks/README.md +20 -20
- package/docs/sdks/taxrates/README.md +4 -4
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/suppliersCreateSuppliers.ts +200 -0
- package/src/funcs/suppliersDeleteSuppliers.ts +206 -0
- package/src/funcs/suppliersGetSuppliers.ts +204 -0
- package/src/funcs/suppliersListSuppliers.ts +179 -0
- package/src/funcs/suppliersUpdateSuppliers.ts +205 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/suppliersCreateSuppliers.ts +47 -0
- package/src/mcp-server/tools/suppliersDeleteSuppliers.ts +46 -0
- package/src/mcp-server/tools/suppliersGetSuppliers.ts +42 -0
- package/src/mcp-server/tools/suppliersListSuppliers.ts +39 -0
- package/src/mcp-server/tools/suppliersUpdateSuppliers.ts +42 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/job.ts +16 -14
- package/src/models/components/supplier.ts +278 -0
- package/src/models/components/suppliercreate.ts +118 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/convertinboxmessagetojob.ts +7 -4
- package/src/models/operations/createjobfromtemplate.ts +5 -7
- package/src/models/operations/createsuppliers.ts +82 -0
- package/src/models/operations/deletesuppliers.ts +69 -0
- package/src/models/operations/getsuppliers.ts +69 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/updatesuppliers.ts +86 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/suppliers.ts +116 -0
|
@@ -26,14 +26,14 @@ export type JobStatus = ClosedEnum<typeof JobStatus>;
|
|
|
26
26
|
/**
|
|
27
27
|
* Indicates whether the geocoding for the job address is valid. If this is false, the lat, lng, and other geo_ fields should not be used. (Read only). Valid values are [0,1]
|
|
28
28
|
*/
|
|
29
|
-
export const
|
|
29
|
+
export const JobGeoIsValid = {
|
|
30
30
|
Zero: 0,
|
|
31
31
|
One: 1,
|
|
32
32
|
} as const;
|
|
33
33
|
/**
|
|
34
34
|
* Indicates whether the geocoding for the job address is valid. If this is false, the lat, lng, and other geo_ fields should not be used. (Read only). Valid values are [0,1]
|
|
35
35
|
*/
|
|
36
|
-
export type
|
|
36
|
+
export type JobGeoIsValid = ClosedEnum<typeof JobGeoIsValid>;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Indicates whether an invoice has been sent for this job.. Valid values are [0,1]
|
|
@@ -151,7 +151,7 @@ export type Job = {
|
|
|
151
151
|
/**
|
|
152
152
|
* Indicates whether the geocoding for the job address is valid. If this is false, the lat, lng, and other geo_ fields should not be used. (Read only). Valid values are [0,1]
|
|
153
153
|
*/
|
|
154
|
-
geoIsValid?:
|
|
154
|
+
geoIsValid?: JobGeoIsValid | undefined;
|
|
155
155
|
/**
|
|
156
156
|
* Client purchase order reference number for this job. Used for cross-referencing with external accounting or order management systems.
|
|
157
157
|
*/
|
|
@@ -319,22 +319,24 @@ export namespace JobStatus$ {
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
/** @internal */
|
|
322
|
-
export const
|
|
323
|
-
|
|
322
|
+
export const JobGeoIsValid$inboundSchema: z.ZodNativeEnum<
|
|
323
|
+
typeof JobGeoIsValid
|
|
324
|
+
> = z.nativeEnum(JobGeoIsValid);
|
|
324
325
|
|
|
325
326
|
/** @internal */
|
|
326
|
-
export const
|
|
327
|
-
|
|
327
|
+
export const JobGeoIsValid$outboundSchema: z.ZodNativeEnum<
|
|
328
|
+
typeof JobGeoIsValid
|
|
329
|
+
> = JobGeoIsValid$inboundSchema;
|
|
328
330
|
|
|
329
331
|
/**
|
|
330
332
|
* @internal
|
|
331
333
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
332
334
|
*/
|
|
333
|
-
export namespace
|
|
334
|
-
/** @deprecated use `
|
|
335
|
-
export const inboundSchema =
|
|
336
|
-
/** @deprecated use `
|
|
337
|
-
export const outboundSchema =
|
|
335
|
+
export namespace JobGeoIsValid$ {
|
|
336
|
+
/** @deprecated use `JobGeoIsValid$inboundSchema` instead. */
|
|
337
|
+
export const inboundSchema = JobGeoIsValid$inboundSchema;
|
|
338
|
+
/** @deprecated use `JobGeoIsValid$outboundSchema` instead. */
|
|
339
|
+
export const outboundSchema = JobGeoIsValid$outboundSchema;
|
|
338
340
|
}
|
|
339
341
|
|
|
340
342
|
/** @internal */
|
|
@@ -454,7 +456,7 @@ export const Job$inboundSchema: z.ZodType<Job, z.ZodTypeDef, unknown> = z
|
|
|
454
456
|
payment_amount: z.string().optional(),
|
|
455
457
|
category_uuid: z.string().optional(),
|
|
456
458
|
payment_note: z.string().optional(),
|
|
457
|
-
geo_is_valid:
|
|
459
|
+
geo_is_valid: JobGeoIsValid$inboundSchema.optional(),
|
|
458
460
|
purchase_order_number: z.string().optional(),
|
|
459
461
|
invoice_sent: JobInvoiceSent$inboundSchema.optional(),
|
|
460
462
|
invoice_sent_stamp: z.string().optional(),
|
|
@@ -612,7 +614,7 @@ export const Job$outboundSchema: z.ZodType<Job$Outbound, z.ZodTypeDef, Job> = z
|
|
|
612
614
|
paymentAmount: z.string().optional(),
|
|
613
615
|
categoryUuid: z.string().optional(),
|
|
614
616
|
paymentNote: z.string().optional(),
|
|
615
|
-
geoIsValid:
|
|
617
|
+
geoIsValid: JobGeoIsValid$outboundSchema.optional(),
|
|
616
618
|
purchaseOrderNumber: z.string().optional(),
|
|
617
619
|
invoiceSent: JobInvoiceSent$outboundSchema.optional(),
|
|
618
620
|
invoiceSentStamp: z.string().optional(),
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Record active/deleted flag. Valid values are [0,1]
|
|
14
|
+
*/
|
|
15
|
+
export const SupplierActive = {
|
|
16
|
+
Zero: 0,
|
|
17
|
+
One: 1,
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Record active/deleted flag. Valid values are [0,1]
|
|
21
|
+
*/
|
|
22
|
+
export type SupplierActive = ClosedEnum<typeof SupplierActive>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Whether the geocoded coordinates are valid (Read only). Valid values are [0,1]
|
|
26
|
+
*/
|
|
27
|
+
export const SupplierGeoIsValid = {
|
|
28
|
+
Zero: 0,
|
|
29
|
+
One: 1,
|
|
30
|
+
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the geocoded coordinates are valid (Read only). Valid values are [0,1]
|
|
33
|
+
*/
|
|
34
|
+
export type SupplierGeoIsValid = ClosedEnum<typeof SupplierGeoIsValid>;
|
|
35
|
+
|
|
36
|
+
export type Supplier = {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier for this record
|
|
39
|
+
*/
|
|
40
|
+
uuid?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Record active/deleted flag. Valid values are [0,1]
|
|
43
|
+
*/
|
|
44
|
+
active?: SupplierActive | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Timestamp at which record was last modified
|
|
47
|
+
*/
|
|
48
|
+
editDate?: any | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The name of the supplier company
|
|
51
|
+
*/
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Business registration number (e.g., ABN, EIN)
|
|
55
|
+
*/
|
|
56
|
+
businessNumber?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Physical address of the supplier store
|
|
59
|
+
*/
|
|
60
|
+
address?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Primary contact email address
|
|
63
|
+
*/
|
|
64
|
+
email?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Primary contact phone number
|
|
67
|
+
*/
|
|
68
|
+
phone?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Your account number with this supplier
|
|
71
|
+
*/
|
|
72
|
+
accountNumber?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Longitude coordinate of the supplier's address (Read only)
|
|
75
|
+
*/
|
|
76
|
+
lng?: number | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Latitude coordinate of the supplier's address (Read only)
|
|
79
|
+
*/
|
|
80
|
+
lat?: number | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the geocoded coordinates are valid (Read only). Valid values are [0,1]
|
|
83
|
+
*/
|
|
84
|
+
geoIsValid?: SupplierGeoIsValid | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Country from geocoded address (Read only)
|
|
87
|
+
*/
|
|
88
|
+
geoCountry?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Postcode from geocoded address (Read only)
|
|
91
|
+
*/
|
|
92
|
+
geoPostcode?: string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* State from geocoded address (Read only)
|
|
95
|
+
*/
|
|
96
|
+
geoState?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* City from geocoded address (Read only)
|
|
99
|
+
*/
|
|
100
|
+
geoCity?: string | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Street name from geocoded address (Read only)
|
|
103
|
+
*/
|
|
104
|
+
geoStreet?: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Street number from geocoded address (Read only)
|
|
107
|
+
*/
|
|
108
|
+
geoNumber?: string | undefined;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const SupplierActive$inboundSchema: z.ZodNativeEnum<
|
|
113
|
+
typeof SupplierActive
|
|
114
|
+
> = z.nativeEnum(SupplierActive);
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const SupplierActive$outboundSchema: z.ZodNativeEnum<
|
|
118
|
+
typeof SupplierActive
|
|
119
|
+
> = SupplierActive$inboundSchema;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
+
*/
|
|
125
|
+
export namespace SupplierActive$ {
|
|
126
|
+
/** @deprecated use `SupplierActive$inboundSchema` instead. */
|
|
127
|
+
export const inboundSchema = SupplierActive$inboundSchema;
|
|
128
|
+
/** @deprecated use `SupplierActive$outboundSchema` instead. */
|
|
129
|
+
export const outboundSchema = SupplierActive$outboundSchema;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const SupplierGeoIsValid$inboundSchema: z.ZodNativeEnum<
|
|
134
|
+
typeof SupplierGeoIsValid
|
|
135
|
+
> = z.nativeEnum(SupplierGeoIsValid);
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const SupplierGeoIsValid$outboundSchema: z.ZodNativeEnum<
|
|
139
|
+
typeof SupplierGeoIsValid
|
|
140
|
+
> = SupplierGeoIsValid$inboundSchema;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
+
*/
|
|
146
|
+
export namespace SupplierGeoIsValid$ {
|
|
147
|
+
/** @deprecated use `SupplierGeoIsValid$inboundSchema` instead. */
|
|
148
|
+
export const inboundSchema = SupplierGeoIsValid$inboundSchema;
|
|
149
|
+
/** @deprecated use `SupplierGeoIsValid$outboundSchema` instead. */
|
|
150
|
+
export const outboundSchema = SupplierGeoIsValid$outboundSchema;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const Supplier$inboundSchema: z.ZodType<
|
|
155
|
+
Supplier,
|
|
156
|
+
z.ZodTypeDef,
|
|
157
|
+
unknown
|
|
158
|
+
> = z.object({
|
|
159
|
+
uuid: z.string().optional(),
|
|
160
|
+
active: SupplierActive$inboundSchema.default(1),
|
|
161
|
+
edit_date: z.any().optional(),
|
|
162
|
+
name: z.string().optional(),
|
|
163
|
+
business_number: z.string().optional(),
|
|
164
|
+
address: z.string().optional(),
|
|
165
|
+
email: z.string().optional(),
|
|
166
|
+
phone: z.string().optional(),
|
|
167
|
+
account_number: z.string().optional(),
|
|
168
|
+
lng: z.number().optional(),
|
|
169
|
+
lat: z.number().optional(),
|
|
170
|
+
geo_is_valid: SupplierGeoIsValid$inboundSchema.optional(),
|
|
171
|
+
geo_country: z.string().optional(),
|
|
172
|
+
geo_postcode: z.string().optional(),
|
|
173
|
+
geo_state: z.string().optional(),
|
|
174
|
+
geo_city: z.string().optional(),
|
|
175
|
+
geo_street: z.string().optional(),
|
|
176
|
+
geo_number: z.string().optional(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
"edit_date": "editDate",
|
|
180
|
+
"business_number": "businessNumber",
|
|
181
|
+
"account_number": "accountNumber",
|
|
182
|
+
"geo_is_valid": "geoIsValid",
|
|
183
|
+
"geo_country": "geoCountry",
|
|
184
|
+
"geo_postcode": "geoPostcode",
|
|
185
|
+
"geo_state": "geoState",
|
|
186
|
+
"geo_city": "geoCity",
|
|
187
|
+
"geo_street": "geoStreet",
|
|
188
|
+
"geo_number": "geoNumber",
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export type Supplier$Outbound = {
|
|
194
|
+
uuid?: string | undefined;
|
|
195
|
+
active: number;
|
|
196
|
+
edit_date?: any | undefined;
|
|
197
|
+
name?: string | undefined;
|
|
198
|
+
business_number?: string | undefined;
|
|
199
|
+
address?: string | undefined;
|
|
200
|
+
email?: string | undefined;
|
|
201
|
+
phone?: string | undefined;
|
|
202
|
+
account_number?: string | undefined;
|
|
203
|
+
lng?: number | undefined;
|
|
204
|
+
lat?: number | undefined;
|
|
205
|
+
geo_is_valid?: number | undefined;
|
|
206
|
+
geo_country?: string | undefined;
|
|
207
|
+
geo_postcode?: string | undefined;
|
|
208
|
+
geo_state?: string | undefined;
|
|
209
|
+
geo_city?: string | undefined;
|
|
210
|
+
geo_street?: string | undefined;
|
|
211
|
+
geo_number?: string | undefined;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/** @internal */
|
|
215
|
+
export const Supplier$outboundSchema: z.ZodType<
|
|
216
|
+
Supplier$Outbound,
|
|
217
|
+
z.ZodTypeDef,
|
|
218
|
+
Supplier
|
|
219
|
+
> = z.object({
|
|
220
|
+
uuid: z.string().optional(),
|
|
221
|
+
active: SupplierActive$outboundSchema.default(1),
|
|
222
|
+
editDate: z.any().optional(),
|
|
223
|
+
name: z.string().optional(),
|
|
224
|
+
businessNumber: z.string().optional(),
|
|
225
|
+
address: z.string().optional(),
|
|
226
|
+
email: z.string().optional(),
|
|
227
|
+
phone: z.string().optional(),
|
|
228
|
+
accountNumber: z.string().optional(),
|
|
229
|
+
lng: z.number().optional(),
|
|
230
|
+
lat: z.number().optional(),
|
|
231
|
+
geoIsValid: SupplierGeoIsValid$outboundSchema.optional(),
|
|
232
|
+
geoCountry: z.string().optional(),
|
|
233
|
+
geoPostcode: z.string().optional(),
|
|
234
|
+
geoState: z.string().optional(),
|
|
235
|
+
geoCity: z.string().optional(),
|
|
236
|
+
geoStreet: z.string().optional(),
|
|
237
|
+
geoNumber: z.string().optional(),
|
|
238
|
+
}).transform((v) => {
|
|
239
|
+
return remap$(v, {
|
|
240
|
+
editDate: "edit_date",
|
|
241
|
+
businessNumber: "business_number",
|
|
242
|
+
accountNumber: "account_number",
|
|
243
|
+
geoIsValid: "geo_is_valid",
|
|
244
|
+
geoCountry: "geo_country",
|
|
245
|
+
geoPostcode: "geo_postcode",
|
|
246
|
+
geoState: "geo_state",
|
|
247
|
+
geoCity: "geo_city",
|
|
248
|
+
geoStreet: "geo_street",
|
|
249
|
+
geoNumber: "geo_number",
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @internal
|
|
255
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
256
|
+
*/
|
|
257
|
+
export namespace Supplier$ {
|
|
258
|
+
/** @deprecated use `Supplier$inboundSchema` instead. */
|
|
259
|
+
export const inboundSchema = Supplier$inboundSchema;
|
|
260
|
+
/** @deprecated use `Supplier$outboundSchema` instead. */
|
|
261
|
+
export const outboundSchema = Supplier$outboundSchema;
|
|
262
|
+
/** @deprecated use `Supplier$Outbound` instead. */
|
|
263
|
+
export type Outbound = Supplier$Outbound;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export function supplierToJSON(supplier: Supplier): string {
|
|
267
|
+
return JSON.stringify(Supplier$outboundSchema.parse(supplier));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function supplierFromJSON(
|
|
271
|
+
jsonString: string,
|
|
272
|
+
): SafeParseResult<Supplier, SDKValidationError> {
|
|
273
|
+
return safeParse(
|
|
274
|
+
jsonString,
|
|
275
|
+
(x) => Supplier$inboundSchema.parse(JSON.parse(x)),
|
|
276
|
+
`Failed to parse 'Supplier' from JSON`,
|
|
277
|
+
);
|
|
278
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type SupplierCreate = {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier for this record
|
|
14
|
+
*/
|
|
15
|
+
uuid?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the supplier company
|
|
18
|
+
*/
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Business registration number (e.g., ABN, EIN)
|
|
22
|
+
*/
|
|
23
|
+
businessNumber?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Physical address of the supplier store
|
|
26
|
+
*/
|
|
27
|
+
address?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Primary contact email address
|
|
30
|
+
*/
|
|
31
|
+
email?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Primary contact phone number
|
|
34
|
+
*/
|
|
35
|
+
phone?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Your account number with this supplier
|
|
38
|
+
*/
|
|
39
|
+
accountNumber?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const SupplierCreate$inboundSchema: z.ZodType<
|
|
44
|
+
SupplierCreate,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
uuid: z.string().optional(),
|
|
49
|
+
name: z.string().optional(),
|
|
50
|
+
business_number: z.string().optional(),
|
|
51
|
+
address: z.string().optional(),
|
|
52
|
+
email: z.string().optional(),
|
|
53
|
+
phone: z.string().optional(),
|
|
54
|
+
account_number: z.string().optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"business_number": "businessNumber",
|
|
58
|
+
"account_number": "accountNumber",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type SupplierCreate$Outbound = {
|
|
64
|
+
uuid?: string | undefined;
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
business_number?: string | undefined;
|
|
67
|
+
address?: string | undefined;
|
|
68
|
+
email?: string | undefined;
|
|
69
|
+
phone?: string | undefined;
|
|
70
|
+
account_number?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const SupplierCreate$outboundSchema: z.ZodType<
|
|
75
|
+
SupplierCreate$Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
SupplierCreate
|
|
78
|
+
> = z.object({
|
|
79
|
+
uuid: z.string().optional(),
|
|
80
|
+
name: z.string().optional(),
|
|
81
|
+
businessNumber: z.string().optional(),
|
|
82
|
+
address: z.string().optional(),
|
|
83
|
+
email: z.string().optional(),
|
|
84
|
+
phone: z.string().optional(),
|
|
85
|
+
accountNumber: z.string().optional(),
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
businessNumber: "business_number",
|
|
89
|
+
accountNumber: "account_number",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
96
|
+
*/
|
|
97
|
+
export namespace SupplierCreate$ {
|
|
98
|
+
/** @deprecated use `SupplierCreate$inboundSchema` instead. */
|
|
99
|
+
export const inboundSchema = SupplierCreate$inboundSchema;
|
|
100
|
+
/** @deprecated use `SupplierCreate$outboundSchema` instead. */
|
|
101
|
+
export const outboundSchema = SupplierCreate$outboundSchema;
|
|
102
|
+
/** @deprecated use `SupplierCreate$Outbound` instead. */
|
|
103
|
+
export type Outbound = SupplierCreate$Outbound;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function supplierCreateToJSON(supplierCreate: SupplierCreate): string {
|
|
107
|
+
return JSON.stringify(SupplierCreate$outboundSchema.parse(supplierCreate));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function supplierCreateFromJSON(
|
|
111
|
+
jsonString: string,
|
|
112
|
+
): SafeParseResult<SupplierCreate, SDKValidationError> {
|
|
113
|
+
return safeParse(
|
|
114
|
+
jsonString,
|
|
115
|
+
(x) => SupplierCreate$inboundSchema.parse(JSON.parse(x)),
|
|
116
|
+
`Failed to parse 'SupplierCreate' from JSON`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -14,7 +14,10 @@ export type ConvertInboxMessageToJobRequest = {
|
|
|
14
14
|
* UUID of the inbox message
|
|
15
15
|
*/
|
|
16
16
|
uuid: string;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Parameters for converting the inbox message into a job (send an empty object to accept defaults)
|
|
19
|
+
*/
|
|
20
|
+
convertToJobRequest: components.ConvertToJobRequest;
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
/** @internal */
|
|
@@ -24,7 +27,7 @@ export const ConvertInboxMessageToJobRequest$inboundSchema: z.ZodType<
|
|
|
24
27
|
unknown
|
|
25
28
|
> = z.object({
|
|
26
29
|
uuid: z.string(),
|
|
27
|
-
ConvertToJobRequest: components.ConvertToJobRequest$inboundSchema
|
|
30
|
+
ConvertToJobRequest: components.ConvertToJobRequest$inboundSchema,
|
|
28
31
|
}).transform((v) => {
|
|
29
32
|
return remap$(v, {
|
|
30
33
|
"ConvertToJobRequest": "convertToJobRequest",
|
|
@@ -34,7 +37,7 @@ export const ConvertInboxMessageToJobRequest$inboundSchema: z.ZodType<
|
|
|
34
37
|
/** @internal */
|
|
35
38
|
export type ConvertInboxMessageToJobRequest$Outbound = {
|
|
36
39
|
uuid: string;
|
|
37
|
-
ConvertToJobRequest
|
|
40
|
+
ConvertToJobRequest: components.ConvertToJobRequest$Outbound;
|
|
38
41
|
};
|
|
39
42
|
|
|
40
43
|
/** @internal */
|
|
@@ -44,7 +47,7 @@ export const ConvertInboxMessageToJobRequest$outboundSchema: z.ZodType<
|
|
|
44
47
|
ConvertInboxMessageToJobRequest
|
|
45
48
|
> = z.object({
|
|
46
49
|
uuid: z.string(),
|
|
47
|
-
convertToJobRequest: components.ConvertToJobRequest$outboundSchema
|
|
50
|
+
convertToJobRequest: components.ConvertToJobRequest$outboundSchema,
|
|
48
51
|
}).transform((v) => {
|
|
49
52
|
return remap$(v, {
|
|
50
53
|
convertToJobRequest: "ConvertToJobRequest",
|
|
@@ -15,9 +15,9 @@ export type CreateJobFromTemplateRequest = {
|
|
|
15
15
|
*/
|
|
16
16
|
uuid: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Field overrides for the new job (send an empty object to use template defaults)
|
|
19
19
|
*/
|
|
20
|
-
jobTemplateOverrides
|
|
20
|
+
jobTemplateOverrides: components.JobTemplateOverrides;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -50,8 +50,7 @@ export const CreateJobFromTemplateRequest$inboundSchema: z.ZodType<
|
|
|
50
50
|
unknown
|
|
51
51
|
> = z.object({
|
|
52
52
|
uuid: z.string(),
|
|
53
|
-
JobTemplateOverrides: components.JobTemplateOverrides$inboundSchema
|
|
54
|
-
.optional(),
|
|
53
|
+
JobTemplateOverrides: components.JobTemplateOverrides$inboundSchema,
|
|
55
54
|
}).transform((v) => {
|
|
56
55
|
return remap$(v, {
|
|
57
56
|
"JobTemplateOverrides": "jobTemplateOverrides",
|
|
@@ -61,7 +60,7 @@ export const CreateJobFromTemplateRequest$inboundSchema: z.ZodType<
|
|
|
61
60
|
/** @internal */
|
|
62
61
|
export type CreateJobFromTemplateRequest$Outbound = {
|
|
63
62
|
uuid: string;
|
|
64
|
-
JobTemplateOverrides
|
|
63
|
+
JobTemplateOverrides: components.JobTemplateOverrides$Outbound;
|
|
65
64
|
};
|
|
66
65
|
|
|
67
66
|
/** @internal */
|
|
@@ -71,8 +70,7 @@ export const CreateJobFromTemplateRequest$outboundSchema: z.ZodType<
|
|
|
71
70
|
CreateJobFromTemplateRequest
|
|
72
71
|
> = z.object({
|
|
73
72
|
uuid: z.string(),
|
|
74
|
-
jobTemplateOverrides: components.JobTemplateOverrides$outboundSchema
|
|
75
|
-
.optional(),
|
|
73
|
+
jobTemplateOverrides: components.JobTemplateOverrides$outboundSchema,
|
|
76
74
|
}).transform((v) => {
|
|
77
75
|
return remap$(v, {
|
|
78
76
|
jobTemplateOverrides: "JobTemplateOverrides",
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateSuppliersResponse = {
|
|
13
|
+
headers: { [k: string]: Array<string> };
|
|
14
|
+
result: components.Result;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const CreateSuppliersResponse$inboundSchema: z.ZodType<
|
|
19
|
+
CreateSuppliersResponse,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
Headers: z.record(z.array(z.string())),
|
|
24
|
+
Result: components.Result$inboundSchema,
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"Headers": "headers",
|
|
28
|
+
"Result": "result",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type CreateSuppliersResponse$Outbound = {
|
|
34
|
+
Headers: { [k: string]: Array<string> };
|
|
35
|
+
Result: components.Result$Outbound;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const CreateSuppliersResponse$outboundSchema: z.ZodType<
|
|
40
|
+
CreateSuppliersResponse$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
CreateSuppliersResponse
|
|
43
|
+
> = z.object({
|
|
44
|
+
headers: z.record(z.array(z.string())),
|
|
45
|
+
result: components.Result$outboundSchema,
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
headers: "Headers",
|
|
49
|
+
result: "Result",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace CreateSuppliersResponse$ {
|
|
58
|
+
/** @deprecated use `CreateSuppliersResponse$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = CreateSuppliersResponse$inboundSchema;
|
|
60
|
+
/** @deprecated use `CreateSuppliersResponse$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = CreateSuppliersResponse$outboundSchema;
|
|
62
|
+
/** @deprecated use `CreateSuppliersResponse$Outbound` instead. */
|
|
63
|
+
export type Outbound = CreateSuppliersResponse$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function createSuppliersResponseToJSON(
|
|
67
|
+
createSuppliersResponse: CreateSuppliersResponse,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
CreateSuppliersResponse$outboundSchema.parse(createSuppliersResponse),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function createSuppliersResponseFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<CreateSuppliersResponse, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => CreateSuppliersResponse$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'CreateSuppliersResponse' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|