@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.
Files changed (164) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +350 -85
  3. package/bin/mcp-server.js.map +17 -12
  4. package/dist/commonjs/__tests__/vendors.test.js +34 -2
  5. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  6. package/dist/commonjs/funcs/vendorsListVendorCredentials.js +1 -0
  7. package/dist/commonjs/funcs/vendorsListVendorCredentials.js.map +1 -1
  8. package/dist/commonjs/funcs/vendorsListVendorScrubPackages.d.ts +20 -0
  9. package/dist/commonjs/funcs/vendorsListVendorScrubPackages.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/vendorsListVendorScrubPackages.js +160 -0
  11. package/dist/commonjs/funcs/vendorsListVendorScrubPackages.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.js +64 -0
  21. package/dist/commonjs/mcp-server/tools/vendorsListVendorScrubPackages.js.map +1 -0
  22. package/dist/commonjs/models/components/index.d.ts +3 -1
  23. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/index.js +3 -1
  25. package/dist/commonjs/models/components/index.js.map +1 -1
  26. package/dist/commonjs/models/components/productvariant.d.ts +36 -0
  27. package/dist/commonjs/models/components/productvariant.d.ts.map +1 -0
  28. package/dist/commonjs/models/components/productvariant.js +73 -0
  29. package/dist/commonjs/models/components/productvariant.js.map +1 -0
  30. package/dist/commonjs/models/components/vendorcredentialscontainer.d.ts +41 -0
  31. package/dist/commonjs/models/components/vendorcredentialscontainer.d.ts.map +1 -0
  32. package/dist/commonjs/models/components/vendorcredentialscontainer.js +81 -0
  33. package/dist/commonjs/models/components/vendorcredentialscontainer.js.map +1 -0
  34. package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +48 -0
  35. package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -0
  36. package/dist/commonjs/models/components/{vendorcredentialslim.js → vendorcredentialsummary.js} +30 -31
  37. package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -0
  38. package/dist/commonjs/models/components/vendorrequiredcredential.d.ts +10 -10
  39. package/dist/commonjs/models/components/vendorrequiredcredential.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/vendorrequiredcredential.js +10 -10
  41. package/dist/commonjs/models/components/vendorrequiredcredential.js.map +1 -1
  42. package/dist/commonjs/models/operations/index.d.ts +1 -0
  43. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/index.js +1 -0
  45. package/dist/commonjs/models/operations/index.js.map +1 -1
  46. package/dist/commonjs/models/operations/listvendorcredentials.d.ts +22 -10
  47. package/dist/commonjs/models/operations/listvendorcredentials.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/listvendorcredentials.js +12 -10
  49. package/dist/commonjs/models/operations/listvendorcredentials.js.map +1 -1
  50. package/dist/commonjs/models/operations/listvendorscrubpackages.d.ts +111 -0
  51. package/dist/commonjs/models/operations/listvendorscrubpackages.d.ts.map +1 -0
  52. package/dist/commonjs/models/operations/listvendorscrubpackages.js +153 -0
  53. package/dist/commonjs/models/operations/listvendorscrubpackages.js.map +1 -0
  54. package/dist/commonjs/react-query/index.d.ts +1 -0
  55. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  56. package/dist/commonjs/react-query/index.js +1 -0
  57. package/dist/commonjs/react-query/index.js.map +1 -1
  58. package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts +3 -0
  59. package/dist/commonjs/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  60. package/dist/commonjs/react-query/vendorsListVendorCredentials.js +2 -0
  61. package/dist/commonjs/react-query/vendorsListVendorCredentials.js.map +1 -1
  62. package/dist/commonjs/react-query/vendorsListVendorScrubPackages.d.ts +77 -0
  63. package/dist/commonjs/react-query/vendorsListVendorScrubPackages.d.ts.map +1 -0
  64. package/dist/commonjs/react-query/vendorsListVendorScrubPackages.js +160 -0
  65. package/dist/commonjs/react-query/vendorsListVendorScrubPackages.js.map +1 -0
  66. package/dist/commonjs/sdk/vendors.d.ts +9 -0
  67. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  68. package/dist/commonjs/sdk/vendors.js +10 -0
  69. package/dist/commonjs/sdk/vendors.js.map +1 -1
  70. package/dist/esm/__tests__/vendors.test.js +34 -2
  71. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  72. package/dist/esm/funcs/vendorsListVendorCredentials.js +1 -0
  73. package/dist/esm/funcs/vendorsListVendorCredentials.js.map +1 -1
  74. package/dist/esm/funcs/vendorsListVendorScrubPackages.d.ts +20 -0
  75. package/dist/esm/funcs/vendorsListVendorScrubPackages.d.ts.map +1 -0
  76. package/dist/esm/funcs/vendorsListVendorScrubPackages.js +124 -0
  77. package/dist/esm/funcs/vendorsListVendorScrubPackages.js.map +1 -0
  78. package/dist/esm/lib/config.d.ts +3 -3
  79. package/dist/esm/lib/config.js +3 -3
  80. package/dist/esm/mcp-server/mcp-server.js +1 -1
  81. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  82. package/dist/esm/mcp-server/server.js +3 -1
  83. package/dist/esm/mcp-server/server.js.map +1 -1
  84. package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.d.ts +8 -0
  85. package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.d.ts.map +1 -0
  86. package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.js +28 -0
  87. package/dist/esm/mcp-server/tools/vendorsListVendorScrubPackages.js.map +1 -0
  88. package/dist/esm/models/components/index.d.ts +3 -1
  89. package/dist/esm/models/components/index.d.ts.map +1 -1
  90. package/dist/esm/models/components/index.js +3 -1
  91. package/dist/esm/models/components/index.js.map +1 -1
  92. package/dist/esm/models/components/productvariant.d.ts +36 -0
  93. package/dist/esm/models/components/productvariant.d.ts.map +1 -0
  94. package/dist/esm/models/components/productvariant.js +35 -0
  95. package/dist/esm/models/components/productvariant.js.map +1 -0
  96. package/dist/esm/models/components/vendorcredentialscontainer.d.ts +41 -0
  97. package/dist/esm/models/components/vendorcredentialscontainer.d.ts.map +1 -0
  98. package/dist/esm/models/components/vendorcredentialscontainer.js +43 -0
  99. package/dist/esm/models/components/vendorcredentialscontainer.js.map +1 -0
  100. package/dist/esm/models/components/vendorcredentialsummary.d.ts +48 -0
  101. package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -0
  102. package/dist/esm/models/components/vendorcredentialsummary.js +55 -0
  103. package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -0
  104. package/dist/esm/models/components/vendorrequiredcredential.d.ts +10 -10
  105. package/dist/esm/models/components/vendorrequiredcredential.d.ts.map +1 -1
  106. package/dist/esm/models/components/vendorrequiredcredential.js +10 -10
  107. package/dist/esm/models/components/vendorrequiredcredential.js.map +1 -1
  108. package/dist/esm/models/operations/index.d.ts +1 -0
  109. package/dist/esm/models/operations/index.d.ts.map +1 -1
  110. package/dist/esm/models/operations/index.js +1 -0
  111. package/dist/esm/models/operations/index.js.map +1 -1
  112. package/dist/esm/models/operations/listvendorcredentials.d.ts +22 -10
  113. package/dist/esm/models/operations/listvendorcredentials.d.ts.map +1 -1
  114. package/dist/esm/models/operations/listvendorcredentials.js +12 -10
  115. package/dist/esm/models/operations/listvendorcredentials.js.map +1 -1
  116. package/dist/esm/models/operations/listvendorscrubpackages.d.ts +111 -0
  117. package/dist/esm/models/operations/listvendorscrubpackages.d.ts.map +1 -0
  118. package/dist/esm/models/operations/listvendorscrubpackages.js +111 -0
  119. package/dist/esm/models/operations/listvendorscrubpackages.js.map +1 -0
  120. package/dist/esm/react-query/index.d.ts +1 -0
  121. package/dist/esm/react-query/index.d.ts.map +1 -1
  122. package/dist/esm/react-query/index.js +1 -0
  123. package/dist/esm/react-query/index.js.map +1 -1
  124. package/dist/esm/react-query/vendorsListVendorCredentials.d.ts +3 -0
  125. package/dist/esm/react-query/vendorsListVendorCredentials.d.ts.map +1 -1
  126. package/dist/esm/react-query/vendorsListVendorCredentials.js +2 -0
  127. package/dist/esm/react-query/vendorsListVendorCredentials.js.map +1 -1
  128. package/dist/esm/react-query/vendorsListVendorScrubPackages.d.ts +77 -0
  129. package/dist/esm/react-query/vendorsListVendorScrubPackages.d.ts.map +1 -0
  130. package/dist/esm/react-query/vendorsListVendorScrubPackages.js +147 -0
  131. package/dist/esm/react-query/vendorsListVendorScrubPackages.js.map +1 -0
  132. package/dist/esm/sdk/vendors.d.ts +9 -0
  133. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  134. package/dist/esm/sdk/vendors.js +10 -0
  135. package/dist/esm/sdk/vendors.js.map +1 -1
  136. package/jsr.json +1 -1
  137. package/package.json +1 -1
  138. package/src/__tests__/vendors.test.ts +37 -2
  139. package/src/funcs/vendorsListVendorCredentials.ts +1 -0
  140. package/src/funcs/vendorsListVendorScrubPackages.ts +254 -0
  141. package/src/lib/config.ts +3 -3
  142. package/src/mcp-server/mcp-server.ts +1 -1
  143. package/src/mcp-server/server.ts +3 -1
  144. package/src/mcp-server/tools/vendorsListVendorScrubPackages.ts +38 -0
  145. package/src/models/components/index.ts +3 -1
  146. package/src/models/components/productvariant.ts +73 -0
  147. package/src/models/components/vendorcredentialscontainer.ts +94 -0
  148. package/src/models/components/vendorcredentialsummary.ts +113 -0
  149. package/src/models/components/vendorrequiredcredential.ts +20 -20
  150. package/src/models/operations/index.ts +1 -0
  151. package/src/models/operations/listvendorcredentials.ts +48 -24
  152. package/src/models/operations/listvendorscrubpackages.ts +252 -0
  153. package/src/react-query/index.ts +1 -0
  154. package/src/react-query/vendorsListVendorCredentials.ts +5 -0
  155. package/src/react-query/vendorsListVendorScrubPackages.ts +346 -0
  156. package/src/sdk/vendors.ts +20 -0
  157. package/dist/commonjs/models/components/vendorcredentialslim.d.ts +0 -44
  158. package/dist/commonjs/models/components/vendorcredentialslim.d.ts.map +0 -1
  159. package/dist/commonjs/models/components/vendorcredentialslim.js.map +0 -1
  160. package/dist/esm/models/components/vendorcredentialslim.d.ts +0 -44
  161. package/dist/esm/models/components/vendorcredentialslim.d.ts.map +0 -1
  162. package/dist/esm/models/components/vendorcredentialslim.js +0 -56
  163. package/dist/esm/models/components/vendorcredentialslim.js.map +0 -1
  164. 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: number;
