@greensecurity/javascript-sdk 0.45.0-beta.4 → 0.45.0-beta.6

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 (101) hide show
  1. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  2. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  3. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/zones.test.js +8 -5
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.d.ts +1 -0
  7. package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.js +1 -0
  9. package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.js.map +1 -1
  10. package/dist/commonjs/funcs/vendorsVendorsExport.d.ts +4 -1
  11. package/dist/commonjs/funcs/vendorsVendorsExport.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/vendorsVendorsExport.js +5 -1
  13. package/dist/commonjs/funcs/vendorsVendorsExport.js.map +1 -1
  14. package/dist/commonjs/lib/config.d.ts +2 -2
  15. package/dist/commonjs/lib/config.js +2 -2
  16. package/dist/commonjs/models/components/expand.d.ts +1 -0
  17. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/expand.js +1 -0
  19. package/dist/commonjs/models/components/expand.js.map +1 -1
  20. package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +5 -0
  21. package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/vendorcredentialsummary.js +9 -1
  23. package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
  24. package/dist/commonjs/models/operations/vendorsexport.d.ts +6 -1
  25. package/dist/commonjs/models/operations/vendorsexport.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/vendorsexport.js +2 -0
  27. package/dist/commonjs/models/operations/vendorsexport.js.map +1 -1
  28. package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.d.ts +2 -0
  29. package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
  30. package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.js +2 -0
  31. package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.js.map +1 -1
  32. package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts +1 -0
  33. package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
  34. package/dist/commonjs/react-query/vendorsVendorsExport.core.js +1 -0
  35. package/dist/commonjs/react-query/vendorsVendorsExport.core.js.map +1 -1
  36. package/dist/commonjs/react-query/vendorsVendorsExport.d.ts +10 -2
  37. package/dist/commonjs/react-query/vendorsVendorsExport.d.ts.map +1 -1
  38. package/dist/commonjs/react-query/vendorsVendorsExport.js +8 -2
  39. package/dist/commonjs/react-query/vendorsVendorsExport.js.map +1 -1
  40. package/dist/commonjs/sdk/vendors.d.ts +5 -1
  41. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/vendors.js +5 -1
  43. package/dist/commonjs/sdk/vendors.js.map +1 -1
  44. package/dist/esm/__tests__/vendors.test.js +1 -1
  45. package/dist/esm/__tests__/webhooks.test.js +1 -1
  46. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  47. package/dist/esm/__tests__/zones.test.js +8 -5
  48. package/dist/esm/__tests__/zones.test.js.map +1 -1
  49. package/dist/esm/funcs/vendorsGetVendorCredentialDetails.d.ts +1 -0
  50. package/dist/esm/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
  51. package/dist/esm/funcs/vendorsGetVendorCredentialDetails.js +1 -0
  52. package/dist/esm/funcs/vendorsGetVendorCredentialDetails.js.map +1 -1
  53. package/dist/esm/funcs/vendorsVendorsExport.d.ts +4 -1
  54. package/dist/esm/funcs/vendorsVendorsExport.d.ts.map +1 -1
  55. package/dist/esm/funcs/vendorsVendorsExport.js +5 -1
  56. package/dist/esm/funcs/vendorsVendorsExport.js.map +1 -1
  57. package/dist/esm/lib/config.d.ts +2 -2
  58. package/dist/esm/lib/config.js +2 -2
  59. package/dist/esm/models/components/expand.d.ts +1 -0
  60. package/dist/esm/models/components/expand.d.ts.map +1 -1
  61. package/dist/esm/models/components/expand.js +1 -0
  62. package/dist/esm/models/components/expand.js.map +1 -1
  63. package/dist/esm/models/components/vendorcredentialsummary.d.ts +5 -0
  64. package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
  65. package/dist/esm/models/components/vendorcredentialsummary.js +7 -0
  66. package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
  67. package/dist/esm/models/operations/vendorsexport.d.ts +6 -1
  68. package/dist/esm/models/operations/vendorsexport.d.ts.map +1 -1
  69. package/dist/esm/models/operations/vendorsexport.js +2 -0
  70. package/dist/esm/models/operations/vendorsexport.js.map +1 -1
  71. package/dist/esm/react-query/vendorsGetVendorCredentialDetails.d.ts +2 -0
  72. package/dist/esm/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
  73. package/dist/esm/react-query/vendorsGetVendorCredentialDetails.js +2 -0
  74. package/dist/esm/react-query/vendorsGetVendorCredentialDetails.js.map +1 -1
  75. package/dist/esm/react-query/vendorsVendorsExport.core.d.ts +1 -0
  76. package/dist/esm/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
  77. package/dist/esm/react-query/vendorsVendorsExport.core.js +1 -0
  78. package/dist/esm/react-query/vendorsVendorsExport.core.js.map +1 -1
  79. package/dist/esm/react-query/vendorsVendorsExport.d.ts +10 -2
  80. package/dist/esm/react-query/vendorsVendorsExport.d.ts.map +1 -1
  81. package/dist/esm/react-query/vendorsVendorsExport.js +8 -2
  82. package/dist/esm/react-query/vendorsVendorsExport.js.map +1 -1
  83. package/dist/esm/sdk/vendors.d.ts +5 -1
  84. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  85. package/dist/esm/sdk/vendors.js +5 -1
  86. package/dist/esm/sdk/vendors.js.map +1 -1
  87. package/jsr.json +1 -1
  88. package/package.json +1 -1
  89. package/src/__tests__/vendors.test.ts +1 -1
  90. package/src/__tests__/webhooks.test.ts +1 -1
  91. package/src/__tests__/zones.test.ts +8 -5
  92. package/src/funcs/vendorsGetVendorCredentialDetails.ts +1 -0
  93. package/src/funcs/vendorsVendorsExport.ts +6 -1
  94. package/src/lib/config.ts +2 -2
  95. package/src/models/components/expand.ts +1 -0
  96. package/src/models/components/vendorcredentialsummary.ts +19 -0
  97. package/src/models/operations/vendorsexport.ts +8 -1
  98. package/src/react-query/vendorsGetVendorCredentialDetails.ts +2 -0
  99. package/src/react-query/vendorsVendorsExport.core.ts +2 -0
  100. package/src/react-query/vendorsVendorsExport.ts +10 -2
  101. package/src/sdk/vendors.ts +5 -1
