@stedi/sdk 0.0.9 → 0.0.10

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 (105) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +82 -29
  3. package/dist-cjs/Stedi.js +35 -1
  4. package/dist-cjs/StediClient.js +1 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +8 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +8 -0
  7. package/dist-cjs/commandBuilder.js +4 -1
  8. package/dist-cjs/commands/CreateEventDestinationCommand.js +8 -0
  9. package/dist-cjs/commands/CreateProfessionalClaimSubmissionCommand.js +1 -1
  10. package/dist-cjs/commands/DeleteEventDestinationCommand.js +8 -0
  11. package/dist-cjs/commands/GetClaimCommand.js +8 -0
  12. package/dist-cjs/commands/GetClaimTimelineCommand.js +8 -0
  13. package/dist-cjs/commands/GetEventDestinationCommand.js +8 -0
  14. package/dist-cjs/commands/GetEventDestinationEventCommand.js +8 -0
  15. package/dist-cjs/commands/GetEventDestinationSecretCommand.js +8 -0
  16. package/dist-cjs/commands/GetProfessionalClaimSubmissionCommand.js +1 -1
  17. package/dist-cjs/commands/ListClaimsCommand.js +8 -0
  18. package/dist-cjs/commands/ListEventDestinationEventsCommand.js +8 -0
  19. package/dist-cjs/commands/ListEventDestinationsCommand.js +8 -0
  20. package/dist-cjs/commands/RotateEventDestinationSecretCommand.js +8 -0
  21. package/dist-cjs/commands/UpdateEventDestinationCommand.js +8 -0
  22. package/dist-cjs/commands/ValidateProfessionalClaimSubmissionCommand.js +1 -1
  23. package/dist-cjs/commands/index.js +12 -0
  24. package/dist-cjs/endpoint/bdd.js +8 -5
  25. package/dist-cjs/index.js +1 -0
  26. package/dist-cjs/models/enums.js +61 -1
  27. package/dist-cjs/models/errors.js +27 -34
  28. package/dist-cjs/pagination/GetClaimTimelinePaginator.js +7 -0
  29. package/dist-cjs/pagination/Interfaces.js +2 -0
  30. package/dist-cjs/pagination/ListClaimsPaginator.js +7 -0
  31. package/dist-cjs/pagination/ListEventDestinationEventsPaginator.js +7 -0
  32. package/dist-cjs/pagination/ListEventDestinationsPaginator.js +7 -0
  33. package/dist-cjs/pagination/index.js +8 -0
  34. package/dist-cjs/runtimeConfig.shared.js +5 -0
  35. package/dist-cjs/schemas/schemas_0.js +487 -127
  36. package/dist-es/Stedi.js +35 -1
  37. package/dist-es/StediClient.js +1 -0
  38. package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
  39. package/dist-es/auth/httpAuthSchemeProvider.js +8 -0
  40. package/dist-es/commandBuilder.js +3 -0
  41. package/dist-es/commands/CreateEventDestinationCommand.js +4 -0
  42. package/dist-es/commands/CreateProfessionalClaimSubmissionCommand.js +2 -2
  43. package/dist-es/commands/DeleteEventDestinationCommand.js +4 -0
  44. package/dist-es/commands/GetClaimCommand.js +4 -0
  45. package/dist-es/commands/GetClaimTimelineCommand.js +4 -0
  46. package/dist-es/commands/GetEventDestinationCommand.js +4 -0
  47. package/dist-es/commands/GetEventDestinationEventCommand.js +4 -0
  48. package/dist-es/commands/GetEventDestinationSecretCommand.js +4 -0
  49. package/dist-es/commands/GetProfessionalClaimSubmissionCommand.js +2 -2
  50. package/dist-es/commands/ListClaimsCommand.js +4 -0
  51. package/dist-es/commands/ListEventDestinationEventsCommand.js +4 -0
  52. package/dist-es/commands/ListEventDestinationsCommand.js +4 -0
  53. package/dist-es/commands/RotateEventDestinationSecretCommand.js +4 -0
  54. package/dist-es/commands/UpdateEventDestinationCommand.js +4 -0
  55. package/dist-es/commands/ValidateProfessionalClaimSubmissionCommand.js +2 -2
  56. package/dist-es/commands/index.js +12 -0
  57. package/dist-es/endpoint/bdd.js +8 -5
  58. package/dist-es/index.js +1 -0
  59. package/dist-es/models/enums.js +60 -0
  60. package/dist-es/models/errors.js +24 -31
  61. package/dist-es/pagination/GetClaimTimelinePaginator.js +4 -0
  62. package/dist-es/pagination/Interfaces.js +1 -0
  63. package/dist-es/pagination/ListClaimsPaginator.js +4 -0
  64. package/dist-es/pagination/ListEventDestinationEventsPaginator.js +4 -0
  65. package/dist-es/pagination/ListEventDestinationsPaginator.js +4 -0
  66. package/dist-es/pagination/index.js +5 -0
  67. package/dist-es/runtimeConfig.shared.js +6 -1
  68. package/dist-es/schemas/schemas_0.js +485 -126
  69. package/dist-types/Stedi.d.ts +116 -1
  70. package/dist-types/StediClient.d.ts +14 -2
  71. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +4 -1
  72. package/dist-types/auth/httpAuthSchemeProvider.d.ts +9 -1
  73. package/dist-types/commandBuilder.d.ts +4 -0
  74. package/dist-types/commands/CreateEventDestinationCommand.d.ts +146 -0
  75. package/dist-types/commands/CreateProfessionalClaimSubmissionCommand.d.ts +177 -152
  76. package/dist-types/commands/DeleteEventDestinationCommand.d.ts +105 -0
  77. package/dist-types/commands/GetClaimCommand.d.ts +139 -0
  78. package/dist-types/commands/GetClaimTimelineCommand.d.ts +218 -0
  79. package/dist-types/commands/GetEventDestinationCommand.d.ts +124 -0
  80. package/dist-types/commands/GetEventDestinationEventCommand.d.ts +141 -0
  81. package/dist-types/commands/GetEventDestinationSecretCommand.d.ts +105 -0
  82. package/dist-types/commands/GetProfessionalClaimSubmissionCommand.d.ts +349 -4
  83. package/dist-types/commands/ListClaimsCommand.d.ts +169 -0
  84. package/dist-types/commands/ListEventDestinationEventsCommand.d.ts +120 -0
  85. package/dist-types/commands/ListEventDestinationsCommand.d.ts +132 -0
  86. package/dist-types/commands/RotateEventDestinationSecretCommand.d.ts +113 -0
  87. package/dist-types/commands/UpdateEventDestinationCommand.d.ts +142 -0
  88. package/dist-types/commands/ValidateProfessionalClaimSubmissionCommand.d.ts +363 -9
  89. package/dist-types/commands/index.d.ts +12 -0
  90. package/dist-types/index.d.ts +1 -0
  91. package/dist-types/models/enums.d.ts +263 -1
  92. package/dist-types/models/errors.d.ts +25 -41
  93. package/dist-types/models/models_0.d.ts +1320 -43
  94. package/dist-types/pagination/GetClaimTimelinePaginator.d.ts +7 -0
  95. package/dist-types/pagination/Interfaces.d.ts +8 -0
  96. package/dist-types/pagination/ListClaimsPaginator.d.ts +7 -0
  97. package/dist-types/pagination/ListEventDestinationEventsPaginator.d.ts +7 -0
  98. package/dist-types/pagination/ListEventDestinationsPaginator.d.ts +7 -0
  99. package/dist-types/pagination/index.d.ts +5 -0
  100. package/dist-types/runtimeConfig.browser.d.ts +7 -2
  101. package/dist-types/runtimeConfig.d.ts +7 -2
  102. package/dist-types/runtimeConfig.native.d.ts +7 -2
  103. package/dist-types/runtimeConfig.shared.d.ts +7 -3
  104. package/dist-types/schemas/schemas_0.d.ts +54 -3
  105. package/package.json +4 -3
@@ -1,16 +1,11 @@
1
- import type { ProfessionalClaimSubmissionAttachmentReportTypeCode, ProfessionalClaimSubmissionAttachmentTransmissionCode, ProfessionalClaimSubmissionBenefitsAssignmentCertificationIndicator, ProfessionalClaimSubmissionClaimFilingIndicator, ProfessionalClaimSubmissionClaimFrequencyCode, ProfessionalClaimSubmissionDrugIdentificationUnitOfMeasure, ProfessionalClaimSubmissionEPSDTReferralConditionIndicator, ProfessionalClaimSubmissionGenderCode, ProfessionalClaimSubmissionInsuranceType, ProfessionalClaimSubmissionMedicareSecondaryInsuranceType, ProfessionalClaimSubmissionOtherInsuredRelationshipToInsured, ProfessionalClaimSubmissionPatientRelationshipToInsured, ProfessionalClaimSubmissionPaymentResponsibilityLevelCode, ProfessionalClaimSubmissionProviderAcceptsAssignment, ProfessionalClaimSubmissionProviderSignature, ProfessionalClaimSubmissionPurpose, ProfessionalClaimSubmissionReleaseOfInformationCode, ProfessionalClaimSubmissionResponsibilityLevel } from "./enums";
1
+ import type { ClaimAcknowledgmentStatus, ClaimPaymentInformationStatusCode, ClaimStatus, ClaimStatusReportedBy, ClaimType, EventDestinationsDestinationInputStatus, EventDestinationsDestinationStatus, EventDestinationsEventEnvironment, EventDestinationsEventPayloadObjectType, EventDestinationsEventStatus, ProfessionalClaimSubmissionAttachmentReportTypeCode, ProfessionalClaimSubmissionAttachmentTransmissionCode, ProfessionalClaimSubmissionBenefitsAssignmentCertificationIndicator, ProfessionalClaimSubmissionClaimFilingIndicator, ProfessionalClaimSubmissionClaimFrequencyCode, ProfessionalClaimSubmissionDrugIdentificationUnitOfMeasure, ProfessionalClaimSubmissionEPSDTReferralConditionIndicator, ProfessionalClaimSubmissionGenderCode, ProfessionalClaimSubmissionInsuranceType, ProfessionalClaimSubmissionMedicareSecondaryInsuranceType, ProfessionalClaimSubmissionOtherInsuredRelationshipToInsured, ProfessionalClaimSubmissionPatientRelationshipToInsured, ProfessionalClaimSubmissionPaymentResponsibilityLevelCode, ProfessionalClaimSubmissionProviderAcceptsAssignment, ProfessionalClaimSubmissionProviderSignature, ProfessionalClaimSubmissionPurchasedServiceProviderEntityType, ProfessionalClaimSubmissionPurpose, ProfessionalClaimSubmissionReleaseOfInformationCode, ProfessionalClaimSubmissionResponsibilityLevel } from "./enums";
2
2
  /**
3
- * A single failed claim edit.
3
+ * An error that caused Stedi to reject the claim.
4
4
  * @public
5
5
  */
