candidhealth 0.5.0 → 0.6.0

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 (99) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +21 -16
  3. package/api/resources/auth/resources/v2/client/Client.js +1 -1
  4. package/api/resources/billingNotes/client/Client.js +1 -1
  5. package/api/resources/commons/types/HttpServiceUnavailableErrorMessage.d.ts +6 -0
  6. package/api/resources/commons/types/HttpServiceUnavailableErrorMessage.js +5 -0
  7. package/api/resources/commons/types/index.d.ts +1 -0
  8. package/api/resources/commons/types/index.js +1 -0
  9. package/api/resources/eligibility/client/Client.d.ts +18 -0
  10. package/api/resources/eligibility/client/Client.js +18 -0
  11. package/api/resources/eligibility/client/index.d.ts +1 -0
  12. package/api/resources/eligibility/client/index.js +2 -0
  13. package/api/resources/eligibility/index.d.ts +2 -0
  14. package/api/resources/eligibility/index.js +18 -0
  15. package/api/resources/eligibility/resources/index.d.ts +1 -0
  16. package/api/resources/eligibility/resources/index.js +27 -0
  17. package/api/resources/eligibility/resources/v2/client/Client.d.ts +31 -0
  18. package/api/resources/eligibility/resources/v2/client/Client.js +103 -0
  19. package/api/resources/eligibility/resources/v2/client/index.d.ts +1 -0
  20. package/api/resources/eligibility/resources/v2/client/index.js +27 -0
  21. package/api/resources/eligibility/resources/v2/client/submitEligibilityCheck.d.ts +28 -0
  22. package/api/resources/eligibility/resources/v2/client/submitEligibilityCheck.js +58 -0
  23. package/api/resources/eligibility/resources/v2/index.d.ts +1 -0
  24. package/api/resources/eligibility/resources/v2/index.js +17 -0
  25. package/api/resources/encounters/resources/v4/client/Client.js +4 -4
  26. package/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
  27. package/api/resources/exports/resources/v3/client/Client.js +1 -1
  28. package/api/resources/guarantor/resources/v1/client/Client.js +3 -3
  29. package/api/resources/index.d.ts +1 -0
  30. package/api/resources/index.js +2 -1
  31. package/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  32. package/api/resources/payers/client/Client.js +2 -2
  33. package/api/resources/tasks/resources/v3/client/Client.js +1 -1
  34. package/dist/Client.d.ts +3 -0
  35. package/dist/Client.js +21 -16
  36. package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
  37. package/dist/api/resources/billingNotes/client/Client.js +1 -1
  38. package/dist/api/resources/commons/types/HttpServiceUnavailableErrorMessage.d.ts +6 -0
  39. package/dist/api/resources/commons/types/HttpServiceUnavailableErrorMessage.js +5 -0
  40. package/dist/api/resources/commons/types/index.d.ts +1 -0
  41. package/dist/api/resources/commons/types/index.js +1 -0
  42. package/dist/api/resources/eligibility/client/Client.d.ts +18 -0
  43. package/dist/api/resources/eligibility/client/Client.js +18 -0
  44. package/dist/api/resources/eligibility/client/index.d.ts +1 -0
  45. package/dist/api/resources/eligibility/client/index.js +2 -0
  46. package/dist/api/resources/eligibility/index.d.ts +2 -0
  47. package/dist/api/resources/eligibility/index.js +18 -0
  48. package/dist/api/resources/eligibility/resources/index.d.ts +1 -0
  49. package/dist/api/resources/eligibility/resources/index.js +27 -0
  50. package/dist/api/resources/eligibility/resources/v2/client/Client.d.ts +31 -0
  51. package/dist/api/resources/eligibility/resources/v2/client/Client.js +103 -0
  52. package/dist/api/resources/eligibility/resources/v2/client/index.d.ts +1 -0
  53. package/dist/api/resources/eligibility/resources/v2/client/index.js +27 -0
  54. package/dist/api/resources/eligibility/resources/v2/client/submitEligibilityCheck.d.ts +28 -0
  55. package/dist/api/resources/eligibility/resources/v2/client/submitEligibilityCheck.js +58 -0
  56. package/dist/api/resources/eligibility/resources/v2/index.d.ts +1 -0
  57. package/dist/api/resources/eligibility/resources/v2/index.js +17 -0
  58. package/dist/api/resources/encounters/resources/v4/client/Client.js +4 -4
  59. package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
  60. package/dist/api/resources/exports/resources/v3/client/Client.js +1 -1
  61. package/dist/api/resources/guarantor/resources/v1/client/Client.js +3 -3
  62. package/dist/api/resources/index.d.ts +1 -0
  63. package/dist/api/resources/index.js +2 -1
  64. package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  65. package/dist/api/resources/payers/client/Client.js +2 -2
  66. package/dist/api/resources/tasks/resources/v3/client/Client.js +1 -1
  67. package/dist/serialization/resources/commons/types/HttpServiceUnavailableErrorMessage.d.ts +12 -0
  68. package/dist/serialization/resources/commons/types/HttpServiceUnavailableErrorMessage.js +33 -0
  69. package/dist/serialization/resources/commons/types/index.d.ts +1 -0
  70. package/dist/serialization/resources/commons/types/index.js +1 -0
  71. package/dist/serialization/resources/eligibility/index.d.ts +1 -0
  72. package/dist/serialization/resources/eligibility/index.js +17 -0
  73. package/dist/serialization/resources/eligibility/resources/index.d.ts +1 -0
  74. package/dist/serialization/resources/eligibility/resources/index.js +27 -0
  75. package/dist/serialization/resources/eligibility/resources/v2/client/index.d.ts +1 -0
  76. package/dist/serialization/resources/eligibility/resources/v2/client/index.js +27 -0
  77. package/dist/serialization/resources/eligibility/resources/v2/client/submitEligibilityCheck.d.ts +14 -0
  78. package/dist/serialization/resources/eligibility/resources/v2/client/submitEligibilityCheck.js +46 -0
  79. package/dist/serialization/resources/eligibility/resources/v2/index.d.ts +1 -0
  80. package/dist/serialization/resources/eligibility/resources/v2/index.js +17 -0
  81. package/dist/serialization/resources/index.d.ts +1 -0
  82. package/dist/serialization/resources/index.js +2 -1
  83. package/package.json +1 -1
  84. package/serialization/resources/commons/types/HttpServiceUnavailableErrorMessage.d.ts +12 -0
  85. package/serialization/resources/commons/types/HttpServiceUnavailableErrorMessage.js +33 -0
  86. package/serialization/resources/commons/types/index.d.ts +1 -0
  87. package/serialization/resources/commons/types/index.js +1 -0
  88. package/serialization/resources/eligibility/index.d.ts +1 -0
  89. package/serialization/resources/eligibility/index.js +17 -0
  90. package/serialization/resources/eligibility/resources/index.d.ts +1 -0
  91. package/serialization/resources/eligibility/resources/index.js +27 -0
  92. package/serialization/resources/eligibility/resources/v2/client/index.d.ts +1 -0
  93. package/serialization/resources/eligibility/resources/v2/client/index.js +27 -0
  94. package/serialization/resources/eligibility/resources/v2/client/submitEligibilityCheck.d.ts +14 -0
  95. package/serialization/resources/eligibility/resources/v2/client/submitEligibilityCheck.js +46 -0
  96. package/serialization/resources/eligibility/resources/v2/index.d.ts +1 -0
  97. package/serialization/resources/eligibility/resources/v2/index.js +17 -0
  98. package/serialization/resources/index.d.ts +1 -0
  99. package/serialization/resources/index.js +2 -1
