candidhealth 0.24.0-2a6d412 → 0.24.2
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/Client.d.ts +3 -0
- package/README.md +134 -6
- package/api/resources/auth/client/Client.d.ts +3 -0
- package/api/resources/auth/resources/v2/client/Client.d.ts +4 -1
- package/api/resources/auth/resources/v2/client/Client.js +6 -7
- package/api/resources/billingNotes/client/Client.d.ts +3 -0
- package/api/resources/billingNotes/resources/v2/client/Client.d.ts +4 -1
- package/api/resources/billingNotes/resources/v2/client/Client.js +5 -4
- package/api/resources/contracts/client/Client.d.ts +3 -0
- package/api/resources/contracts/resources/v2/client/Client.d.ts +8 -5
- package/api/resources/contracts/resources/v2/client/Client.js +27 -26
- package/api/resources/eligibility/client/Client.d.ts +3 -0
- package/api/resources/eligibility/resources/v2/client/Client.d.ts +6 -3
- package/api/resources/eligibility/resources/v2/client/Client.js +12 -9
- package/api/resources/encounters/client/Client.d.ts +3 -0
- package/api/resources/encounters/resources/v4/client/Client.d.ts +7 -19
- package/api/resources/encounters/resources/v4/client/Client.js +22 -37
- package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -21
- package/api/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
- package/api/resources/expectedNetworkStatus/client/Client.d.ts +3 -0
- package/api/resources/expectedNetworkStatus/resources/v1/client/Client.d.ts +4 -1
- package/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +5 -4
- package/api/resources/expectedNetworkStatus/resources/v2/client/Client.d.ts +5 -2
- package/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +13 -11
- package/api/resources/exports/client/Client.d.ts +3 -0
- package/api/resources/exports/resources/v3/client/Client.d.ts +4 -1
- package/api/resources/exports/resources/v3/client/Client.js +5 -4
- package/api/resources/externalPaymentAccountConfig/client/Client.d.ts +3 -0
- package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.d.ts +4 -1
- package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +4 -3
- package/api/resources/feeSchedules/client/Client.d.ts +3 -0
- package/api/resources/feeSchedules/resources/v3/client/Client.d.ts +13 -10
- package/api/resources/feeSchedules/resources/v3/client/Client.js +52 -44
- package/api/resources/guarantor/client/Client.d.ts +3 -0
- package/api/resources/guarantor/resources/v1/client/Client.d.ts +6 -3
- package/api/resources/guarantor/resources/v1/client/Client.js +18 -19
- package/api/resources/importInvoice/client/Client.d.ts +3 -0
- package/api/resources/importInvoice/resources/v1/client/Client.d.ts +7 -4
- package/api/resources/importInvoice/resources/v1/client/Client.js +22 -18
- package/api/resources/insuranceAdjudications/client/Client.d.ts +3 -0
- package/api/resources/insuranceAdjudications/resources/v1/client/Client.d.ts +6 -3
- package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +15 -12
- package/api/resources/insurancePayments/client/Client.d.ts +3 -0
- package/api/resources/insurancePayments/resources/v1/client/Client.d.ts +8 -5
- package/api/resources/insurancePayments/resources/v1/client/Client.js +29 -24
- package/api/resources/insuranceRefunds/client/Client.d.ts +3 -0
- package/api/resources/insuranceRefunds/resources/v1/client/Client.d.ts +8 -5
- package/api/resources/insuranceRefunds/resources/v1/client/Client.js +29 -24
- package/api/resources/organizationProviders/client/Client.d.ts +3 -0
- package/api/resources/organizationProviders/resources/v3/client/Client.d.ts +7 -4
- package/api/resources/organizationProviders/resources/v3/client/Client.js +23 -19
- package/api/resources/organizationServiceFacilities/client/Client.d.ts +3 -0
- package/api/resources/organizationServiceFacilities/resources/v2/client/Client.d.ts +8 -5
- package/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +32 -23
- package/api/resources/patientPayments/client/Client.d.ts +3 -0
- package/api/resources/patientPayments/resources/v4/client/Client.d.ts +8 -5
- package/api/resources/patientPayments/resources/v4/client/Client.js +29 -24
- package/api/resources/patientRefunds/client/Client.d.ts +3 -0
- package/api/resources/patientRefunds/resources/v1/client/Client.d.ts +8 -5
- package/api/resources/patientRefunds/resources/v1/client/Client.js +29 -24
- package/api/resources/payers/client/Client.d.ts +3 -0
- package/api/resources/payers/resources/v3/client/Client.d.ts +5 -2
- package/api/resources/payers/resources/v3/client/Client.js +9 -7
- package/api/resources/preEncounter/client/Client.d.ts +3 -0
- package/api/resources/preEncounter/resources/coverages/client/Client.d.ts +3 -0
- package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +3 -0
- package/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.d.ts +9 -6
- package/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +31 -25
- package/api/resources/preEncounter/resources/patients/client/Client.d.ts +3 -0
- package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +3 -0
- package/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.d.ts +10 -7
- package/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +38 -31
- package/api/resources/serviceFacility/client/Client.d.ts +4 -1
- package/api/resources/serviceFacility/client/Client.js +6 -7
- package/api/resources/tasks/client/Client.d.ts +3 -0
- package/api/resources/tasks/resources/v3/client/Client.d.ts +8 -5
- package/api/resources/tasks/resources/v3/client/Client.js +28 -23
- package/api/resources/writeOffs/client/Client.d.ts +3 -0
- package/api/resources/writeOffs/resources/v1/client/Client.d.ts +7 -4
- package/api/resources/writeOffs/resources/v1/client/Client.js +19 -15
- package/core/fetcher/Fetcher.d.ts +3 -0
- package/core/fetcher/Fetcher.js +22 -153
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +48 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +7 -4
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +3 -0
- package/dist/api/resources/auth/client/Client.d.ts +3 -0
- package/dist/api/resources/auth/resources/v2/client/Client.d.ts +4 -1
- package/dist/api/resources/auth/resources/v2/client/Client.js +6 -7
- package/dist/api/resources/billingNotes/client/Client.d.ts +3 -0
- package/dist/api/resources/billingNotes/resources/v2/client/Client.d.ts +4 -1
- package/dist/api/resources/billingNotes/resources/v2/client/Client.js +5 -4
- package/dist/api/resources/contracts/client/Client.d.ts +3 -0
- package/dist/api/resources/contracts/resources/v2/client/Client.d.ts +8 -5
- package/dist/api/resources/contracts/resources/v2/client/Client.js +27 -26
- package/dist/api/resources/eligibility/client/Client.d.ts +3 -0
- package/dist/api/resources/eligibility/resources/v2/client/Client.d.ts +6 -3
- package/dist/api/resources/eligibility/resources/v2/client/Client.js +12 -9
- package/dist/api/resources/encounters/client/Client.d.ts +3 -0
- package/dist/api/resources/encounters/resources/v4/client/Client.d.ts +7 -19
- package/dist/api/resources/encounters/resources/v4/client/Client.js +22 -37
- package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -21
- package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
- package/dist/api/resources/expectedNetworkStatus/client/Client.d.ts +3 -0
- package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.d.ts +4 -1
- package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +5 -4
- package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.d.ts +5 -2
- package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +13 -11
- package/dist/api/resources/exports/client/Client.d.ts +3 -0
- package/dist/api/resources/exports/resources/v3/client/Client.d.ts +4 -1
- package/dist/api/resources/exports/resources/v3/client/Client.js +5 -4
- package/dist/api/resources/externalPaymentAccountConfig/client/Client.d.ts +3 -0
- package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.d.ts +4 -1
- package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +4 -3
- package/dist/api/resources/feeSchedules/client/Client.d.ts +3 -0
- package/dist/api/resources/feeSchedules/resources/v3/client/Client.d.ts +13 -10
- package/dist/api/resources/feeSchedules/resources/v3/client/Client.js +52 -44
- package/dist/api/resources/guarantor/client/Client.d.ts +3 -0
- package/dist/api/resources/guarantor/resources/v1/client/Client.d.ts +6 -3
- package/dist/api/resources/guarantor/resources/v1/client/Client.js +18 -19
- package/dist/api/resources/importInvoice/client/Client.d.ts +3 -0
- package/dist/api/resources/importInvoice/resources/v1/client/Client.d.ts +7 -4
- package/dist/api/resources/importInvoice/resources/v1/client/Client.js +22 -18
- package/dist/api/resources/insuranceAdjudications/client/Client.d.ts +3 -0
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.d.ts +6 -3
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +15 -12
- package/dist/api/resources/insurancePayments/client/Client.d.ts +3 -0
- package/dist/api/resources/insurancePayments/resources/v1/client/Client.d.ts +8 -5
- package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +29 -24
- package/dist/api/resources/insuranceRefunds/client/Client.d.ts +3 -0
- package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.d.ts +8 -5
- package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +29 -24
- package/dist/api/resources/organizationProviders/client/Client.d.ts +3 -0
- package/dist/api/resources/organizationProviders/resources/v3/client/Client.d.ts +7 -4
- package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +23 -19
- package/dist/api/resources/organizationServiceFacilities/client/Client.d.ts +3 -0
- package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.d.ts +8 -5
- package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +32 -23
- package/dist/api/resources/patientPayments/client/Client.d.ts +3 -0
- package/dist/api/resources/patientPayments/resources/v4/client/Client.d.ts +8 -5
- package/dist/api/resources/patientPayments/resources/v4/client/Client.js +29 -24
- package/dist/api/resources/patientRefunds/client/Client.d.ts +3 -0
- package/dist/api/resources/patientRefunds/resources/v1/client/Client.d.ts +8 -5
- package/dist/api/resources/patientRefunds/resources/v1/client/Client.js +29 -24
- package/dist/api/resources/payers/client/Client.d.ts +3 -0
- package/dist/api/resources/payers/resources/v3/client/Client.d.ts +5 -2
- package/dist/api/resources/payers/resources/v3/client/Client.js +9 -7
- package/dist/api/resources/preEncounter/client/Client.d.ts +3 -0
- package/dist/api/resources/preEncounter/resources/coverages/client/Client.d.ts +3 -0
- package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +3 -0
- package/dist/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.d.ts +9 -6
- package/dist/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +31 -25
- package/dist/api/resources/preEncounter/resources/patients/client/Client.d.ts +3 -0
- package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +3 -0
- package/dist/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.d.ts +10 -7
- package/dist/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +38 -31
- package/dist/api/resources/serviceFacility/client/Client.d.ts +4 -1
- package/dist/api/resources/serviceFacility/client/Client.js +6 -7
- package/dist/api/resources/tasks/client/Client.d.ts +3 -0
- package/dist/api/resources/tasks/resources/v3/client/Client.d.ts +8 -5
- package/dist/api/resources/tasks/resources/v3/client/Client.js +28 -23
- package/dist/api/resources/writeOffs/client/Client.d.ts +3 -0
- package/dist/api/resources/writeOffs/resources/v1/client/Client.d.ts +7 -4
- package/dist/api/resources/writeOffs/resources/v1/client/Client.js +19 -15
- package/dist/core/fetcher/Fetcher.d.ts +3 -0
- package/dist/core/fetcher/Fetcher.js +22 -153
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +48 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +7 -4
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -2
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -2
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +0 -1
- package/package.json +7 -2
- package/reference.md +7177 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -2
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -2
- package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
- package/serialization/resources/encounters/resources/v4/types/Encounter.js +0 -1
|
@@ -55,7 +55,7 @@ class Patients {
|
|
|
55
55
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.preEncounter.patients.v1.patients.create({
|
|
59
59
|
* name: {
|
|
60
60
|
* family: "string",
|
|
61
61
|
* given: ["string"],
|
|
@@ -186,12 +186,13 @@ class Patients {
|
|
|
186
186
|
Authorization: yield this._getAuthorizationHeader(),
|
|
187
187
|
"X-Fern-Language": "JavaScript",
|
|
188
188
|
"X-Fern-SDK-Name": "candidhealth",
|
|
189
|
-
"X-Fern-SDK-Version": "0.24.
|
|
189
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
190
190
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
191
191
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
192
192
|
},
|
|
193
193
|
contentType: "application/json",
|
|
194
|
-
|
|
194
|
+
requestType: "json",
|
|
195
|
+
body: serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
|
|
195
196
|
unrecognizedObjectKeys: "strip",
|
|
196
197
|
}),
|
|
197
198
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,7 +202,7 @@ class Patients {
|
|
|
201
202
|
if (_response.ok) {
|
|
202
203
|
return {
|
|
203
204
|
ok: true,
|
|
204
|
-
body:
|
|
205
|
+
body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
|
|
205
206
|
unrecognizedObjectKeys: "passthrough",
|
|
206
207
|
allowUnrecognizedUnionMembers: true,
|
|
207
208
|
allowUnrecognizedEnumValues: true,
|
|
@@ -214,7 +215,7 @@ class Patients {
|
|
|
214
215
|
case "VersionConflictError":
|
|
215
216
|
return {
|
|
216
217
|
ok: false,
|
|
217
|
-
error:
|
|
218
|
+
error: serializers.preEncounter.patients.v1.patients.create.Error.parseOrThrow(_response.error.body, {
|
|
218
219
|
unrecognizedObjectKeys: "passthrough",
|
|
219
220
|
allowUnrecognizedUnionMembers: true,
|
|
220
221
|
allowUnrecognizedEnumValues: true,
|
|
@@ -236,24 +237,25 @@ class Patients {
|
|
|
236
237
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
238
|
*
|
|
238
239
|
* @example
|
|
239
|
-
* await
|
|
240
|
+
* await client.preEncounter.patients.v1.patients.get(CandidApi.preEncounter.patients.v1.PatientId("string"))
|
|
240
241
|
*/
|
|
241
242
|
get(id, requestOptions) {
|
|
242
243
|
var _a, _b;
|
|
243
244
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
245
|
const _response = yield core.fetcher({
|
|
245
246
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
246
|
-
.preEncounter, `/patients/v1/${encodeURIComponent(
|
|
247
|
+
.preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}`),
|
|
247
248
|
method: "GET",
|
|
248
249
|
headers: {
|
|
249
250
|
Authorization: yield this._getAuthorizationHeader(),
|
|
250
251
|
"X-Fern-Language": "JavaScript",
|
|
251
252
|
"X-Fern-SDK-Name": "candidhealth",
|
|
252
|
-
"X-Fern-SDK-Version": "0.24.
|
|
253
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
253
254
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
254
255
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
255
256
|
},
|
|
256
257
|
contentType: "application/json",
|
|
258
|
+
requestType: "json",
|
|
257
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
258
260
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
259
261
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -261,7 +263,7 @@ class Patients {
|
|
|
261
263
|
if (_response.ok) {
|
|
262
264
|
return {
|
|
263
265
|
ok: true,
|
|
264
|
-
body:
|
|
266
|
+
body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
|
|
265
267
|
unrecognizedObjectKeys: "passthrough",
|
|
266
268
|
allowUnrecognizedUnionMembers: true,
|
|
267
269
|
allowUnrecognizedEnumValues: true,
|
|
@@ -274,7 +276,7 @@ class Patients {
|
|
|
274
276
|
case "NotFoundError":
|
|
275
277
|
return {
|
|
276
278
|
ok: false,
|
|
277
|
-
error:
|
|
279
|
+
error: serializers.preEncounter.patients.v1.patients.get.Error.parseOrThrow(_response.error.body, {
|
|
278
280
|
unrecognizedObjectKeys: "passthrough",
|
|
279
281
|
allowUnrecognizedUnionMembers: true,
|
|
280
282
|
allowUnrecognizedEnumValues: true,
|
|
@@ -296,24 +298,25 @@ class Patients {
|
|
|
296
298
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
299
|
*
|
|
298
300
|
* @example
|
|
299
|
-
* await
|
|
301
|
+
* await client.preEncounter.patients.v1.patients.getHistory(CandidApi.preEncounter.patients.v1.PatientId("string"))
|
|
300
302
|
*/
|
|
301
303
|
getHistory(id, requestOptions) {
|
|
302
304
|
var _a, _b;
|
|
303
305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
304
306
|
const _response = yield core.fetcher({
|
|
305
307
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
306
|
-
.preEncounter, `/patients/v1/${encodeURIComponent(
|
|
308
|
+
.preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/history`),
|
|
307
309
|
method: "GET",
|
|
308
310
|
headers: {
|
|
309
311
|
Authorization: yield this._getAuthorizationHeader(),
|
|
310
312
|
"X-Fern-Language": "JavaScript",
|
|
311
313
|
"X-Fern-SDK-Name": "candidhealth",
|
|
312
|
-
"X-Fern-SDK-Version": "0.24.
|
|
314
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
313
315
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
314
316
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
315
317
|
},
|
|
316
318
|
contentType: "application/json",
|
|
319
|
+
requestType: "json",
|
|
317
320
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
318
321
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
319
322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -321,7 +324,7 @@ class Patients {
|
|
|
321
324
|
if (_response.ok) {
|
|
322
325
|
return {
|
|
323
326
|
ok: true,
|
|
324
|
-
body:
|
|
327
|
+
body: serializers.preEncounter.patients.v1.patients.getHistory.Response.parseOrThrow(_response.body, {
|
|
325
328
|
unrecognizedObjectKeys: "passthrough",
|
|
326
329
|
allowUnrecognizedUnionMembers: true,
|
|
327
330
|
allowUnrecognizedEnumValues: true,
|
|
@@ -334,7 +337,7 @@ class Patients {
|
|
|
334
337
|
case "NotFoundError":
|
|
335
338
|
return {
|
|
336
339
|
ok: false,
|
|
337
|
-
error:
|
|
340
|
+
error: serializers.preEncounter.patients.v1.patients.getHistory.Error.parseOrThrow(_response.error.body, {
|
|
338
341
|
unrecognizedObjectKeys: "passthrough",
|
|
339
342
|
allowUnrecognizedUnionMembers: true,
|
|
340
343
|
allowUnrecognizedEnumValues: true,
|
|
@@ -358,7 +361,7 @@ class Patients {
|
|
|
358
361
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
359
362
|
*
|
|
360
363
|
* @example
|
|
361
|
-
* await
|
|
364
|
+
* await client.preEncounter.patients.v1.patients.update(CandidApi.preEncounter.patients.v1.PatientId("string"), 1, {
|
|
362
365
|
* name: {
|
|
363
366
|
* family: "string",
|
|
364
367
|
* given: ["string"],
|
|
@@ -483,18 +486,19 @@ class Patients {
|
|
|
483
486
|
return __awaiter(this, void 0, void 0, function* () {
|
|
484
487
|
const _response = yield core.fetcher({
|
|
485
488
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
486
|
-
.preEncounter, `/patients/v1/${encodeURIComponent(
|
|
489
|
+
.preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
|
|
487
490
|
method: "PUT",
|
|
488
491
|
headers: {
|
|
489
492
|
Authorization: yield this._getAuthorizationHeader(),
|
|
490
493
|
"X-Fern-Language": "JavaScript",
|
|
491
494
|
"X-Fern-SDK-Name": "candidhealth",
|
|
492
|
-
"X-Fern-SDK-Version": "0.24.
|
|
495
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
493
496
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
494
497
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
495
498
|
},
|
|
496
499
|
contentType: "application/json",
|
|
497
|
-
|
|
500
|
+
requestType: "json",
|
|
501
|
+
body: serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
|
|
498
502
|
unrecognizedObjectKeys: "strip",
|
|
499
503
|
}),
|
|
500
504
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -504,7 +508,7 @@ class Patients {
|
|
|
504
508
|
if (_response.ok) {
|
|
505
509
|
return {
|
|
506
510
|
ok: true,
|
|
507
|
-
body:
|
|
511
|
+
body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
|
|
508
512
|
unrecognizedObjectKeys: "passthrough",
|
|
509
513
|
allowUnrecognizedUnionMembers: true,
|
|
510
514
|
allowUnrecognizedEnumValues: true,
|
|
@@ -518,7 +522,7 @@ class Patients {
|
|
|
518
522
|
case "VersionConflictError":
|
|
519
523
|
return {
|
|
520
524
|
ok: false,
|
|
521
|
-
error:
|
|
525
|
+
error: serializers.preEncounter.patients.v1.patients.update.Error.parseOrThrow(_response.error.body, {
|
|
522
526
|
unrecognizedObjectKeys: "passthrough",
|
|
523
527
|
allowUnrecognizedUnionMembers: true,
|
|
524
528
|
allowUnrecognizedEnumValues: true,
|
|
@@ -541,24 +545,25 @@ class Patients {
|
|
|
541
545
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
542
546
|
*
|
|
543
547
|
* @example
|
|
544
|
-
* await
|
|
548
|
+
* await client.preEncounter.patients.v1.patients.deactivate(CandidApi.preEncounter.patients.v1.PatientId("string"), 1)
|
|
545
549
|
*/
|
|
546
550
|
deactivate(id, version, requestOptions) {
|
|
547
551
|
var _a, _b;
|
|
548
552
|
return __awaiter(this, void 0, void 0, function* () {
|
|
549
553
|
const _response = yield core.fetcher({
|
|
550
554
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
551
|
-
.preEncounter, `/patients/v1/${encodeURIComponent(
|
|
555
|
+
.preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
|
|
552
556
|
method: "DELETE",
|
|
553
557
|
headers: {
|
|
554
558
|
Authorization: yield this._getAuthorizationHeader(),
|
|
555
559
|
"X-Fern-Language": "JavaScript",
|
|
556
560
|
"X-Fern-SDK-Name": "candidhealth",
|
|
557
|
-
"X-Fern-SDK-Version": "0.24.
|
|
561
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
558
562
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
559
563
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
560
564
|
},
|
|
561
565
|
contentType: "application/json",
|
|
566
|
+
requestType: "json",
|
|
562
567
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
563
568
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
564
569
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -575,7 +580,7 @@ class Patients {
|
|
|
575
580
|
case "VersionConflictError":
|
|
576
581
|
return {
|
|
577
582
|
ok: false,
|
|
578
|
-
error:
|
|
583
|
+
error: serializers.preEncounter.patients.v1.patients.deactivate.Error.parseOrThrow(_response.error.body, {
|
|
579
584
|
unrecognizedObjectKeys: "passthrough",
|
|
580
585
|
allowUnrecognizedUnionMembers: true,
|
|
581
586
|
allowUnrecognizedEnumValues: true,
|
|
@@ -597,7 +602,7 @@ class Patients {
|
|
|
597
602
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
598
603
|
*
|
|
599
604
|
* @example
|
|
600
|
-
* await
|
|
605
|
+
* await client.preEncounter.patients.v1.patients.search({
|
|
601
606
|
* nameContains: "string"
|
|
602
607
|
* })
|
|
603
608
|
*/
|
|
@@ -617,12 +622,13 @@ class Patients {
|
|
|
617
622
|
Authorization: yield this._getAuthorizationHeader(),
|
|
618
623
|
"X-Fern-Language": "JavaScript",
|
|
619
624
|
"X-Fern-SDK-Name": "candidhealth",
|
|
620
|
-
"X-Fern-SDK-Version": "0.24.
|
|
625
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
621
626
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
622
627
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
623
628
|
},
|
|
624
629
|
contentType: "application/json",
|
|
625
630
|
queryParameters: _queryParams,
|
|
631
|
+
requestType: "json",
|
|
626
632
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
627
633
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
628
634
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -630,7 +636,7 @@ class Patients {
|
|
|
630
636
|
if (_response.ok) {
|
|
631
637
|
return {
|
|
632
638
|
ok: true,
|
|
633
|
-
body:
|
|
639
|
+
body: serializers.preEncounter.patients.v1.patients.search.Response.parseOrThrow(_response.body, {
|
|
634
640
|
unrecognizedObjectKeys: "passthrough",
|
|
635
641
|
allowUnrecognizedUnionMembers: true,
|
|
636
642
|
allowUnrecognizedEnumValues: true,
|
|
@@ -651,7 +657,7 @@ class Patients {
|
|
|
651
657
|
* @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
|
|
652
658
|
*
|
|
653
659
|
* @example
|
|
654
|
-
* await
|
|
660
|
+
* await client.preEncounter.patients.v1.patients.scan({
|
|
655
661
|
* since: new Date("2024-01-15T09:30:00.000Z")
|
|
656
662
|
* })
|
|
657
663
|
*/
|
|
@@ -669,12 +675,13 @@ class Patients {
|
|
|
669
675
|
Authorization: yield this._getAuthorizationHeader(),
|
|
670
676
|
"X-Fern-Language": "JavaScript",
|
|
671
677
|
"X-Fern-SDK-Name": "candidhealth",
|
|
672
|
-
"X-Fern-SDK-Version": "0.24.
|
|
678
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
673
679
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
674
680
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
675
681
|
},
|
|
676
682
|
contentType: "application/json",
|
|
677
683
|
queryParameters: _queryParams,
|
|
684
|
+
requestType: "json",
|
|
678
685
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
679
686
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
680
687
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -682,7 +689,7 @@ class Patients {
|
|
|
682
689
|
if (_response.ok) {
|
|
683
690
|
return {
|
|
684
691
|
ok: true,
|
|
685
|
-
body:
|
|
692
|
+
body: serializers.preEncounter.patients.v1.patients.scan.Response.parseOrThrow(_response.body, {
|
|
686
693
|
unrecognizedObjectKeys: "passthrough",
|
|
687
694
|
allowUnrecognizedUnionMembers: true,
|
|
688
695
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace ServiceFacility {
|
|
|
10
10
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -24,7 +27,7 @@ export declare class ServiceFacility {
|
|
|
24
27
|
* @param {ServiceFacility.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
28
|
*
|
|
26
29
|
* @example
|
|
27
|
-
* await
|
|
30
|
+
* await client.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
28
31
|
* organizationName: "string",
|
|
29
32
|
* npi: "string",
|
|
30
33
|
* address: {
|
|
@@ -54,7 +54,7 @@ class ServiceFacility {
|
|
|
54
54
|
* @param {ServiceFacility.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await
|
|
57
|
+
* await client.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
58
58
|
* organizationName: "string",
|
|
59
59
|
* npi: "string",
|
|
60
60
|
* address: {
|
|
@@ -72,20 +72,19 @@ class ServiceFacility {
|
|
|
72
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
73
|
const _response = yield core.fetcher({
|
|
74
74
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
75
|
-
.candidApi, `/api/service_facility/v2/${encodeURIComponent(
|
|
75
|
+
.candidApi, `/api/service_facility/v2/${encodeURIComponent(serializers.ServiceFacilityId.jsonOrThrow(serviceFacilityId))}`),
|
|
76
76
|
method: "PATCH",
|
|
77
77
|
headers: {
|
|
78
78
|
Authorization: yield this._getAuthorizationHeader(),
|
|
79
79
|
"X-Fern-Language": "JavaScript",
|
|
80
80
|
"X-Fern-SDK-Name": "candidhealth",
|
|
81
|
-
"X-Fern-SDK-Version": "0.24.
|
|
81
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
84
|
},
|
|
85
85
|
contentType: "application/json",
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}),
|
|
86
|
+
requestType: "json",
|
|
87
|
+
body: serializers.EncounterServiceFacilityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
89
88
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
89
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -93,7 +92,7 @@ class ServiceFacility {
|
|
|
93
92
|
if (_response.ok) {
|
|
94
93
|
return {
|
|
95
94
|
ok: true,
|
|
96
|
-
body:
|
|
95
|
+
body: serializers.EncounterServiceFacility.parseOrThrow(_response.body, {
|
|
97
96
|
unrecognizedObjectKeys: "passthrough",
|
|
98
97
|
allowUnrecognizedUnionMembers: true,
|
|
99
98
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace Tasks {
|
|
|
10
10
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -10,8 +10,11 @@ export declare namespace V3 {
|
|
|
10
10
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -23,7 +26,7 @@ export declare class V3 {
|
|
|
23
26
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
27
|
*
|
|
25
28
|
* @example
|
|
26
|
-
* await
|
|
29
|
+
* await client.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
27
30
|
*/
|
|
28
31
|
getActions(taskId: CandidApi.TaskId, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.tasks.v3.TaskActions, CandidApi.tasks.v3.getActions.Error>>;
|
|
29
32
|
/**
|
|
@@ -31,7 +34,7 @@ export declare class V3 {
|
|
|
31
34
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
35
|
*
|
|
33
36
|
* @example
|
|
34
|
-
* await
|
|
37
|
+
* await client.tasks.v3.getMulti({
|
|
35
38
|
* limit: 1,
|
|
36
39
|
* pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
|
|
37
40
|
* status: CandidApi.tasks.TaskStatus.Finished,
|
|
@@ -53,7 +56,7 @@ export declare class V3 {
|
|
|
53
56
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
57
|
*
|
|
55
58
|
* @example
|
|
56
|
-
* await
|
|
59
|
+
* await client.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
57
60
|
*/
|
|
58
61
|
get(taskId: CandidApi.TaskId, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.tasks.v3.Task, CandidApi.tasks.v3.get.Error>>;
|
|
59
62
|
/**
|
|
@@ -61,7 +64,7 @@ export declare class V3 {
|
|
|
61
64
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
65
|
*
|
|
63
66
|
* @example
|
|
64
|
-
* await
|
|
67
|
+
* await client.tasks.v3.create({
|
|
65
68
|
* encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
66
69
|
* taskType: CandidApi.tasks.TaskType.CustomerDataRequest,
|
|
67
70
|
* description: "string",
|
|
@@ -78,7 +81,7 @@ export declare class V3 {
|
|
|
78
81
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
82
|
*
|
|
80
83
|
* @example
|
|
81
|
-
* await
|
|
84
|
+
* await client.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
82
85
|
* status: CandidApi.tasks.TaskStatus.Finished,
|
|
83
86
|
* assigneeUserId: CandidApi.UserId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
84
87
|
* blocksClaimSubmission: true
|
|
@@ -53,24 +53,25 @@ class V3 {
|
|
|
53
53
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
|
-
* await
|
|
56
|
+
* await client.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
57
57
|
*/
|
|
58
58
|
getActions(taskId, requestOptions) {
|
|
59
59
|
var _a;
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
61
|
const _response = yield core.fetcher({
|
|
62
62
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
63
|
-
.candidApi, `/api/tasks/v3/${encodeURIComponent(
|
|
63
|
+
.candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}/actions`),
|
|
64
64
|
method: "GET",
|
|
65
65
|
headers: {
|
|
66
66
|
Authorization: yield this._getAuthorizationHeader(),
|
|
67
67
|
"X-Fern-Language": "JavaScript",
|
|
68
68
|
"X-Fern-SDK-Name": "candidhealth",
|
|
69
|
-
"X-Fern-SDK-Version": "0.24.
|
|
69
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
70
70
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
71
71
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
72
72
|
},
|
|
73
73
|
contentType: "application/json",
|
|
74
|
+
requestType: "json",
|
|
74
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
76
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
76
77
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -78,7 +79,7 @@ class V3 {
|
|
|
78
79
|
if (_response.ok) {
|
|
79
80
|
return {
|
|
80
81
|
ok: true,
|
|
81
|
-
body:
|
|
82
|
+
body: serializers.tasks.v3.TaskActions.parseOrThrow(_response.body, {
|
|
82
83
|
unrecognizedObjectKeys: "passthrough",
|
|
83
84
|
allowUnrecognizedUnionMembers: true,
|
|
84
85
|
allowUnrecognizedEnumValues: true,
|
|
@@ -97,7 +98,7 @@ class V3 {
|
|
|
97
98
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
99
|
*
|
|
99
100
|
* @example
|
|
100
|
-
* await
|
|
101
|
+
* await client.tasks.v3.getMulti({
|
|
101
102
|
* limit: 1,
|
|
102
103
|
* pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
|
|
103
104
|
* status: CandidApi.tasks.TaskStatus.Finished,
|
|
@@ -165,12 +166,13 @@ class V3 {
|
|
|
165
166
|
Authorization: yield this._getAuthorizationHeader(),
|
|
166
167
|
"X-Fern-Language": "JavaScript",
|
|
167
168
|
"X-Fern-SDK-Name": "candidhealth",
|
|
168
|
-
"X-Fern-SDK-Version": "0.24.
|
|
169
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
169
170
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
170
171
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
171
172
|
},
|
|
172
173
|
contentType: "application/json",
|
|
173
174
|
queryParameters: _queryParams,
|
|
175
|
+
requestType: "json",
|
|
174
176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
175
177
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
176
178
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -178,7 +180,7 @@ class V3 {
|
|
|
178
180
|
if (_response.ok) {
|
|
179
181
|
return {
|
|
180
182
|
ok: true,
|
|
181
|
-
body:
|
|
183
|
+
body: serializers.tasks.v3.TaskPage.parseOrThrow(_response.body, {
|
|
182
184
|
unrecognizedObjectKeys: "passthrough",
|
|
183
185
|
allowUnrecognizedUnionMembers: true,
|
|
184
186
|
allowUnrecognizedEnumValues: true,
|
|
@@ -191,7 +193,7 @@ class V3 {
|
|
|
191
193
|
case "UnprocessableEntityError":
|
|
192
194
|
return {
|
|
193
195
|
ok: false,
|
|
194
|
-
error:
|
|
196
|
+
error: serializers.tasks.v3.getMulti.Error.parseOrThrow(_response.error.body, {
|
|
195
197
|
unrecognizedObjectKeys: "passthrough",
|
|
196
198
|
allowUnrecognizedUnionMembers: true,
|
|
197
199
|
allowUnrecognizedEnumValues: true,
|
|
@@ -211,24 +213,25 @@ class V3 {
|
|
|
211
213
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
212
214
|
*
|
|
213
215
|
* @example
|
|
214
|
-
* await
|
|
216
|
+
* await client.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
215
217
|
*/
|
|
216
218
|
get(taskId, requestOptions) {
|
|
217
219
|
var _a, _b;
|
|
218
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
221
|
const _response = yield core.fetcher({
|
|
220
222
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
221
|
-
.candidApi, `/api/tasks/v3/${encodeURIComponent(
|
|
223
|
+
.candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}`),
|
|
222
224
|
method: "GET",
|
|
223
225
|
headers: {
|
|
224
226
|
Authorization: yield this._getAuthorizationHeader(),
|
|
225
227
|
"X-Fern-Language": "JavaScript",
|
|
226
228
|
"X-Fern-SDK-Name": "candidhealth",
|
|
227
|
-
"X-Fern-SDK-Version": "0.24.
|
|
229
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
228
230
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
229
231
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
230
232
|
},
|
|
231
233
|
contentType: "application/json",
|
|
234
|
+
requestType: "json",
|
|
232
235
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
233
236
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
234
237
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -236,7 +239,7 @@ class V3 {
|
|
|
236
239
|
if (_response.ok) {
|
|
237
240
|
return {
|
|
238
241
|
ok: true,
|
|
239
|
-
body:
|
|
242
|
+
body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
|
|
240
243
|
unrecognizedObjectKeys: "passthrough",
|
|
241
244
|
allowUnrecognizedUnionMembers: true,
|
|
242
245
|
allowUnrecognizedEnumValues: true,
|
|
@@ -250,7 +253,7 @@ class V3 {
|
|
|
250
253
|
case "UnauthorizedError":
|
|
251
254
|
return {
|
|
252
255
|
ok: false,
|
|
253
|
-
error:
|
|
256
|
+
error: serializers.tasks.v3.get.Error.parseOrThrow(_response.error.body, {
|
|
254
257
|
unrecognizedObjectKeys: "passthrough",
|
|
255
258
|
allowUnrecognizedUnionMembers: true,
|
|
256
259
|
allowUnrecognizedEnumValues: true,
|
|
@@ -270,7 +273,7 @@ class V3 {
|
|
|
270
273
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
271
274
|
*
|
|
272
275
|
* @example
|
|
273
|
-
* await
|
|
276
|
+
* await client.tasks.v3.create({
|
|
274
277
|
* encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
275
278
|
* taskType: CandidApi.tasks.TaskType.CustomerDataRequest,
|
|
276
279
|
* description: "string",
|
|
@@ -291,12 +294,13 @@ class V3 {
|
|
|
291
294
|
Authorization: yield this._getAuthorizationHeader(),
|
|
292
295
|
"X-Fern-Language": "JavaScript",
|
|
293
296
|
"X-Fern-SDK-Name": "candidhealth",
|
|
294
|
-
"X-Fern-SDK-Version": "0.24.
|
|
297
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
295
298
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
296
299
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
297
300
|
},
|
|
298
301
|
contentType: "application/json",
|
|
299
|
-
|
|
302
|
+
requestType: "json",
|
|
303
|
+
body: serializers.tasks.v3.TaskCreateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
300
304
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
301
305
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
302
306
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -304,7 +308,7 @@ class V3 {
|
|
|
304
308
|
if (_response.ok) {
|
|
305
309
|
return {
|
|
306
310
|
ok: true,
|
|
307
|
-
body:
|
|
311
|
+
body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
|
|
308
312
|
unrecognizedObjectKeys: "passthrough",
|
|
309
313
|
allowUnrecognizedUnionMembers: true,
|
|
310
314
|
allowUnrecognizedEnumValues: true,
|
|
@@ -324,7 +328,7 @@ class V3 {
|
|
|
324
328
|
* @param {V3.RequestOptions} requestOptions - Request-specific configuration.
|
|
325
329
|
*
|
|
326
330
|
* @example
|
|
327
|
-
* await
|
|
331
|
+
* await client.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
328
332
|
* status: CandidApi.tasks.TaskStatus.Finished,
|
|
329
333
|
* assigneeUserId: CandidApi.UserId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
330
334
|
* blocksClaimSubmission: true
|
|
@@ -335,18 +339,19 @@ class V3 {
|
|
|
335
339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
340
|
const _response = yield core.fetcher({
|
|
337
341
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
338
|
-
.candidApi, `/api/tasks/v3/${encodeURIComponent(
|
|
342
|
+
.candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}`),
|
|
339
343
|
method: "PATCH",
|
|
340
344
|
headers: {
|
|
341
345
|
Authorization: yield this._getAuthorizationHeader(),
|
|
342
346
|
"X-Fern-Language": "JavaScript",
|
|
343
347
|
"X-Fern-SDK-Name": "candidhealth",
|
|
344
|
-
"X-Fern-SDK-Version": "0.24.
|
|
348
|
+
"X-Fern-SDK-Version": "0.24.2",
|
|
345
349
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
346
350
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
347
351
|
},
|
|
348
352
|
contentType: "application/json",
|
|
349
|
-
|
|
353
|
+
requestType: "json",
|
|
354
|
+
body: serializers.tasks.v3.TaskUpdateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
350
355
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
351
356
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
352
357
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -354,7 +359,7 @@ class V3 {
|
|
|
354
359
|
if (_response.ok) {
|
|
355
360
|
return {
|
|
356
361
|
ok: true,
|
|
357
|
-
body:
|
|
362
|
+
body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
|
|
358
363
|
unrecognizedObjectKeys: "passthrough",
|
|
359
364
|
allowUnrecognizedUnionMembers: true,
|
|
360
365
|
allowUnrecognizedEnumValues: true,
|
|
@@ -369,7 +374,7 @@ class V3 {
|
|
|
369
374
|
case "TaskUpdatedToDeprecatedStatusError":
|
|
370
375
|
return {
|
|
371
376
|
ok: false,
|
|
372
|
-
error:
|
|
377
|
+
error: serializers.tasks.v3.update.Error.parseOrThrow(_response.error.body, {
|
|
373
378
|
unrecognizedObjectKeys: "passthrough",
|
|
374
379
|
allowUnrecognizedUnionMembers: true,
|
|
375
380
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace WriteOffs {
|
|
|
10
10
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|