Export ConsumptionRequestReason from the package entry point; consider exposing FirstSendAttemptResult for consistency
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- api
调研方向
从 index.ts 开始,将其中与通知相关的导出与 models/ConsumptionRequestReason 和 models/FirstSendAttemptResult 进行比较。编译 issue 中的 TypeScript consumer 示例,然后构建 package,并验证从 package 根目录导入的内容能在生成的 JavaScript 文件和声明文件中正常工作;应在公开 FirstSendAttemptResult 之前确定其预期状态。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 388
- 派生
- 88
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apple/app-store-server-library-node 的其他 Issue
-
NotificationHistoryResponseValidator uses the response validator for history items and accepts malformed item fields可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 3/5 1-2 天 新手友好度 54/100
-
Cloudflare Workers (nodejs_compat): SignedDataVerifier passes with online checks; two non-crypto blockers remain可能已有人在做 @vishalhabib99 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 32/100
apple/app-store-server-library-node#476 · 1 条评论 · 1 个 reaction ·
-
Abort OCSP requests when the response times out可能已有人在做 @TorinAsakura 于 71 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
-
Subscription status response validators omit validation of data and nested lastTransactions可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 84/100
查看 apple/app-store-server-library-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[Bug]: Search input loses focus while typing on the Inventory, Reservations and Locations lists (view_configurations enabled)可能已有人在做 @medusa-os-bot 今天认领。 未关闭status: needs triaging type: bug version: 2.0
难度 2/5 1-3 小时 新手友好度 86/100
medusajs/medusa#17886 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 95/100
marimo-team/marimo#11949 ·
维护者通常 1 天内回复
-
bug server-time v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/servers#5559 ·
维护者通常 1 天内回复
-
D1 Time Travel restore help advertises 30 days without a plan qualifier可能已有人在做 @akhil9tiet 今天认领。 未关闭bug package:wrangler product:d1
难度 1/5 1-3 小时 新手友好度 78/100
cloudflare/workers-sdk#17000 · 2 条评论 ·
维护者通常 1 天内回复