@@ -33,6 +33,8 @@ export type VendorCredentialSummaryVendor = Vendor | number;
33
33
 
34
34
  export type VendorCredentialSummaryInvoice = Invoice | number;
35
35
 
36
+ export type Quote = Invoice | number;
37
+
36
38
  export type UnsatisfiedDependencies = {
37
39
  credentialId?: number | null | undefined;
38
40
  dependsOnId?: number | null | undefined;
@@ -87,6 +89,7 @@ export type VendorCredentialSummary = {
87
89
  credential?: Credential | number | null | undefined;
88
90
  vendor?: Vendor | number | null | undefined;
89
91
  invoice?: Invoice | number | null | undefined;
92
+ quote?: Invoice | number | null | undefined;
90
93
  vendorCredentialFiles?: Array<VendorCredentialFile | null> | undefined;
91
94
  latestVendorCredentialId?: number | null | undefined;
92
95
  previouslyApproved?: boolean | null | undefined;
@@ -164,6 +167,20 @@ export function vendorCredentialSummaryInvoiceFromJSON(
164
167
  );
165
168
  }
166
169
 
170
+ /** @internal */
171
+ export const Quote$inboundSchema: z.ZodType<Quote, z.ZodTypeDef, unknown> =
172
+ smartUnion([Invoice$inboundSchema, types.number()]);
173
+
174
+ export function quoteFromJSON(
175
+ jsonString: string,
176
+ ): SafeParseResult<Quote, SDKValidationError> {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) => Quote$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'Quote' from JSON`,
181
+ );
182
+ }
183
+
167
184
  /** @internal */
168
185
  export const UnsatisfiedDependencies$inboundSchema: z.ZodType<
169
186
  UnsatisfiedDependencies,
@@ -296,6 +313,8 @@ export const VendorCredentialSummary$inboundSchema: z.ZodType<
296
313
  .optional(),
297
314
  invoice: z.nullable(smartUnion([Invoice$inboundSchema, types.number()]))
298
315
  .optional(),
316
+ quote: z.nullable(smartUnion([Invoice$inboundSchema, types.number()]))
317
+ .optional(),
299
318
  vendor_credential_files: types.optional(
300
319
  z.array(types.nullable(z.lazy(() => VendorCredentialFile$inboundSchema))),
301
320
  ),
@@ -56,9 +56,13 @@ export type VendorsExportRequest = {
56
56
  */
57
57
  status?: string | undefined;
58
58
  /**
59
- * Scope to a specific company (API users must be authorized by MarketplaceAppActivation).
59
+ * Scope to a specific company (API users must be authorized by MarketplaceAppActivation). Cannot be combined with externally_managed_by_company_id.
60
60
  */
61
61
  companyId?: number | undefined;
62
+ /**
63
+ * Only export *external* vendors who can be managed by the specified company. Cannot be combined with company_id.
64
+ */
65
+ externallyManagedByCompanyId?: number | undefined;
62
66
  /**
63
67
  * Filter to vendors with (or without) a credentialing subscription.
64
68
  */
@@ -132,6 +136,7 @@ export type VendorsExportRequest$Outbound = {
132
136
  zip_like?: string | undefined;
133
137
  status?: string | undefined;
134
138
  company_id?: number | undefined;
139
+ externally_managed_by_company_id?: number | undefined;
135
140
  credentialing_subscription_id_null?: string | undefined;
136
141
  scrubs_subscription_id_null?: string | undefined;
137
142
  credentialing_subscription_status?: string | undefined;
@@ -167,6 +172,7 @@ export const VendorsExportRequest$outboundSchema: z.ZodType<
167
172
  zipLike: z.string().optional(),
168
173
  status: z.string().optional(),
169
174
  companyId: z.number().int().optional(),
175
+ externallyManagedByCompanyId: z.number().int().optional(),
170
176
  credentialingSubscriptionIdNull: z.string().optional(),
171
177
  scrubsSubscriptionIdNull: z.string().optional(),
172
178
  credentialingSubscriptionStatus: z.string().optional(),
@@ -203,6 +209,7 @@ export const VendorsExportRequest$outboundSchema: z.ZodType<
203
209
  stateLike: "state_like",
204
210
  zipLike: "zip_like",
205
211
  companyId: "company_id",
212
+ externallyManagedByCompanyId: "externally_managed_by_company_id",
206
213
  credentialingSubscriptionIdNull: "credentialing_subscription_id_null",
207
214
  scrubsSubscriptionIdNull: "scrubs_subscription_id_null",
208
215
  credentialingSubscriptionStatus: "credentialing_subscription_status",
@@ -63,6 +63,7 @@ export type VendorsGetVendorCredentialDetailsQueryError =
63
63
  * - vendor_credential.credential
64
64
  * - vendor_credential.vendor
65
65
  * - vendor_credential.invoice
66
+ * - vendor_credential.quote
66
67
  * - vendor_credential.vendor_credential_files
67
68
  * - vendor_credential.latest_vendor_credential_id
68
69
  * - vendor_credential.previously_approved
@@ -118,6 +119,7 @@ export function useVendorsGetVendorCredentialDetails(
118
119
  * - vendor_credential.credential
119
120
  * - vendor_credential.vendor
120
121
  * - vendor_credential.invoice
122
+ * - vendor_credential.quote
121
123
  * - vendor_credential.vendor_credential_files
122
124
  * - vendor_credential.latest_vendor_credential_id
123
125
  * - vendor_credential.previously_approved
@@ -57,6 +57,7 @@ export function buildVendorsVendorsExportQuery(
57
57
  zipLike: request.zipLike,
58
58
  status: request.status,
59
59
  companyId: request.companyId,
60
+ externallyManagedByCompanyId: request.externallyManagedByCompanyId,
60
61
  credentialingSubscriptionIdNull: request.credentialingSubscriptionIdNull,
61
62
  scrubsSubscriptionIdNull: request.scrubsSubscriptionIdNull,
62
63
  credentialingSubscriptionStatus: request.credentialingSubscriptionStatus,
@@ -110,6 +111,7 @@ export function queryKeyVendorsVendorsExport(
110
111
  zipLike?: string | undefined;
111
112
  status?: string | undefined;
112
113
  companyId?: number | undefined;
114
+ externallyManagedByCompanyId?: number | undefined;
113
115
  credentialingSubscriptionIdNull?: string | undefined;
114
116
  scrubsSubscriptionIdNull?: string | undefined;
115
117
  credentialingSubscriptionStatus?: string | undefined;
@@ -58,7 +58,10 @@ export type VendorsVendorsExportQueryError =
58
58
  *
59
59
  * @remarks
60
60
  * Enqueues an asynchronous job to generate a CSV export of vendors based on the
61
- * provided filters (the same filters supported by the vendors list endpoint).
61
+ * provided filters (the same filters supported by the vendors list endpoint), in the same
62
+ * credential-inclusive format as the portal's "Download Full Report" button - one column per
63
+ * applicable credential (status, due date, expiration), plus counts and percentage approved,
64
+ * alongside the vendor's identity, contact, and company details.
62
65
  * Returns a `status_url` to poll until the export is ready, plus a
63
66
  * `download_url` and `status_id`.
64
67
  */
@@ -88,7 +91,10 @@ export function useVendorsVendorsExport(
88
91
  *
89
92
  * @remarks
90
93
  * Enqueues an asynchronous job to generate a CSV export of vendors based on the
91
- * provided filters (the same filters supported by the vendors list endpoint).
94
+ * provided filters (the same filters supported by the vendors list endpoint), in the same
95
+ * credential-inclusive format as the portal's "Download Full Report" button - one column per
96
+ * applicable credential (status, due date, expiration), plus counts and percentage approved,
97
+ * alongside the vendor's identity, contact, and company details.
92
98
  * Returns a `status_url` to poll until the export is ready, plus a
93
99
  * `download_url` and `status_id`.
94
100
  */
@@ -130,6 +136,7 @@ export function setVendorsVendorsExportData(
130
136
  zipLike?: string | undefined;
131
137
  status?: string | undefined;
132
138
  companyId?: number | undefined;
139
+ externallyManagedByCompanyId?: number | undefined;
133
140
  credentialingSubscriptionIdNull?: string | undefined;
134
141
  scrubsSubscriptionIdNull?: string | undefined;
135
142
  credentialingSubscriptionStatus?: string | undefined;
@@ -170,6 +177,7 @@ export function invalidateVendorsVendorsExport(
170
177
  zipLike?: string | undefined;
171
178
  status?: string | undefined;
172
179
  companyId?: number | undefined;
180
+ externallyManagedByCompanyId?: number | undefined;
173
181
  credentialingSubscriptionIdNull?: string | undefined;
174
182
  scrubsSubscriptionIdNull?: string | undefined;
175
183
  credentialingSubscriptionStatus?: string | undefined;
@@ -273,6 +273,7 @@ export class Vendors extends ClientSDK {
273
273
  * - vendor_credential.credential
274
274
  * - vendor_credential.vendor
275
275
  * - vendor_credential.invoice
276
+ * - vendor_credential.quote
276
277
  * - vendor_credential.vendor_credential_files
277
278
  * - vendor_credential.latest_vendor_credential_id
278
279
  * - vendor_credential.previously_approved
@@ -1078,7 +1079,10 @@ export class Vendors extends ClientSDK {
1078
1079
  *
1079
1080
  * @remarks
1080
1081
  * Enqueues an asynchronous job to generate a CSV export of vendors based on the
1081
- * provided filters (the same filters supported by the vendors list endpoint).
1082
+ * provided filters (the same filters supported by the vendors list endpoint), in the same
1083
+ * credential-inclusive format as the portal's "Download Full Report" button - one column per
1084
+ * applicable credential (status, due date, expiration), plus counts and percentage approved,
1085
+ * alongside the vendor's identity, contact, and company details.
1082
1086
  * Returns a `status_url` to poll until the export is ready, plus a
1083
1087
  * `download_url` and `status_id`.
1084
1088
  */