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DAOA,IAAA,6DAOA,IAAA,iDAOA,IAAA,yCAOA,IAAA,gEACH,CAnYD,CAAY,WAAQ,QAAA,SAAR,SAAQ","file":"/npm/@reelspace/app-store-server-library@0.0.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@reelspace/app-store-server-library@0.0.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Copyright (c) 2023 Apple Inc. Licensed under MIT License.\n\nimport fetch from 'node-fetch';\nimport { CheckTestNotificationResponse, CheckTestNotificationResponseValidator } from './models/CheckTestNotificationResponse';\nimport { ConsumptionRequest } from './models/ConsumptionRequest';\nimport { Environment } from './models/Environment';\nimport { ExtendRenewalDateRequest } from './models/ExtendRenewalDateRequest';\nimport { ExtendRenewalDateResponse, ExtendRenewalDateResponseValidator } from './models/ExtendRenewalDateResponse';\nimport { HistoryResponse, HistoryResponseValidator } from './models/HistoryResponse';\nimport { MassExtendRenewalDateRequest } from './models/MassExtendRenewalDateRequest';\nimport { MassExtendRenewalDateResponse, MassExtendRenewalDateResponseValidator } from './models/MassExtendRenewalDateResponse';\nimport { MassExtendRenewalDateStatusResponse, MassExtendRenewalDateStatusResponseValidator } from './models/MassExtendRenewalDateStatusResponse';\nimport { OrderLookupResponse, OrderLookupResponseValidator } from './models/OrderLookupResponse';\nimport { RefundHistoryResponse, RefundHistoryResponseValidator } from './models/RefundHistoryResponse';\nimport { SendTestNotificationResponse, SendTestNotificationResponseValidator } from './models/SendTestNotificationResponse';\nimport { StatusResponse, StatusResponseValidator } from './models/StatusResponse';\nimport { TransactionHistoryRequest } from './models/TransactionHistoryRequest';\nimport { TransactionInfoResponse, TransactionInfoResponseValidator } from './models/TransactionInfoResponse';\nimport { Validator } from './models/Validator';\nimport { Status } from './models/Status';\nexport { SignedDataVerifier } from './jws_verification'\nexport { ReceiptUtility } from './receipt_utility'\nexport { AccountTenure } from \"./models/AccountTenure\"\nexport { AutoRenewStatus } from './models/AutoRenewStatus'\nexport { CheckTestNotificationResponse } from './models/CheckTestNotificationResponse'\nexport { ConsumptionRequest } from './models/ConsumptionRequest'\nexport { ConsumptionStatus } from './models/ConsumptionStatus'\nexport { Data } from './models/Data'\nexport { DeliveryStatus } from './models/DeliveryStatus'\nexport { Environment } from './models/Environment'\nexport { ExpirationIntent } from './models/ExpirationIntent'\nexport { ExtendReasonCode } from './models/ExtendReasonCode'\nexport { ExtendRenewalDateRequest } from './models/ExtendRenewalDateRequest'\nexport { ExtendRenewalDateResponse } from './models/ExtendRenewalDateResponse'\nexport { SendAttemptResult } from './models/SendAttemptResult'\nexport { SendAttemptItem } from './models/SendAttemptItem'\nexport { HistoryResponse } from './models/HistoryResponse'\nexport { InAppOwnershipType } from './models/InAppOwnershipType'\nexport { JWSRenewalInfoDecodedPayload } from './models/JWSRenewalInfoDecodedPayload'\nexport { JWSTransactionDecodedPayload } from './models/JWSTransactionDecodedPayload'\nexport { LastTransactionsItem } from './models/LastTransactionsItem'\nexport { LifetimeDollarsPurchased } from './models/LifetimeDollarsPurchased'\nexport { LifetimeDollarsRefunded } from './models/LifetimeDollarsRefunded'\nexport { MassExtendRenewalDateRequest } from './models/MassExtendRenewalDateRequest'\nexport { MassExtendRenewalDateResponse } from './models/MassExtendRenewalDateResponse'\nexport { MassExtendRenewalDateStatusResponse } from './models/MassExtendRenewalDateStatusResponse'\nexport { NotificationHistoryRequest } from './models/NotificationHistoryRequest'\nexport { NotificationHistoryResponse } from './models/NotificationHistoryResponse'\nexport { NotificationHistoryResponseItem } from './models/NotificationHistoryResponseItem'\nexport { NotificationTypeV2 } from './models/NotificationTypeV2'\nexport { OfferType } from './models/OfferType'\nexport { OrderLookupResponse } from './models/OrderLookupResponse'\nexport { OrderLookupStatus } from './models/OrderLookupStatus'\nexport { Platform } from './models/Platform'\nexport { PlayTime } from './models/PlayTime'\nexport { PriceIncreaseStatus } from './models/PriceIncreaseStatus'\nexport { RefundHistoryResponse } from './models/RefundHistoryResponse'\nexport { ResponseBodyV2 } from './models/ResponseBodyV2'\nexport { ResponseBodyV2DecodedPayload } from './models/ResponseBodyV2DecodedPayload'\nexport { RevocationReason } from './models/RevocationReason'\nexport { SendTestNotificationResponse } from './models/SendTestNotificationResponse'\nexport { Status } from './models/Status'\nexport { StatusResponse } from './models/StatusResponse'\nexport { SubscriptionGroupIdentifierItem } from './models/SubscriptionGroupIdentifierItem'\nexport { Subtype } from './models/Subtype'\nexport { Summary } from './models/Summary'\nexport { TransactionHistoryRequest, Order, ProductType } from './models/TransactionHistoryRequest'\nexport { TransactionInfoResponse } from './models/TransactionInfoResponse'\nexport { TransactionReason } from './models/TransactionReason'\nexport { Type } from './models/Type'\nexport { UserStatus } from './models/UserStatus'\nexport { PromotionalOfferSignatureCreator } from './promotional_offer'\nexport { DecodedSignedData } from './models/DecodedSignedData'\nexport { AppTransaction } from './models/AppTransaction'\n\nimport jsonwebtoken = require('jsonwebtoken');\nimport { NotificationHistoryRequest } from './models/NotificationHistoryRequest';\nimport { NotificationHistoryResponse, NotificationHistoryResponseValidator } from './models/NotificationHistoryResponse';\nimport { URLSearchParams } from 'url';\n\nexport class AppStoreServerAPIClient {\n    private static PRODUCTION_URL = \"https://api.storekit.itunes.apple.com\";\n    private static SANDBOX_URL = \"https://api.storekit-sandbox.itunes.apple.com\";\n    private static LOCAL_TESTING_URL = \"https://local-testing-base-url\";\n    private static USER_AGENT = \"app-store-server-library/node/1.1.0\";\n\n    private issuerId: string\n    private keyId: string\n    private signingKey: string\n    private bundleId: string\n    private urlBase: string\n\n    /**\n     * Create an App Store Server API client\n     * @param signingKey Your private key downloaded from App Store Connect\n     * @param keyId Your private key ID from App Store Connect\n     * @param issuerId Your issuer ID from the Keys page in App Store Connect\n     * @param bundleId Your app’s bundle ID\n     * @param environment The environment to target\n     */\n    public constructor(signingKey: string, keyId: string, issuerId: string, bundleId: string, environment: Environment) {\n        this.issuerId = issuerId\n        this.keyId = keyId\n        this.bundleId = bundleId\n        this.signingKey = signingKey\n        switch(environment) {\n            case Environment.XCODE:\n                throw new Error(\"Xcode is not a supported environment for an AppStoreServerAPIClient\")\n            case Environment.PRODUCTION:\n                this.urlBase = AppStoreServerAPIClient.PRODUCTION_URL\n                break\n            case Environment.LOCAL_TESTING:\n                this.urlBase = AppStoreServerAPIClient.LOCAL_TESTING_URL\n                break\n            case Environment.SANDBOX:\n                this.urlBase = AppStoreServerAPIClient.SANDBOX_URL\n                break\n        }\n    }\n\n    protected async makeRequest<T>(path: string, method: string, queryParameters: { [key: string]: string[]}, body: object | null, validator: Validator<T> | null): Promise<T> {\n        const headers: { [key: string]: string } = {\n            'User-Agent': AppStoreServerAPIClient.USER_AGENT,\n            'Authorization': 'Bearer ' + this.createBearerToken(),\n            'Accept': 'application/json',\n        }\n        const parsedQueryParameters = new URLSearchParams()\n        for (const queryParam in queryParameters) {\n            for (const queryVal of queryParameters[queryParam]) {\n                parsedQueryParameters.append(queryParam, queryVal)\n            }\n        }\n        let stringBody = undefined\n        if (body != null) {\n            stringBody = JSON.stringify(body)\n            headers['Content-Type'] = 'application/json'\n        }\n\n        const response = await this.makeFetchRequest(path, parsedQueryParameters, method, stringBody, headers)\n\n        if(response.ok) {\n            // Success\n            if (validator == null) {\n                return null as T\n            }\n\n            const responseBody = await response.json()\n\n            if (!validator.validate(responseBody)) {\n                throw new Error(\"Unexpected response body format\")\n            }\n\n            return responseBody\n        }\n\n        try {\n            const responseBody = await response.json()\n            const errorCode = responseBody['errorCode']\n            const errorMessage = responseBody['errorMessage']\n\n            if (errorCode) {\n                throw new APIException(response.status, errorCode, errorMessage)\n            }\n\n            throw new APIException(response.status)\n        } catch (e) {\n            if (e instanceof APIException) {\n                throw e\n            }\n\n            throw new APIException(response.status)\n        }\n    }\n\n    protected async makeFetchRequest(path: string, parsedQueryParameters: URLSearchParams, method: string, stringBody: string | undefined, headers: { [key: string]: string; }) {\n        return await fetch(this.urlBase + path + '?' + parsedQueryParameters, {\n            method: method,\n            body: stringBody,\n            headers: headers\n        });\n    }\n\n    /**\n     * Uses a subscription’s product identifier to extend the renewal date for all of its eligible active subscribers.\n     *\n     * @param massExtendRenewalDateRequest The request body for extending a subscription renewal date for all of its active subscribers.\n     * @return A response that indicates the server successfully received the subscription-renewal-date extension request.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/extend_subscription_renewal_dates_for_all_active_subscribers Extend Subscription Renewal Dates for All Active Subscribers}\n     */\n    public async extendRenewalDateForAllActiveSubscribers(massExtendRenewalDateRequest: MassExtendRenewalDateRequest): Promise<MassExtendRenewalDateResponse> {\n        return await this.makeRequest(\"/inApps/v1/subscriptions/extend/mass\", \"POST\", {}, massExtendRenewalDateRequest, new MassExtendRenewalDateResponseValidator());\n    }\n\n    /**\n     * Extends the renewal date of a customer’s active subscription using the original transaction identifier.\n     *\n     * @param originalTransactionId    The original transaction identifier of the subscription receiving a renewal date extension.\n     * @param extendRenewalDateRequest The request body containing subscription-renewal-extension data.\n     * @return A response that indicates whether an individual renewal-date extension succeeded, and related details.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/extend_a_subscription_renewal_date Extend a Subscription Renewal Date}\n     */\n    public async extendSubscriptionRenewalDate(originalTransactionId: string, extendRenewalDateRequest: ExtendRenewalDateRequest): Promise<ExtendRenewalDateResponse> {\n        return await this.makeRequest<ExtendRenewalDateResponse>(\"/inApps/v1/subscriptions/extend/\" + originalTransactionId, \"PUT\", {}, extendRenewalDateRequest, new ExtendRenewalDateResponseValidator());\n    }\n\n    /**\n     * Get the statuses for all of a customer’s auto-renewable subscriptions in your app.\n     *\n     * @param transactionId The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.\n     * @param status An optional filter that indicates the status of subscriptions to include in the response. Your query may specify more than one status query parameter.\n     * @return A response that contains status information for all of a customer’s auto-renewable subscriptions in your app.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_all_subscription_statuses Get All Subscription Statuses}\n     */\n    public async getAllSubscriptionStatuses(transactionId: string, status: Status[] | undefined = undefined): Promise<StatusResponse> {\n        const queryParameters: { [key: string]: [string]} = {}\n        if (status != null) {\n            queryParameters[\"status\"] = status.map(s => s.toString()) as [string];\n        }\n\n        return await this.makeRequest(\"/inApps/v1/subscriptions/\" + transactionId, \"GET\", queryParameters, null, new StatusResponseValidator());\n    }\n\n    /**\n     * Get a paginated list of all of a customer’s refunded in-app purchases for your app.\n     *\n     * @param transactionId The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.\n     * @param revision              A token you provide to get the next set of up to 20 transactions. All responses include a revision token. Use the revision token from the previous RefundHistoryResponse.\n     * @return A response that contains status information for all of a customer’s auto-renewable subscriptions in your app.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_refund_history Get Refund History}\n     */\n    public async getRefundHistory(transactionId: string, revision: string | null): Promise<RefundHistoryResponse> {\n        const queryParameters: { [key: string]: [string]} = {}\n        if (revision !== null) {\n            queryParameters[\"revision\"] = [revision];\n        }\n\n        return await this.makeRequest(\"/inApps/v2/refund/lookup/\" + transactionId, \"GET\", queryParameters, null, new RefundHistoryResponseValidator());\n    }\n\n    /**\n     * Checks whether a renewal date extension request completed, and provides the final count of successful or failed extensions.\n     *\n     * @param requestIdentifier The UUID that represents your request to the Extend Subscription Renewal Dates for All Active Subscribers endpoint.\n     * @param productId         The product identifier of the auto-renewable subscription that you request a renewal-date extension for.\n     * @return A response that indicates the current status of a request to extend the subscription renewal date to all eligible subscribers.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_status_of_subscription_renewal_date_extensions Get Status of Subscription Renewal Date Extensions}\n     */\n    public async getStatusOfSubscriptionRenewalDateExtensions(requestIdentifier: string, productId: string): Promise<MassExtendRenewalDateStatusResponse> {\n        return await this.makeRequest(\"/inApps/v1/subscriptions/extend/mass/\" + productId + \"/\" + requestIdentifier, \"GET\", {}, null, new MassExtendRenewalDateStatusResponseValidator());\n    }\n\n    /**\n     * Check the status of the test App Store server notification sent to your server.\n     *\n     * @param testNotificationToken The test notification token received from the Request a Test Notification endpoint\n     * @return A response that contains the contents of the test notification sent by the App Store server and the result from your server.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_test_notification_status Get Test Notification Status}\n     */\n    public async getTestNotificationStatus(testNotificationToken: string): Promise<CheckTestNotificationResponse> {\n        return await this.makeRequest(\"/inApps/v1/notifications/test/\" + testNotificationToken, \"GET\", {}, null, new CheckTestNotificationResponseValidator());\n    }\n\n    /**\n     * Get a list of notifications that the App Store server attempted to send to your server.\n     *\n     * @param paginationToken An optional token you use to get the next set of up to 20 notification history records. All responses that have more records available include a paginationToken. Omit this parameter the first time you call this endpoint.\n     * @param notificationHistoryRequest The request body that includes the start and end dates, and optional query constraints.\n     * @return A response that contains the App Store Server Notifications history for your app.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_notification_history Get Notification History}\n     */\n    public async getNotificationHistory(paginationToken: string | null, notificationHistoryRequest: NotificationHistoryRequest): Promise<NotificationHistoryResponse> {\n        const queryParameters: { [key: string]: [string]} = {}\n        if (paginationToken != null) {\n            queryParameters[\"paginationToken\"] = [paginationToken];\n        }\n        return await this.makeRequest(\"/inApps/v1/notifications/history\", \"POST\", queryParameters, notificationHistoryRequest, new NotificationHistoryResponseValidator());\n    }\n\n    /**\n     * Get a customer’s in-app purchase transaction history for your app.\n     *\n     * @param transactionId The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.\n     * @param revision              A token you provide to get the next set of up to 20 transactions. All responses include a revision token. Note: For requests that use the revision token, include the same query parameters from the initial request. Use the revision token from the previous HistoryResponse.\n     * @return A response that contains the customer’s transaction history for an app.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history Get Transaction History}\n     */\n    public async getTransactionHistory(transactionId: string, revision: string | null, transactionHistoryRequest: TransactionHistoryRequest): Promise<HistoryResponse> {\n        const queryParameters: { [key: string]: string[]} = {}\n        if (revision != null) {\n            queryParameters[\"revision\"] = [revision];\n        }\n        if (transactionHistoryRequest.startDate) {\n            queryParameters[\"startDate\"] = [transactionHistoryRequest.startDate.toString()];\n        }\n        if (transactionHistoryRequest.endDate) {\n            queryParameters[\"endDate\"] = [transactionHistoryRequest.endDate.toString()];\n        }\n        if (transactionHistoryRequest.productIds) {\n            queryParameters[\"productId\"] = transactionHistoryRequest.productIds;\n        }\n        if (transactionHistoryRequest.productTypes) {\n            queryParameters[\"productType\"] = transactionHistoryRequest.productTypes;\n        }\n        if (transactionHistoryRequest.sort) {\n            queryParameters[\"sort\"] = [transactionHistoryRequest.sort];\n        }\n        if (transactionHistoryRequest.subscriptionGroupIdentifiers) {\n            queryParameters[\"subscriptionGroupIdentifier\"] = transactionHistoryRequest.subscriptionGroupIdentifiers;\n        }\n        if (transactionHistoryRequest.inAppOwnershipType) {\n            queryParameters[\"inAppOwnershipType\"] = [transactionHistoryRequest.inAppOwnershipType];\n        }\n        if (transactionHistoryRequest.revoked !== undefined) {\n            queryParameters[\"revoked\"] = [transactionHistoryRequest.revoked.toString()];\n        }\n        return await this.makeRequest(\"/inApps/v1/history/\" + transactionId, \"GET\", queryParameters, null, new HistoryResponseValidator());\n    }\n\n    /**\n     * Get information about a single transaction for your app.\n     *\n     * @param transactionId The identifier of a transaction that belongs to the customer, and which may be an original transaction identifier.\n     * @return A response that contains signed transaction information for a single transaction.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/get_transaction_info Get Transaction Info}\n     */\n    public async getTransactionInfo(transactionId: string): Promise<TransactionInfoResponse> {\n        return await this.makeRequest(\"/inApps/v1/transactions/\" + transactionId, \"GET\", {}, null, new TransactionInfoResponseValidator());\n    }\n\n    /**\n     * Get a customer’s in-app purchases from a receipt using the order ID.\n     *\n     * @param orderId The order ID for in-app purchases that belong to the customer.\n     * @return A response that includes the order lookup status and an array of signed transactions for the in-app purchases in the order.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/look_up_order_id Look Up Order ID}\n     */\n    public async lookUpOrderId(orderId: string): Promise<OrderLookupResponse> {\n        return await this.makeRequest(\"/inApps/v1/lookup/\" + orderId, \"GET\", {}, null, new OrderLookupResponseValidator());\n    }\n\n    /**\n     * Ask App Store Server Notifications to send a test notification to your server.\n     *\n     * @return A response that contains the test notification token.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/request_a_test_notification Request a Test Notification}\n     */\n    public async requestTestNotification(): Promise<SendTestNotificationResponse> {\n        return await this.makeRequest(\"/inApps/v1/notifications/test\", \"POST\", {}, null, new SendTestNotificationResponseValidator());\n    }\n\n    /**\n     * Send consumption information about a consumable in-app purchase to the App Store after your server receives a consumption request notification.\n     *\n     * @param transactionId The transaction identifier for which you’re providing consumption information. You receive this identifier in the CONSUMPTION_REQUEST notification the App Store sends to your server.\n     * @param consumptionRequest    The request body containing consumption information.\n     * @throws APIException If a response was returned indicating the request could not be processed\n     * {@link https://developer.apple.com/documentation/appstoreserverapi/send_consumption_information Send Consumption Information}\n     */\n    public async sendConsumptionData(transactionId: string, consumptionRequest: ConsumptionRequest): Promise<void> {\n        await this.makeRequest(\"/inApps/v1/transactions/consumption/\" + transactionId, \"PUT\", {}, consumptionRequest, null);\n    }\n\n    private createBearerToken(): string {\n        const payload = {\n            bid: this.bundleId\n        }\n        return jsonwebtoken.sign(payload, this.signingKey, { algorithm: 'ES256', keyid: this.keyId, issuer: this.issuerId, audience: 'appstoreconnect-v1', expiresIn: '5m'});\n    }\n}\n\n\nexport class APIException extends Error {\n    public httpStatusCode: number\n    public apiError: number | APIError | null\n    public errorMessage: string | null\n\n    constructor(httpStatusCode: number, apiError: number | null = null, errorMessage: string | null = null) {\n        super()\n        this.httpStatusCode = httpStatusCode\n        this.apiError = apiError\n        this.errorMessage = errorMessage\n    }\n}\n\n/**\n * Error codes that App Store Server API responses return.\n * \n * {@link https://developer.apple.com/documentation/appstoreserverapi/error_codes Error codes}\n */\nexport enum APIError {\n    /**\n     * An error that indicates an invalid request.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/generalbadrequesterror GeneralBadRequestError}\n     */\n    GENERAL_BAD_REQUEST = 4000000,\n\n    /**\n     * An error that indicates an invalid app identifier.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidappidentifiererror InvalidAppIdentifierError}\n     */\n    INVALID_APP_IDENTIFIER = 4000002,\n\n    /**\n     * An error that indicates an invalid request revision.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidrequestrevisionerror InvalidRequestRevisionError}\n     */\n    INVALID_REQUEST_REVISION = 4000005,\n\n    /**\n     * An error that indicates an invalid transaction identifier.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidtransactioniderror InvalidTransactionIdError}\n     */\n    INVALID_TRANSACTION_ID = 4000006,\n\n    /**\n     * An error that indicates an invalid original transaction identifier.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidoriginaltransactioniderror InvalidOriginalTransactionIdError}\n     */\n    INVALID_ORIGINAL_TRANSACTION_ID = 4000008,\n\n    /**\n     * An error that indicates an invalid extend-by-days value.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidextendbydayserror InvalidExtendByDaysError}\n     */\n    INVALID_EXTEND_BY_DAYS = 4000009,\n\n    /**\n     * An error that indicates an invalid reason code.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidextendreasoncodeerror InvalidExtendReasonCodeError}\n     */\n    INVALID_EXTEND_REASON_CODE = 4000010,\n\n    /**\n     * An error that indicates an invalid request identifier.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidrequestidentifiererror InvalidRequestIdentifierError}\n     */\n    INVALID_REQUEST_IDENTIFIER = 4000011,\n\n    /**\n     * An error that indicates that the start date is earlier than the earliest allowed date.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/startdatetoofarinpasterror StartDateTooFarInPastError}\n     */\n    START_DATE_TOO_FAR_IN_PAST = 4000012,\n\n    /**\n     * An error that indicates that the end date precedes the start date, or the two dates are equal.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/startdateafterenddateerror StartDateAfterEndDateError}\n     */\n    START_DATE_AFTER_END_DATE = 4000013,\n\n    /**\n     * An error that indicates the pagination token is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidpaginationtokenerror InvalidPaginationTokenError}\n     */\n    INVALID_PAGINATION_TOKEN = 4000014,\n\n    /**\n     * An error that indicates the start date is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidstartdateerror InvalidStartDateError}\n     */\n    INVALID_START_DATE = 4000015,\n\n    /**\n     * An error that indicates the end date is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidenddateerror InvalidEndDateError}\n     */\n    INVALID_END_DATE = 4000016,\n    \n    /**\n     * An error that indicates the pagination token expired.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/paginationtokenexpirederror PaginationTokenExpiredError}\n     */\n    PAGINATION_TOKEN_EXPIRED = 4000017,\n\n    /**\n     * An error that indicates the notification type or subtype is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidnotificationtypeerror InvalidNotificationTypeError}\n     */\n    INVALID_NOTIFICATION_TYPE = 4000018,\n\n    /**\n     * An error that indicates the request is invalid because it has too many constraints applied.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/multiplefilterssuppliederror MultipleFiltersSuppliedError}\n     */\n    MULTIPLE_FILTERS_SUPPLIED = 4000019,\n\n    /**\n     * An error that indicates the test notification token is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidtestnotificationtokenerror InvalidTestNotificationTokenError}\n     */\n    INVALID_TEST_NOTIFICATION_TOKEN = 4000020,\n\n    /**\n     * An error that indicates an invalid sort parameter.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidsorterror InvalidSortError}\n     */\n    INVALID_SORT = 4000021,\n\n    /**\n     * An error that indicates an invalid product type parameter.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidproducttypeerror InvalidProductTypeError}\n     */\n    INVALID_PRODUCT_TYPE = 4000022,\n\n    /**\n     * An error that indicates the product ID parameter is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidproductiderror InvalidProductIdError}\n     */\n    INVALID_PRODUCT_ID = 4000023,\n\n    /**\n     * An error that indicates an invalid subscription group identifier.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidsubscriptiongroupidentifiererror InvalidSubscriptionGroupIdentifierError}\n     */\n    INVALID_SUBSCRIPTION_GROUP_IDENTIFIER = 4000024,\n\n    /**\n     * An error that indicates the query parameter exclude-revoked is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidexcluderevokederror InvalidExcludeRevokedError}\n     * \n     * @deprecated\n     */\n    INVALID_EXCLUDE_REVOKED = 4000025,\n\n    /**\n     * An error that indicates an invalid in-app ownership type parameter.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidinappownershiptypeerror InvalidInAppOwnershipTypeError}\n     */\n    INVALID_IN_APP_OWNERSHIP_TYPE = 4000026,\n\n    /**\n     * An error that indicates a required storefront country code is empty.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidemptystorefrontcountrycodelisterror InvalidEmptyStorefrontCountryCodeListError}\n     */\n    INVALID_EMPTY_STOREFRONT_COUNTRY_CODE_LIST = 4000027,\n\n    /**\n     * An error that indicates a storefront code is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidstorefrontcountrycodeerror InvalidStorefrontCountryCodeError}\n     */\n    INVALID_STOREFRONT_COUNTRY_CODE = 4000028,\n\n    /**\n     * An error that indicates the revoked parameter contains an invalid value.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidrevokederror InvalidRevokedError}\n     */\n    INVALID_REVOKED = 4000030,\n\n    /**\n     * An error that indicates the status parameter is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidstatuserror InvalidStatusError}\n     */\n    INVALID_STATUS = 4000031,\n\n    /**\n     * An error that indicates the value of the account tenure field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidaccounttenureerror InvalidAccountTenureError}\n     */\n    INVALID_ACCOUNT_TENURE = 4000032,\n\n    /**\n     * An error that indicates the value of the app account token field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidappaccounttokenerror InvalidAppAccountTokenError}\n     */\n    INVALID_APP_ACCOUNT_TOKEN = 4000033,\n\n    /**\n     * An error that indicates the value of the consumption status field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidconsumptionstatuserror InvalidConsumptionStatusError}\n     */\n    INVALID_CONSUMPTION_STATUS = 4000034,\n\n    /**\n     * An error that indicates the customer consented field is invalid or doesn’t indicate that the customer consented.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidcustomerconsentederror InvalidCustomerConsentedError}\n     */\n    INVALID_CUSTOMER_CONSENTED = 4000035,\n\n    /**\n     * An error that indicates the value in the delivery status field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invaliddeliverystatuserror InvalidDeliveryStatusError}\n     */\n    INVALID_DELIVERY_STATUS = 4000036,\n\n    /**\n     * An error that indicates the value in the lifetime dollars purchased field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidlifetimedollarspurchasederror InvalidLifetimeDollarsPurchasedError}\n     */\n    INVALID_LIFETIME_DOLLARS_PURCHASED = 4000037,\n\n    /**\n     * An error that indicates the value in the lifetime dollars refunded field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidlifetimedollarsrefundederror InvalidLifetimeDollarsRefundedError}\n     */\n    INVALID_LIFETIME_DOLLARS_REFUNDED = 4000038,\n\n    /**\n     * An error that indicates the value in the platform field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidplatformerror InvalidPlatformError}\n     */\n    INVALID_PLATFORM = 4000039,\n\n    /**\n     * An error that indicates the value in the playtime field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidplaytimeerror InvalidPlayTimeError}\n     */\n    INVALID_PLAY_TIME = 4000040,\n\n    /**\n     * An error that indicates the value in the sample content provided field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidsamplecontentprovidederror InvalidSampleContentProvidedError}\n     */\n    INVALID_SAMPLE_CONTENT_PROVIDED = 4000041,\n\n    /**\n     * An error that indicates the value in the user status field is invalid.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invaliduserstatuserror InvalidUserStatusError}\n     */\n    INVALID_USER_STATUS = 4000042,\n\n    /**\n     * An error that indicates the transaction identifier doesn’t represent a consumable in-app purchase.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/invalidtransactionnotconsumableerror InvalidTransactionNotConsumableError}\n     */\n    INVALID_TRANSACTION_NOT_CONSUMABLE = 4000043,\n\n    /**\n     * An error that indicates the subscription doesn't qualify for a renewal-date extension due to its subscription state.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/subscriptionextensionineligibleerror SubscriptionExtensionIneligibleError}\n     */\n    SUBSCRIPTION_EXTENSION_INELIGIBLE = 4030004,\n\n    /**\n     * An error that indicates the subscription doesn’t qualify for a renewal-date extension because it has already received the maximum extensions.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/subscriptionmaxextensionerror SubscriptionMaxExtensionError}\n     */\n    SUBSCRIPTION_MAX_EXTENSION = 4030005,\n\n    /**\n     * An error that indicates a subscription isn't directly eligible for a renewal date extension because the user obtained it through Family Sharing.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/familysharedsubscriptionextensionineligibleerror FamilySharedSubscriptionExtensionIneligibleError}\n     */\n    FAMILY_SHARED_SUBSCRIPTION_EXTENSION_INELIGIBLE = 4030007,\n\n    /**\n     * An error that indicates the App Store account wasn’t found.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/accountnotfounderror AccountNotFoundError}\n     */\n    ACCOUNT_NOT_FOUND = 4040001,\n\n    /**\n     * An error response that indicates the App Store account wasn’t found, but you can try again.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/accountnotfoundretryableerror AccountNotFoundRetryableError}\n     */\n    ACCOUNT_NOT_FOUND_RETRYABLE = 4040002,\n\n    /**\n     * An error that indicates the app wasn’t found.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/appnotfounderror AppNotFoundError}\n     */\n    APP_NOT_FOUND = 4040003,\n\n    /**\n     * An error response that indicates the app wasn’t found, but you can try again.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/appnotfoundretryableerror AppNotFoundRetryableError}\n     */\n    APP_NOT_FOUND_RETRYABLE = 4040004,\n\n    /**\n     * An error that indicates an original transaction identifier wasn't found.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/originaltransactionidnotfounderror OriginalTransactionIdNotFoundError}\n     */\n    ORIGINAL_TRANSACTION_ID_NOT_FOUND = 4040005,\n\n    /**\n     * An error response that indicates the original transaction identifier wasn’t found, but you can try again.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/originaltransactionidnotfoundretryableerror OriginalTransactionIdNotFoundRetryableError}\n     */\n    ORIGINAL_TRANSACTION_ID_NOT_FOUND_RETRYABLE = 4040006,\n\n    /**\n     * An error that indicates that the App Store server couldn’t find a notifications URL for your app in this environment.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/servernotificationurlnotfounderror ServerNotificationUrlNotFoundError}\n     */\n    SERVER_NOTIFICATION_URL_NOT_FOUND = 4040007,\n\n    /**\n     * An error that indicates that the test notification token is expired or the test notification status isn’t available.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/testnotificationnotfounderror TestNotificationNotFoundError}\n     */\n    TEST_NOTIFICATION_NOT_FOUND = 4040008,\n\n    /**\n     * An error that indicates the server didn't find a subscription-renewal-date extension request for the request identifier and product identifier you provided.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/statusrequestnotfounderror StatusRequestNotFoundError}\n     */\n    STATUS_REQUEST_NOT_FOUND = 4040009,\n\n    /**\n     * An error that indicates a transaction identifier wasn't found.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/transactionidnotfounderror TransactionIdNotFoundError}\n     */\n    TRANSACTION_ID_NOT_FOUND = 4040010,\n\n    /**\n     * An error that indicates that the request exceeded the rate limit.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/ratelimitexceedederror RateLimitExceededError}\n     */\n    RATE_LIMIT_EXCEEDED = 4290000,\n\n    /**\n     * An error that indicates a general internal error.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/generalinternalerror GeneralInternalError}\n     */\n    GENERAL_INTERNAL = 5000000,\n\n    /**\n     * An error response that indicates an unknown error occurred, but you can try again.\n     * \n     * {@link https://developer.apple.com/documentation/appstoreserverapi/generalinternalretryableerror GeneralInternalRetryableError}\n     */\n    GENERAL_INTERNAL_RETRYABLE = 5000001,\n}"]}