Description
ConsumptionRequestReason is a defined enum used by the public Data.consumptionRequestReason field, but index.ts does not re-export it. Consumers cannot import the enum from @apple/app-store-server-library, even though they can receive values of that field in decoded notifications.
Consumers must currently use string literals or import the enum through an internal distribution path. This is inconsistent with the package's public exports for other notification-related enums.
FirstSendAttemptResult is also defined but not re-exported. Unlike ConsumptionRequestReason, it is not referenced by any current model in this revision. Exposing it is therefore a separate API-consistency consideration, not evidence that a current model's enum is inaccessible. If that enum is obsolete, maintainers may prefer to clarify its status rather than add it to the public API.
Reproduction
Compile this consumer code:
import {
ConsumptionRequestReason,
FirstSendAttemptResult,
} from '@apple/app-store-server-library';
console.log(ConsumptionRequestReason.UNINTENDED_PURCHASE);
console.log(FirstSendAttemptResult.SUCCESS);
Both imports fail with a missing-export diagnostic. TypeScript 5.9.3 reported TS2724 for each symbol under both moduleResolution: "NodeNext" and moduleResolution: "Bundler".
Existing exports such as Environment and SignedDataVerifier compile successfully in the same consumer configurations, isolating the problem to the missing symbols.
Expected behavior
Consumers should be able to import ConsumptionRequestReason from the package entry point and compare notification data against its named values.
Suggested change
Add the missing public export:
export { ConsumptionRequestReason } from './models/ConsumptionRequestReason';
If FirstSendAttemptResult is intended to remain a supported public enum, also add:
export { FirstSendAttemptResult } from './models/FirstSendAttemptResult';
Verify that the package's emitted JavaScript and declarations expose the intended symbols to package-root imports.
Description
ConsumptionRequestReasonis a defined enum used by the publicData.consumptionRequestReasonfield, butindex.tsdoes not re-export it. Consumers cannot import the enum from@apple/app-store-server-library, even though they can receive values of that field in decoded notifications.Consumers must currently use string literals or import the enum through an internal distribution path. This is inconsistent with the package's public exports for other notification-related enums.
FirstSendAttemptResultis also defined but not re-exported. UnlikeConsumptionRequestReason, it is not referenced by any current model in this revision. Exposing it is therefore a separate API-consistency consideration, not evidence that a current model's enum is inaccessible. If that enum is obsolete, maintainers may prefer to clarify its status rather than add it to the public API.Reproduction
Compile this consumer code:
Both imports fail with a missing-export diagnostic. TypeScript 5.9.3 reported TS2724 for each symbol under both
moduleResolution: "NodeNext"andmoduleResolution: "Bundler".Existing exports such as
EnvironmentandSignedDataVerifiercompile successfully in the same consumer configurations, isolating the problem to the missing symbols.Expected behavior
Consumers should be able to import
ConsumptionRequestReasonfrom the package entry point and compare notification data against its named values.Suggested change
Add the missing public export:
If
FirstSendAttemptResultis intended to remain a supported public enum, also add:Verify that the package's emitted JavaScript and declarations expose the intended symbols to package-root imports.