@greensecurity/javascript-sdk 0.31.4 → 0.31.5
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 +12 -0
- package/bin/mcp-server.js +1231 -470
- package/bin/mcp-server.js.map +24 -11
- package/dist/commonjs/__tests__/vendors.test.js +86 -5
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +4 -61
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFile.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFile.js +118 -0
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/funcs/vendorsDeleteVendorCredentialFile.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsDeleteVendorCredentialFile.js +122 -0
- package/dist/commonjs/funcs/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/funcs/vendorsListVendorCredentialHistory.d.ts +20 -0
- package/dist/commonjs/funcs/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsListVendorCredentialHistory.js +161 -0
- package/dist/commonjs/funcs/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialFile.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialFile.js +123 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- 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 +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsAddVendorCredentialFile.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsAddVendorCredentialFile.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsDeleteVendorCredentialFile.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsDeleteVendorCredentialFile.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorCredentialHistory.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorCredentialHistory.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialFile.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialFile.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/models/components/contenttype.d.ts +163 -0
- package/dist/commonjs/models/components/contenttype.d.ts.map +1 -0
- package/dist/commonjs/models/components/contenttype.js +107 -0
- package/dist/commonjs/models/components/contenttype.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +6 -2
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +8 -2
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/commonjs/models/operations/addvendorcredentialfile.d.ts +99 -0
- package/dist/commonjs/models/operations/addvendorcredentialfile.d.ts.map +1 -0
- package/dist/commonjs/models/operations/addvendorcredentialfile.js +159 -0
- package/dist/commonjs/models/operations/addvendorcredentialfile.js.map +1 -0
- package/dist/commonjs/models/operations/deletevendorcredentialfile.d.ts +37 -0
- package/dist/commonjs/models/operations/deletevendorcredentialfile.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletevendorcredentialfile.js +80 -0
- package/dist/commonjs/models/operations/deletevendorcredentialfile.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/listvendorcredentialhistory.d.ts +116 -0
- package/dist/commonjs/models/operations/listvendorcredentialhistory.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listvendorcredentialhistory.js +157 -0
- package/dist/commonjs/models/operations/listvendorcredentialhistory.js.map +1 -0
- package/dist/commonjs/models/operations/updatevendorcredentialfile.d.ts +66 -0
- package/dist/commonjs/models/operations/updatevendorcredentialfile.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatevendorcredentialfile.js +121 -0
- package/dist/commonjs/models/operations/updatevendorcredentialfile.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +4 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +4 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/vendorsAddVendorCredentialFile.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsAddVendorCredentialFile.js +51 -0
- package/dist/commonjs/react-query/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/react-query/vendorsDeleteVendorCredentialFile.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsDeleteVendorCredentialFile.js +51 -0
- package/dist/commonjs/react-query/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentialHistory.d.ts +79 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentialHistory.js +161 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialFile.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialFile.js +51 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/commonjs/sdk/vendors.d.ts +30 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +40 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +86 -5
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +4 -61
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsAddVendorCredentialFile.d.ts +17 -0
- package/dist/esm/funcs/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsAddVendorCredentialFile.js +82 -0
- package/dist/esm/funcs/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/esm/funcs/vendorsDeleteVendorCredentialFile.d.ts +17 -0
- package/dist/esm/funcs/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsDeleteVendorCredentialFile.js +86 -0
- package/dist/esm/funcs/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/esm/funcs/vendorsListVendorCredentialHistory.d.ts +20 -0
- package/dist/esm/funcs/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsListVendorCredentialHistory.js +125 -0
- package/dist/esm/funcs/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialFile.d.ts +17 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialFile.js +87 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- 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 +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsAddVendorCredentialFile.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsAddVendorCredentialFile.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsDeleteVendorCredentialFile.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsDeleteVendorCredentialFile.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorCredentialHistory.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorCredentialHistory.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialFile.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialFile.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/esm/models/components/contenttype.d.ts +163 -0
- package/dist/esm/models/components/contenttype.d.ts.map +1 -0
- package/dist/esm/models/components/contenttype.js +71 -0
- package/dist/esm/models/components/contenttype.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +6 -2
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +8 -2
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/esm/models/operations/addvendorcredentialfile.d.ts +99 -0
- package/dist/esm/models/operations/addvendorcredentialfile.d.ts.map +1 -0
- package/dist/esm/models/operations/addvendorcredentialfile.js +117 -0
- package/dist/esm/models/operations/addvendorcredentialfile.js.map +1 -0
- package/dist/esm/models/operations/deletevendorcredentialfile.d.ts +37 -0
- package/dist/esm/models/operations/deletevendorcredentialfile.d.ts.map +1 -0
- package/dist/esm/models/operations/deletevendorcredentialfile.js +42 -0
- package/dist/esm/models/operations/deletevendorcredentialfile.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/listvendorcredentialhistory.d.ts +116 -0
- package/dist/esm/models/operations/listvendorcredentialhistory.d.ts.map +1 -0
- package/dist/esm/models/operations/listvendorcredentialhistory.js +115 -0
- package/dist/esm/models/operations/listvendorcredentialhistory.js.map +1 -0
- package/dist/esm/models/operations/updatevendorcredentialfile.d.ts +66 -0
- package/dist/esm/models/operations/updatevendorcredentialfile.d.ts.map +1 -0
- package/dist/esm/models/operations/updatevendorcredentialfile.js +81 -0
- package/dist/esm/models/operations/updatevendorcredentialfile.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +4 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +4 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/vendorsAddVendorCredentialFile.d.ts +23 -0
- package/dist/esm/react-query/vendorsAddVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsAddVendorCredentialFile.js +46 -0
- package/dist/esm/react-query/vendorsAddVendorCredentialFile.js.map +1 -0
- package/dist/esm/react-query/vendorsDeleteVendorCredentialFile.d.ts +23 -0
- package/dist/esm/react-query/vendorsDeleteVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsDeleteVendorCredentialFile.js +46 -0
- package/dist/esm/react-query/vendorsDeleteVendorCredentialFile.js.map +1 -0
- package/dist/esm/react-query/vendorsListVendorCredentialHistory.d.ts +79 -0
- package/dist/esm/react-query/vendorsListVendorCredentialHistory.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsListVendorCredentialHistory.js +148 -0
- package/dist/esm/react-query/vendorsListVendorCredentialHistory.js.map +1 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialFile.d.ts +23 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialFile.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialFile.js +46 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialFile.js.map +1 -0
- package/dist/esm/sdk/vendors.d.ts +30 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +40 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendors.test.ts +98 -5
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +4 -61
- package/src/funcs/vendorsAddVendorCredentialFile.ts +177 -0
- package/src/funcs/vendorsDeleteVendorCredentialFile.ts +181 -0
- package/src/funcs/vendorsListVendorCredentialHistory.ts +259 -0
- package/src/funcs/vendorsUpdateVendorCredentialFile.ts +182 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/vendorsAddVendorCredentialFile.ts +38 -0
- package/src/mcp-server/tools/vendorsDeleteVendorCredentialFile.ts +39 -0
- package/src/mcp-server/tools/vendorsListVendorCredentialHistory.ts +39 -0
- package/src/mcp-server/tools/vendorsUpdateVendorCredentialFile.ts +39 -0
- package/src/models/components/contenttype.ts +84 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/vendorcredentialsummary.ts +14 -4
- package/src/models/operations/addvendorcredentialfile.ts +248 -0
- package/src/models/operations/deletevendorcredentialfile.ts +88 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listvendorcredentialhistory.ts +272 -0
- package/src/models/operations/updatevendorcredentialfile.ts +173 -0
- package/src/react-query/index.ts +4 -0
- package/src/react-query/vendorsAddVendorCredentialFile.ts +93 -0
- package/src/react-query/vendorsDeleteVendorCredentialFile.ts +92 -0
- package/src/react-query/vendorsListVendorCredentialHistory.ts +360 -0
- package/src/react-query/vendorsUpdateVendorCredentialFile.ts +92 -0
- package/src/sdk/vendors.ts +77 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsAddVendorCredentialFile } from "../../funcs/vendorsAddVendorCredentialFile.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.AddVendorCredentialFileRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsAddVendorCredentialFile: ToolDefinition<typeof args> =
|
|
14
|
+
{
|
|
15
|
+
name: "vendors-add-vendor-credential-file",
|
|
16
|
+
description: `Add vendor credential file
|
|
17
|
+
|
|
18
|
+
It will add a new vendor credential file`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await vendorsAddVendorCredentialFile(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsDeleteVendorCredentialFile } from "../../funcs/vendorsDeleteVendorCredentialFile.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeleteVendorCredentialFileRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsDeleteVendorCredentialFile: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "vendors-delete-vendor-credential-file",
|
|
17
|
+
description: `Delete vendor credential file
|
|
18
|
+
|
|
19
|
+
It will delete the vendor credential file`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await vendorsDeleteVendorCredentialFile(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsListVendorCredentialHistory } from "../../funcs/vendorsListVendorCredentialHistory.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListVendorCredentialHistoryRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsListVendorCredentialHistory: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "vendors-list-vendor-credential-history",
|
|
17
|
+
description: `List Vendor Credential History
|
|
18
|
+
|
|
19
|
+
Lists vendor credentials history`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await vendorsListVendorCredentialHistory(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value.result;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { vendorsUpdateVendorCredentialFile } from "../../funcs/vendorsUpdateVendorCredentialFile.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateVendorCredentialFileRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$vendorsUpdateVendorCredentialFile: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "vendors-update-vendor-credential-file",
|
|
17
|
+
description: `Update vendor credential file
|
|
18
|
+
|
|
19
|
+
It will update the vendor credential file properties`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await vendorsUpdateVendorCredentialFile(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The list of valid content types
|
|
10
|
+
*/
|
|
11
|
+
export const ContentType = {
|
|
12
|
+
ApplicationBinary: "application/binary",
|
|
13
|
+
ApplicationCsv: "application/csv",
|
|
14
|
+
ApplicationJson: "application/json",
|
|
15
|
+
ApplicationMsword: "application/msword",
|
|
16
|
+
ApplicationOctetStream: "application/octet-stream",
|
|
17
|
+
ApplicationPdf: "application/pdf",
|
|
18
|
+
ApplicationRtf: "application/rtf",
|
|
19
|
+
ApplicationVndMsExcel: "application/vnd.ms-excel",
|
|
20
|
+
ApplicationVndMsTnef: "application/vnd.ms-tnef",
|
|
21
|
+
ApplicationVndOasisOpendocumentText:
|
|
22
|
+
"application/vnd.oasis.opendocument.text",
|
|
23
|
+
ApplicationVndOpenxmlformatsOfficedocumentPresentationmlPresentation:
|
|
24
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
25
|
+
ApplicationVndOpenxmlformatsOfficedocumentSpreadsheetmlSheet:
|
|
26
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
27
|
+
ApplicationVndOpenxmlformatsOfficedocumentWordprocessingmlDocument:
|
|
28
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
29
|
+
ApplicationVndPdf: "application/vnd.pdf",
|
|
30
|
+
ApplicationWpsOfficeDocx: "application/wps-office.docx",
|
|
31
|
+
ApplicationX7zCompressed: "application/x-7z-compressed",
|
|
32
|
+
ApplicationXDownload: "application/x-download",
|
|
33
|
+
ApplicationXhtmlPlusXml: "application/xhtml+xml",
|
|
34
|
+
ApplicationXml: "application/xml",
|
|
35
|
+
ApplicationXMsDosExecutable: "application/x-ms-dos-executable",
|
|
36
|
+
ApplicationXOleStorage: "application/x-ole-storage",
|
|
37
|
+
ApplicationZip: "application/zip",
|
|
38
|
+
ImageBmp: "image/bmp",
|
|
39
|
+
ImageGif: "image/gif",
|
|
40
|
+
ImageHeic: "image/heic",
|
|
41
|
+
ImageHeif: "image/heif",
|
|
42
|
+
ImageJp2: "image/jp2",
|
|
43
|
+
ImageJpeg: "image/jpeg",
|
|
44
|
+
ImageJpg: "image/jpg",
|
|
45
|
+
ImagePjpeg: "image/pjpeg",
|
|
46
|
+
ImagePng: "image/png",
|
|
47
|
+
ImageTiff: "image/tiff",
|
|
48
|
+
ImageVndAdobePhotoshop: "image/vnd.adobe.photoshop",
|
|
49
|
+
ImageVndMicrosoftIcon: "image/vnd.microsoft.icon",
|
|
50
|
+
ImageWebp: "image/webp",
|
|
51
|
+
ImageXPng: "image/x-png",
|
|
52
|
+
InodeXEmpty: "inode/x-empty",
|
|
53
|
+
MessageRfc822: "message/rfc822",
|
|
54
|
+
PdfSignoSign2: "pdf/signoSign.2",
|
|
55
|
+
TextHtml: "text/html",
|
|
56
|
+
TextPdf: "text/pdf",
|
|
57
|
+
TextPlain: "text/plain",
|
|
58
|
+
TextVcard: "text/vcard",
|
|
59
|
+
VideoMp4: "video/mp4",
|
|
60
|
+
VideoQuicktime: "video/quicktime",
|
|
61
|
+
} as const;
|
|
62
|
+
/**
|
|
63
|
+
* The list of valid content types
|
|
64
|
+
*/
|
|
65
|
+
export type ContentType = ClosedEnum<typeof ContentType>;
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const ContentType$inboundSchema: z.ZodNativeEnum<typeof ContentType> = z
|
|
69
|
+
.nativeEnum(ContentType);
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const ContentType$outboundSchema: z.ZodNativeEnum<typeof ContentType> =
|
|
73
|
+
ContentType$inboundSchema;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
78
|
+
*/
|
|
79
|
+
export namespace ContentType$ {
|
|
80
|
+
/** @deprecated use `ContentType$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema = ContentType$inboundSchema;
|
|
82
|
+
/** @deprecated use `ContentType$outboundSchema` instead. */
|
|
83
|
+
export const outboundSchema = ContentType$outboundSchema;
|
|
84
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./activestatus.js";
|
|
|
6
6
|
export * from "./backgroundcheckresult.js";
|
|
7
7
|
export * from "./company.js";
|
|
8
8
|
export * from "./contact.js";
|
|
9
|
+
export * from "./contenttype.js";
|
|
9
10
|
export * from "./credential.js";
|
|
10
11
|
export * from "./credentialdocument.js";
|
|
11
12
|
export * from "./credentialstatus.js";
|
|
@@ -79,6 +79,7 @@ export type ExpeditedOffers = {
|
|
|
79
79
|
export type VendorCredentialSummary = {
|
|
80
80
|
id: number;
|
|
81
81
|
status?: string | null | undefined;
|
|
82
|
+
version?: number | undefined;
|
|
82
83
|
/**
|
|
83
84
|
* A simplified representation of a Company, typically used in list views.
|
|
84
85
|
*/
|
|
@@ -88,8 +89,9 @@ export type VendorCredentialSummary = {
|
|
|
88
89
|
dateExpedited?: string | null | undefined;
|
|
89
90
|
dateValid?: string | null | undefined;
|
|
90
91
|
notes?: string | null | undefined;
|
|
91
|
-
expedited?: boolean | undefined;
|
|
92
92
|
jsonData?: string | null | undefined;
|
|
93
|
+
filename?: string | null | undefined;
|
|
94
|
+
alternateId?: number | null | undefined;
|
|
93
95
|
credential?: Credential | number | null | undefined;
|
|
94
96
|
vendor?: Vendor | number | null | undefined;
|
|
95
97
|
invoice?: Invoice | number | null | undefined;
|
|
@@ -431,14 +433,16 @@ export const VendorCredentialSummary$inboundSchema: z.ZodType<
|
|
|
431
433
|
> = z.object({
|
|
432
434
|
id: z.number().int(),
|
|
433
435
|
status: z.nullable(z.string()).optional(),
|
|
436
|
+
version: z.number().int().optional(),
|
|
434
437
|
company: z.nullable(Company$inboundSchema).optional(),
|
|
435
438
|
date_due: z.nullable(z.string()).optional(),
|
|
436
439
|
date_expires: z.nullable(z.string()).optional(),
|
|
437
440
|
date_expedited: z.nullable(z.string()).optional(),
|
|
438
441
|
date_valid: z.nullable(z.string()).optional(),
|
|
439
442
|
notes: z.nullable(z.string()).optional(),
|
|
440
|
-
expedited: z.boolean().optional(),
|
|
441
443
|
json_data: z.nullable(z.string()).optional(),
|
|
444
|
+
filename: z.nullable(z.string()).optional(),
|
|
445
|
+
alternate_id: z.nullable(z.number().int()).optional(),
|
|
442
446
|
credential: z.nullable(z.union([Credential$inboundSchema, z.number().int()]))
|
|
443
447
|
.optional(),
|
|
444
448
|
vendor: z.nullable(z.union([Vendor$inboundSchema, z.number().int()]))
|
|
@@ -475,6 +479,7 @@ export const VendorCredentialSummary$inboundSchema: z.ZodType<
|
|
|
475
479
|
"date_expedited": "dateExpedited",
|
|
476
480
|
"date_valid": "dateValid",
|
|
477
481
|
"json_data": "jsonData",
|
|
482
|
+
"alternate_id": "alternateId",
|
|
478
483
|
"vendor_credential_files": "vendorCredentialFiles",
|
|
479
484
|
"latest_vendor_credential_id": "latestVendorCredentialId",
|
|
480
485
|
"previously_approved": "previouslyApproved",
|
|
@@ -494,14 +499,16 @@ export const VendorCredentialSummary$inboundSchema: z.ZodType<
|
|
|
494
499
|
export type VendorCredentialSummary$Outbound = {
|
|
495
500
|
id: number;
|
|
496
501
|
status?: string | null | undefined;
|
|
502
|
+
version?: number | undefined;
|
|
497
503
|
company?: Company$Outbound | null | undefined;
|
|
498
504
|
date_due?: string | null | undefined;
|
|
499
505
|
date_expires?: string | null | undefined;
|
|
500
506
|
date_expedited?: string | null | undefined;
|
|
501
507
|
date_valid?: string | null | undefined;
|
|
502
508
|
notes?: string | null | undefined;
|
|
503
|
-
expedited?: boolean | undefined;
|
|
504
509
|
json_data?: string | null | undefined;
|
|
510
|
+
filename?: string | null | undefined;
|
|
511
|
+
alternate_id?: number | null | undefined;
|
|
505
512
|
credential?: Credential$Outbound | number | null | undefined;
|
|
506
513
|
vendor?: Vendor$Outbound | number | null | undefined;
|
|
507
514
|
invoice?: Invoice$Outbound | number | null | undefined;
|
|
@@ -535,14 +542,16 @@ export const VendorCredentialSummary$outboundSchema: z.ZodType<
|
|
|
535
542
|
> = z.object({
|
|
536
543
|
id: z.number().int(),
|
|
537
544
|
status: z.nullable(z.string()).optional(),
|
|
545
|
+
version: z.number().int().optional(),
|
|
538
546
|
company: z.nullable(Company$outboundSchema).optional(),
|
|
539
547
|
dateDue: z.nullable(z.string()).optional(),
|
|
540
548
|
dateExpires: z.nullable(z.string()).optional(),
|
|
541
549
|
dateExpedited: z.nullable(z.string()).optional(),
|
|
542
550
|
dateValid: z.nullable(z.string()).optional(),
|
|
543
551
|
notes: z.nullable(z.string()).optional(),
|
|
544
|
-
expedited: z.boolean().optional(),
|
|
545
552
|
jsonData: z.nullable(z.string()).optional(),
|
|
553
|
+
filename: z.nullable(z.string()).optional(),
|
|
554
|
+
alternateId: z.nullable(z.number().int()).optional(),
|
|
546
555
|
credential: z.nullable(z.union([Credential$outboundSchema, z.number().int()]))
|
|
547
556
|
.optional(),
|
|
548
557
|
vendor: z.nullable(z.union([Vendor$outboundSchema, z.number().int()]))
|
|
@@ -579,6 +588,7 @@ export const VendorCredentialSummary$outboundSchema: z.ZodType<
|
|
|
579
588
|
dateExpedited: "date_expedited",
|
|
580
589
|
dateValid: "date_valid",
|
|
581
590
|
jsonData: "json_data",
|
|
591
|
+
alternateId: "alternate_id",
|
|
582
592
|
vendorCredentialFiles: "vendor_credential_files",
|
|
583
593
|
latestVendorCredentialId: "latest_vendor_credential_id",
|
|
584
594
|
previouslyApproved: "previously_approved",
|
|
@@ -0,0 +1,248 @@
|
|
|
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 AddVendorCredentialFileRequestBody = {
|
|
13
|
+
fileName: string;
|
|
14
|
+
/**
|
|
15
|
+
* The list of valid content types
|
|
16
|
+
*/
|
|
17
|
+
contentType: components.ContentType;
|
|
18
|
+
fileSize: number;
|
|
19
|
+
isDecline?: boolean | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type AddVendorCredentialFileRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* ID of the vendor credential rep.
|
|
26
|
+
*/
|
|
27
|
+
vendorCredentialId: number;
|
|
28
|
+
requestBody: AddVendorCredentialFileRequestBody;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
33
|
+
*/
|
|
34
|
+
export type AddVendorCredentialFileResponseBody = {
|
|
35
|
+
id?: number | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AddVendorCredentialFileRequestBody$inboundSchema: z.ZodType<
|
|
40
|
+
AddVendorCredentialFileRequestBody,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
file_name: z.string(),
|
|
45
|
+
content_type: components.ContentType$inboundSchema,
|
|
46
|
+
file_size: z.number().int(),
|
|
47
|
+
is_decline: z.boolean().optional(),
|
|
48
|
+
name: z.string().optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
"file_name": "fileName",
|
|
52
|
+
"content_type": "contentType",
|
|
53
|
+
"file_size": "fileSize",
|
|
54
|
+
"is_decline": "isDecline",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type AddVendorCredentialFileRequestBody$Outbound = {
|
|
60
|
+
file_name: string;
|
|
61
|
+
content_type: string;
|
|
62
|
+
file_size: number;
|
|
63
|
+
is_decline?: boolean | undefined;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const AddVendorCredentialFileRequestBody$outboundSchema: z.ZodType<
|
|
69
|
+
AddVendorCredentialFileRequestBody$Outbound,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
AddVendorCredentialFileRequestBody
|
|
72
|
+
> = z.object({
|
|
73
|
+
fileName: z.string(),
|
|
74
|
+
contentType: components.ContentType$outboundSchema,
|
|
75
|
+
fileSize: z.number().int(),
|
|
76
|
+
isDecline: z.boolean().optional(),
|
|
77
|
+
name: z.string().optional(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
fileName: "file_name",
|
|
81
|
+
contentType: "content_type",
|
|
82
|
+
fileSize: "file_size",
|
|
83
|
+
isDecline: "is_decline",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
90
|
+
*/
|
|
91
|
+
export namespace AddVendorCredentialFileRequestBody$ {
|
|
92
|
+
/** @deprecated use `AddVendorCredentialFileRequestBody$inboundSchema` instead. */
|
|
93
|
+
export const inboundSchema = AddVendorCredentialFileRequestBody$inboundSchema;
|
|
94
|
+
/** @deprecated use `AddVendorCredentialFileRequestBody$outboundSchema` instead. */
|
|
95
|
+
export const outboundSchema =
|
|
96
|
+
AddVendorCredentialFileRequestBody$outboundSchema;
|
|
97
|
+
/** @deprecated use `AddVendorCredentialFileRequestBody$Outbound` instead. */
|
|
98
|
+
export type Outbound = AddVendorCredentialFileRequestBody$Outbound;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function addVendorCredentialFileRequestBodyToJSON(
|
|
102
|
+
addVendorCredentialFileRequestBody: AddVendorCredentialFileRequestBody,
|
|
103
|
+
): string {
|
|
104
|
+
return JSON.stringify(
|
|
105
|
+
AddVendorCredentialFileRequestBody$outboundSchema.parse(
|
|
106
|
+
addVendorCredentialFileRequestBody,
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function addVendorCredentialFileRequestBodyFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<AddVendorCredentialFileRequestBody, SDKValidationError> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) =>
|
|
117
|
+
AddVendorCredentialFileRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'AddVendorCredentialFileRequestBody' from JSON`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const AddVendorCredentialFileRequest$inboundSchema: z.ZodType<
|
|
124
|
+
AddVendorCredentialFileRequest,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
unknown
|
|
127
|
+
> = z.object({
|
|
128
|
+
vendor_credential_id: z.number().int(),
|
|
129
|
+
RequestBody: z.lazy(() => AddVendorCredentialFileRequestBody$inboundSchema),
|
|
130
|
+
}).transform((v) => {
|
|
131
|
+
return remap$(v, {
|
|
132
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
133
|
+
"RequestBody": "requestBody",
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type AddVendorCredentialFileRequest$Outbound = {
|
|
139
|
+
vendor_credential_id: number;
|
|
140
|
+
RequestBody: AddVendorCredentialFileRequestBody$Outbound;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const AddVendorCredentialFileRequest$outboundSchema: z.ZodType<
|
|
145
|
+
AddVendorCredentialFileRequest$Outbound,
|
|
146
|
+
z.ZodTypeDef,
|
|
147
|
+
AddVendorCredentialFileRequest
|
|
148
|
+
> = z.object({
|
|
149
|
+
vendorCredentialId: z.number().int(),
|
|
150
|
+
requestBody: z.lazy(() => AddVendorCredentialFileRequestBody$outboundSchema),
|
|
151
|
+
}).transform((v) => {
|
|
152
|
+
return remap$(v, {
|
|
153
|
+
vendorCredentialId: "vendor_credential_id",
|
|
154
|
+
requestBody: "RequestBody",
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @internal
|
|
160
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
161
|
+
*/
|
|
162
|
+
export namespace AddVendorCredentialFileRequest$ {
|
|
163
|
+
/** @deprecated use `AddVendorCredentialFileRequest$inboundSchema` instead. */
|
|
164
|
+
export const inboundSchema = AddVendorCredentialFileRequest$inboundSchema;
|
|
165
|
+
/** @deprecated use `AddVendorCredentialFileRequest$outboundSchema` instead. */
|
|
166
|
+
export const outboundSchema = AddVendorCredentialFileRequest$outboundSchema;
|
|
167
|
+
/** @deprecated use `AddVendorCredentialFileRequest$Outbound` instead. */
|
|
168
|
+
export type Outbound = AddVendorCredentialFileRequest$Outbound;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function addVendorCredentialFileRequestToJSON(
|
|
172
|
+
addVendorCredentialFileRequest: AddVendorCredentialFileRequest,
|
|
173
|
+
): string {
|
|
174
|
+
return JSON.stringify(
|
|
175
|
+
AddVendorCredentialFileRequest$outboundSchema.parse(
|
|
176
|
+
addVendorCredentialFileRequest,
|
|
177
|
+
),
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function addVendorCredentialFileRequestFromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<AddVendorCredentialFileRequest, SDKValidationError> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) => AddVendorCredentialFileRequest$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'AddVendorCredentialFileRequest' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const AddVendorCredentialFileResponseBody$inboundSchema: z.ZodType<
|
|
193
|
+
AddVendorCredentialFileResponseBody,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
unknown
|
|
196
|
+
> = z.object({
|
|
197
|
+
id: z.number().int().optional(),
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export type AddVendorCredentialFileResponseBody$Outbound = {
|
|
202
|
+
id?: number | undefined;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const AddVendorCredentialFileResponseBody$outboundSchema: z.ZodType<
|
|
207
|
+
AddVendorCredentialFileResponseBody$Outbound,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
AddVendorCredentialFileResponseBody
|
|
210
|
+
> = z.object({
|
|
211
|
+
id: z.number().int().optional(),
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
217
|
+
*/
|
|
218
|
+
export namespace AddVendorCredentialFileResponseBody$ {
|
|
219
|
+
/** @deprecated use `AddVendorCredentialFileResponseBody$inboundSchema` instead. */
|
|
220
|
+
export const inboundSchema =
|
|
221
|
+
AddVendorCredentialFileResponseBody$inboundSchema;
|
|
222
|
+
/** @deprecated use `AddVendorCredentialFileResponseBody$outboundSchema` instead. */
|
|
223
|
+
export const outboundSchema =
|
|
224
|
+
AddVendorCredentialFileResponseBody$outboundSchema;
|
|
225
|
+
/** @deprecated use `AddVendorCredentialFileResponseBody$Outbound` instead. */
|
|
226
|
+
export type Outbound = AddVendorCredentialFileResponseBody$Outbound;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function addVendorCredentialFileResponseBodyToJSON(
|
|
230
|
+
addVendorCredentialFileResponseBody: AddVendorCredentialFileResponseBody,
|
|
231
|
+
): string {
|
|
232
|
+
return JSON.stringify(
|
|
233
|
+
AddVendorCredentialFileResponseBody$outboundSchema.parse(
|
|
234
|
+
addVendorCredentialFileResponseBody,
|
|
235
|
+
),
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function addVendorCredentialFileResponseBodyFromJSON(
|
|
240
|
+
jsonString: string,
|
|
241
|
+
): SafeParseResult<AddVendorCredentialFileResponseBody, SDKValidationError> {
|
|
242
|
+
return safeParse(
|
|
243
|
+
jsonString,
|
|
244
|
+
(x) =>
|
|
245
|
+
AddVendorCredentialFileResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
246
|
+
`Failed to parse 'AddVendorCredentialFileResponseBody' from JSON`,
|
|
247
|
+
);
|
|
248
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 DeleteVendorCredentialFileRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the vendor credential rep.
|
|
14
|
+
*/
|
|
15
|
+
vendorCredentialId: number;
|
|
16
|
+
/**
|
|
17
|
+
* The identifier of the object
|
|
18
|
+
*/
|
|
19
|
+
id: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const DeleteVendorCredentialFileRequest$inboundSchema: z.ZodType<
|
|
24
|
+
DeleteVendorCredentialFileRequest,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
vendor_credential_id: z.number().int(),
|
|
29
|
+
id: z.number().int(),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type DeleteVendorCredentialFileRequest$Outbound = {
|
|
38
|
+
vendor_credential_id: number;
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const DeleteVendorCredentialFileRequest$outboundSchema: z.ZodType<
|
|
44
|
+
DeleteVendorCredentialFileRequest$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
DeleteVendorCredentialFileRequest
|
|
47
|
+
> = z.object({
|
|
48
|
+
vendorCredentialId: z.number().int(),
|
|
49
|
+
id: z.number().int(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
vendorCredentialId: "vendor_credential_id",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace DeleteVendorCredentialFileRequest$ {
|
|
61
|
+
/** @deprecated use `DeleteVendorCredentialFileRequest$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = DeleteVendorCredentialFileRequest$inboundSchema;
|
|
63
|
+
/** @deprecated use `DeleteVendorCredentialFileRequest$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema =
|
|
65
|
+
DeleteVendorCredentialFileRequest$outboundSchema;
|
|
66
|
+
/** @deprecated use `DeleteVendorCredentialFileRequest$Outbound` instead. */
|
|
67
|
+
export type Outbound = DeleteVendorCredentialFileRequest$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function deleteVendorCredentialFileRequestToJSON(
|
|
71
|
+
deleteVendorCredentialFileRequest: DeleteVendorCredentialFileRequest,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
DeleteVendorCredentialFileRequest$outboundSchema.parse(
|
|
75
|
+
deleteVendorCredentialFileRequest,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function deleteVendorCredentialFileRequestFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<DeleteVendorCredentialFileRequest, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => DeleteVendorCredentialFileRequest$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'DeleteVendorCredentialFileRequest' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|