@greensecurity/javascript-sdk 0.30.7 → 0.30.9
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 +3 -0
- package/bin/mcp-server.js +350 -85
- package/bin/mcp-server.js.map +17 -12
- package/dist/commonjs/__tests__/vendors.test.js +34 -2
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsListVendorCredentials.js +1 -0
- package/dist/commonjs/funcs/vendorsListVendorCredentials.js.map +1 -1
- package/dist/commonjs/funcs/vendorsListVendorScrubPackages.d.ts +20 -0
- package/dist/commonjs/funcs/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsListVendorScrubPackages.js +160 -0
- package/dist/commonjs/funcs/vendorsListVendorScrubPackages.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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +3 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/productvariant.d.ts +36 -0
- package/dist/commonjs/models/components/productvariant.d.ts.map +1 -0
- package/dist/commonjs/models/components/productvariant.js +73 -0
- package/dist/commonjs/models/components/productvariant.js.map +1 -0
- package/dist/commonjs/models/components/vendorcredentialscontainer.d.ts +41 -0
- package/dist/commonjs/models/components/vendorcredentialscontainer.d.ts.map +1 -0
- package/dist/commonjs/models/components/vendorcredentialscontainer.js +81 -0
- package/dist/commonjs/models/components/vendorcredentialscontainer.js.map +1 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +48 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -0
- package/dist/commonjs/models/components/{vendorcredentialslim.js → vendorcredentialsummary.js} +30 -31
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -0
- package/dist/commonjs/models/components/vendorrequiredcredential.d.ts +10 -10
- package/dist/commonjs/models/components/vendorrequiredcredential.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorrequiredcredential.js +10 -10
- package/dist/commonjs/models/components/vendorrequiredcredential.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listvendorcredentials.d.ts +22 -10
- package/dist/commonjs/models/operations/listvendorcredentials.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listvendorcredentials.js +12 -10
- package/dist/commonjs/models/operations/listvendorcredentials.js.map +1 -1
- package/dist/commonjs/models/operations/listvendorscrubpackages.d.ts +111 -0
- package/dist/commonjs/models/operations/listvendorscrubpackages.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listvendorscrubpackages.js +153 -0
- package/dist/commonjs/models/operations/listvendorscrubpackages.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts +3 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorCredentials.js +2 -0
- package/dist/commonjs/react-query/vendorsListVendorCredentials.js.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorScrubPackages.d.ts +77 -0
- package/dist/commonjs/react-query/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsListVendorScrubPackages.js +160 -0
- package/dist/commonjs/react-query/vendorsListVendorScrubPackages.js.map +1 -0
- package/dist/commonjs/sdk/vendors.d.ts +9 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +10 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +34 -2
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/funcs/vendorsListVendorCredentials.js +1 -0
- package/dist/esm/funcs/vendorsListVendorCredentials.js.map +1 -1
- package/dist/esm/funcs/vendorsListVendorScrubPackages.d.ts +20 -0
- package/dist/esm/funcs/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsListVendorScrubPackages.js +124 -0
- package/dist/esm/funcs/vendorsListVendorScrubPackages.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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +3 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/productvariant.d.ts +36 -0
- package/dist/esm/models/components/productvariant.d.ts.map +1 -0
- package/dist/esm/models/components/productvariant.js +35 -0
- package/dist/esm/models/components/productvariant.js.map +1 -0
- package/dist/esm/models/components/vendorcredentialscontainer.d.ts +41 -0
- package/dist/esm/models/components/vendorcredentialscontainer.d.ts.map +1 -0
- package/dist/esm/models/components/vendorcredentialscontainer.js +43 -0
- package/dist/esm/models/components/vendorcredentialscontainer.js.map +1 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +48 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -0
- package/dist/esm/models/components/vendorcredentialsummary.js +55 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -0
- package/dist/esm/models/components/vendorrequiredcredential.d.ts +10 -10
- package/dist/esm/models/components/vendorrequiredcredential.d.ts.map +1 -1
- package/dist/esm/models/components/vendorrequiredcredential.js +10 -10
- package/dist/esm/models/components/vendorrequiredcredential.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listvendorcredentials.d.ts +22 -10
- package/dist/esm/models/operations/listvendorcredentials.d.ts.map +1 -1
- package/dist/esm/models/operations/listvendorcredentials.js +12 -10
- package/dist/esm/models/operations/listvendorcredentials.js.map +1 -1
- package/dist/esm/models/operations/listvendorscrubpackages.d.ts +111 -0
- package/dist/esm/models/operations/listvendorscrubpackages.d.ts.map +1 -0
- package/dist/esm/models/operations/listvendorscrubpackages.js +111 -0
- package/dist/esm/models/operations/listvendorscrubpackages.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/vendorsListVendorCredentials.d.ts +3 -0
- package/dist/esm/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsListVendorCredentials.js +2 -0
- package/dist/esm/react-query/vendorsListVendorCredentials.js.map +1 -1
- package/dist/esm/react-query/vendorsListVendorScrubPackages.d.ts +77 -0
- package/dist/esm/react-query/vendorsListVendorScrubPackages.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsListVendorScrubPackages.js +147 -0
- package/dist/esm/react-query/vendorsListVendorScrubPackages.js.map +1 -0
- package/dist/esm/sdk/vendors.d.ts +9 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +10 -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 +37 -2
- package/src/funcs/vendorsListVendorCredentials.ts +1 -0
- package/src/funcs/vendorsListVendorScrubPackages.ts +254 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/vendorsListVendorScrubPackages.ts +38 -0
- package/src/models/components/index.ts +3 -1
- package/src/models/components/productvariant.ts +73 -0
- package/src/models/components/vendorcredentialscontainer.ts +94 -0
- package/src/models/components/vendorcredentialsummary.ts +113 -0
- package/src/models/components/vendorrequiredcredential.ts +20 -20
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listvendorcredentials.ts +48 -24
- package/src/models/operations/listvendorscrubpackages.ts +252 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsListVendorCredentials.ts +5 -0
- package/src/react-query/vendorsListVendorScrubPackages.ts +346 -0
- package/src/sdk/vendors.ts +20 -0
- package/dist/commonjs/models/components/vendorcredentialslim.d.ts +0 -44
- package/dist/commonjs/models/components/vendorcredentialslim.d.ts.map +0 -1
- package/dist/commonjs/models/components/vendorcredentialslim.js.map +0 -1
- package/dist/esm/models/components/vendorcredentialslim.d.ts +0 -44
- package/dist/esm/models/components/vendorcredentialslim.d.ts.map +0 -1
- package/dist/esm/models/components/vendorcredentialslim.js +0 -56
- package/dist/esm/models/components/vendorcredentialslim.js.map +0 -1
- package/src/models/components/vendorcredentialslim.ts +0 -106
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Reduced list of attributes of Variant record
|
|
12
|
+
*/
|
|
13
|
+
export type ProductVariant = {
|
|
14
|
+
id?: number | undefined;
|
|
15
|
+
amount?: number | undefined;
|
|
16
|
+
total?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ProductVariant$inboundSchema: z.ZodType<
|
|
21
|
+
ProductVariant,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
id: z.number().int().optional(),
|
|
26
|
+
amount: z.number().int().optional(),
|
|
27
|
+
total: z.number().int().optional(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type ProductVariant$Outbound = {
|
|
32
|
+
id?: number | undefined;
|
|
33
|
+
amount?: number | undefined;
|
|
34
|
+
total?: number | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ProductVariant$outboundSchema: z.ZodType<
|
|
39
|
+
ProductVariant$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ProductVariant
|
|
42
|
+
> = z.object({
|
|
43
|
+
id: z.number().int().optional(),
|
|
44
|
+
amount: z.number().int().optional(),
|
|
45
|
+
total: z.number().int().optional(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace ProductVariant$ {
|
|
53
|
+
/** @deprecated use `ProductVariant$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = ProductVariant$inboundSchema;
|
|
55
|
+
/** @deprecated use `ProductVariant$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = ProductVariant$outboundSchema;
|
|
57
|
+
/** @deprecated use `ProductVariant$Outbound` instead. */
|
|
58
|
+
export type Outbound = ProductVariant$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function productVariantToJSON(productVariant: ProductVariant): string {
|
|
62
|
+
return JSON.stringify(ProductVariant$outboundSchema.parse(productVariant));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function productVariantFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<ProductVariant, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => ProductVariant$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'ProductVariant' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
import {
|
|
11
|
+
VendorCredentialSummary,
|
|
12
|
+
VendorCredentialSummary$inboundSchema,
|
|
13
|
+
VendorCredentialSummary$Outbound,
|
|
14
|
+
VendorCredentialSummary$outboundSchema,
|
|
15
|
+
} from "./vendorcredentialsummary.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A map of vendor credentials, where each key follows the format 'c{credential_id}'
|
|
19
|
+
*/
|
|
20
|
+
export type VendorCredentialsContainer = {
|
|
21
|
+
/**
|
|
22
|
+
* Reduced list of attributes of Vendor Credential record
|
|
23
|
+
*/
|
|
24
|
+
vc?: VendorCredentialSummary | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Reduced list of attributes of Vendor Credential record
|
|
27
|
+
*/
|
|
28
|
+
vcLast?: VendorCredentialSummary | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const VendorCredentialsContainer$inboundSchema: z.ZodType<
|
|
33
|
+
VendorCredentialsContainer,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
vc: z.nullable(VendorCredentialSummary$inboundSchema).optional(),
|
|
38
|
+
vc_last: z.nullable(VendorCredentialSummary$inboundSchema).optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"vc_last": "vcLast",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type VendorCredentialsContainer$Outbound = {
|
|
47
|
+
vc?: VendorCredentialSummary$Outbound | null | undefined;
|
|
48
|
+
vc_last?: VendorCredentialSummary$Outbound | null | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const VendorCredentialsContainer$outboundSchema: z.ZodType<
|
|
53
|
+
VendorCredentialsContainer$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
VendorCredentialsContainer
|
|
56
|
+
> = z.object({
|
|
57
|
+
vc: z.nullable(VendorCredentialSummary$outboundSchema).optional(),
|
|
58
|
+
vcLast: z.nullable(VendorCredentialSummary$outboundSchema).optional(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
vcLast: "vc_last",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace VendorCredentialsContainer$ {
|
|
70
|
+
/** @deprecated use `VendorCredentialsContainer$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = VendorCredentialsContainer$inboundSchema;
|
|
72
|
+
/** @deprecated use `VendorCredentialsContainer$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = VendorCredentialsContainer$outboundSchema;
|
|
74
|
+
/** @deprecated use `VendorCredentialsContainer$Outbound` instead. */
|
|
75
|
+
export type Outbound = VendorCredentialsContainer$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function vendorCredentialsContainerToJSON(
|
|
79
|
+
vendorCredentialsContainer: VendorCredentialsContainer,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
VendorCredentialsContainer$outboundSchema.parse(vendorCredentialsContainer),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function vendorCredentialsContainerFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<VendorCredentialsContainer, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => VendorCredentialsContainer$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'VendorCredentialsContainer' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
import {
|
|
11
|
+
Company,
|
|
12
|
+
Company$inboundSchema,
|
|
13
|
+
Company$Outbound,
|
|
14
|
+
Company$outboundSchema,
|
|
15
|
+
} from "./company.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Reduced list of attributes of Vendor Credential record
|
|
19
|
+
*/
|
|
20
|
+
export type VendorCredentialSummary = {
|
|
21
|
+
id: number;
|
|
22
|
+
status?: string | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* A simplified representation of a Company, typically used in list views.
|
|
25
|
+
*/
|
|
26
|
+
company?: Company | null | undefined;
|
|
27
|
+
dateDue?: string | null | undefined;
|
|
28
|
+
dateExpires?: string | null | undefined;
|
|
29
|
+
notes?: string | null | undefined;
|
|
30
|
+
expedited?: boolean | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const VendorCredentialSummary$inboundSchema: z.ZodType<
|
|
35
|
+
VendorCredentialSummary,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
id: z.number().int(),
|
|
40
|
+
status: z.nullable(z.string()).optional(),
|
|
41
|
+
company: z.nullable(Company$inboundSchema).optional(),
|
|
42
|
+
date_due: z.nullable(z.string()).optional(),
|
|
43
|
+
date_expires: z.nullable(z.string()).optional(),
|
|
44
|
+
notes: z.nullable(z.string()).optional(),
|
|
45
|
+
expedited: z.boolean().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"date_due": "dateDue",
|
|
49
|
+
"date_expires": "dateExpires",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type VendorCredentialSummary$Outbound = {
|
|
55
|
+
id: number;
|
|
56
|
+
status?: string | null | undefined;
|
|
57
|
+
company?: Company$Outbound | null | undefined;
|
|
58
|
+
date_due?: string | null | undefined;
|
|
59
|
+
date_expires?: string | null | undefined;
|
|
60
|
+
notes?: string | null | undefined;
|
|
61
|
+
expedited?: boolean | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const VendorCredentialSummary$outboundSchema: z.ZodType<
|
|
66
|
+
VendorCredentialSummary$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
VendorCredentialSummary
|
|
69
|
+
> = z.object({
|
|
70
|
+
id: z.number().int(),
|
|
71
|
+
status: z.nullable(z.string()).optional(),
|
|
72
|
+
company: z.nullable(Company$outboundSchema).optional(),
|
|
73
|
+
dateDue: z.nullable(z.string()).optional(),
|
|
74
|
+
dateExpires: z.nullable(z.string()).optional(),
|
|
75
|
+
notes: z.nullable(z.string()).optional(),
|
|
76
|
+
expedited: z.boolean().optional(),
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
dateDue: "date_due",
|
|
80
|
+
dateExpires: "date_expires",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace VendorCredentialSummary$ {
|
|
89
|
+
/** @deprecated use `VendorCredentialSummary$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = VendorCredentialSummary$inboundSchema;
|
|
91
|
+
/** @deprecated use `VendorCredentialSummary$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = VendorCredentialSummary$outboundSchema;
|
|
93
|
+
/** @deprecated use `VendorCredentialSummary$Outbound` instead. */
|
|
94
|
+
export type Outbound = VendorCredentialSummary$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function vendorCredentialSummaryToJSON(
|
|
98
|
+
vendorCredentialSummary: VendorCredentialSummary,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
VendorCredentialSummary$outboundSchema.parse(vendorCredentialSummary),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function vendorCredentialSummaryFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<VendorCredentialSummary, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => VendorCredentialSummary$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'VendorCredentialSummary' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -12,12 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
* A simplified representation of a VendorRequiredCredential, typically used in list views.
|
|
13
13
|
*/
|
|
14
14
|
export type VendorRequiredCredential = {
|
|
15
|
-
id
|
|
16
|
-
vendorId
|
|
15
|
+
id?: number | undefined;
|
|
16
|
+
vendorId?: number | undefined;
|
|
17
17
|
facilityId?: number | null | undefined;
|
|
18
|
-
credentialIds
|
|
19
|
-
dateCalculated
|
|
20
|
-
companyCredentialIds
|
|
18
|
+
credentialIds?: string | null | undefined;
|
|
19
|
+
dateCalculated?: string | undefined;
|
|
20
|
+
companyCredentialIds?: string | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
@@ -26,12 +26,12 @@ export const VendorRequiredCredential$inboundSchema: z.ZodType<
|
|
|
26
26
|
z.ZodTypeDef,
|
|
27
27
|
unknown
|
|
28
28
|
> = z.object({
|
|
29
|
-
id: z.number().int(),
|
|
30
|
-
vendor_id: z.number().int(),
|
|
29
|
+
id: z.number().int().optional(),
|
|
30
|
+
vendor_id: z.number().int().optional(),
|
|
31
31
|
facility_id: z.nullable(z.number().int()).optional(),
|
|
32
|
-
credential_ids: z.nullable(z.string()),
|
|
33
|
-
date_calculated: z.string(),
|
|
34
|
-
company_credential_ids: z.nullable(z.string()),
|
|
32
|
+
credential_ids: z.nullable(z.string()).optional(),
|
|
33
|
+
date_calculated: z.string().optional(),
|
|
34
|
+
company_credential_ids: z.nullable(z.string()).optional(),
|
|
35
35
|
}).transform((v) => {
|
|
36
36
|
return remap$(v, {
|
|
37
37
|
"vendor_id": "vendorId",
|
|
@@ -44,12 +44,12 @@ export const VendorRequiredCredential$inboundSchema: z.ZodType<
|
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
46
|
export type VendorRequiredCredential$Outbound = {
|
|
47
|
-
id
|
|
48
|
-
vendor_id
|
|
47
|
+
id?: number | undefined;
|
|
48
|
+
vendor_id?: number | undefined;
|
|
49
49
|
facility_id?: number | null | undefined;
|
|
50
|
-
credential_ids
|
|
51
|
-
date_calculated
|
|
52
|
-
company_credential_ids
|
|
50
|
+
credential_ids?: string | null | undefined;
|
|
51
|
+
date_calculated?: string | undefined;
|
|
52
|
+
company_credential_ids?: string | null | undefined;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
/** @internal */
|
|
@@ -58,12 +58,12 @@ export const VendorRequiredCredential$outboundSchema: z.ZodType<
|
|
|
58
58
|
z.ZodTypeDef,
|
|
59
59
|
VendorRequiredCredential
|
|
60
60
|
> = z.object({
|
|
61
|
-
id: z.number().int(),
|
|
62
|
-
vendorId: z.number().int(),
|
|
61
|
+
id: z.number().int().optional(),
|
|
62
|
+
vendorId: z.number().int().optional(),
|
|
63
63
|
facilityId: z.nullable(z.number().int()).optional(),
|
|
64
|
-
credentialIds: z.nullable(z.string()),
|
|
65
|
-
dateCalculated: z.string(),
|
|
66
|
-
companyCredentialIds: z.nullable(z.string()),
|
|
64
|
+
credentialIds: z.nullable(z.string()).optional(),
|
|
65
|
+
dateCalculated: z.string().optional(),
|
|
66
|
+
companyCredentialIds: z.nullable(z.string()).optional(),
|
|
67
67
|
}).transform((v) => {
|
|
68
68
|
return remap$(v, {
|
|
69
69
|
vendorId: "vendor_id",
|
|
@@ -24,6 +24,7 @@ export * from "./listvendorinvoices.js";
|
|
|
24
24
|
export * from "./listvendorjobtitles.js";
|
|
25
25
|
export * from "./listvendormanagedbycompanies.js";
|
|
26
26
|
export * from "./listvendorscrubdetails.js";
|
|
27
|
+
export * from "./listvendorscrubpackages.js";
|
|
27
28
|
export * from "./listvendorscrubpurchases.js";
|
|
28
29
|
export * from "./logsuserintothesystem.js";
|
|
29
30
|
export * from "./magiclink.js";
|
|
@@ -42,6 +42,10 @@ export type ListVendorCredentialsRequest = {
|
|
|
42
42
|
* False will exclude credentials that apply to company
|
|
43
43
|
*/
|
|
44
44
|
includeCc?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* True will return only Vendor credentials with expedited flag set to true
|
|
47
|
+
*/
|
|
48
|
+
expedited?: number | undefined;
|
|
45
49
|
/**
|
|
46
50
|
* Marking as a 1 will return vendor credentials listed as urgent
|
|
47
51
|
*/
|
|
@@ -62,17 +66,25 @@ export type Pager = {
|
|
|
62
66
|
* Pagination information for a pageable list
|
|
63
67
|
*/
|
|
64
68
|
pager: components.Pager;
|
|
65
|
-
items: Array<components.
|
|
69
|
+
items: Array<components.VendorCredentialSummary | null>;
|
|
66
70
|
};
|
|
67
71
|
|
|
68
72
|
/**
|
|
69
73
|
* The request was successful, and the server has returned the requested resource in the response body.
|
|
70
74
|
*/
|
|
71
75
|
export type ListVendorCredentialsResponseBody = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
/**
|
|
77
|
+
* A simplified representation of a VendorRequiredCredential, typically used in list views.
|
|
78
|
+
*/
|
|
79
|
+
vendorRequiredCredentials?:
|
|
80
|
+
| components.VendorRequiredCredential
|
|
81
|
+
| null
|
|
82
|
+
| undefined;
|
|
83
|
+
credentials?: Array<Credentials> | undefined;
|
|
84
|
+
vendorCredentials?:
|
|
85
|
+
| { [k: string]: components.VendorCredentialsContainer }
|
|
86
|
+
| undefined;
|
|
87
|
+
pager?: Pager | null | undefined;
|
|
76
88
|
};
|
|
77
89
|
|
|
78
90
|
export type ListVendorCredentialsResponse = {
|
|
@@ -95,6 +107,7 @@ export const ListVendorCredentialsRequest$inboundSchema: z.ZodType<
|
|
|
95
107
|
facility_id: z.number().optional(),
|
|
96
108
|
include_vc: z.number().optional(),
|
|
97
109
|
include_cc: z.number().optional(),
|
|
110
|
+
expedited: z.number().optional(),
|
|
98
111
|
urgent: z.number().optional(),
|
|
99
112
|
vendor_id: z.number().int(),
|
|
100
113
|
}).transform((v) => {
|
|
@@ -118,6 +131,7 @@ export type ListVendorCredentialsRequest$Outbound = {
|
|
|
118
131
|
facility_id?: number | undefined;
|
|
119
132
|
include_vc?: number | undefined;
|
|
120
133
|
include_cc?: number | undefined;
|
|
134
|
+
expedited?: number | undefined;
|
|
121
135
|
urgent?: number | undefined;
|
|
122
136
|
vendor_id: number;
|
|
123
137
|
};
|
|
@@ -138,6 +152,7 @@ export const ListVendorCredentialsRequest$outboundSchema: z.ZodType<
|
|
|
138
152
|
facilityId: z.number().optional(),
|
|
139
153
|
includeVc: z.number().optional(),
|
|
140
154
|
includeCc: z.number().optional(),
|
|
155
|
+
expedited: z.number().optional(),
|
|
141
156
|
urgent: z.number().optional(),
|
|
142
157
|
vendorId: z.number().int(),
|
|
143
158
|
}).transform((v) => {
|
|
@@ -241,13 +256,15 @@ export function credentialsFromJSON(
|
|
|
241
256
|
export const Pager$inboundSchema: z.ZodType<Pager, z.ZodTypeDef, unknown> = z
|
|
242
257
|
.object({
|
|
243
258
|
pager: components.Pager$inboundSchema,
|
|
244
|
-
items: z.array(
|
|
259
|
+
items: z.array(
|
|
260
|
+
z.nullable(components.VendorCredentialSummary$inboundSchema),
|
|
261
|
+
),
|
|
245
262
|
});
|
|
246
263
|
|
|
247
264
|
/** @internal */
|
|
248
265
|
export type Pager$Outbound = {
|
|
249
266
|
pager: components.Pager$Outbound;
|
|
250
|
-
items: Array<components.
|
|
267
|
+
items: Array<components.VendorCredentialSummary$Outbound | null>;
|
|
251
268
|
};
|
|
252
269
|
|
|
253
270
|
/** @internal */
|
|
@@ -257,7 +274,7 @@ export const Pager$outboundSchema: z.ZodType<
|
|
|
257
274
|
Pager
|
|
258
275
|
> = z.object({
|
|
259
276
|
pager: components.Pager$outboundSchema,
|
|
260
|
-
items: z.array(components.
|
|
277
|
+
items: z.array(z.nullable(components.VendorCredentialSummary$outboundSchema)),
|
|
261
278
|
});
|
|
262
279
|
|
|
263
280
|
/**
|
|
@@ -293,12 +310,14 @@ export const ListVendorCredentialsResponseBody$inboundSchema: z.ZodType<
|
|
|
293
310
|
z.ZodTypeDef,
|
|
294
311
|
unknown
|
|
295
312
|
> = z.object({
|
|
296
|
-
vendor_required_credentials: z.
|
|
313
|
+
vendor_required_credentials: z.nullable(
|
|
297
314
|
components.VendorRequiredCredential$inboundSchema,
|
|
298
|
-
),
|
|
299
|
-
credentials: z.array(z.lazy(() => Credentials$inboundSchema)),
|
|
300
|
-
vendor_credentials: z.
|
|
301
|
-
|
|
315
|
+
).optional(),
|
|
316
|
+
credentials: z.array(z.lazy(() => Credentials$inboundSchema)).optional(),
|
|
317
|
+
vendor_credentials: z.record(
|
|
318
|
+
components.VendorCredentialsContainer$inboundSchema,
|
|
319
|
+
).optional(),
|
|
320
|
+
pager: z.nullable(z.lazy(() => Pager$inboundSchema)).optional(),
|
|
302
321
|
}).transform((v) => {
|
|
303
322
|
return remap$(v, {
|
|
304
323
|
"vendor_required_credentials": "vendorRequiredCredentials",
|
|
@@ -308,12 +327,15 @@ export const ListVendorCredentialsResponseBody$inboundSchema: z.ZodType<
|
|
|
308
327
|
|
|
309
328
|
/** @internal */
|
|
310
329
|
export type ListVendorCredentialsResponseBody$Outbound = {
|
|
311
|
-
vendor_required_credentials
|
|
312
|
-
components.VendorRequiredCredential$Outbound
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
330
|
+
vendor_required_credentials?:
|
|
331
|
+
| components.VendorRequiredCredential$Outbound
|
|
332
|
+
| null
|
|
333
|
+
| undefined;
|
|
334
|
+
credentials?: Array<Credentials$Outbound> | undefined;
|
|
335
|
+
vendor_credentials?: {
|
|
336
|
+
[k: string]: components.VendorCredentialsContainer$Outbound;
|
|
337
|
+
} | undefined;
|
|
338
|
+
pager?: Pager$Outbound | null | undefined;
|
|
317
339
|
};
|
|
318
340
|
|
|
319
341
|
/** @internal */
|
|
@@ -322,12 +344,14 @@ export const ListVendorCredentialsResponseBody$outboundSchema: z.ZodType<
|
|
|
322
344
|
z.ZodTypeDef,
|
|
323
345
|
ListVendorCredentialsResponseBody
|
|
324
346
|
> = z.object({
|
|
325
|
-
vendorRequiredCredentials: z.
|
|
347
|
+
vendorRequiredCredentials: z.nullable(
|
|
326
348
|
components.VendorRequiredCredential$outboundSchema,
|
|
327
|
-
),
|
|
328
|
-
credentials: z.array(z.lazy(() => Credentials$outboundSchema)),
|
|
329
|
-
vendorCredentials: z.
|
|
330
|
-
|
|
349
|
+
).optional(),
|
|
350
|
+
credentials: z.array(z.lazy(() => Credentials$outboundSchema)).optional(),
|
|
351
|
+
vendorCredentials: z.record(
|
|
352
|
+
components.VendorCredentialsContainer$outboundSchema,
|
|
353
|
+
).optional(),
|
|
354
|
+
pager: z.nullable(z.lazy(() => Pager$outboundSchema)).optional(),
|
|
331
355
|
}).transform((v) => {
|
|
332
356
|
return remap$(v, {
|
|
333
357
|
vendorRequiredCredentials: "vendor_required_credentials",
|