package/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { Auth } from "./api/resources/auth/client/Client";
7
+ import { Eligibility } from "./api/resources/eligibility/client/Client";
7
8
  import { Encounters } from "./api/resources/encounters/client/Client";
8
9
  import { ExpectedNetworkStatus } from "./api/resources/expectedNetworkStatus/client/Client";
9
10
  import { Exports } from "./api/resources/exports/client/Client";
@@ -23,6 +24,8 @@ export declare class CandidApiClient {
23
24
  constructor(options: CandidApiClient.Options);
24
25
  protected _auth: Auth | undefined;
25
26
  get auth(): Auth;
27
+ protected _eligibility: Eligibility | undefined;
28
+ get eligibility(): Eligibility;
26
29
  protected _encounters: Encounters | undefined;
27
30
  get encounters(): Encounters;
28
31
  protected _expectedNetworkStatus: ExpectedNetworkStatus | undefined;
package/Client.js CHANGED
@@ -5,14 +5,15 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CandidApiClient = void 0;
7
7
  const Client_1 = require("./api/resources/auth/client/Client");
8
- const Client_2 = require("./api/resources/encounters/client/Client");
9
- const Client_3 = require("./api/resources/expectedNetworkStatus/client/Client");
10
- const Client_4 = require("./api/resources/exports/client/Client");
11
- const Client_5 = require("./api/resources/guarantor/client/Client");
12
- const Client_6 = require("./api/resources/organizationProviders/client/Client");
13
- const Client_7 = require("./api/resources/tasks/client/Client");
14
- const Client_8 = require("./api/resources/billingNotes/client/Client");
15
- const Client_9 = require("./api/resources/payers/client/Client");
8
+ const Client_2 = require("./api/resources/eligibility/client/Client");
9
+ const Client_3 = require("./api/resources/encounters/client/Client");
10
+ const Client_4 = require("./api/resources/expectedNetworkStatus/client/Client");
11
+ const Client_5 = require("./api/resources/exports/client/Client");
12
+ const Client_6 = require("./api/resources/guarantor/client/Client");
13
+ const Client_7 = require("./api/resources/organizationProviders/client/Client");
14
+ const Client_8 = require("./api/resources/tasks/client/Client");
15
+ const Client_9 = require("./api/resources/billingNotes/client/Client");
16
+ const Client_10 = require("./api/resources/payers/client/Client");
16
17
  class CandidApiClient {
17
18
  options;
18
19
  constructor(options) {
@@ -22,37 +23,41 @@ class CandidApiClient {
22
23
  get auth() {
23
24
  return (this._auth ??= new Client_1.Auth(this.options));
24
25
  }
26
+ _eligibility;
27
+ get eligibility() {
28
+ return (this._eligibility ??= new Client_2.Eligibility(this.options));
29
+ }
25
30
  _encounters;
26
31
  get encounters() {
27
- return (this._encounters ??= new Client_2.Encounters(this.options));
32
+ return (this._encounters ??= new Client_3.Encounters(this.options));
28
33
  }
29
34
  _expectedNetworkStatus;
30
35
  get expectedNetworkStatus() {
31
- return (this._expectedNetworkStatus ??= new Client_3.ExpectedNetworkStatus(this.options));
36
+ return (this._expectedNetworkStatus ??= new Client_4.ExpectedNetworkStatus(this.options));
32
37
  }
33
38
  _exports;
34
39
  get exports() {
35
- return (this._exports ??= new Client_4.Exports(this.options));
40
+ return (this._exports ??= new Client_5.Exports(this.options));
36
41
  }
37
42
  _guarantor;
38
43
  get guarantor() {
39
- return (this._guarantor ??= new Client_5.Guarantor(this.options));
44
+ return (this._guarantor ??= new Client_6.Guarantor(this.options));
40
45
  }
41
46
  _organizationProviders;
42
47
  get organizationProviders() {
43
- return (this._organizationProviders ??= new Client_6.OrganizationProviders(this.options));
48
+ return (this._organizationProviders ??= new Client_7.OrganizationProviders(this.options));
44
49
  }
45
50
  _tasks;
46
51
  get tasks() {
47
- return (this._tasks ??= new Client_7.Tasks(this.options));
52
+ return (this._tasks ??= new Client_8.Tasks(this.options));
48
53
  }
49
54
  _billingNotes;
50
55
  get billingNotes() {
51
- return (this._billingNotes ??= new Client_8.BillingNotes(this.options));
56
+ return (this._billingNotes ??= new Client_9.BillingNotes(this.options));
52
57
  }
53
58
  _payers;
54
59
  get payers() {
55
- return (this._payers ??= new Client_9.Payers(this.options));
60
+ return (this._payers ??= new Client_10.Payers(this.options));
56
61
  }
57
62
  }
58
63
  exports.CandidApiClient = CandidApiClient;
@@ -48,7 +48,7 @@ class V2 {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.5.0",
51
+ "X-Fern-SDK-Version": "0.6.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.auth.v2.AuthGetTokenRequest.jsonOrThrow(request, {
@@ -48,7 +48,7 @@ class BillingNotes {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.5.0",
51
+ "X-Fern-SDK-Version": "0.6.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.StandaloneBillingNoteCreate.jsonOrThrow(request, {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface HttpServiceUnavailableErrorMessage {
5
+ message?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -28,6 +28,7 @@ export * from "./EmrPayerCrosswalk";
28
28
  export * from "./ErrorMessage";
29
29
  export * from "./EntityNotFoundErrorMessage";
30
30
  export * from "./UnauthorizedErrorMessage";
31
+ export * from "./HttpServiceUnavailableErrorMessage";
31
32
  export * from "./RequestValidationError";
32
33
  export * from "./PhoneNumber";
33
34
  export * from "./PhoneNumberType";
@@ -44,6 +44,7 @@ __exportStar(require("./EmrPayerCrosswalk"), exports);
44
44
  __exportStar(require("./ErrorMessage"), exports);
45
45
  __exportStar(require("./EntityNotFoundErrorMessage"), exports);
46
46
  __exportStar(require("./UnauthorizedErrorMessage"), exports);
47
+ __exportStar(require("./HttpServiceUnavailableErrorMessage"), exports);
47
48
  __exportStar(require("./RequestValidationError"), exports);
48
49
  __exportStar(require("./PhoneNumber"), exports);
49
50
  __exportStar(require("./PhoneNumberType"), exports);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import { V2 } from "../resources/v2/client/Client";
7
+ export declare namespace Eligibility {
8
+ interface Options {
9
+ environment?: environments.CandidApiEnvironment | string;
10
+ token?: core.Supplier<core.BearerToken | undefined>;
11
+ }
12
+ }
13
+ export declare class Eligibility {
14
+ protected readonly options: Eligibility.Options;
15
+ constructor(options: Eligibility.Options);
16
+ protected _v2: V2 | undefined;
17
+ get v2(): V2;
18
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Eligibility = void 0;
7
+ const Client_1 = require("../resources/v2/client/Client");
8
+ class Eligibility {
9
+ options;
10
+ constructor(options) {
11
+ this.options = options;
12
+ }
13
+ _v2;
14
+ get v2() {
15
+ return (this._v2 ??= new Client_1.V2(this.options));
16
+ }
17
+ }
18
+ exports.Eligibility = Eligibility;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client";
2
+ export * from "./resources";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ __exportStar(require("./resources"), exports);
@@ -0,0 +1 @@
1
+ export * as v2 from "./v2";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.v2 = void 0;
27
+ exports.v2 = __importStar(require("./v2"));
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ import * as CandidApi from "../../../../..";
7
+ export declare namespace V2 {
8
+ interface Options {
9
+ environment?: environments.CandidApiEnvironment | string;
10
+ token?: core.Supplier<core.BearerToken | undefined>;
11
+ }
12
+ }
13
+ export declare class V2 {
14
+ protected readonly options: V2.Options;
15
+ constructor(options: V2.Options);
16
+ /**
17
+ * This API is a wrapper around Change Healthcare's eligibility API. Below are some helpful documentation links:
18
+ *
19
+ * - [Candid Health Support article](https://support.joincandidhealth.com/hc/en-us/articles/7937415468820)
20
+ * - [Change Healthcare - API Reference: Check Eligibility](https://developers.changehealthcare.com/eligibilityandclaims/reference/medicaleligibility)
21
+ * - [Change Healthcare - Guides: Eligibility FAQs](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-api-requests)
22
+ * - [Change Healthcare - Guides: Sandbox API Values and Test Responses](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-sandbox-api-values-and-test-responses)
23
+ * - [Change Healthcare - Guides: Sandbox Predefined Fields and Values](https://developers.changehealthcare.com/eligibilityandclaims/docs/sandbox-predefined-fields-and-values)
24
+ * - [Change Healthcare - Guides: Using Test Payers in the Sandbox](https://developers.changehealthcare.com/eligibilityandclaims/docs/use-the-test-payers-in-the-sandbox-api)
25
+ *
26
+ * A schema of the response object can be found here: [Change Healthcare Docs](https://developers.changehealthcare.com/eligibilityandclaims/reference/medicaleligibility)
27
+ *
28
+ */
29
+ submitEligibilityCheck(request?: unknown): Promise<core.APIResponse<unknown, CandidApi.eligibility.v2.submitEligibilityCheck.Error>>;
30
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
31
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.V2 = void 0;
33
+ const environments = __importStar(require("../../../../../../environments"));
34
+ const core = __importStar(require("../../../../../../core"));
35
+ const CandidApi = __importStar(require("../../../../.."));
36
+ const url_join_1 = __importDefault(require("url-join"));
37
+ const serializers = __importStar(require("../../../../../../serialization"));
38
+ class V2 {
39
+ options;
40
+ constructor(options) {
41
+ this.options = options;
42
+ }
43
+ /**
44
+ * This API is a wrapper around Change Healthcare's eligibility API. Below are some helpful documentation links:
45
+ *
46
+ * - [Candid Health Support article](https://support.joincandidhealth.com/hc/en-us/articles/7937415468820)
47
+ * - [Change Healthcare - API Reference: Check Eligibility](https://developers.changehealthcare.com/eligibilityandclaims/reference/medicaleligibility)
48
+ * - [Change Healthcare - Guides: Eligibility FAQs](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-api-requests)
49
+ * - [Change Healthcare - Guides: Sandbox API Values and Test Responses](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-sandbox-api-values-and-test-responses)
50
+ * - [Change Healthcare - Guides: Sandbox Predefined Fields and Values](https://developers.changehealthcare.com/eligibilityandclaims/docs/sandbox-predefined-fields-and-values)
51
+ * - [Change Healthcare - Guides: Using Test Payers in the Sandbox](https://developers.changehealthcare.com/eligibilityandclaims/docs/use-the-test-payers-in-the-sandbox-api)
52
+ *
53
+ * A schema of the response object can be found here: [Change Healthcare Docs](https://developers.changehealthcare.com/eligibilityandclaims/reference/medicaleligibility)
54
+ *
55
+ */
56
+ async submitEligibilityCheck(request) {
57
+ const _response = await core.fetcher({
58
+ url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, "/api/eligibility/v2"),
59
+ method: "POST",
60
+ headers: {
61
+ Authorization: await this._getAuthorizationHeader(),
62
+ "X-Fern-Language": "JavaScript",
63
+ "X-Fern-SDK-Name": "candidhealth",
64
+ "X-Fern-SDK-Version": "0.6.0",
65
+ },
66
+ contentType: "application/json",
67
+ body: request,
68
+ timeoutMs: 60000,
69
+ });
70
+ if (_response.ok) {
71
+ return {
72
+ ok: true,
73
+ body: _response.body,
74
+ };
75
+ }
76
+ if (_response.error.reason === "status-code") {
77
+ switch (_response.error.body?.errorName) {
78
+ case "HttpServiceUnavailableError":
79
+ return {
80
+ ok: false,
81
+ error: await serializers.eligibility.v2.submitEligibilityCheck.Error.parseOrThrow(_response.error.body, {
82
+ unrecognizedObjectKeys: "passthrough",
83
+ allowUnrecognizedUnionMembers: true,
84
+ allowUnrecognizedEnumValues: true,
85
+ breadcrumbsPrefix: ["response"],
86
+ }),
87
+ };
88
+ }
89
+ }
90
+ return {
91
+ ok: false,
92
+ error: CandidApi.eligibility.v2.submitEligibilityCheck.Error._unknown(_response.error),
93
+ };
94
+ }
95
+ async _getAuthorizationHeader() {
96
+ const bearer = await core.Supplier.get(this.options.token);
97
+ if (bearer != null) {
98
+ return `Bearer ${bearer}`;
99
+ }
100
+ return undefined;
101
+ }
102
+ }
103
+ exports.V2 = V2;
@@ -0,0 +1 @@
1
+ export * as submitEligibilityCheck from "./submitEligibilityCheck";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.submitEligibilityCheck = void 0;
27
+ exports.submitEligibilityCheck = __importStar(require("./submitEligibilityCheck"));
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../../../..";
5
+ import * as core from "../../../../../../core";
6
+ export declare type Error = CandidApi.eligibility.v2.submitEligibilityCheck.Error.HttpServiceUnavailableError | CandidApi.eligibility.v2.submitEligibilityCheck.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface HttpServiceUnavailableError extends _Utils {
9
+ errorName: "HttpServiceUnavailableError";
10
+ content: CandidApi.HttpServiceUnavailableErrorMessage;
11
+ }
12
+ interface _Unknown extends _Utils {
13
+ errorName: void;
14
+ content: core.Fetcher.Error;
15
+ }
16
+ interface _Utils {
17
+ _visit: <_Result>(visitor: CandidApi.eligibility.v2.submitEligibilityCheck.Error._Visitor<_Result>) => _Result;
18
+ }
19
+ interface _Visitor<_Result> {
20
+ httpServiceUnavailableError: (value: CandidApi.HttpServiceUnavailableErrorMessage) => _Result;
21
+ _other: (value: core.Fetcher.Error) => _Result;
22
+ }
23
+ }
24
+ export declare const Error: {
25
+ readonly httpServiceUnavailableError: (value: CandidApi.HttpServiceUnavailableErrorMessage) => CandidApi.eligibility.v2.submitEligibilityCheck.Error.HttpServiceUnavailableError;
26
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.eligibility.v2.submitEligibilityCheck.Error._Unknown;
27
+ readonly _visit: <_Result>(value: CandidApi.eligibility.v2.submitEligibilityCheck.Error, visitor: CandidApi.eligibility.v2.submitEligibilityCheck.Error._Visitor<_Result>) => _Result;
28
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Error = void 0;
30
+ const CandidApi = __importStar(require("../../../../.."));
31
+ exports.Error = {
32
+ httpServiceUnavailableError: (value) => {
33
+ return {
34
+ content: value,
35
+ errorName: "HttpServiceUnavailableError",
36
+ _visit: function (visitor) {
37
+ return CandidApi.eligibility.v2.submitEligibilityCheck.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
41
+ _unknown: (fetcherError) => {
42
+ return {
43
+ errorName: undefined,
44
+ content: fetcherError,
45
+ _visit: function (visitor) {
46
+ return CandidApi.eligibility.v2.submitEligibilityCheck.Error._visit(this, visitor);
47
+ },
48
+ };
49
+ },
50
+ _visit: (value, visitor) => {
51
+ switch (value.errorName) {
52
+ case "HttpServiceUnavailableError":
53
+ return visitor.httpServiceUnavailableError(value.content);
54
+ default:
55
+ return visitor._other(value);
56
+ }
57
+ },
58
+ };
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -103,7 +103,7 @@ class V4 {
103
103
  Authorization: await this._getAuthorizationHeader(),
104
104
  "X-Fern-Language": "JavaScript",
105
105
  "X-Fern-SDK-Name": "candidhealth",
106
- "X-Fern-SDK-Version": "0.5.0",
106
+ "X-Fern-SDK-Version": "0.6.0",
107
107
  },
108
108
  contentType: "application/json",
109
109
  queryParameters: _queryParams,
@@ -133,7 +133,7 @@ class V4 {
133
133
  Authorization: await this._getAuthorizationHeader(),
134
134
  "X-Fern-Language": "JavaScript",
135
135
  "X-Fern-SDK-Name": "candidhealth",
136
- "X-Fern-SDK-Version": "0.5.0",
136
+ "X-Fern-SDK-Version": "0.6.0",
137
137
  },
138
138
  contentType: "application/json",
139
139
  timeoutMs: 60000,
@@ -162,7 +162,7 @@ class V4 {
162
162
  Authorization: await this._getAuthorizationHeader(),
163
163
  "X-Fern-Language": "JavaScript",
164
164
  "X-Fern-SDK-Name": "candidhealth",
165
- "X-Fern-SDK-Version": "0.5.0",
165
+ "X-Fern-SDK-Version": "0.6.0",
166
166
  },
167
167
  contentType: "application/json",
168
168
  body: await serializers.encounters.v4.EncounterCreate.jsonOrThrow(request, {
@@ -212,7 +212,7 @@ class V4 {
212
212
  Authorization: await this._getAuthorizationHeader(),
213
213
  "X-Fern-Language": "JavaScript",
214
214
  "X-Fern-SDK-Name": "candidhealth",
215
- "X-Fern-SDK-Version": "0.5.0",
215
+ "X-Fern-SDK-Version": "0.6.0",
216
216
  },
217
217
  contentType: "application/json",
218
218
  body: await serializers.encounters.v4.EncounterUpdate.jsonOrThrow(request, {
@@ -48,7 +48,7 @@ class V1 {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.5.0",
51
+ "X-Fern-SDK-Version": "0.6.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.expectedNetworkStatus.v1.ExpectedNetworkStatusRequest.jsonOrThrow(request, {
@@ -53,7 +53,7 @@ class V3 {
53
53
  Authorization: await this._getAuthorizationHeader(),
54
54
  "X-Fern-Language": "JavaScript",
55
55
  "X-Fern-SDK-Name": "candidhealth",
56
- "X-Fern-SDK-Version": "0.5.0",
56
+ "X-Fern-SDK-Version": "0.6.0",
57
57
  },
58
58
  contentType: "application/json",
59
59
  queryParameters: _queryParams,
@@ -48,7 +48,7 @@ class V1 {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.5.0",
51
+ "X-Fern-SDK-Version": "0.6.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.guarantor.v1.GuarantorCreate.jsonOrThrow(request, {
@@ -94,7 +94,7 @@ class V1 {
94
94
  Authorization: await this._getAuthorizationHeader(),
95
95
  "X-Fern-Language": "JavaScript",
96
96
  "X-Fern-SDK-Name": "candidhealth",
97
- "X-Fern-SDK-Version": "0.5.0",
97
+ "X-Fern-SDK-Version": "0.6.0",
98
98
  },
99
99
  contentType: "application/json",
100
100
  timeoutMs: 60000,
@@ -123,7 +123,7 @@ class V1 {
123
123
  Authorization: await this._getAuthorizationHeader(),
124
124
  "X-Fern-Language": "JavaScript",
125
125
  "X-Fern-SDK-Name": "candidhealth",
126
- "X-Fern-SDK-Version": "0.5.0",
126
+ "X-Fern-SDK-Version": "0.6.0",
127
127
  },
128
128
  contentType: "application/json",
129
129
  body: await serializers.guarantor.v1.GuarantorUpdate.jsonOrThrow(request, {
@@ -34,5 +34,6 @@ export * as serviceFacility from "./serviceFacility";
34
34
  export * from "./serviceFacility/types";
35
35
  export * as tags from "./tags";
36
36
  export * from "./tags/types";
37
+ export * as eligibility from "./eligibility";
37
38
  export * from "./billingNotes/client/requests";
38
39
  export * from "./payers/client/requests";
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.tags = exports.serviceFacility = exports.payers = exports.invoices = exports.insuranceCard = exports.individual = exports.identifiers = exports.era = exports.diagnoses = exports.contracts = exports.commons = exports.claims = exports.billingNotes = exports.tasks = exports.serviceLines = exports.patientPayments = exports.organizationProviders = exports.guarantor = exports.exports = exports.expectedNetworkStatus = exports.encounters = exports.encounterProviders = exports.auth = void 0;
29
+ exports.eligibility = exports.tags = exports.serviceFacility = exports.payers = exports.invoices = exports.insuranceCard = exports.individual = exports.identifiers = exports.era = exports.diagnoses = exports.contracts = exports.commons = exports.claims = exports.billingNotes = exports.tasks = exports.serviceLines = exports.patientPayments = exports.organizationProviders = exports.guarantor = exports.exports = exports.expectedNetworkStatus = exports.encounters = exports.encounterProviders = exports.auth = void 0;
30
30
  exports.auth = __importStar(require("./auth"));
31
31
  exports.encounterProviders = __importStar(require("./encounterProviders"));
32
32
  exports.encounters = __importStar(require("./encounters"));
@@ -63,5 +63,6 @@ exports.serviceFacility = __importStar(require("./serviceFacility"));
63
63
  __exportStar(require("./serviceFacility/types"), exports);
64
64
  exports.tags = __importStar(require("./tags"));
65
65
  __exportStar(require("./tags/types"), exports);
66
+ exports.eligibility = __importStar(require("./eligibility"));
66
67
  __exportStar(require("./billingNotes/client/requests"), exports);
67
68
  __exportStar(require("./payers/client/requests"), exports);