@greensecurity/javascript-sdk 0.40.8-beta.22 → 0.40.8-beta.23
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/dist/commonjs/__tests__/vendors.test.js +25 -0
- 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 +2 -3
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js +126 -0
- package/dist/commonjs/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/models/components/expand.d.ts +3 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +1 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/screeninganswer.d.ts +112 -0
- package/dist/commonjs/models/components/screeninganswer.d.ts.map +1 -0
- package/dist/commonjs/models/components/screeninganswer.js +138 -0
- package/dist/commonjs/models/components/screeninganswer.js.map +1 -0
- package/dist/commonjs/models/components/screeningquestion.d.ts +98 -0
- package/dist/commonjs/models/components/screeningquestion.d.ts.map +1 -0
- package/dist/commonjs/models/components/screeningquestion.js +125 -0
- package/dist/commonjs/models/components/screeningquestion.js.map +1 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js +122 -0
- package/dist/commonjs/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
- 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/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/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js +97 -0
- package/dist/commonjs/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/commonjs/sdk/vendors.d.ts +7 -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 +25 -0
- 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 +2 -3
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts +18 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js +90 -0
- package/dist/esm/funcs/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/models/components/expand.d.ts +3 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +1 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/screeninganswer.d.ts +112 -0
- package/dist/esm/models/components/screeninganswer.d.ts.map +1 -0
- package/dist/esm/models/components/screeninganswer.js +100 -0
- package/dist/esm/models/components/screeninganswer.js.map +1 -0
- package/dist/esm/models/components/screeningquestion.d.ts +98 -0
- package/dist/esm/models/components/screeningquestion.d.ts.map +1 -0
- package/dist/esm/models/components/screeningquestion.js +87 -0
- package/dist/esm/models/components/screeningquestion.js.map +1 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts +70 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.d.ts.map +1 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js +82 -0
- package/dist/esm/models/operations/getnextunansweredscreeningquestion.js.map +1 -0
- 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/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/vendorsGetNextUnansweredScreeningQuestion.d.ts +43 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js +87 -0
- package/dist/esm/react-query/vendorsGetNextUnansweredScreeningQuestion.js.map +1 -0
- package/dist/esm/sdk/vendors.d.ts +7 -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/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendors.test.ts +32 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +2 -3
- package/src/funcs/vendorsGetNextUnansweredScreeningQuestion.ts +188 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/screeninganswer.ts +195 -0
- package/src/models/components/screeningquestion.ts +163 -0
- package/src/models/operations/getnextunansweredscreeningquestion.ts +191 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsGetNextUnansweredScreeningQuestion.ts +190 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -0,0 +1,191 @@
|
|
|
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 GetNextUnansweredScreeningQuestionRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
15
|
+
*/
|
|
16
|
+
vendorIdOrMe: string;
|
|
17
|
+
/**
|
|
18
|
+
* An array-style parameter to identify which sections of an object to expand. See documentation for the endpoint for a list of valid expansion values.
|
|
19
|
+
*/
|
|
20
|
+
expand?: Array<components.Expand> | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
25
|
+
*/
|
|
26
|
+
export type GetNextUnansweredScreeningQuestionResponseBody = {
|
|
27
|
+
screeningQuestion: components.ScreeningQuestion | null;
|
|
28
|
+
screeningResponse: components.ScreeningResponse | null;
|
|
29
|
+
success: boolean;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const GetNextUnansweredScreeningQuestionRequest$inboundSchema: z.ZodType<
|
|
34
|
+
GetNextUnansweredScreeningQuestionRequest,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
vendor_id_or_me: z.string(),
|
|
39
|
+
expand: z.array(components.Expand$inboundSchema).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type GetNextUnansweredScreeningQuestionRequest$Outbound = {
|
|
48
|
+
vendor_id_or_me: string;
|
|
49
|
+
expand?: Array<string> | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const GetNextUnansweredScreeningQuestionRequest$outboundSchema:
|
|
54
|
+
z.ZodType<
|
|
55
|
+
GetNextUnansweredScreeningQuestionRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
GetNextUnansweredScreeningQuestionRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
vendorIdOrMe: z.string(),
|
|
60
|
+
expand: z.array(components.Expand$outboundSchema).optional(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace GetNextUnansweredScreeningQuestionRequest$ {
|
|
72
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionRequest$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema =
|
|
74
|
+
GetNextUnansweredScreeningQuestionRequest$inboundSchema;
|
|
75
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionRequest$outboundSchema` instead. */
|
|
76
|
+
export const outboundSchema =
|
|
77
|
+
GetNextUnansweredScreeningQuestionRequest$outboundSchema;
|
|
78
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionRequest$Outbound` instead. */
|
|
79
|
+
export type Outbound = GetNextUnansweredScreeningQuestionRequest$Outbound;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function getNextUnansweredScreeningQuestionRequestToJSON(
|
|
83
|
+
getNextUnansweredScreeningQuestionRequest:
|
|
84
|
+
GetNextUnansweredScreeningQuestionRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
GetNextUnansweredScreeningQuestionRequest$outboundSchema.parse(
|
|
88
|
+
getNextUnansweredScreeningQuestionRequest,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getNextUnansweredScreeningQuestionRequestFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<
|
|
96
|
+
GetNextUnansweredScreeningQuestionRequest,
|
|
97
|
+
SDKValidationError
|
|
98
|
+
> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) =>
|
|
102
|
+
GetNextUnansweredScreeningQuestionRequest$inboundSchema.parse(
|
|
103
|
+
JSON.parse(x),
|
|
104
|
+
),
|
|
105
|
+
`Failed to parse 'GetNextUnansweredScreeningQuestionRequest' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const GetNextUnansweredScreeningQuestionResponseBody$inboundSchema:
|
|
111
|
+
z.ZodType<
|
|
112
|
+
GetNextUnansweredScreeningQuestionResponseBody,
|
|
113
|
+
z.ZodTypeDef,
|
|
114
|
+
unknown
|
|
115
|
+
> = z.object({
|
|
116
|
+
screening_question: z.nullable(components.ScreeningQuestion$inboundSchema),
|
|
117
|
+
screening_response: z.nullable(components.ScreeningResponse$inboundSchema),
|
|
118
|
+
success: z.boolean(),
|
|
119
|
+
}).transform((v) => {
|
|
120
|
+
return remap$(v, {
|
|
121
|
+
"screening_question": "screeningQuestion",
|
|
122
|
+
"screening_response": "screeningResponse",
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export type GetNextUnansweredScreeningQuestionResponseBody$Outbound = {
|
|
128
|
+
screening_question: components.ScreeningQuestion$Outbound | null;
|
|
129
|
+
screening_response: components.ScreeningResponse$Outbound | null;
|
|
130
|
+
success: boolean;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const GetNextUnansweredScreeningQuestionResponseBody$outboundSchema:
|
|
135
|
+
z.ZodType<
|
|
136
|
+
GetNextUnansweredScreeningQuestionResponseBody$Outbound,
|
|
137
|
+
z.ZodTypeDef,
|
|
138
|
+
GetNextUnansweredScreeningQuestionResponseBody
|
|
139
|
+
> = z.object({
|
|
140
|
+
screeningQuestion: z.nullable(components.ScreeningQuestion$outboundSchema),
|
|
141
|
+
screeningResponse: z.nullable(components.ScreeningResponse$outboundSchema),
|
|
142
|
+
success: z.boolean(),
|
|
143
|
+
}).transform((v) => {
|
|
144
|
+
return remap$(v, {
|
|
145
|
+
screeningQuestion: "screening_question",
|
|
146
|
+
screeningResponse: "screening_response",
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @internal
|
|
152
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
|
+
*/
|
|
154
|
+
export namespace GetNextUnansweredScreeningQuestionResponseBody$ {
|
|
155
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionResponseBody$inboundSchema` instead. */
|
|
156
|
+
export const inboundSchema =
|
|
157
|
+
GetNextUnansweredScreeningQuestionResponseBody$inboundSchema;
|
|
158
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionResponseBody$outboundSchema` instead. */
|
|
159
|
+
export const outboundSchema =
|
|
160
|
+
GetNextUnansweredScreeningQuestionResponseBody$outboundSchema;
|
|
161
|
+
/** @deprecated use `GetNextUnansweredScreeningQuestionResponseBody$Outbound` instead. */
|
|
162
|
+
export type Outbound =
|
|
163
|
+
GetNextUnansweredScreeningQuestionResponseBody$Outbound;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function getNextUnansweredScreeningQuestionResponseBodyToJSON(
|
|
167
|
+
getNextUnansweredScreeningQuestionResponseBody:
|
|
168
|
+
GetNextUnansweredScreeningQuestionResponseBody,
|
|
169
|
+
): string {
|
|
170
|
+
return JSON.stringify(
|
|
171
|
+
GetNextUnansweredScreeningQuestionResponseBody$outboundSchema.parse(
|
|
172
|
+
getNextUnansweredScreeningQuestionResponseBody,
|
|
173
|
+
),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function getNextUnansweredScreeningQuestionResponseBodyFromJSON(
|
|
178
|
+
jsonString: string,
|
|
179
|
+
): SafeParseResult<
|
|
180
|
+
GetNextUnansweredScreeningQuestionResponseBody,
|
|
181
|
+
SDKValidationError
|
|
182
|
+
> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) =>
|
|
186
|
+
GetNextUnansweredScreeningQuestionResponseBody$inboundSchema.parse(
|
|
187
|
+
JSON.parse(x),
|
|
188
|
+
),
|
|
189
|
+
`Failed to parse 'GetNextUnansweredScreeningQuestionResponseBody' from JSON`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -28,6 +28,7 @@ export * from "./deletevendormanagedbycompany.js";
|
|
|
28
28
|
export * from "./expeditetimeremaining.js";
|
|
29
29
|
export * from "./getfacility.js";
|
|
30
30
|
export * from "./getfhirconfig.js";
|
|
31
|
+
export * from "./getnextunansweredscreeningquestion.js";
|
|
31
32
|
export * from "./getsecurityzone.js";
|
|
32
33
|
export * from "./getsubscription.js";
|
|
33
34
|
export * from "./getsupportarticle.js";
|
package/src/react-query/index.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from "./vendorsDeclineVendorCredential.js";
|
|
|
60
60
|
export * from "./vendorsDeleteVendorCredentialFile.js";
|
|
61
61
|
export * from "./vendorsDeleteVendorManagedByCompany.js";
|
|
62
62
|
export * from "./vendorsExpediteTimeRemaining.js";
|
|
63
|
+
export * from "./vendorsGetNextUnansweredScreeningQuestion.js";
|
|
63
64
|
export * from "./vendorsGetSubscription.js";
|
|
64
65
|
export * from "./vendorsGetVendorCredentialDetails.js";
|
|
65
66
|
export * from "./vendorsGetVendorCredentialFile.js";
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
QueryFunctionContext,
|
|
9
|
+
QueryKey,
|
|
10
|
+
useQuery,
|
|
11
|
+
UseQueryResult,
|
|
12
|
+
useSuspenseQuery,
|
|
13
|
+
UseSuspenseQueryResult,
|
|
14
|
+
} from "@tanstack/react-query";
|
|
15
|
+
import { GreenSecurityCore } from "../core.js";
|
|
16
|
+
import { vendorsGetNextUnansweredScreeningQuestion } from "../funcs/vendorsGetNextUnansweredScreeningQuestion.js";
|
|
17
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
18
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
19
|
+
import * as components from "../models/components/index.js";
|
|
20
|
+
import * as operations from "../models/operations/index.js";
|
|
21
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
22
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
23
|
+
import {
|
|
24
|
+
QueryHookOptions,
|
|
25
|
+
SuspenseQueryHookOptions,
|
|
26
|
+
TupleToPrefixes,
|
|
27
|
+
} from "./_types.js";
|
|
28
|
+
|
|
29
|
+
export type VendorsGetNextUnansweredScreeningQuestionQueryData =
|
|
30
|
+
operations.GetNextUnansweredScreeningQuestionResponseBody;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get the next unanswered screening question
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Returns the next unanswered screening question for the vendor specified by the vendor_id_or_me path parameter.
|
|
37
|
+
*/
|
|
38
|
+
export function useVendorsGetNextUnansweredScreeningQuestion(
|
|
39
|
+
request: operations.GetNextUnansweredScreeningQuestionRequest,
|
|
40
|
+
options?: QueryHookOptions<
|
|
41
|
+
VendorsGetNextUnansweredScreeningQuestionQueryData
|
|
42
|
+
>,
|
|
43
|
+
): UseQueryResult<VendorsGetNextUnansweredScreeningQuestionQueryData, Error> {
|
|
44
|
+
const client = useGreenSecurityContext();
|
|
45
|
+
return useQuery({
|
|
46
|
+
...buildVendorsGetNextUnansweredScreeningQuestionQuery(
|
|
47
|
+
client,
|
|
48
|
+
request,
|
|
49
|
+
options,
|
|
50
|
+
),
|
|
51
|
+
...options,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get the next unanswered screening question
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Returns the next unanswered screening question for the vendor specified by the vendor_id_or_me path parameter.
|
|
60
|
+
*/
|
|
61
|
+
export function useVendorsGetNextUnansweredScreeningQuestionSuspense(
|
|
62
|
+
request: operations.GetNextUnansweredScreeningQuestionRequest,
|
|
63
|
+
options?: SuspenseQueryHookOptions<
|
|
64
|
+
VendorsGetNextUnansweredScreeningQuestionQueryData
|
|
65
|
+
>,
|
|
66
|
+
): UseSuspenseQueryResult<
|
|
67
|
+
VendorsGetNextUnansweredScreeningQuestionQueryData,
|
|
68
|
+
Error
|
|
69
|
+
> {
|
|
70
|
+
const client = useGreenSecurityContext();
|
|
71
|
+
return useSuspenseQuery({
|
|
72
|
+
...buildVendorsGetNextUnansweredScreeningQuestionQuery(
|
|
73
|
+
client,
|
|
74
|
+
request,
|
|
75
|
+
options,
|
|
76
|
+
),
|
|
77
|
+
...options,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function prefetchVendorsGetNextUnansweredScreeningQuestion(
|
|
82
|
+
queryClient: QueryClient,
|
|
83
|
+
client$: GreenSecurityCore,
|
|
84
|
+
request: operations.GetNextUnansweredScreeningQuestionRequest,
|
|
85
|
+
): Promise<void> {
|
|
86
|
+
return queryClient.prefetchQuery({
|
|
87
|
+
...buildVendorsGetNextUnansweredScreeningQuestionQuery(
|
|
88
|
+
client$,
|
|
89
|
+
request,
|
|
90
|
+
),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function setVendorsGetNextUnansweredScreeningQuestionData(
|
|
95
|
+
client: QueryClient,
|
|
96
|
+
queryKeyBase: [
|
|
97
|
+
vendorIdOrMe: string,
|
|
98
|
+
parameters: { expand?: Array<components.Expand> | undefined },
|
|
99
|
+
],
|
|
100
|
+
data: VendorsGetNextUnansweredScreeningQuestionQueryData,
|
|
101
|
+
): VendorsGetNextUnansweredScreeningQuestionQueryData | undefined {
|
|
102
|
+
const key = queryKeyVendorsGetNextUnansweredScreeningQuestion(
|
|
103
|
+
...queryKeyBase,
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
return client.setQueryData<
|
|
107
|
+
VendorsGetNextUnansweredScreeningQuestionQueryData
|
|
108
|
+
>(key, data);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function invalidateVendorsGetNextUnansweredScreeningQuestion(
|
|
112
|
+
client: QueryClient,
|
|
113
|
+
queryKeyBase: TupleToPrefixes<
|
|
114
|
+
[
|
|
115
|
+
vendorIdOrMe: string,
|
|
116
|
+
parameters: { expand?: Array<components.Expand> | undefined },
|
|
117
|
+
]
|
|
118
|
+
>,
|
|
119
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
120
|
+
): Promise<void> {
|
|
121
|
+
return client.invalidateQueries({
|
|
122
|
+
...filters,
|
|
123
|
+
queryKey: [
|
|
124
|
+
"@greensecurity/javascript-sdk",
|
|
125
|
+
"vendors",
|
|
126
|
+
"getNextUnansweredScreeningQuestion",
|
|
127
|
+
...queryKeyBase,
|
|
128
|
+
],
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function invalidateAllVendorsGetNextUnansweredScreeningQuestion(
|
|
133
|
+
client: QueryClient,
|
|
134
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
135
|
+
): Promise<void> {
|
|
136
|
+
return client.invalidateQueries({
|
|
137
|
+
...filters,
|
|
138
|
+
queryKey: [
|
|
139
|
+
"@greensecurity/javascript-sdk",
|
|
140
|
+
"vendors",
|
|
141
|
+
"getNextUnansweredScreeningQuestion",
|
|
142
|
+
],
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function buildVendorsGetNextUnansweredScreeningQuestionQuery(
|
|
147
|
+
client$: GreenSecurityCore,
|
|
148
|
+
request: operations.GetNextUnansweredScreeningQuestionRequest,
|
|
149
|
+
options?: RequestOptions,
|
|
150
|
+
): {
|
|
151
|
+
queryKey: QueryKey;
|
|
152
|
+
queryFn: (
|
|
153
|
+
context: QueryFunctionContext,
|
|
154
|
+
) => Promise<VendorsGetNextUnansweredScreeningQuestionQueryData>;
|
|
155
|
+
} {
|
|
156
|
+
return {
|
|
157
|
+
queryKey: queryKeyVendorsGetNextUnansweredScreeningQuestion(
|
|
158
|
+
request.vendorIdOrMe,
|
|
159
|
+
{ expand: request.expand },
|
|
160
|
+
),
|
|
161
|
+
queryFn: async function vendorsGetNextUnansweredScreeningQuestionQueryFn(
|
|
162
|
+
ctx,
|
|
163
|
+
): Promise<VendorsGetNextUnansweredScreeningQuestionQueryData> {
|
|
164
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
165
|
+
const mergedOptions = {
|
|
166
|
+
...options,
|
|
167
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
return unwrapAsync(vendorsGetNextUnansweredScreeningQuestion(
|
|
171
|
+
client$,
|
|
172
|
+
request,
|
|
173
|
+
mergedOptions,
|
|
174
|
+
));
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function queryKeyVendorsGetNextUnansweredScreeningQuestion(
|
|
180
|
+
vendorIdOrMe: string,
|
|
181
|
+
parameters: { expand?: Array<components.Expand> | undefined },
|
|
182
|
+
): QueryKey {
|
|
183
|
+
return [
|
|
184
|
+
"@greensecurity/javascript-sdk",
|
|
185
|
+
"vendors",
|
|
186
|
+
"getNextUnansweredScreeningQuestion",
|
|
187
|
+
vendorIdOrMe,
|
|
188
|
+
parameters,
|
|
189
|
+
];
|
|
190
|
+
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { vendorsDeclineVendorCredential } from "../funcs/vendorsDeclineVendorCre
|
|
|
16
16
|
import { vendorsDeleteVendorCredentialFile } from "../funcs/vendorsDeleteVendorCredentialFile.js";
|
|
17
17
|
import { vendorsDeleteVendorManagedByCompany } from "../funcs/vendorsDeleteVendorManagedByCompany.js";
|
|
18
18
|
import { vendorsExpediteTimeRemaining } from "../funcs/vendorsExpediteTimeRemaining.js";
|
|
19
|
+
import { vendorsGetNextUnansweredScreeningQuestion } from "../funcs/vendorsGetNextUnansweredScreeningQuestion.js";
|
|
19
20
|
import { vendorsGetSubscription } from "../funcs/vendorsGetSubscription.js";
|
|
20
21
|
import { vendorsGetVendorCredentialDetails } from "../funcs/vendorsGetVendorCredentialDetails.js";
|
|
21
22
|
import { vendorsGetVendorCredentialFile } from "../funcs/vendorsGetVendorCredentialFile.js";
|
|
@@ -887,4 +888,21 @@ export class Vendors extends ClientSDK {
|
|
|
887
888
|
options,
|
|
888
889
|
));
|
|
889
890
|
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Get the next unanswered screening question
|
|
894
|
+
*
|
|
895
|
+
* @remarks
|
|
896
|
+
* Returns the next unanswered screening question for the vendor specified by the vendor_id_or_me path parameter.
|
|
897
|
+
*/
|
|
898
|
+
async getNextUnansweredScreeningQuestion(
|
|
899
|
+
request: operations.GetNextUnansweredScreeningQuestionRequest,
|
|
900
|
+
options?: RequestOptions,
|
|
901
|
+
): Promise<operations.GetNextUnansweredScreeningQuestionResponseBody> {
|
|
902
|
+
return unwrapAsync(vendorsGetNextUnansweredScreeningQuestion(
|
|
903
|
+
this,
|
|
904
|
+
request,
|
|
905
|
+
options,
|
|
906
|
+
));
|
|
907
|
+
}
|
|
890
908
|
}
|