|
1 | 1 | package appstore
|
2 | 2 |
|
| 3 | +import "github.com/golang-jwt/jwt/v4" |
| 4 | + |
3 | 5 | // OrderLookupResponse https://developer.apple.com/documentation/appstoreserverapi/orderlookupresponse
|
4 | 6 | type OrderLookupResponse struct {
|
5 | 7 | Status int `json:"status"`
|
@@ -196,3 +198,55 @@ const (
|
196 | 198 | type SendTestNotificationResponse struct {
|
197 | 199 | TestNotificationToken string `json:"testNotificationToken"`
|
198 | 200 | }
|
| 201 | + |
| 202 | +// Notification signed payload |
| 203 | +type NotificationPayload struct { |
| 204 | + jwt.RegisteredClaims |
| 205 | + NotificationType string `json:"notificationType"` |
| 206 | + Subtype string `json:"subtype"` |
| 207 | + NotificationUUID string `json:"notificationUUID"` |
| 208 | + NotificationVersion string `json:"notificationVersion"` |
| 209 | + Data NotificationData `json:"data"` |
| 210 | +} |
| 211 | + |
| 212 | +// Notification Data |
| 213 | +type NotificationData struct { |
| 214 | + jwt.RegisteredClaims |
| 215 | + AppAppleID int `json:"appAppleId"` |
| 216 | + BundleID string `json:"bundleId"` |
| 217 | + BundleVersion string `json:"bundleVersion"` |
| 218 | + Environment string `json:"environment"` |
| 219 | + SignedRenewalInfo string `json:"signedRenewalInfo"` |
| 220 | + SignedTransactionInfo string `json:"signedTransactionInfo"` |
| 221 | +} |
| 222 | + |
| 223 | +// Notification Transaction Info |
| 224 | +type TransactionInfo struct { |
| 225 | + jwt.RegisteredClaims |
| 226 | + TransactionId string `json:"transactionId"` |
| 227 | + OriginalTransactionID string `json:"originalTransactionId"` |
| 228 | + WebOrderLineItemID string `json:"webOrderLineItemId"` |
| 229 | + BundleID string `json:"bundleId"` |
| 230 | + ProductID string `json:"productId"` |
| 231 | + SubscriptionGroupIdentifier string `json:"subscriptionGroupIdentifier"` |
| 232 | + PurchaseDate int `json:"purchaseDate"` |
| 233 | + OriginalPurchaseDate int `json:"originalPurchaseDate"` |
| 234 | + ExpiresDate int `json:"expiresDate"` |
| 235 | + Type string `json:"type"` |
| 236 | + InAppOwnershipType string `json:"inAppOwnershipType"` |
| 237 | + SignedDate int `json:"signedDate"` |
| 238 | + Environment string `json:"environment"` |
| 239 | +} |
| 240 | + |
| 241 | +// Notification Renewal Info |
| 242 | +type RenewalInfo struct { |
| 243 | + jwt.RegisteredClaims |
| 244 | + OriginalTransactionID string `json:"originalTransactionId"` |
| 245 | + ExpirationIntent int `json:"expirationIntent"` |
| 246 | + AutoRenewProductId string `json:"autoRenewProductId"` |
| 247 | + ProductID string `json:"productId"` |
| 248 | + AutoRenewStatus int `json:"autoRenewStatus"` |
| 249 | + IsInBillingRetryPeriod bool `json:"isInBillingRetryPeriod"` |
| 250 | + SignedDate int `json:"signedDate"` |
| 251 | + Environment string `json:"environment"` |
| 252 | +} |
0 commit comments