6
- export interface ClaimEditError {
6
+ export interface ClaimRejectionError {
7
7
  /**
8
- * A code identifying the failed edit.
9
- * @public
10
- */
11
- code: string | undefined;
12
- /**
13
- * Human readable description of the failed edit.
8
+ * A human-readable explanation of the error.
14
9
  * @public
15
10
  */
16
11
  description: string | undefined;
@@ -140,7 +135,7 @@ export interface ProfessionalClaimSubmissionBillingProviderIdentifiers {
140
135
  */
141
136
  export interface ProfessionalClaimSubmissionPersonName {
142
137
  /**
143
- * The person's last name. Don't include a name suffix such as Jr. or III here; use the `suffix` property instead.
138
+ * The person's last name. Don't include a name suffix such as Jr. or III here. Use the `suffix` property instead.
144
139
  * @public
145
140
  */
146
141
  lastName: string | undefined;
@@ -226,7 +221,7 @@ export interface ProfessionalClaimSubmissionBillingProvider {
226
221
  */
227
222
  contact?: ProfessionalClaimSubmissionContact | undefined;
228
223
  /**
229
- * **[CMS-1500 Box 33a, 33b]** Identifiers for the billing provider.
224
+ * **[CMS-1500 Box 33a, 33b]** Identifiers for the billing provider. You must provide the billing provider's NPI. When the provider doesn't have an NPI, you can supply an alternative, such as `commercialNumber` or `locationNumber`.
230
225
  * @public
231
226
  */
232
227
  identifiers?: ProfessionalClaimSubmissionBillingProviderIdentifiers | undefined;
@@ -237,7 +232,7 @@ export interface ProfessionalClaimSubmissionBillingProvider {
237
232
  */
238
233
  export interface ProfessionalClaimSubmissionServiceFacilityIdentifiers {
239
234
  /**
240
- * **[CMS-1500 Box 32a]** The facility's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier). Only required when the facility's NPI differs from the billing provider's NPI.
235
+ * **[CMS-1500 Box 32a]** The facility's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier). Only required when the facility's NPI differs from the billing provider's NPI. Don't include when the service facility is the patient's home.
241
236
  * @public
242
237
  */
243
238
  npi?: string | undefined;
@@ -296,12 +291,12 @@ export declare namespace ProfessionalClaimSubmissionQualifiedOrganizationName {
296
291
  */
297
292
  export interface ProfessionalClaimSubmissionServiceFacility {
298
293
  /**
299
- * **[CMS-1500 Box 32]** The facility's organization name.
294
+ * **[CMS-1500 Box 32]** The facility's organization name. When services were rendered in the patient's home, we recommend setting this to Residence or something similar.
300
295
  * @public
301
296
  */
302
297
  name: ProfessionalClaimSubmissionQualifiedOrganizationName | undefined;
303
298
  /**
304
- * **[CMS-1500 Box 32]** The facility's physical address. This must be a street address, not a PO Box.
299
+ * **[CMS-1500 Box 32]** The facility's physical address. This must be a street address, not a PO Box. If the service was rendered in an area where there are no street addresses, enter a description of where the service was rendered. For example, 'crossroad of State Road 34 and 45' or 'Exit near Mile marker 265 on Interstate 80'.
305
300
  * @public
306
301
  */
307
302
  address: ProfessionalClaimSubmissionAddress | undefined;
@@ -377,12 +372,14 @@ export interface ProfessionalClaimSubmissionBilling {
377
372
  */
378
373
  totalCharge: string | undefined;
379
374
  /**
380
- * **[CMS-1500 Box 29]** The total amount the patient, or the patient's representative, has already paid toward services in this claim. This is the patient's payment only; do not include amounts paid by other payers.
375
+ * **[CMS-1500 Box 29]** The total amount the patient, or the patient's representative, has already paid toward services in this claim. This is the patient's payment only. Don't include amounts paid by other payers.
381
376
  * @public
382
377
  */
383
378
  amountPaid?: string | undefined;
384
379
  /**
385
- * **[CMS-1500 Box 32, 32a, 32b]** The facility where the patient received care, also called the service facility location. Include when services were rendered somewhere other than the billing provider's address.
380
+ * **[CMS-1500 Box 32, 32a, 32b]** The facility where the patient received care, also called the service facility location. This can be a healthcare facility like a surgical center or reference lab, or the patient's address when you rendered services in their home. Include when services were rendered somewhere other than the billing provider's address.
381
+ * - For telehealth services, the service facility location is the provider's address, even though the patient may have been in their home or elsewhere when receiving services.
382
+ * - When the billing provider is a physician group located at the same address as a hospital but is a separate entity, you can differentiate the service facility location by including the specific suite or building number of the physician group.
386
383
  * @public
387
384
  */
388
385
  serviceFacility?: ProfessionalClaimSubmissionServiceFacility | undefined;
@@ -393,7 +390,7 @@ export interface ProfessionalClaimSubmissionBilling {
393
390
  billingProvider: ProfessionalClaimSubmissionBillingProvider | undefined;
394
391
  }
395
392
  /**
396
- * A piece of supporting documentation attached to the claim, such as medical records or an operative note. Include only when required by the payer.
393
+ * A piece of supporting documentation attached to the claim, such as medical records or an operative note. Only include when the payer requires it. Visit [Submit claim attachments](https://www.stedi.com/docs/healthcare/submit-claim-attachments) for more information.
397
394
  * @public
398
395
  */
399
396
  export interface ProfessionalClaimSubmissionAttachment {
@@ -403,17 +400,22 @@ export interface ProfessionalClaimSubmissionAttachment {
403
400
  */
404
401
  reportTypeCode: ProfessionalClaimSubmissionAttachmentReportTypeCode | undefined;
405
402
  /**
406
- * How the attachment is transmitted to the payer.
403
+ * How you're sending the attachment to the payer.
407
404
  * @public
408
405
  */
409
406
  transmissionCode: ProfessionalClaimSubmissionAttachmentTransmissionCode | undefined;
410
407
  /**
411
- * A control number that identifies the attachment and links it to the claim.
408
+ * A control number assigned to the attachment. The payer uses this identifier to match the attachment to the claim.
409
+ * - You must include either this property or `attachmentId` in the request, but not both. Including both properties will result in an error.
410
+ * - We recommend using a ULID or UUID of up to 50 characters.
411
+ * - Stedi autogenerates a control number if you don't provide one.
412
412
  * @public
413
413
  */
414
414
  attachmentControlNumber?: string | undefined;
415
415
  /**
416
- * The Stedi attachment ID for a previously uploaded attachment.
416
+ * The unique identifier for an attachment file you previously uploaded to Stedi. This value is returned in the `attachmentId` property of the [Create Claim Attachment (275) JSON](https://www.stedi.com/docs/healthcare/api-reference/post-healthcare-submit-claim-attachment) response. Stedi uses it to generate and submit the 275 claim attachment transaction to the payer.
417
+ * - This property is required when you're submitting attachment files through Stedi.
418
+ * - You must include either this property or `attachmentControlNumber` in the request, but not both. Including both properties will result in an error.
417
419
  * @public
418
420
  */
419
421
  attachmentId?: string | undefined;
@@ -805,11 +807,17 @@ export interface ProfessionalClaimSubmissionEncounter {
805
807
  primaryPlaceOfService?: string | undefined;
806
808
  /**
807
809
  * **[CMS-1500 Box 21]** The principal diagnosis for the claim, which describes the main reason for the encounter. Must be an [ICD-10-CM code](https://www.cdc.gov/nchs/icd/icd-10-cm/index.html). Stedi combines this with `additionalDiagnosisCodes` and the diagnosis codes on the service lines to form the claim's diagnosis list, which can hold at most 12 codes.
810
+ * - Use valid, billable codes at the highest level of specificity available.
811
+ * - Don't submit the decimal point (e.g., submit `I639` not `I63.9`).
812
+ * - Don't submit header codes (codes with fewer than three characters, such as `E10` for Type 1 diabetes).
808
813
  * @public
809
814
  */
810
815
  primaryDiagnosisCode: string | undefined;
811
816
  /**
812
817
  * **[CMS-1500 Box 21]** Additional diagnoses for the claim beyond `primaryDiagnosisCode`, in order of importance. Use this for diagnoses that apply to the claim but are not tied to a specific service line; you don't need to repeat codes that already appear in a service line's `diagnosisCodes`. Stedi places these directly after the primary diagnosis in the claim's diagnosis list.
818
+ * - Use valid, billable codes at the highest level of specificity available.
819
+ * - Don't submit the decimal point (e.g., submit `I639` not `I63.9`).
820
+ * - Don't submit header codes (codes with fewer than three characters, such as `E10` for Type 1 diabetes).
813
821
  * @public
814
822
  */
815
823
  additionalDiagnosisCodes?: string[] | undefined;
@@ -819,12 +827,15 @@ export interface ProfessionalClaimSubmissionEncounter {
819
827
  */
820
828
  patientCondition?: ProfessionalClaimSubmissionPatientCondition | undefined;
821
829
  /**
822
- * **[CMS-1500 Box 10d]** Up to four National Uniform Claim Committee (NUCC) condition codes. A condition code is a two-character code that provides extra information about the patient's condition or the claim itself, such as whether the claim is part of disaster relief. For a list, see the [NUCC Condition Codes](https://www.nucc.org/index.php/code-sets-mainmenu-41/condition-codes-mainmenu-38).
830
+ * **[CMS-1500 Box 10d]** Up to four National Uniform Claim Committee (NUCC) condition codes. A condition code is a two-character code that provides extra information about the patient's condition or the claim itself, such as whether the claim is part of disaster relief. For a list, visit the [NUCC Condition Codes](https://www.nucc.org/index.php/code-sets-mainmenu-41/condition-codes-mainmenu-38).
823
831
  * @public
824
832
  */
825
833
  claimCodes?: string[] | undefined;
826
834
  /**
827
- * **[CMS-1500 Box 24h]** Early and Periodic Screening, Diagnosis, and Treatment (EPSDT) referral condition indicators for the claim. EPSDT is a Medicaid program that provides preventive health care services for children under age 21. Include when the claim bills an EPSDT screening service, with the referral outcome of the screening; use `NOT_USED` when the screening did not result in a referral. Mark services that resulted from a screening with `serviceLines[].isEpsdtRelated`.
835
+ * **[CMS-1500 Box 24h]** Early and Periodic Screening, Diagnosis, and Treatment (EPSDT) referral condition indicators for the claim. EPSDT is a Medicaid program that provides preventive health care services for children under age 21.
836
+ * - Include when the claim bills an EPSDT screening service, with the referral outcome of the screening.
837
+ * - Use `NOT_USED` when the screening did not result in a referral.
838
+ * - Mark services that resulted from a screening with `serviceLines[].isEpsdtRelated`.
828
839
  * @public
829
840
  */
830
841
  epsdtReferralCodes?: ProfessionalClaimSubmissionEPSDTReferralConditionIndicator[] | undefined;
@@ -859,7 +870,7 @@ export interface ProfessionalClaimSubmissionEncounter {
859
870
  */
860
871
  attachments?: ProfessionalClaimSubmissionAttachment[] | undefined;
861
872
  /**
862
- * **[CMS-1500 Box 22]** Whether this claim replaces or voids a previously submitted claim. Leave empty for original claims.
873
+ * **[CMS-1500 Box 22]** Whether this claim replaces or voids a previously submitted claim. Omit when you're submitting a new claim and when you're resubmitting a claim that was rejected before it entered the payer's processing system. You must also omit this property for every resubmission to Original Medicare because Original Medicare doesn't accept `REPLACEMENT_OF_PRIOR_CLAIM`.
863
874
  * @public
864
875
  */
865
876
  resubmission?: ProfessionalClaimSubmissionResubmission | undefined;
@@ -1115,7 +1126,9 @@ export interface ProfessionalClaimSubmissionPatient {
1115
1126
  */
1116
1127
  export interface ProfessionalClaimSubmissionPayer {
1117
1128
  /**
1118
- * **[CMS-1500 Carrier Block]** The Stedi payer ID for the payer being billed. Visit the [Payer Network](https://www.stedi.com/healthcare/network) for a complete list. You can send the primary payer ID, the Stedi payer ID, or any alias listed in the payer record.
1129
+ * **[CMS-1500 Carrier Block]** The Stedi payer ID for the payer being billed. Visit the [Payer Network](https://www.stedi.com/healthcare/network) for a complete list.
1130
+ * - You can send requests using the primary payer ID, the Stedi payer ID, or any alias listed in the payer record.
1131
+ * - You must include leading 0 characters. Payer IDs are alphanumeric strings and must be treated as complete strings, not integers. For example, use `00540` for SISCO, not `540`.
1119
1132
  * @public
1120
1133
  */
1121
1134
  id: string | undefined;
@@ -1280,6 +1293,49 @@ export interface ProfessionalClaimSubmissionProcedureCode {
1280
1293
  */
1281
1294
  modifiers?: string[] | undefined;
1282
1295
  }
1296
+ /**
1297
+ * Identifiers for a purchased service provider.
1298
+ * @public
1299
+ */
1300
+ export interface ProfessionalClaimSubmissionPurchasedServiceProviderIdentifiers {
1301
+ /**
1302
+ * **[CMS-1500 Box 32a]** The purchased service provider's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier), a unique 10-digit ID issued by the Centers for Medicare & Medicaid Services (CMS).
1303
+ * @public
1304
+ */
1305
+ npi: string | undefined;
1306
+ }
1307
+ /**
1308
+ * The outside provider the billing provider bought the service from.
1309
+ * @public
1310
+ */
1311
+ export interface ProfessionalClaimSubmissionPurchasedServiceProvider {
1312
+ /**
1313
+ * Whether the outside provider is a person or an organization.
1314
+ * @public
1315
+ */
1316
+ entityType: ProfessionalClaimSubmissionPurchasedServiceProviderEntityType | undefined;
1317
+ /**
1318
+ * Identifiers for the purchased service provider.
1319
+ * @public
1320
+ */
1321
+ identifiers: ProfessionalClaimSubmissionPurchasedServiceProviderIdentifiers | undefined;
1322
+ }
1323
+ /**
1324
+ * A service the billing provider bought from an outside provider and is billing to the payer.
1325
+ * @public
1326
+ */
1327
+ export interface ProfessionalClaimSubmissionPurchasedService {
1328
+ /**
1329
+ * **[CMS-1500 Box 20]** The price the billing provider paid the outside provider for this service.
1330
+ * @public
1331
+ */
1332
+ chargeAmount: string | undefined;
1333
+ /**
1334
+ * The outside provider the billing provider bought this service from.
1335
+ * @public
1336
+ */
1337
+ provider: ProfessionalClaimSubmissionPurchasedServiceProvider | undefined;
1338
+ }
1283
1339
  /**
1284
1340
  * Identifiers for the rendering provider.
1285
1341
  * @public
@@ -1333,12 +1389,12 @@ export interface ProfessionalClaimSubmissionRenderingProvider {
1333
1389
  */
1334
1390
  export interface ProfessionalClaimSubmissionServiceLine {
1335
1391
  /**
1336
- * **[CMS-1500 Box 24a]** The date or date range on which the service was provided.
1392
+ * **[CMS-1500 Box 24a]** The date or date range when the patient received the service.
1337
1393
  * @public
1338
1394
  */
1339
1395
  datesOfService: ProfessionalClaimSubmissionDateRange | undefined;
1340
1396
  /**
1341
- * **[CMS-1500 Box 24b]** The place of service code identifying where the service was rendered. Visit [Place of Service Codes](https://www.cms.gov/medicare/coding-billing/place-of-service-codes/code-sets) for a complete list.
1397
+ * **[CMS-1500 Box 24b]** The place of service code identifying where the patient received the service. Visit [Place of Service Codes](https://www.cms.gov/medicare/coding-billing/place-of-service-codes/code-sets) for a complete list.
1342
1398
  * @public
1343
1399
  */
1344
1400
  placeOfService?: string | undefined;
@@ -1354,6 +1410,9 @@ export interface ProfessionalClaimSubmissionServiceLine {
1354
1410
  procedureCode: ProfessionalClaimSubmissionProcedureCode | undefined;
1355
1411
  /**
1356
1412
  * **[CMS-1500 Box 24e]** Up to four diagnoses this service relates to. Must be [ICD-10-CM codes](https://www.cdc.gov/nchs/icd/icd-10-cm/index.html). List them in order of importance to the service, with the most relevant diagnosis first. Across `encounter.primaryDiagnosisCode` and the codes on every service line, a claim can use at most 12 distinct diagnosis codes.
1413
+ * - You must submit a valid, billable code at the highest level of specificity. Include the 4th - 7th characters as applicable.
1414
+ * - Don't submit the decimal point for ICD codes. The decimal point is implied.
1415
+ * - Don't submit ICD-10 header codes. Header codes exist to group related codes and aren't valid for billing. These header codes can change with each new version of ICD-10, so we recommend reviewing your diagnosis codes every year to ensure that they aren't classified as header codes in the most recent version. To determine whether a code is a header code, you can also search the Value Set Authority Center. If the 'Header' property is set, the code is a header code and you shouldn't use it in claim submissions.
1357
1416
  * @public
1358
1417
  */
1359
1418
  diagnosisCodes: string[] | undefined;
@@ -1368,7 +1427,7 @@ export interface ProfessionalClaimSubmissionServiceLine {
1368
1427
  */
1369
1428
  units: string | undefined;
1370
1429
  /**
1371
- * **[CMS-1500 Box 24h]** Whether the service is related to an Early and Periodic Screening, Diagnosis, and Treatment (EPSDT) encounter. Set this on services that resulted from an EPSDT screening, not on the screening service itself; report the screening's referral outcome in `encounter.epsdtReferralCodes`.
1430
+ * **[CMS-1500 Box 24h]** Whether the service is related to an Early and Periodic Screening, Diagnosis, and Treatment (EPSDT) encounter. Set this on services that resulted from an EPSDT screening, not on the screening service itself. Report the screening's referral outcome in `encounter.epsdtReferralCodes`.
1372
1431
  * @public
1373
1432
  */
1374
1433
  isEpsdtRelated?: boolean | undefined;
@@ -1388,7 +1447,12 @@ export interface ProfessionalClaimSubmissionServiceLine {
1388
1447
  */
1389
1448
  orderingProvider?: ProfessionalClaimSubmissionOrderingProvider | undefined;
1390
1449
  /**
1391
- * A control number you assign to this service line for your own tracking. Each must be unique within the claim.
1450
+ * **[CMS-1500 Box 20]** The purchase of this service from a provider outside the billing provider's practice, such as an independent laboratory. Only include when the billing provider bought the service and is billing the payer for it.
1451
+ * @public
1452
+ */
1453
+ purchasedService?: ProfessionalClaimSubmissionPurchasedService | undefined;
1454
+ /**
1455
+ * A control number you assign to this service line for your own tracking. Each must be unique within the claim. If you don't set it, Stedi sets it for you – a random ULID.
1392
1456
  * @public
1393
1457
  */
1394
1458
  lineItemControlNumber?: string | undefined;
@@ -1403,7 +1467,7 @@ export interface ProfessionalClaimSubmissionServiceLine {
1403
1467
  */
1404
1468
  narrativeForUnspecifiedCode?: string | undefined;
1405
1469
  /**
1406
- * **[CMS-1500 Box 24]** Supporting documentation attached to this service line. Include only when required by the payer.
1470
+ * **[CMS-1500 Box 24]** Supporting documentation attached to this service line. Only include when the payer requires it. Visit [Submit claim attachments](https://www.stedi.com/docs/healthcare/submit-claim-attachments) for more information.
1407
1471
  * @public
1408
1472
  */
1409
1473
  attachments?: ProfessionalClaimSubmissionAttachment[] | undefined;
@@ -1480,17 +1544,17 @@ export interface CreateProfessionalClaimSubmissionInput {
1480
1544
  */
1481
1545
  billing: ProfessionalClaimSubmissionBilling | undefined;
1482
1546
  /**
1483
- * **[CMS-1500 Box 17, 17a, 17b, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1547
+ * **[CMS-1500 Box 17, 17a, 17b, 20, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1484
1548
  * @public
1485
1549
  */
1486
1550
  serviceLines: ProfessionalClaimSubmissionServiceLine[] | undefined;
1487
1551
  /**
1488
- * **[CMS-1500 Box 9, 9a, 9d]** Coverage held by the patient under another insurance policy, used for coordination of benefits. Include this when the patient is covered by a payer other than the one being billed.
1552
+ * **[CMS-1500 Box 9, 9a, 9d]** Coverage the patient holds under another insurance policy, relevant to coordination of benefits. Include this when the patient has coverage from another payer in addition to the one you're billing.
1489
1553
  * @public
1490
1554
  */
1491
1555
  otherInsured?: ProfessionalClaimSubmissionOtherInsured[] | undefined;
1492
1556
  /**
1493
- * A unique key that makes the request idempotent. Keys are retained for 24 hours. Replaying a request with the same key and the same body within that window returns the original response byte-for-byte. Reusing a key with a different body, or while the original request is still in flight, returns a 409 ConflictException.
1557
+ * A unique string to identify this request to the server. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents you from sending duplicate claims due to network errors or other intermittent failures. If you reuse a key on a new request while Stedi is still processing the original, Stedi returns a `409 Conflict` error. [Learn more](https://www.stedi.com/docs/api-reference/index#idempotency-keys).
1494
1558
  * @public
1495
1559
  */
1496
1560
  idempotencyKey?: string | undefined;
@@ -1501,15 +1565,22 @@ export interface CreateProfessionalClaimSubmissionInput {
1501
1565
  */
1502
1566
  export interface CreateProfessionalClaimSubmissionOutput {
1503
1567
  /**
1504
- * A unique identifier for the claim within Stedi.
1568
+ * A unique identifier for the claim within Stedi. This ID stays the same throughout the claim's entire lifecycle. For example, the claim ID is the same for the initial submission and any resubmissions. This is how Stedi links a particular claim to responses, such as 277CA claim acknowledgments.
1505
1569
  * @public
1506
1570
  */
1507
1571
  claimId: string | undefined;
1508
1572
  /**
1509
- * A unique identifier for this submission of the claim within Stedi.
1573
+ * A unique identifier for a specific submission of a claim within Stedi. Stedi generates a submission ID for the initial submission and then a new submission ID for every resubmission of the same claim. This is different from the claim ID, which doesn't change throughout the claim's lifecycle.
1510
1574
  * @public
1511
1575
  */
1512
1576
  submissionId: string | undefined;
1577
+ /**
1578
+ * Failed claim edits that caused Stedi to reject the claim.
1579
+ * - When present, Stedi stored the claim and generated a 277CA claim acknowledgment for the rejection, but didn't send the claim to the payer. You must fix all errors before resubmitting.
1580
+ * - When absent, the claim data passed Stedi's edits and Stedi sent the claim to the payer.
1581
+ * @public
1582
+ */
1583
+ errors?: ClaimRejectionError[] | undefined;
1513
1584
  }
1514
1585
  /**
1515
1586
  * A single way in which the request failed validation.
@@ -1533,7 +1604,9 @@ export interface ValidationFailure {
1533
1604
  */
1534
1605
  export interface GetProfessionalClaimSubmissionInput {
1535
1606
  /**
1536
- * The claim submission ID.
1607
+ * A unique identifier for a specific submission of a claim within Stedi. Stedi generates a submission ID for the initial submission and then a new submission ID for every resubmission of the same claim. This is different from the claim ID, which doesn't change throughout the claim's lifecycle.
1608
+ *
1609
+ * You can retrieve this ID from the `submissionId` property in the [Professional Claims CMS-1500 JSON submission endpoint](/docs/healthcare/api-reference/post-healthcare-claims-cms-1500-json) response.
1537
1610
  * @public
1538
1611
  */
1539
1612
  id: string | undefined;
@@ -1584,28 +1657,28 @@ export interface ProfessionalClaimSubmissionData {
1584
1657
  */
1585
1658
  billing: ProfessionalClaimSubmissionBilling | undefined;
1586
1659
  /**
1587
- * **[CMS-1500 Box 17, 17a, 17b, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1660
+ * **[CMS-1500 Box 17, 17a, 17b, 20, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1588
1661
  * @public
1589
1662
  */
1590
1663
  serviceLines: ProfessionalClaimSubmissionServiceLine[] | undefined;
1591
1664
  /**
1592
- * **[CMS-1500 Box 9, 9a, 9d]** Coverage held by the patient under another insurance policy, used for coordination of benefits. Include this when the patient is covered by a payer other than the one being billed.
1665
+ * **[CMS-1500 Box 9, 9a, 9d]** Coverage the patient holds under another insurance policy, relevant to coordination of benefits. Include this when the patient has coverage from another payer in addition to the one you're billing.
1593
1666
  * @public
1594
1667
  */
1595
1668
  otherInsured?: ProfessionalClaimSubmissionOtherInsured[] | undefined;
1596
1669
  }
1597
1670
  /**
1598
- * A professional claim submission.
1671
+ * The claim submission in the Stedi professional claim JSON format.
1599
1672
  * @public
1600
1673
  */
1601
1674
  export interface GetProfessionalClaimSubmissionOutput {
1602
1675
  /**
1603
- * A unique identifier for the claim within Stedi.
1676
+ * A unique identifier for the claim within Stedi. This ID stays the same throughout the claim's entire lifecycle. For example, the claim ID is the same for the initial submission and any resubmissions. This is how Stedi links a particular claim to responses, such as 277CA claim acknowledgments.
1604
1677
  * @public
1605
1678
  */
1606
1679
  claimId: string | undefined;
1607
1680
  /**
1608
- * A unique identifier for this submission of the claim within Stedi.
1681
+ * A unique identifier for a specific submission of a claim within Stedi. Stedi generates a submission ID for the initial submission and then a new submission ID for every resubmission of the same claim. This is different from the claim ID, which doesn't change throughout the claim's lifecycle.
1609
1682
  * @public
1610
1683
  */
1611
1684
  submissionId: string | undefined;
@@ -1671,19 +1744,1223 @@ export interface ValidateProfessionalClaimSubmissionInput {
1671
1744
  */
1672
1745
  billing: ProfessionalClaimSubmissionBilling | undefined;
1673
1746
  /**
1674
- * **[CMS-1500 Box 17, 17a, 17b, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1747
+ * **[CMS-1500 Box 17, 17a, 17b, 20, 24a-24j]** The individual services, procedures, or supplies being billed. Each service line corresponds to one row in Box 24 of the CMS-1500 form.
1675
1748
  * @public
1676
1749
  */
1677
1750
  serviceLines: ProfessionalClaimSubmissionServiceLine[] | undefined;
1678
1751
  /**
1679
- * **[CMS-1500 Box 9, 9a, 9d]** Coverage held by the patient under another insurance policy, used for coordination of benefits. Include this when the patient is covered by a payer other than the one being billed.
1752
+ * **[CMS-1500 Box 9, 9a, 9d]** Coverage the patient holds under another insurance policy, relevant to coordination of benefits. Include this when the patient has coverage from another payer in addition to the one you're billing.
1680
1753
  * @public
1681
1754
  */
1682
1755
  otherInsured?: ProfessionalClaimSubmissionOtherInsured[] | undefined;
1683
1756
  }
1684
1757
  /**
1685
- * The response to a professional claim validation. A success response means the claim passed validation.
1758
+ * The response to a professional claim validation. A response with no errors means Stedi would accept the claim as-is.
1686
1759
  * @public
1687
1760
  */
1688
1761
  export interface ValidateProfessionalClaimSubmissionOutput {
1762
+ /**
1763
+ * Failed claim edits that would cause Stedi to reject the claim. Absent when the claim passes Stedi's pre-submission checks.
1764
+ * @public
1765
+ */
1766
+ errors?: ClaimRejectionError[] | undefined;
1767
+ }
1768
+ /**
1769
+ * A date range. `end` is inclusive. A single date of service carries only `start`.
1770
+ * @public
1771
+ */
1772
+ export interface ClaimDateRange {
1773
+ /**
1774
+ * The start date of the range, in `YYYY-MM-DD` format.
1775
+ * @public
1776
+ */
1777
+ start: string | undefined;
1778
+ /**
1779
+ * The end date of the range, inclusive, in `YYYY-MM-DD` format.
1780
+ * @public
1781
+ */
1782
+ end?: string | undefined;
1783
+ }
1784
+ /**
1785
+ * A summary of a 277CA claim acknowledgment from a clearinghouse or the payer.
1786
+ * @public
1787
+ */
1788
+ export interface ClaimAcknowledgmentSummary {
1789
+ /**
1790
+ * A unique identifier for the acknowledgment within Stedi.
1791
+ * @public
1792
+ */
1793
+ id: string | undefined;
1794
+ /**
1795
+ * The status the clearinghouse or payer reported for the claim in the 277CA.
1796
+ * - `REJECTED`: A clearinghouse or the payer rejected the claim. The payer won't adjudicate the claim until you correct and resubmit it.
1797
+ * - `ACCEPTED`: A clearinghouse or the payer accepted the claim. A clearinghouse acceptance means the claim passed its edits and the clearinghouse forwarded it to the payer. A payer acceptance means the payer will adjudicate the claim.
1798
+ * - `RECEIVED`: A clearinghouse or the payer received the claim but hasn't yet accepted or rejected it.
1799
+ * - `INVALID`: Stedi couldn't determine the status because the 277CA carries a status category code Stedi doesn't recognize.
1800
+ * @public
1801
+ */
1802
+ status: ClaimAcknowledgmentStatus | undefined;
1803
+ /**
1804
+ * The entity that reported the status in the 277CA.
1805
+ * - `PAYER`: The payer reported the status in the 277CA.
1806
+ * - `CLEARINGHOUSE`: A clearinghouse reported the status, either Stedi or an intermediary clearinghouse between Stedi and the payer.
1807
+ * @public
1808
+ */
1809
+ reportedBy: ClaimStatusReportedBy | undefined;
1810
+ /**
1811
+ * The name of the clearinghouse or payer that reported the status, as it appears in the 277CA.
1812
+ * @public
1813
+ */
1814
+ sourceName: string | undefined;
1815
+ /**
1816
+ * The time Stedi processed the acknowledgment.
1817
+ * @public
1818
+ */
1819
+ processedAt: Date | undefined;
1820
+ }
1821
+ /**
1822
+ * The name of the patient who received the services on the claim.
1823
+ * @public
1824
+ */
1825
+ export interface ClaimPatientName {
1826
+ /**
1827
+ * The patient's first name.
1828
+ * @public
1829
+ */
1830
+ firstName?: string | undefined;
1831
+ /**
1832
+ * The patient's middle name.
1833
+ * @public
1834
+ */
1835
+ middleName?: string | undefined;
1836
+ /**
1837
+ * The patient's last name.
1838
+ * @public
1839
+ */
1840
+ lastName?: string | undefined;
1841
+ /**
1842
+ * The patient's name suffix.
1843
+ * @public
1844
+ */
1845
+ suffix?: string | undefined;
1846
+ }
1847
+ /**
1848
+ * A summary of the claim payment information the payer reported for a claim in an 835 ERA. Each record corresponds to one CLP loop in the ERA.
1849
+ * @public
1850
+ */
1851
+ export interface ClaimPaymentInformationSummary {
1852
+ /**
1853
+ * A unique identifier for the claim payment information record within Stedi.
1854
+ * @public
1855
+ */
1856
+ id: string | undefined;
1857
+ /**
1858
+ * The status the payer assigned to the claim.
1859
+ * @public
1860
+ */
1861
+ statusCode: ClaimPaymentInformationStatusCode | undefined;
1862
+ /**
1863
+ * The total charge amount of the claim.
1864
+ * @public
1865
+ */
1866
+ totalClaimChargeAmount: string | undefined;
1867
+ /**
1868
+ * The amount the payer paid on the claim. This is the charge amount less all adjustments, and can be positive, zero, or negative.
1869
+ * @public
1870
+ */
1871
+ claimPaymentAmount: string | undefined;
1872
+ /**
1873
+ * The amount the patient owes, such as a deductible, copay, or coinsurance.
1874
+ * @public
1875
+ */
1876
+ patientResponsibilityAmount?: string | undefined;
1877
+ /**
1878
+ * The check number for check payments, or the EFT trace number for electronic payments. Use it to match this claim payment information to the funds the payer sent.
1879
+ * @public
1880
+ */
1881
+ checkOrEftTraceNumber?: string | undefined;
1882
+ /**
1883
+ * The time Stedi processed the 835 ERA that reported this claim payment information.
1884
+ * @public
1885
+ */
1886
+ processedAt: Date | undefined;
1887
+ }
1888
+ /**
1889
+ * A summary of a claim submission.
1890
+ * @public
1891
+ */
1892
+ export interface ClaimSubmissionSummary {
1893
+ /**
1894
+ * A unique identifier for a specific submission of a claim within Stedi. Stedi generates a submission ID for the initial submission and then a new submission ID for every resubmission of the same claim. This is different from the claim ID, which doesn't change throughout the claim's lifecycle.
1895
+ * @public
1896
+ */
1897
+ id: string | undefined;
1898
+ /**
1899
+ * The payer identifier in Stedi's system. This is the Stedi payer ID listed in the Stedi [Payer Network](https://www.stedi.com/healthcare/network).
1900
+ * @public
1901
+ */
1902
+ stediPayerId?: string | undefined;
1903
+ /**
1904
+ * The patient control number you assigned to the claim.
1905
+ * @public
1906
+ */
1907
+ patientControlNumber: string | undefined;
1908
+ /**
1909
+ * The name of the patient who received the services on the claim.
1910
+ * @public
1911
+ */
1912
+ patientName?: ClaimPatientName | undefined;
1913
+ /**
1914
+ * The total charge amount of the submitted claim.
1915
+ * @public
1916
+ */
1917
+ totalClaimChargeAmount: string | undefined;
1918
+ /**
1919
+ * The dates of service from the claim. A single date of service carries only `start`. Absent when the submitted dates aren't valid calendar dates.
1920
+ * @public
1921
+ */
1922
+ datesOfService?: ClaimDateRange | undefined;
1923
+ /**
1924
+ * The time Stedi processed the submission.
1925
+ * @public
1926
+ */
1927
+ processedAt: Date | undefined;
1928
+ }
1929
+ /**
1930
+ * The top-level fields of a claim.
1931
+ * @public
1932
+ */
1933
+ export interface ClaimSummary {
1934
+ /**
1935
+ * A unique identifier for the claim within Stedi. This ID stays the same throughout the claim's entire lifecycle. For example, the claim ID is the same for the initial submission and any resubmissions.
1936
+ * @public
1937
+ */
1938
+ id: string | undefined;
1939
+ /**
1940
+ * The payer identifier in Stedi's system. This is the Stedi payer ID listed in the Stedi [Payer Network](https://www.stedi.com/healthcare/network).
1941
+ * @public
1942
+ */
1943
+ stediPayerId?: string | undefined;
1944
+ /**
1945
+ * The patient control number you assigned to the claim.
1946
+ * @public
1947
+ */
1948
+ patientControlNumber: string | undefined;
1949
+ /**
1950
+ * The name of the patient who received the services on the claim.
1951
+ * @public
1952
+ */
1953
+ patientName?: ClaimPatientName | undefined;
1954
+ /**
1955
+ * The claim's current processing status.
1956
+ * - `SUBMITTED`: You submitted the claim to Stedi but haven't yet received a 277CA response from Stedi or the payer.
1957
+ * - `REJECTED`: Either Stedi or the payer rejected the claim before the start of adjudication. This can happen even when the payer has acknowledged receipt.
1958
+ * - `ACCEPTED`: The payer has accepted the claim into their adjudication system and it's currently being processed or adjudicated.
1959
+ * - `RECEIVED`: The clearinghouse or payer has acknowledged receipt of the claim. This doesn't mean the claim has been accepted for adjudication.
1960
+ * - `PROCESSED`: The payer has adjudicated the claim. Check `totalClaimPaidAmount` to see how much was paid.
1961
+ * - `DENIED`: The payer has denied the claim.
1962
+ * - `UNKNOWN`: Stedi can't determine a single status for this claim, usually because the payer's responses are mixed or incomplete.
1963
+ * @public
1964
+ */
1965
+ status: ClaimStatus | undefined;
1966
+ /**
1967
+ * The entity that reported the claim's current status.
1968
+ * - `PAYER`: The payer reported the status, in a 277CA claim acknowledgment or an 835 ERA.
1969
+ * - `CLEARINGHOUSE`: A clearinghouse reported the status, either Stedi or an intermediary clearinghouse between Stedi and the payer.
1970
+ * @public
1971
+ */
1972
+ statusReportedBy: ClaimStatusReportedBy | undefined;
1973
+ /**
1974
+ * The type of claim. Each type corresponds to a different 837 transaction set.
1975
+ * - `PROFESSIONAL`: An 837P professional claim, the electronic equivalent of the CMS-1500 form.
1976
+ * - `INSTITUTIONAL`: An 837I institutional claim, the electronic equivalent of the UB-04 form.
1977
+ * - `DENTAL`: An 837D dental claim, the electronic equivalent of the ADA Dental Claim Form.
1978
+ * @public
1979
+ */
1980
+ type: ClaimType | undefined;
1981
+ /**
1982
+ * The total charge amount of the claim's most recent submission.
1983
+ * @public
1984
+ */
1985
+ totalClaimChargeAmount: string | undefined;
1986
+ /**
1987
+ * The total amount payers have paid on this claim, summed across every claim payment information record linked to it. Excludes claim payment information with the `PREDETERMINATION_PRICING_ONLY` status, where the payer priced the claim without paying it. Reversals carry a negative amount, so they subtract from the total. Absent until Stedi receives an 835 ERA for the claim.
1988
+ * @public
1989
+ */
1990
+ totalClaimPaidAmount?: string | undefined;
1991
+ /**
1992
+ * The dates of service from the claim's most recent submission. A single date of service carries only `start`. Absent when the submitted dates aren't valid calendar dates.
1993
+ * @public
1994
+ */
1995
+ datesOfService?: ClaimDateRange | undefined;
1996
+ /**
1997
+ * The time Stedi processed the claim's most recent submission.
1998
+ * @public
1999
+ */
2000
+ submittedAt: Date | undefined;
2001
+ }
2002
+ /**
2003
+ * A timeline entry in a claim's history. Exactly one property is set, and its name identifies the type of entry.
2004
+ * @public
2005
+ */
2006
+ export type ClaimTimelineEvent = ClaimTimelineEvent.ClaimAcknowledgmentMember | ClaimTimelineEvent.ClaimPaymentInformationMember | ClaimTimelineEvent.DentalClaimSubmissionMember | ClaimTimelineEvent.InstitutionalClaimSubmissionMember | ClaimTimelineEvent.ProfessionalClaimSubmissionMember | ClaimTimelineEvent.$UnknownMember;
2007
+ /**
2008
+ * @public
2009
+ */
2010
+ export declare namespace ClaimTimelineEvent {
2011
+ /**
2012
+ * An 837P professional claim submission, either the initial submission or a resubmission.
2013
+ * @public
2014
+ */
2015
+ interface ProfessionalClaimSubmissionMember {
2016
+ professionalClaimSubmission: ClaimSubmissionSummary;
2017
+ dentalClaimSubmission?: never;
2018
+ institutionalClaimSubmission?: never;
2019
+ claimAcknowledgment?: never;
2020
+ claimPaymentInformation?: never;
2021
+ $unknown?: never;
2022
+ }
2023
+ /**
2024
+ * An 837D dental claim submission, either the initial submission or a resubmission.
2025
+ * @public
2026
+ */
2027
+ interface DentalClaimSubmissionMember {
2028
+ professionalClaimSubmission?: never;
2029
+ dentalClaimSubmission: ClaimSubmissionSummary;
2030
+ institutionalClaimSubmission?: never;
2031
+ claimAcknowledgment?: never;
2032
+ claimPaymentInformation?: never;
2033
+ $unknown?: never;
2034
+ }
2035
+ /**
2036
+ * An 837I institutional claim submission, either the initial submission or a resubmission.
2037
+ * @public
2038
+ */
2039
+ interface InstitutionalClaimSubmissionMember {
2040
+ professionalClaimSubmission?: never;
2041
+ dentalClaimSubmission?: never;
2042
+ institutionalClaimSubmission: ClaimSubmissionSummary;
2043
+ claimAcknowledgment?: never;
2044
+ claimPaymentInformation?: never;
2045
+ $unknown?: never;
2046
+ }
2047
+ /**
2048
+ * A 277CA claim acknowledgment from a clearinghouse or the payer.
2049
+ * @public
2050
+ */
2051
+ interface ClaimAcknowledgmentMember {
2052
+ professionalClaimSubmission?: never;
2053
+ dentalClaimSubmission?: never;
2054
+ institutionalClaimSubmission?: never;
2055
+ claimAcknowledgment: ClaimAcknowledgmentSummary;
2056
+ claimPaymentInformation?: never;
2057
+ $unknown?: never;
2058
+ }
2059
+ /**
2060
+ * Payment information the payer reported for this claim in an 835 Electronic Remittance Advice (ERA).
2061
+ * @public
2062
+ */
2063
+ interface ClaimPaymentInformationMember {
2064
+ professionalClaimSubmission?: never;
2065
+ dentalClaimSubmission?: never;
2066
+ institutionalClaimSubmission?: never;
2067
+ claimAcknowledgment?: never;
2068
+ claimPaymentInformation: ClaimPaymentInformationSummary;
2069
+ $unknown?: never;
2070
+ }
2071
+ /**
2072
+ * @public
2073
+ */
2074
+ interface $UnknownMember {
2075
+ professionalClaimSubmission?: never;
2076
+ dentalClaimSubmission?: never;
2077
+ institutionalClaimSubmission?: never;
2078
+ claimAcknowledgment?: never;
2079
+ claimPaymentInformation?: never;
2080
+ $unknown: [string, any];
2081
+ }
2082
+ /**
2083
+ * @deprecated unused in schema-serde mode.
2084
+ *
2085
+ */
2086
+ interface Visitor<T> {
2087
+ professionalClaimSubmission: (value: ClaimSubmissionSummary) => T;
2088
+ dentalClaimSubmission: (value: ClaimSubmissionSummary) => T;
2089
+ institutionalClaimSubmission: (value: ClaimSubmissionSummary) => T;
2090
+ claimAcknowledgment: (value: ClaimAcknowledgmentSummary) => T;
2091
+ claimPaymentInformation: (value: ClaimPaymentInformationSummary) => T;
2092
+ _: (name: string, value: any) => T;
2093
+ }
2094
+ }
2095
+ /**
2096
+ * Input for retrieving a claim.
2097
+ * @public
2098
+ */
2099
+ export interface GetClaimInput {
2100
+ /**
2101
+ * A unique identifier for the claim within Stedi. You can retrieve this ID from the `claimId` property in the Create Professional Claim Submission JSON endpoint response or from the List Claims lifecycle endpoint.
2102
+ * @public
2103
+ */
2104
+ id: string | undefined;
2105
+ }
2106
+ /**
2107
+ * The claim, with its current status and the summary fields from its most recent submission.
2108
+ * @public
2109
+ */
2110
+ export interface GetClaimOutput {
2111
+ /**
2112
+ * A unique identifier for the claim within Stedi. This ID stays the same throughout the claim's entire lifecycle. For example, the claim ID is the same for the initial submission and any resubmissions.
2113
+ * @public
2114
+ */
2115
+ id: string | undefined;
2116
+ /**
2117
+ * The payer identifier in Stedi's system. This is the Stedi payer ID listed in the Stedi [Payer Network](https://www.stedi.com/healthcare/network).
2118
+ * @public
2119
+ */
2120
+ stediPayerId?: string | undefined;
2121
+ /**
2122
+ * The patient control number you assigned to the claim.
2123
+ * @public
2124
+ */
2125
+ patientControlNumber: string | undefined;
2126
+ /**
2127
+ * The name of the patient who received the services on the claim.
2128
+ * @public
2129
+ */
2130
+ patientName?: ClaimPatientName | undefined;
2131
+ /**
2132
+ * The claim's current processing status.
2133
+ * - `SUBMITTED`: You submitted the claim to Stedi but haven't yet received a 277CA response from Stedi or the payer.
2134
+ * - `REJECTED`: Either Stedi or the payer rejected the claim before the start of adjudication. This can happen even when the payer has acknowledged receipt.
2135
+ * - `ACCEPTED`: The payer has accepted the claim into their adjudication system and it's currently being processed or adjudicated.
2136
+ * - `RECEIVED`: The clearinghouse or payer has acknowledged receipt of the claim. This doesn't mean the claim has been accepted for adjudication.
2137
+ * - `PROCESSED`: The payer has adjudicated the claim. Check `totalClaimPaidAmount` to see how much was paid.
2138
+ * - `DENIED`: The payer has denied the claim.
2139
+ * - `UNKNOWN`: Stedi can't determine a single status for this claim, usually because the payer's responses are mixed or incomplete.
2140
+ * @public
2141
+ */
2142
+ status: ClaimStatus | undefined;
2143
+ /**
2144
+ * The entity that reported the claim's current status.
2145
+ * - `PAYER`: The payer reported the status, in a 277CA claim acknowledgment or an 835 ERA.
2146
+ * - `CLEARINGHOUSE`: A clearinghouse reported the status, either Stedi or an intermediary clearinghouse between Stedi and the payer.
2147
+ * @public
2148
+ */
2149
+ statusReportedBy: ClaimStatusReportedBy | undefined;
2150
+ /**
2151
+ * The type of claim. Each type corresponds to a different 837 transaction set.
2152
+ * - `PROFESSIONAL`: An 837P professional claim, the electronic equivalent of the CMS-1500 form.
2153
+ * - `INSTITUTIONAL`: An 837I institutional claim, the electronic equivalent of the UB-04 form.
2154
+ * - `DENTAL`: An 837D dental claim, the electronic equivalent of the ADA Dental Claim Form.
2155
+ * @public
2156
+ */
2157
+ type: ClaimType | undefined;
2158
+ /**
2159
+ * The total charge amount of the claim's most recent submission.
2160
+ * @public
2161
+ */
2162
+ totalClaimChargeAmount: string | undefined;
2163
+ /**
2164
+ * The total amount payers have paid on this claim, summed across every claim payment information record linked to it. Excludes claim payment information with the `PREDETERMINATION_PRICING_ONLY` status, where the payer priced the claim without paying it. Reversals carry a negative amount, so they subtract from the total. Absent until Stedi receives an 835 ERA for the claim.
2165
+ * @public
2166
+ */
2167
+ totalClaimPaidAmount?: string | undefined;
2168
+ /**
2169
+ * The dates of service from the claim's most recent submission. A single date of service carries only `start`. Absent when the submitted dates aren't valid calendar dates.
2170
+ * @public
2171
+ */
2172
+ datesOfService?: ClaimDateRange | undefined;
2173
+ /**
2174
+ * The time Stedi processed the claim's most recent submission.
2175
+ * @public
2176
+ */
2177
+ submittedAt: Date | undefined;
2178
+ }
2179
+ /**
2180
+ * Input for retrieving a claim's timeline.
2181
+ * @public
2182
+ */
2183
+ export interface GetClaimTimelineInput {
2184
+ /**
2185
+ * The maximum number of timeline entries to return per page. Defaults to 100.
2186
+ * @public
2187
+ */
2188
+ pageSize?: number | undefined;
2189
+ /**
2190
+ * The `nextPageToken` from a previous call to this operation. If not specified, Stedi returns the first page of results.
2191
+ * @public
2192
+ */
2193
+ pageToken?: string | undefined;
2194
+ /**
2195
+ * A unique identifier for the claim within Stedi. You can retrieve this ID from the `claimId` property in a claim submission response or from the list claims endpoint.
2196
+ * @public
2197
+ */
2198
+ id: string | undefined;
2199
+ }
2200
+ /**
2201
+ * A page of a claim's timeline.
2202
+ * @public
2203
+ */
2204
+ export interface GetClaimTimelineOutput {
2205
+ /**
2206
+ * Token you can supply in subsequent requests to retrieve the next page of results. If absent, there are no more results.
2207
+ * @public
2208
+ */
2209
+ nextPageToken?: string | undefined;
2210
+ /**
2211
+ * Timeline entries for the claim, newest first, including submissions, acknowledgments, and claim payment information.
2212
+ * @public
2213
+ */
2214
+ items: ClaimTimelineEvent[] | undefined;
2215
+ }
2216
+ /**
2217
+ * Input for listing claims.
2218
+ * @public
2219
+ */
2220
+ export interface ListClaimsInput {
2221
+ /**
2222
+ * The maximum number of claims to return per page. Defaults to 100.
2223
+ * @public
2224
+ */
2225
+ pageSize?: number | undefined;
2226
+ /**
2227
+ * The `nextPageToken` from a previous call to this operation. If not specified, Stedi returns the first page of results.
2228
+ * @public
2229
+ */
2230
+ pageToken?: string | undefined;
2231
+ /**
2232
+ * Filter for claims with specific statuses. You can include this parameter multiple times to filter for multiple statuses.
2233
+ * - `SUBMITTED`: You submitted the claim to Stedi but haven't yet received a 277CA response from Stedi or the payer.
2234
+ * - `RECEIVED`: The clearinghouse or payer has acknowledged receipt of the claim. This doesn't mean the claim has been accepted for adjudication.
2235
+ * - `ACCEPTED`: The payer has accepted the claim into their adjudication system and it's currently being processed or adjudicated.
2236
+ * - `REJECTED`: Either Stedi or the payer rejected the claim before the start of adjudication. This can happen even when the payer has acknowledged receipt.
2237
+ * - `PROCESSED`: The payer has adjudicated the claim. Check `totalClaimPaidAmount` to see how much was paid.
2238
+ * - `DENIED`: The payer has denied the claim.
2239
+ * - `UNKNOWN`: Stedi can't determine a single status for this claim, usually because the payer's responses are mixed or incomplete.
2240
+ * @public
2241
+ */
2242
+ status?: ClaimStatus[] | undefined;
2243
+ /**
2244
+ * Filter for claims with specific patient control numbers. You can include this parameter multiple times to filter for multiple patient control numbers.
2245
+ * @public
2246
+ */
2247
+ patientControlNumbers?: string[] | undefined;
2248
+ /**
2249
+ * Filter for claims with `submittedAt` after this time.
2250
+ * @public
2251
+ */
2252
+ submittedAfter?: Date | undefined;
2253
+ /**
2254
+ * Filter for claims with `submittedAt` before this time.
2255
+ * @public
2256
+ */
2257
+ submittedBefore?: Date | undefined;
2258
+ }
2259
+ /**
2260
+ * A page of claims.
2261
+ * @public
2262
+ */
2263
+ export interface ListClaimsOutput {
2264
+ /**
2265
+ * Token you can supply in subsequent requests to retrieve the next page of results. If absent, there are no more results.
2266
+ * @public
2267
+ */
2268
+ nextPageToken?: string | undefined;
2269
+ /**
2270
+ * The claim records on this page, newest first by `submittedAt`. Each claim record includes summary information about the most recent submission, including processing status, charge and paid totals, patient name, dates of service, and claim type.
2271
+ * @public
2272
+ */
2273
+ items: ClaimSummary[] | undefined;
2274
+ }
2275
+ /**
2276
+ * Input for creating a new destination.
2277
+ * @public
2278
+ */
2279
+ export interface CreateEventDestinationInput {
2280
+ /**
2281
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2282
+ * @public
2283
+ */
2284
+ name: string | undefined;
2285
+ /**
2286
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2287
+ * @public
2288
+ */
2289
+ description?: string | undefined;
2290
+ /**
2291
+ * The event types you want Stedi to send to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2292
+ * @public
2293
+ */
2294
+ eventTypes: string[] | undefined;
2295
+ /**
2296
+ * The URL where you want Stedi to deliver payloads through HTTP `POST`.
2297
+ * @public
2298
+ */
2299
+ destinationUrl: string | undefined;
2300
+ /**
2301
+ * Maximum concurrent deliveries for this destination. If not set, Stedi applies your account default (typically 5). Stedi rejects requests exceeding your account maximum (typically 20) with a `400` error. Contact Stedi to change your limits.
2302
+ * @public
2303
+ */
2304
+ concurrencyLimit?: number | undefined;
2305
+ /**
2306
+ * The destination's status upon creation. Default is `ENABLED`.
2307
+ * @public
2308
+ */
2309
+ status?: EventDestinationsDestinationInputStatus | undefined;
2310
+ /**
2311
+ * A unique string to identify this request to the server. If not set, Stedi generates one automatically.
2312
+ *
2313
+ * The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents duplicate operations due to network errors or other intermittent failures. [Learn more](https://www.stedi.com/docs/api-reference/index#idempotency-keys).
2314
+ * @public
2315
+ */
2316
+ idempotencyKey?: string | undefined;
2317
+ }
2318
+ /**
2319
+ * Output containing the created destination details and signing secret.
2320
+ * @public
2321
+ */
2322
+ export interface CreateEventDestinationOutput {
2323
+ /**
2324
+ * The unique identifier for the destination.
2325
+ * @public
2326
+ */
2327
+ id: string | undefined;
2328
+ /**
2329
+ * Creation timestamp for this destination.
2330
+ * @public
2331
+ */
2332
+ createdAt: Date | undefined;
2333
+ /**
2334
+ * Last update timestamp for this destination.
2335
+ * @public
2336
+ */
2337
+ updatedAt: Date | undefined;
2338
+ /**
2339
+ * The destination's current status. Stedi only sends event payloads to `ENABLED` destinations.
2340
+ * @public
2341
+ */
2342
+ status: EventDestinationsDestinationStatus | undefined;
2343
+ /**
2344
+ * The timestamp for Stedi's most recent delivery attempt to this destination. Absent when Stedi hasn't yet attempted a delivery.
2345
+ * @public
2346
+ */
2347
+ lastDeliveryTime?: Date | undefined;
2348
+ /**
2349
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2350
+ * @public
2351
+ */
2352
+ name: string | undefined;
2353
+ /**
2354
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2355
+ * @public
2356
+ */
2357
+ description: string | undefined;
2358
+ /**
2359
+ * The event types Stedi sends to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2360
+ * @public
2361
+ */
2362
+ eventTypes: string[] | undefined;
2363
+ /**
2364
+ * The URL where Stedi delivers payloads through HTTP `POST`.
2365
+ * @public
2366
+ */
2367
+ destinationUrl: string | undefined;
2368
+ /**
2369
+ * The maximum number of concurrent deliveries for this destination. Contact Stedi to change your account limits.
2370
+ * @public
2371
+ */
2372
+ concurrencyLimit?: number | undefined;
2373
+ /**
2374
+ * The signing secret for verifying event payloads. Store it securely. Visit [verify event signatures](https://www.stedi.com/docs/healthcare/event-destinations-message-handling#verify-authenticity-and-receipt-time) for details.
2375
+ * @public
2376
+ */
2377
+ signingSecret: string | undefined;
2378
+ }
2379
+ /**
2380
+ * Input for deleting a destination.
2381
+ * @public
2382
+ */
2383
+ export interface DeleteEventDestinationInput {
2384
+ /**
2385
+ * The unique identifier for the destination. You can retrieve destination IDs with the [List Destinations](https://www.stedi.com/docs/healthcare/api-reference/get-event-destinations-list-destinations) endpoint.
2386
+ * @public
2387
+ */
2388
+ destinationId: string | undefined;
2389
+ /**
2390
+ * A unique string to identify this request to the server. If not set, Stedi generates one automatically.
2391
+ *
2392
+ * The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents duplicate operations due to network errors or other intermittent failures. [Learn more](https://www.stedi.com/docs/api-reference/index#idempotency-keys).
2393
+ * @public
2394
+ */
2395
+ idempotencyKey?: string | undefined;
2396
+ }
2397
+ /**
2398
+ * A successful response confirms the destination has been permanently deleted.
2399
+ * @public
2400
+ */
2401
+ export interface DeleteEventDestinationOutput {
2402
+ }
2403
+ /**
2404
+ * A summary representation of a destination, returned in list responses.
2405
+ * @public
2406
+ */
2407
+ export interface EventDestinationsDestinationSummary {
2408
+ /**
2409
+ * The unique identifier for the destination.
2410
+ * @public
2411
+ */
2412
+ id: string | undefined;
2413
+ /**
2414
+ * Creation timestamp for this destination.
2415
+ * @public
2416
+ */
2417
+ createdAt: Date | undefined;
2418
+ /**
2419
+ * Last update timestamp for this destination.
2420
+ * @public
2421
+ */
2422
+ updatedAt: Date | undefined;
2423
+ /**
2424
+ * The destination's current status. Stedi only sends event payloads to `ENABLED` destinations.
2425
+ * @public
2426
+ */
2427
+ status: EventDestinationsDestinationStatus | undefined;
2428
+ /**
2429
+ * The timestamp for Stedi's most recent delivery attempt to this destination. Absent when Stedi hasn't yet attempted a delivery.
2430
+ * @public
2431
+ */
2432
+ lastDeliveryTime?: Date | undefined;
2433
+ /**
2434
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2435
+ * @public
2436
+ */
2437
+ name: string | undefined;
2438
+ /**
2439
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2440
+ * @public
2441
+ */
2442
+ description: string | undefined;
2443
+ /**
2444
+ * The event types Stedi sends to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2445
+ * @public
2446
+ */
2447
+ eventTypes: string[] | undefined;
2448
+ /**
2449
+ * The URL where Stedi delivers payloads through HTTP `POST`.
2450
+ * @public
2451
+ */
2452
+ destinationUrl: string | undefined;
2453
+ /**
2454
+ * The maximum number of concurrent deliveries for this destination. Contact Stedi to change your account limits.
2455
+ * @public
2456
+ */
2457
+ concurrencyLimit?: number | undefined;
2458
+ }
2459
+ /**
2460
+ * A reference to a resource affected by an event.
2461
+ * @public
2462
+ */
2463
+ export interface EventDestinationsEventPayloadResourceRef {
2464
+ /**
2465
+ * The resource identifier.
2466
+ * @public
2467
+ */
2468
+ id: string | undefined;
2469
+ /**
2470
+ * The resource type. Uses dot notation to indicate nested resources. For example, `enrollment.document` indicates a document associated with a transaction enrollment request.
2471
+ * @public
2472
+ */
2473
+ type: string | undefined;
2474
+ }
2475
+ /**
2476
+ * A v1 thin event envelope that signals a state change. Consumers fetch current resource state via API using the resource reference. This is the exact payload delivered to webhook destinations.
2477
+ * @public
2478
+ */
2479
+ export interface EventDestinationsV1EventPayload {
2480
+ /**
2481
+ * Object type discriminator. Identifies the schema version of this payload.
2482
+ * @public
2483
+ */
2484
+ object: EventDestinationsEventPayloadObjectType | undefined;
2485
+ /**
2486
+ * Stedi account identifier (UUID).
2487
+ * @public
2488
+ */
2489
+ account: string | undefined;
2490
+ /**
2491
+ * The environment in which the event was produced.
2492
+ * @public
2493
+ */
2494
+ environment: EventDestinationsEventEnvironment | undefined;
2495
+ /**
2496
+ * An ISO 8601 timestamp of when the event was created.
2497
+ * @public
2498
+ */
2499
+ created: Date | undefined;
2500
+ /**
2501
+ * Information about the resource that triggered the event. You can use this information to retrieve additional information about the resource.
2502
+ * @public
2503
+ */
2504
+ resource: EventDestinationsEventPayloadResourceRef | undefined;
2505
+ /**
2506
+ * An identifier for the event, formatted as `evt_\{UUID\}`.
2507
+ * @public
2508
+ */
2509
+ id?: string | undefined;
2510
+ /**
2511
+ * The event type in dot notation, such as `enrollment.activated`.
2512
+ * @public
2513
+ */
2514
+ type?: string | undefined;
2515
+ /**
2516
+ * Other resources related to the event. Only present when there are related resources.
2517
+ * @public
2518
+ */
2519
+ relatedResources?: EventDestinationsEventPayloadResourceRef[] | undefined;
2520
+ }
2521
+ /**
2522
+ * The event payload, discriminated by object type. Each variant corresponds to a versioned event schema.
2523
+ * @public
2524
+ */
2525
+ export type EventDestinationsEventPayload = EventDestinationsEventPayload.V1EventMember | EventDestinationsEventPayload.$UnknownMember;
2526
+ /**
2527
+ * @public
2528
+ */
2529
+ export declare namespace EventDestinationsEventPayload {
2530
+ /**
2531
+ * A `v1` thin event payload.
2532
+ * @public
2533
+ */
2534
+ interface V1EventMember {
2535
+ v1Event: EventDestinationsV1EventPayload;
2536
+ $unknown?: never;
2537
+ }
2538
+ /**
2539
+ * @public
2540
+ */
2541
+ interface $UnknownMember {
2542
+ v1Event?: never;
2543
+ $unknown: [string, any];
2544
+ }
2545
+ /**
2546
+ * @deprecated unused in schema-serde mode.
2547
+ *
2548
+ */
2549
+ interface Visitor<T> {
2550
+ v1Event: (value: EventDestinationsV1EventPayload) => T;
2551
+ _: (name: string, value: any) => T;
2552
+ }
2553
+ }
2554
+ /**
2555
+ * A summary representation of an event, returned in list responses.
2556
+ * @public
2557
+ */
2558
+ export interface EventDestinationsEventSummary {
2559
+ /**
2560
+ * The unique identifier for the event, formatted as `evt_\{UUID\}`.
2561
+ * @public
2562
+ */
2563
+ id: string | undefined;
2564
+ /**
2565
+ * The current status of the event. Can be:
2566
+ * - `DELIVERED`: Stedi successfully delivered the event to all relevant event destinations.
2567
+ * - `PENDING`: Stedi is still trying to deliver the event to one or more event destinations. Events may stay in this state for multiple days as Stedi automatically retries.
2568
+ * - `FAILED`: Stedi couldn't deliver the event to at least one event destination and is no longer retrying. Deliveries to some event destinations may have been successful.
2569
+ * @public
2570
+ */
2571
+ status: EventDestinationsEventStatus | undefined;
2572
+ /**
2573
+ * An ISO 8601 timestamp of when the event was created.
2574
+ * @public
2575
+ */
2576
+ createdAt: Date | undefined;
2577
+ /**
2578
+ * The type of event, such as `enrollment.activated`.
2579
+ * @public
2580
+ */
2581
+ eventType: string | undefined;
2582
+ }
2583
+ /**
2584
+ * Input for retrieving a destination.
2585
+ * @public
2586
+ */
2587
+ export interface GetEventDestinationInput {
2588
+ /**
2589
+ * The unique identifier for the destination. You can retrieve destination IDs with the [List Destinations](https://www.stedi.com/docs/healthcare/api-reference/get-event-destinations-list-destinations) endpoint.
2590
+ * @public
2591
+ */
2592
+ destinationId: string | undefined;
2593
+ }
2594
+ /**
2595
+ * Output containing the destination details.
2596
+ * @public
2597
+ */
2598
+ export interface GetEventDestinationOutput {
2599
+ /**
2600
+ * The unique identifier for the destination.
2601
+ * @public
2602
+ */
2603
+ id: string | undefined;
2604
+ /**
2605
+ * Creation timestamp for this destination.
2606
+ * @public
2607
+ */
2608
+ createdAt: Date | undefined;
2609
+ /**
2610
+ * Last update timestamp for this destination.
2611
+ * @public
2612
+ */
2613
+ updatedAt: Date | undefined;
2614
+ /**
2615
+ * The destination's current status. Stedi only sends event payloads to `ENABLED` destinations.
2616
+ * @public
2617
+ */
2618
+ status: EventDestinationsDestinationStatus | undefined;
2619
+ /**
2620
+ * The timestamp for Stedi's most recent delivery attempt to this destination. Absent when Stedi hasn't yet attempted a delivery.
2621
+ * @public
2622
+ */
2623
+ lastDeliveryTime?: Date | undefined;
2624
+ /**
2625
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2626
+ * @public
2627
+ */
2628
+ name: string | undefined;
2629
+ /**
2630
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2631
+ * @public
2632
+ */
2633
+ description: string | undefined;
2634
+ /**
2635
+ * The event types Stedi sends to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2636
+ * @public
2637
+ */
2638
+ eventTypes: string[] | undefined;
2639
+ /**
2640
+ * The URL where Stedi delivers payloads through HTTP `POST`.
2641
+ * @public
2642
+ */
2643
+ destinationUrl: string | undefined;
2644
+ /**
2645
+ * The maximum number of concurrent deliveries for this destination. Contact Stedi to change your account limits.
2646
+ * @public
2647
+ */
2648
+ concurrencyLimit?: number | undefined;
2649
+ }
2650
+ /**
2651
+ * Input for retrieving an event.
2652
+ * @public
2653
+ */
2654
+ export interface GetEventDestinationEventInput {
2655
+ /**
2656
+ * The unique identifier for the event, formatted as `evt_\{UUID\}`.
2657
+ * @public
2658
+ */
2659
+ eventId: string | undefined;
2660
+ }
2661
+ /**
2662
+ * Output containing the event details.
2663
+ * @public
2664
+ */
2665
+ export interface GetEventDestinationEventOutput {
2666
+ /**
2667
+ * The unique identifier for the event, formatted as `evt_\{UUID\}`.
2668
+ * @public
2669
+ */
2670
+ id: string | undefined;
2671
+ /**
2672
+ * The current status of the event. Can be:
2673
+ * - `DELIVERED`: Stedi successfully delivered the event to all relevant event destinations.
2674
+ * - `PENDING`: Stedi is still trying to deliver the event to one or more event destinations. Events may stay in this state for multiple days as Stedi automatically retries.
2675
+ * - `FAILED`: Stedi couldn't deliver the event to at least one event destination and is no longer retrying. Deliveries to some event destinations may have been successful.
2676
+ * @public
2677
+ */
2678
+ status: EventDestinationsEventStatus | undefined;
2679
+ /**
2680
+ * An ISO 8601 timestamp of when the event was created.
2681
+ * @public
2682
+ */
2683
+ createdAt: Date | undefined;
2684
+ /**
2685
+ * The type of event, such as `enrollment.activated`.
2686
+ * @public
2687
+ */
2688
+ eventType: string | undefined;
2689
+ /**
2690
+ * The event payload Stedi delivers to event destinations.
2691
+ * @public
2692
+ */
2693
+ eventPayload: EventDestinationsEventPayload | undefined;
2694
+ }
2695
+ /**
2696
+ * Input for retrieving a destination's signing secret.
2697
+ * @public
2698
+ */
2699
+ export interface GetEventDestinationSecretInput {
2700
+ /**
2701
+ * The unique identifier for the destination. You can retrieve destination IDs with the [List Destinations](https://www.stedi.com/docs/healthcare/api-reference/get-event-destinations-list-destinations) endpoint.
2702
+ * @public
2703
+ */
2704
+ destinationId: string | undefined;
2705
+ }
2706
+ /**
2707
+ * Output containing the destination's signing secret.
2708
+ * @public
2709
+ */
2710
+ export interface GetEventDestinationSecretOutput {
2711
+ /**
2712
+ * The signing secret for verifying event payloads. Visit [verify event signatures](https://www.stedi.com/docs/healthcare/event-destinations-message-handling#verify-authenticity-and-receipt-time) for details.
2713
+ * @public
2714
+ */
2715
+ signingSecret: string | undefined;
2716
+ /**
2717
+ * Expiration timestamp for the previous secret. Only present when a secret rotation is in progress.
2718
+ * @public
2719
+ */
2720
+ previousSecretExpiresAt?: Date | undefined;
2721
+ }
2722
+ /**
2723
+ * Input for listing events.
2724
+ * @public
2725
+ */
2726
+ export interface ListEventDestinationEventsInput {
2727
+ /**
2728
+ * The maximum number of elements to return in a page. If not specified, the default is 100.
2729
+ * @public
2730
+ */
2731
+ pageSize?: number | undefined;
2732
+ /**
2733
+ * The `nextPageToken` value from a previous response. You can use this to get the next page of results. If not set, Stedi returns the first page of results.
2734
+ * @public
2735
+ */
2736
+ pageToken?: string | undefined;
2737
+ /**
2738
+ * Filter results by event ID, such as `evt_019d554b-311b-7813-b491-0a8973762eae`.
2739
+ * @public
2740
+ */
2741
+ eventId?: string | undefined;
2742
+ /**
2743
+ * Filter results by one or more event statuses. Can be:
2744
+ * - `DELIVERED`: Stedi successfully delivered the event to all relevant event destinations.
2745
+ * - `PENDING`: Stedi is still trying to deliver the event to one or more event destinations.
2746
+ * - `FAILED`: Stedi couldn't deliver the event to at least one event destination and is no longer retrying.
2747
+ * @public
2748
+ */
2749
+ status?: EventDestinationsEventStatus[] | undefined;
2750
+ /**
2751
+ * Filter results by event type, such as `enrollment.activated`.
2752
+ * @public
2753
+ */
2754
+ eventType?: string | undefined;
2755
+ /**
2756
+ * Filter results by their `createdAt` timestamp. Each value is in the format `operator:ISO-8601-timestamp`.
2757
+ * - The supported operators are `gt` (after), `gte` (at or after), `lt` (before), and `lte` (at or before). For example: Setting this to `lt:2024-02-01T00:00:00Z` filters for events created before the specified timestamp.
2758
+ * - Combine multiple values with `&` to specify a date range. For example: `created=gt:2026-01-01T00:00:00Z&created=lt:2026-02-01T00:00:00Z`.
2759
+ * @public
2760
+ */
2761
+ created?: string[] | undefined;
2762
+ }
2763
+ /**
2764
+ * Output containing the list of events.
2765
+ * @public
2766
+ */
2767
+ export interface ListEventDestinationEventsOutput {
2768
+ /**
2769
+ * Token that you can supply in subsequent requests to retrieve the next page of results. If not returned, there are no more results.
2770
+ * @public
2771
+ */
2772
+ nextPageToken?: string | undefined;
2773
+ /**
2774
+ * The list of event summaries.
2775
+ * @public
2776
+ */
2777
+ items: EventDestinationsEventSummary[] | undefined;
2778
+ }
2779
+ /**
2780
+ * Input for listing destinations.
2781
+ * @public
2782
+ */
2783
+ export interface ListEventDestinationsInput {
2784
+ /**
2785
+ * Number of items to return per page.
2786
+ * @public
2787
+ */
2788
+ pageSize?: number | undefined;
2789
+ /**
2790
+ * The `nextPageToken` value from a previous response. You can use this to get the next page of results. If not set, Stedi returns the first page of results.
2791
+ * @public
2792
+ */
2793
+ pageToken?: string | undefined;
2794
+ /**
2795
+ * Filter results by destination status.
2796
+ * @public
2797
+ */
2798
+ status?: EventDestinationsDestinationStatus | undefined;
2799
+ /**
2800
+ * Filter results by event type. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2801
+ * @public
2802
+ */
2803
+ eventType?: string | undefined;
2804
+ }
2805
+ /**
2806
+ * Output containing the list of destinations.
2807
+ * @public
2808
+ */
2809
+ export interface ListEventDestinationsOutput {
2810
+ /**
2811
+ * Token that you can supply in subsequent requests to retrieve the next page of results. If not returned, there are no more results.
2812
+ * @public
2813
+ */
2814
+ nextPageToken?: string | undefined;
2815
+ /**
2816
+ * The list of destination summaries.
2817
+ * @public
2818
+ */
2819
+ items: EventDestinationsDestinationSummary[] | undefined;
2820
+ }
2821
+ /**
2822
+ * Input for rotating a destination's signing secret.
2823
+ * @public
2824
+ */
2825
+ export interface RotateEventDestinationSecretInput {
2826
+ /**
2827
+ * The unique identifier for the destination. You can retrieve destination IDs with the [List Destinations](https://www.stedi.com/docs/healthcare/api-reference/get-event-destinations-list-destinations) endpoint.
2828
+ * @public
2829
+ */
2830
+ destinationId: string | undefined;
2831
+ /**
2832
+ * The number of hours you want the previous secret to remain valid after rotation.
2833
+ * - Default is 24 hours.
2834
+ * - Set to `0` when you want the previous secret to expire immediately — in-flight payloads signed with the previous secret fail verification.
2835
+ * - You can't rotate again until this grace period expires.
2836
+ * @public
2837
+ */
2838
+ previousSecretExpiryHours?: number | undefined;
2839
+ /**
2840
+ * A unique string to identify this request to the server. If not set, Stedi generates one automatically.
2841
+ *
2842
+ * The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents duplicate operations due to network errors or other intermittent failures. [Learn more](https://www.stedi.com/docs/api-reference/index#idempotency-keys).
2843
+ * @public
2844
+ */
2845
+ idempotencyKey?: string | undefined;
2846
+ }
2847
+ /**
2848
+ * Output containing the new signing secret.
2849
+ * @public
2850
+ */
2851
+ export interface RotateEventDestinationSecretOutput {
2852
+ /**
2853
+ * The new signing secret for verifying event payloads. Visit [verify event signatures](https://www.stedi.com/docs/healthcare/event-destinations-message-handling#verify-authenticity-and-receipt-time) for details.
2854
+ * @public
2855
+ */
2856
+ signingSecret: string | undefined;
2857
+ /**
2858
+ * Expiration timestamp for the secret this rotation replaced. Equals the rotation time when you set `previousSecretExpiryHours` to `0`. You can't rotate again until this timestamp passes.
2859
+ * @public
2860
+ */
2861
+ previousSecretExpiresAt?: Date | undefined;
2862
+ }
2863
+ /**
2864
+ * Input for updating a destination.
2865
+ * @public
2866
+ */
2867
+ export interface UpdateEventDestinationInput {
2868
+ /**
2869
+ * The unique identifier for the destination. You can retrieve destination IDs with the [List Destinations](https://www.stedi.com/docs/healthcare/api-reference/get-event-destinations-list-destinations) endpoint.
2870
+ * @public
2871
+ */
2872
+ destinationId: string | undefined;
2873
+ /**
2874
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2875
+ * @public
2876
+ */
2877
+ name?: string | undefined;
2878
+ /**
2879
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2880
+ * @public
2881
+ */
2882
+ description?: string | undefined;
2883
+ /**
2884
+ * The event types you want Stedi to send to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2885
+ * @public
2886
+ */
2887
+ eventTypes?: string[] | undefined;
2888
+ /**
2889
+ * The URL where you want Stedi to deliver payloads through HTTP `POST`.
2890
+ * @public
2891
+ */
2892
+ destinationUrl?: string | undefined;
2893
+ /**
2894
+ * Maximum concurrent deliveries for this destination. If not set, Stedi applies your account default (typically 5). Stedi rejects requests exceeding your account maximum (typically 20) with a `400` error. Contact Stedi to change your limits.
2895
+ * @public
2896
+ */
2897
+ concurrencyLimit?: number | undefined;
2898
+ /**
2899
+ * The destination's status. Set to `ENABLED` to receive event deliveries or `DISABLED` to pause them.
2900
+ * @public
2901
+ */
2902
+ status?: EventDestinationsDestinationInputStatus | undefined;
2903
+ /**
2904
+ * A unique string to identify this request to the server. If not set, Stedi generates one automatically.
2905
+ *
2906
+ * The key can be up to 255 characters. You can safely retry requests with the same idempotency key within 24 hours of making the first request. This prevents duplicate operations due to network errors or other intermittent failures. [Learn more](https://www.stedi.com/docs/api-reference/index#idempotency-keys).
2907
+ * @public
2908
+ */
2909
+ idempotencyKey?: string | undefined;
2910
+ }
2911
+ /**
2912
+ * Output containing the updated destination details.
2913
+ * @public
2914
+ */
2915
+ export interface UpdateEventDestinationOutput {
2916
+ /**
2917
+ * The unique identifier for the destination.
2918
+ * @public
2919
+ */
2920
+ id: string | undefined;
2921
+ /**
2922
+ * Creation timestamp for this destination.
2923
+ * @public
2924
+ */
2925
+ createdAt: Date | undefined;
2926
+ /**
2927
+ * Last update timestamp for this destination.
2928
+ * @public
2929
+ */
2930
+ updatedAt: Date | undefined;
2931
+ /**
2932
+ * The destination's current status. Stedi only sends event payloads to `ENABLED` destinations.
2933
+ * @public
2934
+ */
2935
+ status: EventDestinationsDestinationStatus | undefined;
2936
+ /**
2937
+ * The timestamp for Stedi's most recent delivery attempt to this destination. Absent when Stedi hasn't yet attempted a delivery.
2938
+ * @public
2939
+ */
2940
+ lastDeliveryTime?: Date | undefined;
2941
+ /**
2942
+ * A human-readable name for the destination. Stedi displays this name in the portal.
2943
+ * @public
2944
+ */
2945
+ name: string | undefined;
2946
+ /**
2947
+ * A description of the destination's purpose, such as "Receives transaction enrollment task notifications."
2948
+ * @public
2949
+ */
2950
+ description: string | undefined;
2951
+ /**
2952
+ * The event types Stedi sends to this destination. Visit [event types](https://www.stedi.com/docs/healthcare/event-destinations-event-types) for a complete list.
2953
+ * @public
2954
+ */
2955
+ eventTypes: string[] | undefined;
2956
+ /**
2957
+ * The URL where Stedi delivers payloads through HTTP `POST`.
2958
+ * @public
2959
+ */
2960
+ destinationUrl: string | undefined;
2961
+ /**
2962
+ * The maximum number of concurrent deliveries for this destination. Contact Stedi to change your account limits.
2963
+ * @public
2964
+ */
2965
+ concurrencyLimit?: number | undefined;
1689
2966
  }