{
  "endpoint": "CommerceHandler",
  "preferredHttpPath": "m",
  "alternateHttpPaths": [
    "HttpCommerce"
  ],
  "summary": "Commerce related APIs.",
  "apis": [
    {
      "name": "GetEffectiveUserLimits",
      "httpMethod": "GET",
      "httpPathRegex": "^/effective-user-limits",
      "subPathPattern": "/effective-user-limits",
      "summary": "Gets the specified user's effective limits, computing the overlapping limits and merging them together to compute the effective limits for the next two time periods.\n            At least one set of limits will always be returned (the limits based on the default free subscription or a root subscription).\n            Multiple limit sets may be returned, in temporal order with the end time for each set.\n            Includes only the usage for currently active purchases, not past or potential future purchases (or lack thereof).",
      "parameters": [
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The optional <see cref=\"T:AmbientServices.UserId\" /> for the user whose limits are wanted.  If not specified, the currently-authenticated user will be used."
        },
        {
          "name": "previousEndTime",
          "required": false,
          "type": "DateTime?",
          "description": "An optional <see cref=\"T:System.DateTime\" /> whose value comes from the <see cref=\"P:PicMeModel.EffectiveUserLimits.EndTime\" /> returned in a previous call.  The limits returned in this case will apply when the *server* clock reaches this time. Must not be more than 367 days after the current UTC time."
        }
      ],
      "return": {
        "type": "GetEffectiveUserLimitsResponse",
        "description": "A <see cref=\"T:PicMeApi.GetEffectiveUserLimitsResponse\" /> containing the response."
      }
    },
    {
      "name": "GetEffectiveUserUsage",
      "httpMethod": "GET",
      "httpPathRegex": "^/effective-user-usage",
      "subPathPattern": "/effective-user-usage",
      "summary": "Gets the specified user's effective usage, computing the overlapping usage and limits and merging them together to compute the effective limits for the current time period.\n            Includes only the usage for currently active purchases, not past or potential future purchases (or lack thereof).",
      "parameters": [
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The optional <see cref=\"T:AmbientServices.UserId\" /> for the user whose usage and limits are wanted.  If not specified, the currently-authenticated user will be used."
        },
        {
          "name": "previousEndTime",
          "required": false,
          "type": "DateTime?",
          "description": "An optional <see cref=\"T:System.DateTime\" /> whose value comes from the <see cref=\"P:PicMeModel.EffectiveUserUsage.EndTime\" /> returned in a previous call.  The limits returned in this case will apply when the *server* clock reaches this time. Must not be more than 367 days after the current UTC time."
        }
      ],
      "return": {
        "type": "GetEffectiveUserUsageResponse",
        "description": "A <see cref=\"T:PicMeApi.GetEffectiveUserUsageResponse\" /> containing the response."
      }
    },
    {
      "name": "ListUserPurchaseChangeRecords",
      "httpMethod": "GET",
      "httpPathRegex": "^/purchase-records",
      "subPathPattern": "/purchase-records",
      "summary": "Lists all user purchase change records for the specified user.\n            Requires root administrator privileges or in dev, a Lightning Kite email account",
      "parameters": [
        {
          "name": "userId",
          "required": true,
          "type": "UserId",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose limits are to be retrieved."
        },
        {
          "name": "startTime",
          "required": false,
          "type": "DateTime?",
          "description": "The <see cref=\"T:System.DateTime\" /> of the earliest purchase to return (defaults to 365 days ago, compares against at <see cref=\"P:PicMeModel.UserPurchase.EndTime\" />)."
        },
        {
          "name": "purchaseMethod",
          "required": false,
          "type": "String?",
          "description": "The string to store in <see cref=\"P:PicMeModel.UserPurchase.PurchaseMethod\" />.  Defaults to null, which lists *all* purchase change records."
        }
      ],
      "return": {
        "type": "ListUserPurchaseChangeRecordsResponse",
        "description": "A <see cref=\"T:PicMeApi.ListUserPurchaseChangeRecordsResponse\" /> containing the response."
      }
    },
    {
      "name": "SynchronizeUserPurchases",
      "httpMethod": "POST",
      "httpPathRegex": "^/sync-purchases",
      "subPathPattern": "/sync-purchases",
      "summary": "Manually synchronizes user purchases from the specified external payment system to the set of user purchases with the specified purchase method (currently, only \"RevenueCat\" is valid and required).  \n            This is intended to be used as a manual backstop in case the webhooks fail for some reason, to ensure that the user's purchases are eventually consistent with the external payment system.  \n            Requires root administrator privileges or in dev, a Lightning Kite email account.",
      "parameters": [
        {
          "name": "userId",
          "required": true,
          "type": "UserId?",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose purchases are to be synchronized.  If not specified, uses the authenticated user."
        },
        {
          "name": "purchaseMethod",
          "required": true,
          "type": "String",
          "description": "The purchase method (currently, only \"RevenueCat\" is valid, and is required)."
        }
      ],
      "return": {
        "type": "SynchronizeUserPurchasesResponse",
        "description": "A <see cref=\"T:PicMeApi.SynchronizeUserPurchasesResponse\" /> containing the response."
      }
    },
    {
      "name": "RevenueCatWebhook",
      "httpMethod": "POST",
      "httpPathRegex": "^/revenuecat",
      "subPathPattern": "/revenuecat",
      "summary": "The webhook for RevenueCat.\n            Called by RevenueCat using the secret key configured in RevenueCat, or by a root administrator.\n            Synchronizes purchases for the indicated user(s) by syncing from RevenueCat (or IExternalPaymentVerification) to purchases with the the \"RevenueCat\" purchase method for the indicated user(s).",
      "parameters": [
        {
          "name": "body",
          "required": true,
          "type": "RevenueCatWebhookPostData",
          "description": "The body of the POST."
        }
      ],
      "return": {
        "type": "RevenueCatWebhookResponse",
        "description": "A <see cref=\"T:PicMeApi.RevenueCatWebhookResponse\" /> containing the response."
      }
    },
    {
      "name": "CreateUserPurchase",
      "httpMethod": "POST",
      "httpPathRegex": "^/purchase",
      "subPathPattern": "/purchase",
      "summary": "Creates a purchase for a specific user.\n            Requires root administrator privileges or in dev, a Lightning Kite email account.",
      "parameters": [
        {
          "name": "startTime",
          "required": true,
          "type": "DateTime",
          "description": "The <see cref=\"T:System.DateTime\" /> the subscription is to start (the end time will be determined by the properties of the product)."
        },
        {
          "name": "productId",
          "required": false,
          "type": "String?",
          "description": "The optional ID of a pre-existing product to be \"purchased\"."
        },
        {
          "name": "product",
          "required": false,
          "type": "Product?",
          "description": "If <paramref name=\"productId\" /> is not specified, the custom product to be \"purchased\".  For custom products, use an empty Product ID so that a unique one will be assigned to prevent conflicts with historical, existing, and future products."
        },
        {
          "name": "emailOrPhoneNumber",
          "required": false,
          "type": "String?",
          "description": "The email or phone number of the user whose limits are to be set.  Either this or <paramref name=\"userId\" /> must be set."
        },
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose limits are to be set.  Either this or <paramref name=\"emailOrPhoneNumber\" /> must be set."
        },
        {
          "name": "purchaseMethod",
          "required": false,
          "type": "String",
          "description": "The string to store in <see cref=\"P:PicMeModel.UserPurchase.PurchaseMethod\" />.  Defaults to \"Admin\"."
        }
      ],
      "return": {
        "type": "CreateUserPurchaseResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateUserPurchaseResponse\" /> containing the response."
      }
    },
    {
      "name": "PutUserPurchase",
      "httpMethod": "PUT",
      "httpPathRegex": "^/purchase",
      "subPathPattern": "/purchase",
      "summary": "Puts a new purchase for the user (with the option to cancel any previous purchases of a similar type).\n            Requires root administrator privileges or in dev, a Lightning Kite email account.",
      "parameters": [
        {
          "name": "startTime",
          "required": true,
          "type": "DateTime",
          "description": "The <see cref=\"T:System.DateTime\" /> the subscription is to start (the end time will be determined by the properties of the product)."
        },
        {
          "name": "cancelAnyOtherActiveSubscriptions",
          "required": true,
          "type": "Boolean",
          "description": "Whether to cancel any active subscriptions from the specified purchase method."
        },
        {
          "name": "cancelAnyOtherActiveNonSubscriptions",
          "required": true,
          "type": "Boolean",
          "description": "Whether to cancel any active non-subscriptions from the specified purchase method."
        },
        {
          "name": "productId",
          "required": false,
          "type": "String?",
          "description": "The optional ID of a pre-existing product to be \"purchased\"."
        },
        {
          "name": "product",
          "required": false,
          "type": "Product?",
          "description": "If <paramref name=\"productId\" /> is not specified, the custom product to be \"purchased\".  For custom products, use an empty Product ID so that a unique one will be assigned to prevent conflicts with historical, existing, and future products."
        },
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose limits are to be set.  Either this or <paramref name=\"emailOrPhoneNumber\" /> must be set."
        },
        {
          "name": "emailOrPhoneNumber",
          "required": false,
          "type": "String?",
          "description": "The email or phone number of the user whose limits are to be set.  Either this or <paramref name=\"userId\" /> must be set."
        },
        {
          "name": "purchaseMethod",
          "required": false,
          "type": "String",
          "description": "The string to store in <see cref=\"P:PicMeModel.UserPurchase.PurchaseMethod\" />.  Defaults to \"Admin\"."
        }
      ],
      "return": {
        "type": "PutUserPurchaseResponse",
        "description": "A <see cref=\"T:PicMeApi.PutUserPurchaseResponse\" /> containing the response."
      }
    },
    {
      "name": "ListUserPurchases",
      "httpMethod": "GET",
      "httpPathRegex": "^/purchase",
      "subPathPattern": "/purchase",
      "summary": "Lists all user purchases.  Does *not* list default subscriptions.\n            When specifying a user, requires root administrator privileges or in dev, a Lightning Kite email account",
      "parameters": [
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose limits are to be retrieved (must be root admin).  When not specified, gets the purchases for the currently-authenticated user."
        },
        {
          "name": "startTime",
          "required": false,
          "type": "DateTime?",
          "description": "The <see cref=\"T:System.DateTime\" /> of the earliest purchase to return (defaults to yesterday, compares against at <see cref=\"P:PicMeModel.UserPurchase.EndTime\" />)."
        },
        {
          "name": "includeCancelledPurchases",
          "required": false,
          "type": "Boolean",
          "description": "Whether to include cancelled purchases in the response."
        },
        {
          "name": "purchaseMethod",
          "required": false,
          "type": "String?",
          "description": "The string to store in <see cref=\"P:PicMeModel.UserPurchase.PurchaseMethod\" />.  Defaults to null, which lists *all* purchases."
        }
      ],
      "return": {
        "type": "ListUserPurchasesResponse",
        "description": "A <see cref=\"T:PicMeApi.ListUserPurchasesResponse\" /> containing the response."
      }
    },
    {
      "name": "CancelUserPurchase",
      "httpMethod": "DELETE",
      "httpPathRegex": "^/purchase",
      "subPathPattern": "/purchase",
      "summary": "Cancels the specified purchase with the specified purchase method.\n            Requires root administrator privileges or in dev, a Lightning Kite email account.",
      "parameters": [
        {
          "name": "purchaseId",
          "required": true,
          "type": "UserPurchaseId",
          "description": "The unique identifier for the purchase."
        },
        {
          "name": "purchaseMethod",
          "required": false,
          "type": "String",
          "description": "The string indicating the <see cref=\"P:PicMeModel.UserPurchase.PurchaseMethod\" /> of the purchase to be cancelled.  Defaults to \"Admin\"."
        },
        {
          "name": "userId",
          "required": false,
          "type": "UserId?",
          "description": "The <see cref=\"T:AmbientServices.UserId\" /> whose limits are to be set.  Either this or <paramref name=\"emailOrPhoneNumber\" /> must be set."
        },
        {
          "name": "emailOrPhoneNumber",
          "required": false,
          "type": "String?",
          "description": "The email or phone number of the user whose limits are to be set.  Either this or <paramref name=\"userId\" /> must be set."
        }
      ],
      "return": {
        "type": "CancelUserPurchaseResponse",
        "description": "A <see cref=\"T:PicMeApi.CancelUserPurchaseResponse\" /> containing the response."
      }
    },
    {
      "name": "ListAvailableProducts",
      "httpMethod": "GET",
      "httpPathRegex": "^/product",
      "subPathPattern": "/product",
      "summary": "Lists all available products with their names, prices, limits, recurrence, etc.",
      "parameters": [
        {
          "name": "includeSubscriptions",
          "required": false,
          "type": "Boolean",
          "description": "Whether to include subscription products (defaults to true)."
        },
        {
          "name": "includeNonSubscriptions",
          "required": false,
          "type": "Boolean",
          "description": "Whether to include non-subscription products (defaults to true)."
        }
      ],
      "return": {
        "type": "ListAvailableProductsResponse",
        "description": "A <see cref=\"T:PicMeApi.ListAvailableProductsResponse\" /> containing the response."
      }
    },
    {
      "name": "CreateTestProduct",
      "httpMethod": "POST",
      "httpPathRegex": "^/product",
      "subPathPattern": "/product",
      "summary": "Creates a product for purchase.  (For testing only).\n            Requires root administrator privileges.",
      "parameters": [
        {
          "name": "body",
          "required": true,
          "type": "Product",
          "description": "The <see cref=\"T:PicMeModel.Product\" />."
        }
      ],
      "return": {
        "type": "CreateTestProductResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateTestProductResponse\" /> containing the response."
      }
    }
  ],
  "types": [
    {
      "name": "UserId",
      "summary": "A struct that holds a user identifier.",
      "type": "proxy",
      "representedBy": "String"
    },
    {
      "name": "GetEffectiveUserLimitsResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.GetEffectiveUserLimits(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,PicMeApi.AuthData,System.Nullable{AmbientServices.UserId},System.Nullable{System.DateTime})\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "effectiveUserLimits",
          "type": "EffectiveUserLimits[]",
          "summary": "An array of <see cref=\"P:PicMeApi.GetEffectiveUserLimitsResponse.EffectiveUserLimits\" /> for the specified user, starting with the currently-effective one."
        }
      ]
    },
    {
      "name": "EffectiveUserLimits",
      "summary": "A record containing information about the effective user limits, combining multiple purchases if needed.",
      "type": "composite",
      "members": [
        {
          "name": "freeUser",
          "type": "Boolean",
          "summary": "Whether the user is a free user or not."
        },
        {
          "name": "ids",
          "type": "String",
          "summary": "A list of product IDs"
        },
        {
          "name": "names",
          "type": "String",
          "summary": "The names of the products."
        },
        {
          "name": "ads",
          "type": "SubscriptionAds",
          "summary": "A <see cref=\"T:PicMeModel.SubscriptionAds\" /> indicating which ads should be suppressed."
        },
        {
          "name": "maxCollections",
          "type": "Int32",
          "summary": "The maximum number of collections allowed."
        },
        {
          "name": "maxStorageBytes",
          "type": "Int64",
          "summary": "The number of storage bytes allowed during this period."
        },
        {
          "name": "maxDownloadBytes",
          "type": "Int64",
          "summary": "The data transfer bytes available during this period."
        },
        {
          "name": "maxUploadsPerCollection",
          "type": "Int32",
          "summary": "The maximum number of uploads per collection under this plan."
        },
        {
          "name": "maxUploadSizeBytes",
          "type": "Int64",
          "summary": "The maximum number of bytes for any given upload."
        },
        {
          "name": "maxBytesPerCollection",
          "type": "Int64",
          "summary": "The maximum number of bytes per collection under this plan."
        },
        {
          "name": "endTime",
          "type": "DateTime",
          "summary": "The end time for these limits."
        }
      ]
    },
    {
      "name": "SubscriptionAds",
      "summary": "An enumeration of flags (ORable) indicating which ads should be suppressed.",
      "type": "enum",
      "flags": true,
      "enumValues": [
        {
          "name": "AllAds",
          "summary": "All ads should be displayed.",
          "value": 0
        },
        {
          "name": "NoInterstitialAds",
          "summary": "No interstitial ads should be displayed.",
          "value": 1
        },
        {
          "name": "NoProgessAds",
          "summary": "No ads should be displayed on progress dialogs.",
          "value": 2
        },
        {
          "name": "NoAds",
          "summary": "No ads of any kind should ever be displayed.",
          "value": -1
        }
      ]
    },
    {
      "name": "GetEffectiveUserUsageResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.GetEffectiveUserUsage(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,PicMeApi.AuthData,System.Nullable{AmbientServices.UserId},System.Nullable{System.DateTime})\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "activePurchases",
          "type": "UserPurchase[]",
          "summary": "An array containing the active <see cref=\"T:PicMeModel.UserPurchase\" />s."
        },
        {
          "name": "effectiveUserUsage",
          "type": "EffectiveUserUsage[]",
          "summary": "An array of <see cref=\"P:PicMeApi.GetEffectiveUserUsageResponse.EffectiveUserUsage\" /> for the specified user."
        }
      ]
    },
    {
      "name": "EffectiveUserUsage",
      "summary": "A record containing information about the user's effective usage measured against effective limits.",
      "type": "composite",
      "members": [
        {
          "name": "userPurchaseId",
          "type": "UserPurchaseId",
          "summary": "The <see cref=\"P:PicMeModel.EffectiveUserUsage.UserPurchaseId\" /> of the purchase these limits and usage are associated with."
        },
        {
          "name": "userPurchaseGlobalId",
          "type": "RecordGlobalId",
          "summary": "The <see cref=\"T:AmbientServices.RecordGlobalId\" /> of the purchase these limits and usage are associated with."
        },
        {
          "name": "collections",
          "type": "Int32",
          "summary": "The number of collections used."
        },
        {
          "name": "collectionsAllowed",
          "type": "Int32",
          "summary": "The number of collections allowed."
        },
        {
          "name": "uploads",
          "type": "Int32",
          "summary": "The number of uploads used."
        },
        {
          "name": "uploadsAllowed",
          "type": "Int32",
          "summary": "The number of uploads allowed."
        },
        {
          "name": "storageBytes",
          "type": "Int64",
          "summary": "The number of storage bytes used."
        },
        {
          "name": "storageBytesAllowed",
          "type": "Int64",
          "summary": "The number of storage bytes allowed during this period."
        },
        {
          "name": "downloadBytes",
          "type": "Int64",
          "summary": "The data transfer bytes used."
        },
        {
          "name": "downloadBytesAllowed",
          "type": "Int64",
          "summary": "The data transfer bytes available during this period."
        },
        {
          "name": "endTime",
          "type": "DateTime",
          "summary": "The time when this usage or the limits expire.  Not necessarily when the purchase expires, but the end of the time period during which there is no change in overlapping products, after which limits may change or usage may be allocated differently."
        }
      ]
    },
    {
      "name": "RecordGlobalId",
      "summary": "A structured replacement for <see cref=\"T:AmbientServices.RecordIdentifier\" /> that contains the same data, a type-qualified and parent-qualified global identifier for a database record.\n            Records may be children of other records, and this identifier contains the path to the parent in addition to the path to the child record.\n            An example of a record that is a child of another record is an upload within a collection.",
      "type": "proxy",
      "representedBy": "String"
    },
    {
      "name": "UserPurchase",
      "summary": "A record containing information about a purchase that is either active or was previously active.",
      "type": "composite",
      "members": [
        {
          "name": "userPurchaseId",
          "type": "UserPurchaseId",
          "summary": "The <see cref=\"P:PicMeModel.UserPurchase.UserPurchaseId\" /> for the purchase."
        },
        {
          "name": "userPurchaseGlobalId",
          "type": "RecordGlobalId",
          "summary": "The <see cref=\"T:AmbientServices.RecordGlobalId\" /> for the purchase."
        },
        {
          "name": "purchaseTime",
          "type": "DateTime",
          "summary": "The time this product was purchased."
        },
        {
          "name": "startTime",
          "type": "DateTime",
          "summary": "The start time for this purchase."
        },
        {
          "name": "endTime",
          "type": "DateTime",
          "summary": "The end time for the this purchase.  If this is less than the normal end time as calculated from the <see cref=\"P:PicMeModel.UserPurchase.StartTime\" /> and <see cref=\"P:PicMeModel.Product.Duration\" />, it was cancelled early."
        },
        {
          "name": "product",
          "type": "Product",
          "summary": "The <see cref=\"T:PicMeModel.Product\" /> indicating what was purchased."
        },
        {
          "name": "cancellationTime",
          "type": "DateTime?",
          "summary": "The time when the purchase was cancelled (not the end time).  Defaults to null, which means that the purchase was not cancelled."
        },
        {
          "name": "purchaseMethod",
          "type": "String?",
          "summary": "The purchase method (App Store, Play Store, RevenueCat, Admin, etc.)."
        },
        {
          "name": "paymentSystemProductId",
          "type": "String?",
          "summary": "The store-specific product identifier from the payment system in case the purchase is cancelled or restored.  In the case of RevenueCat, this is the store-specific product identifier (e.g. \"S01\") that appears as product_identifier in the subscriber API."
        },
        {
          "name": "transactionId",
          "type": "String?",
          "summary": "The transaction ID from the store, if known."
        }
      ]
    },
    {
      "name": "ListUserPurchaseChangeRecordsResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.ListUserPurchaseChangeRecords(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,System.String,PicMeApi.AuthData,AmbientServices.UserId,System.Nullable{System.DateTime},System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "userPurchaseChangeRecords",
          "type": "UserPurchaseChangeKeyWithValue[]",
          "summary": "An array of <see cref=\"T:PicMeApi.UserPurchaseChangeKeyWithValue\" /> for the specified user."
        }
      ]
    },
    {
      "name": "UserPurchaseChangeKeyWithValue",
      "summary": "A record containing a <see cref=\"T:PicMeLogic.UserPurchaseChangeKey\" /> and its associated <see cref=\"T:PicMeLogic.UserPurchaseChangeRecord\" />.",
      "type": "composite",
      "members": [
        {
          "name": "key",
          "type": "UserPurchaseChangeKey",
          "summary": "The <see cref=\"T:PicMeLogic.UserPurchaseChangeKey\" />."
        },
        {
          "name": "value",
          "type": "UserPurchaseChangeRecord",
          "summary": "The associated <see cref=\"T:PicMeLogic.UserPurchaseChangeRecord\" />."
        }
      ]
    },
    {
      "name": "UserPurchaseChangeRecord",
      "summary": "A record that captures a change in a user's purchase.",
      "type": "composite",
      "members": [
        {
          "name": "oldPurchase",
          "type": "UserPurchase?",
          "summary": "Gets the old <see cref=\"T:PicMeModel.UserPurchase\" /> (if any)."
        },
        {
          "name": "newPurchase",
          "type": "UserPurchase?",
          "summary": "Gets the new <see cref=\"T:PicMeModel.UserPurchase\" /> (if any)."
        },
        {
          "name": "changeReason",
          "type": "String",
          "summary": "Gets the textual description of the reason for the change."
        },
        {
          "name": "changeAgent",
          "type": "String",
          "summary": "Gets a textual description of the agent responsible for the change."
        },
        {
          "name": "contextLogPairs",
          "type": "IEnumerable\u00601",
          "summary": "Gets an enumeration of <see cref=\"T:AmbientServices.LogContextEntry\" /> representing the context log pairs captured at the time of the change record's creation."
        }
      ]
    },
    {
      "name": "IEnumerable\u00601"
    },
    {
      "name": "UserPurchaseChangeKey",
      "summary": "A record that captures a change in a user's purchase.",
      "type": "composite",
      "members": [
        {
          "name": "userId",
          "type": "UserId",
          "summary": "The <see cref=\"P:PicMeLogic.UserPurchaseChangeKey.UserId\" /> of the user whose purchase changed."
        },
        {
          "name": "changeTime",
          "type": "DateTime",
          "summary": "The time of the change."
        }
      ]
    },
    {
      "name": "SynchronizeUserPurchasesResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.SynchronizeUserPurchases(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,AmbientServices.IExternalPaymentVerification,System.String,PicMeApi.AuthData,System.Nullable{AmbientServices.UserId},System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "purchases",
          "type": "UserPurchase[]",
          "summary": "An array of the synchronized purchases using the specified purchase method."
        }
      ]
    },
    {
      "name": "RevenueCatWebhookPostData",
      "type": "composite",
      "members": [
        {
          "name": "event",
          "type": "RevenueCatEventData"
        },
        {
          "name": "apiVersion",
          "type": "String?"
        }
      ]
    },
    {
      "name": "RevenueCatEventData",
      "type": "composite",
      "members": [
        {
          "name": "type",
          "type": "RevenueCatEventType"
        },
        {
          "name": "id",
          "type": "String"
        },
        {
          "name": "appUserId",
          "type": "String?"
        },
        {
          "name": "environment",
          "type": "RevenueCatEnvironment"
        },
        {
          "name": "eventTimestampMs",
          "type": "Int64?"
        },
        {
          "name": "purchasedAtMs",
          "type": "Int64?"
        },
        {
          "name": "productId",
          "type": "String?"
        },
        {
          "name": "entitlementIds",
          "type": "String[]?"
        },
        {
          "name": "originalPurchaseDate",
          "type": "DateTime?"
        },
        {
          "name": "expirationAtMs",
          "type": "Int64?"
        },
        {
          "name": "store",
          "type": "RevenueCatStore?"
        },
        {
          "name": "isTrialConversion",
          "type": "Boolean?"
        },
        {
          "name": "isFamilyShare",
          "type": "Boolean?"
        },
        {
          "name": "cancelReason",
          "type": "String?"
        },
        {
          "name": "subscriberAttributes",
          "type": "Dictionary\u00602?"
        },
        {
          "name": "appId",
          "type": "String?"
        },
        {
          "name": "renewalNumber",
          "type": "Int32?"
        },
        {
          "name": "transactionId",
          "type": "String?"
        },
        {
          "name": "originalTransactionId",
          "type": "String?"
        },
        {
          "name": "countryCode",
          "type": "String?"
        },
        {
          "name": "currency",
          "type": "String?"
        },
        {
          "name": "price",
          "type": "Single?"
        },
        {
          "name": "priceInPurchasedCurrency",
          "type": "Single?"
        },
        {
          "name": "transferredFrom",
          "type": "String[]?"
        },
        {
          "name": "transferredTo",
          "type": "String[]?"
        }
      ]
    },
    {
      "name": "Dictionary\u00602",
      "type": "composite",
      "members": [
        {
          "name": "comparer",
          "type": "IEqualityComparer\u00601"
        },
        {
          "name": "count",
          "type": "Int32"
        },
        {
          "name": "capacity",
          "type": "Int32"
        },
        {
          "name": "keys",
          "type": "KeyCollection"
        },
        {
          "name": "values",
          "type": "ValueCollection"
        },
        {
          "name": "item",
          "type": "RevenueCatSubscriberAttribute?"
        }
      ]
    },
    {
      "name": "RevenueCatSubscriberAttribute",
      "type": "composite",
      "members": [
        {
          "name": "updatedAtMs",
          "type": "Int64"
        },
        {
          "name": "value",
          "type": "String"
        }
      ]
    },
    {
      "name": "ValueCollection",
      "type": "composite",
      "members": [
        {
          "name": "count",
          "type": "Int32"
        }
      ]
    },
    {
      "name": "KeyCollection",
      "type": "composite",
      "members": [
        {
          "name": "count",
          "type": "Int32"
        }
      ]
    },
    {
      "name": "IEqualityComparer\u00601"
    },
    {
      "name": "RevenueCatStore",
      "type": "enum",
      "flags": false,
      "enumValues": [
        {
          "name": "Amazon",
          "value": 0
        },
        {
          "name": "AppStore",
          "value": 1
        },
        {
          "name": "External",
          "value": 2
        },
        {
          "name": "MacAppStore",
          "value": 3
        },
        {
          "name": "Paddle",
          "value": 4
        },
        {
          "name": "PlayStore",
          "value": 5
        },
        {
          "name": "Promotional",
          "value": 6
        },
        {
          "name": "RcBilling",
          "value": 7
        },
        {
          "name": "Stripe",
          "value": 8
        },
        {
          "name": "UnknownStore",
          "value": 9
        }
      ]
    },
    {
      "name": "RevenueCatEnvironment",
      "type": "enum",
      "flags": false,
      "enumValues": [
        {
          "name": "Production",
          "value": 0
        },
        {
          "name": "Sandbox",
          "value": 1
        }
      ]
    },
    {
      "name": "RevenueCatEventType",
      "type": "enum",
      "flags": false,
      "enumValues": [
        {
          "name": "Test",
          "value": 0
        },
        {
          "name": "InitialPurchase",
          "value": 1
        },
        {
          "name": "Renewal",
          "value": 2
        },
        {
          "name": "Cancellation",
          "value": 3
        },
        {
          "name": "Uncancellation",
          "value": 4
        },
        {
          "name": "NonRenewingPurchase",
          "value": 5
        },
        {
          "name": "SubscriptionPaused",
          "value": 6
        },
        {
          "name": "Expiration",
          "value": 7
        },
        {
          "name": "BillingIssue",
          "value": 8
        },
        {
          "name": "ProductChange",
          "value": 9
        },
        {
          "name": "Transfer",
          "value": 10
        },
        {
          "name": "SubscriptionExtended",
          "value": 11
        },
        {
          "name": "TemporaryEntitlementGrant",
          "value": 12
        },
        {
          "name": "RefundReversed",
          "value": 13
        },
        {
          "name": "InvoiceIssuance",
          "value": 14
        },
        {
          "name": "VirtualCurrencyTransaction",
          "value": 15
        }
      ]
    },
    {
      "name": "RevenueCatWebhookResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.RevenueCatWebhook(System.Collections.Generic.IDictionary{System.String,System.String},AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.ExternalEncryptionKeyManager,AmbientServices.IExternalPaymentVerification,AmbientServices.IAmbientAtomicCache,System.String,System.Text.Json.JsonDocument,PicMeApi.AuthData)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "updatedPurchases",
          "type": "UserPurchase[]",
          "summary": "An array of <see cref=\"T:PicMeModel.UserPurchase\" />s with updated values."
        }
      ]
    },
    {
      "name": "Product",
      "summary": "A record containing information about an available product.",
      "type": "composite",
      "members": [
        {
          "name": "id",
          "type": "String",
          "summary": "A unique identifier for the plan.  This can be used as a SKU, as it should always represent a specific set of privileges/limits and timeframe."
        },
        {
          "name": "name",
          "type": "String",
          "summary": "The name of the plan."
        },
        {
          "name": "subscription",
          "type": "Boolean",
          "summary": "Whether this product is a one-time purchase or a subscription."
        },
        {
          "name": "duration",
          "type": "PurchaseDuration",
          "summary": "A <see cref=\"T:PicMeModel.PurchaseDuration\" /> indicating how long the purchase will last."
        },
        {
          "name": "price",
          "type": "Single",
          "summary": "The price (in US dollars) for this subscription, if applicable."
        },
        {
          "name": "ads",
          "type": "SubscriptionAds",
          "summary": "A <see cref=\"T:PicMeModel.SubscriptionAds\" /> indicating which ads should be suppressed."
        },
        {
          "name": "additionalCollections",
          "type": "Int32",
          "summary": "Allows more collections for the purchaser."
        },
        {
          "name": "additionalUploads",
          "type": "Int32",
          "summary": "Allows more total uploads for the purchaser."
        },
        {
          "name": "additionalStorageBytes",
          "type": "Int64",
          "summary": "The number of storage bytes allowed under this plan."
        },
        {
          "name": "additionalDownloadBytes",
          "type": "Int64",
          "summary": "The data transfer bytes available under this plan."
        },
        {
          "name": "maxUploadsPerCollection",
          "type": "Int32",
          "summary": "The maximum number of uploads per collection under this plan."
        },
        {
          "name": "maxUploadSizeBytes",
          "type": "Int64",
          "summary": "The maximum number of bytes for any given upload."
        },
        {
          "name": "maxBytesPerCollection",
          "type": "Int64",
          "summary": "The maximum number of bytes per collection under this plan."
        },
        {
          "name": "paymentSystemSubscriptionIds",
          "type": "String[]?",
          "summary": "An array of subscription IDs in the external payment system identifying subscription products.  If null or empty, assumes this product cannot be purchased through an external payment processor and can only be activated by system administrators.  In the case of RevenueCat, this is the user-configured (but immutable) entitlement ID that appears as the property name in the subscriptions dictionary and in the product_id in the entitlements dictionary.  It is *NOT* the identifier that starts with a prefix of entl or prod, but including those here too is recommeneded."
        },
        {
          "name": "paymentSystemNonSubscriptionIds",
          "type": "String[]?",
          "summary": "An array of product identifiers in the external payment system identifying non-subscription products.  If *any* of these match an incoming purchase notification or a synchronization query shows one of these in a purchase, this product will be mapped to that purchase.  In the case of RevenueCat, this is the user-configured (but immutable) entitlement ID that appears as the property name in the non_subscriptions dictionary.  It is *NOT* the identifier that starts with a prefix of entl or prod, but including those here too is recommeneded (though having a non-subscription with an entl prefix would be bad)."
        },
        {
          "name": "trackingDuration",
          "type": "PurchaseDuration?",
          "summary": "Optional duration used to split usage tracking into time periods.  When null (default), usage is tracked using the same duration as the product (<see cref=\"P:PicMeModel.Product.Duration\" />).  When set, a single purchase can span multiple tracking periods (e.g. a one-year purchase with OneMonth tracking has 12 periods)."
        }
      ]
    },
    {
      "name": "PurchaseDuration",
      "summary": "An enumeration of purchase durations.",
      "type": "enum",
      "flags": false,
      "enumValues": [
        {
          "name": "NotApplicable",
          "summary": "Duration doesn't apply to this purchase.",
          "value": 0
        },
        {
          "name": "OneDay",
          "summary": "The purchase lasts for one day.",
          "value": 1
        },
        {
          "name": "TwoDays",
          "summary": "The purchase lasts for two days.",
          "value": 2
        },
        {
          "name": "FiveDays",
          "summary": "The purchase lasts for five days.",
          "value": 5
        },
        {
          "name": "TenDays",
          "summary": "The purchase lasts for ten days.",
          "value": 10
        },
        {
          "name": "OneMonth",
          "summary": "The purchase lasts for one month.",
          "value": 30
        },
        {
          "name": "ThreeMonths",
          "summary": "The purchase lasts for three months.",
          "value": 90
        },
        {
          "name": "SixMonths",
          "summary": "The purchase lasts for six months.",
          "value": 180
        },
        {
          "name": "OneYear",
          "summary": "The purchase lasts for one year.",
          "value": 365
        },
        {
          "name": "Unlimited",
          "summary": "The purchase lasts forever.",
          "value": -1
        }
      ]
    },
    {
      "name": "CreateUserPurchaseResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.CreateUserPurchase(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,System.String,PicMeApi.AuthData,System.DateTime,System.String,PicMeModel.Product,System.String,System.Nullable{AmbientServices.UserId},System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "createdUserPurchase",
          "type": "UserPurchase",
          "summary": "The <see cref=\"T:PicMeModel.UserPurchase\" /> that was created."
        }
      ]
    },
    {
      "name": "PutUserPurchaseResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.PutUserPurchase(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,System.String,PicMeApi.AuthData,System.DateTime,System.Boolean,System.Boolean,System.String,PicMeModel.Product,System.Nullable{AmbientServices.UserId},System.String,System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "createdUserPurchase",
          "type": "UserPurchase",
          "summary": "The <see cref=\"T:PicMeModel.UserPurchase\" /> that was created."
        },
        {
          "name": "cancelledPurchases",
          "type": "UserPurchase[]",
          "summary": "An array of <see cref=\"T:PicMeModel.UserPurchase\" /> that were canceled."
        }
      ]
    },
    {
      "name": "ListUserPurchasesResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.ListUserPurchases(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,System.String,PicMeApi.AuthData,System.Nullable{AmbientServices.UserId},System.Nullable{System.DateTime},System.Boolean,System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "userPurchases",
          "type": "UserPurchase[]",
          "summary": "An array of <see cref=\"T:PicMeModel.UserPurchase\" /> for the specified user."
        }
      ]
    },
    {
      "name": "UserPurchaseId",
      "summary": "A struct that holds a user purchase id.",
      "type": "proxy",
      "representedBy": "String"
    },
    {
      "name": "CancelUserPurchaseResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.CancelUserPurchase(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,System.String,PicMeApi.AuthData,AmbientServices.UserPurchaseId,System.String,System.Nullable{AmbientServices.UserId},System.String)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "cancelledUserPurchase",
          "type": "UserPurchase?",
          "summary": "The <see cref=\"T:PicMeModel.UserPurchase\" /> that was canceled."
        }
      ]
    },
    {
      "name": "ListAvailableProductsResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.ListAvailableProducts(AmbientServices.Database,System.Boolean,System.Boolean)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "products",
          "type": "Product[]",
          "summary": "A list of <see cref=\"T:PicMeModel.Product\" /> with information about an available product."
        }
      ]
    },
    {
      "name": "CreateTestProductResponse",
      "summary": "A record containing the response from the <see cref=\"M:PicMeApi.CommerceApis.CreateTestProduct(AmbientServices.Database,AmbientServices.Auth,AmbientServices.IFileSystem,AmbientServices.IAmbientAtomicCache,System.String,PicMeApi.AuthData,PicMeModel.Product)\" /> API.",
      "type": "composite",
      "members": [
        {
          "name": "product",
          "type": "Product",
          "summary": "The <see cref=\"P:PicMeApi.CreateTestProductResponse.Product\" /> that was created."
        }
      ]
    }
  ]
}