16
- vendorId: number;
15
+ id?: number | undefined;
16
+ vendorId?: number | undefined;
17
17
  facilityId?: number | null | undefined;
18
- credentialIds: string | null;
19
- dateCalculated: string;
20
- companyCredentialIds: string | null;
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: number;
48
- vendor_id: number;
47
+ id?: number | undefined;
48
+ vendor_id?: number | undefined;
49
49
  facility_id?: number | null | undefined;
50
- credential_ids: string | null;
51
- date_calculated: string;
52
- company_credential_ids: string | null;
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.VendorCredentialSlim>;
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
- vendorRequiredCredentials: Array<components.VendorRequiredCredential>;
73
- credentials: Array<Credentials>;
74
- vendorCredentials: Array<components.VendorCredentialSlim>;
75
- pager: Pager;
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(components.VendorCredentialSlim$inboundSchema),
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.VendorCredentialSlim$Outbound>;
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.VendorCredentialSlim$outboundSchema),
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.array(
313
+ vendor_required_credentials: z.nullable(
297
314
  components.VendorRequiredCredential$inboundSchema,
298
- ),
299
- credentials: z.array(z.lazy(() => Credentials$inboundSchema)),
300
- vendor_credentials: z.array(components.VendorCredentialSlim$inboundSchema),
301
- pager: z.lazy(() => Pager$inboundSchema),
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: Array<
312
- components.VendorRequiredCredential$Outbound
313
- >;
314
- credentials: Array<Credentials$Outbound>;
315
- vendor_credentials: Array<components.VendorCredentialSlim$Outbound>;
316
- pager: Pager$Outbound;
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.array(
347
+ vendorRequiredCredentials: z.nullable(
326
348
  components.VendorRequiredCredential$outboundSchema,
327
- ),
328
- credentials: z.array(z.lazy(() => Credentials$outboundSchema)),
329
- vendorCredentials: z.array(components.VendorCredentialSlim$outboundSchema),
330
- pager: z.lazy(() => Pager$outboundSchema),
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",