Add StoreKit history and modernize admin console
Expose ledger-backed cross-device purchase history while shipping the tested React admin redesign in the same reproducible deployment revision.
This commit is contained in:
@@ -177,6 +177,28 @@ paths:
|
||||
items: { $ref: "#/components/schemas/StoreKitProduct" }
|
||||
default: { $ref: "#/components/responses/Error" }
|
||||
/v1/storekit/transactions:
|
||||
get:
|
||||
summary: Return credited StoreKit purchase history for the current account
|
||||
description: |
|
||||
Returns only App Store transactions that were previously verified and
|
||||
committed with their immutable credit-ledger entries. Results include
|
||||
purchases credited before this endpoint was introduced and never call
|
||||
the App Store at query time. The opaque cursor follows the stable
|
||||
descending order of `purchasedAt` and `transactionId`.
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- name: cursor
|
||||
in: query
|
||||
description: Opaque cursor returned by the preceding page.
|
||||
schema: { type: string, minLength: 1, maxLength: 256 }
|
||||
responses:
|
||||
"200":
|
||||
description: Credited StoreKit purchases for the authenticated account
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/StoreKitTransactionHistory" }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
default: { $ref: "#/components/responses/Error" }
|
||||
post:
|
||||
summary: Verify an App Store transaction and idempotently grant credits
|
||||
description: |
|
||||
@@ -1306,6 +1328,29 @@ components:
|
||||
creditsGranted: { type: integer, format: int64, minimum: 1 }
|
||||
balanceAfter: { type: integer, format: int64, minimum: 0 }
|
||||
replayed: { type: boolean }
|
||||
StoreKitTransactionHistoryItem:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
[transactionId, productId, creditsGranted, balanceAfter, purchasedAt, status]
|
||||
properties:
|
||||
transactionId: { type: string, pattern: "^[0-9]{1,64}$" }
|
||||
productId: { type: string, minLength: 3, maxLength: 128 }
|
||||
creditsGranted: { type: integer, format: int64, minimum: 1 }
|
||||
balanceAfter: { type: integer, format: int64, minimum: 0 }
|
||||
purchasedAt: { type: string, format: date-time }
|
||||
status: { type: string, enum: [credited] }
|
||||
StoreKitTransactionHistory:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [items, nextCursor]
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items: { $ref: "#/components/schemas/StoreKitTransactionHistoryItem" }
|
||||
nextCursor:
|
||||
type: ["string", "null"]
|
||||
maxLength: 256
|
||||
AppleAppSiteAssociation:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
Reference in New Issue
Block a user