make CanDoPurchaseRequest.type optional

This commit is contained in:
Jonas Lochmann
2026-06-08 02:00:00 +02:00
parent 48d6a061f8
commit 2f35b969bf
5 changed files with 7 additions and 7 deletions
+2
View File
@@ -15,6 +15,8 @@ Use this before a purchase to check if a purchase is possible.
see [this JSON schema](../schema/candopurchaserequest.md)
Note that ``type`` is not used at all.
### response
On a invalid request body: HTTP status code 400 Bad request
+1 -2
View File
@@ -14,8 +14,7 @@
},
"additionalProperties": false,
"required": [
"deviceAuthToken",
"type"
"deviceAuthToken"
],
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
+2 -2
View File
@@ -18,7 +18,7 @@ https://timelimit.io/CanDoPurchaseRequest
| Property | Type | Required | Nullable | Defined by |
| :---------------------------------- | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| [type](#type) | `string` | Required | cannot be null | [CanDoPurchaseRequest](candopurchaserequest-properties-type.md "https://timelimit.io/CanDoPurchaseRequest#/properties/type") |
| [type](#type) | `string` | Optional | cannot be null | [CanDoPurchaseRequest](candopurchaserequest-properties-type.md "https://timelimit.io/CanDoPurchaseRequest#/properties/type") |
| [deviceAuthToken](#deviceauthtoken) | `string` | Required | cannot be null | [CanDoPurchaseRequest](candopurchaserequest-properties-deviceauthtoken.md "https://timelimit.io/CanDoPurchaseRequest#/properties/deviceAuthToken") |
## type
@@ -27,7 +27,7 @@ https://timelimit.io/CanDoPurchaseRequest
`type`
* is required
* is optional
* Type: `string`
+1 -1
View File
@@ -113,7 +113,7 @@ export interface CreateRegisterDeviceTokenRequest {
}
export interface CanDoPurchaseRequest {
type: 'googleplay' | 'any'
type?: 'googleplay' | 'any'
deviceAuthToken: string
}
+1 -2
View File
@@ -3353,8 +3353,7 @@ export const isCanDoPurchaseRequest: (value: unknown) => value is CanDoPurchaseR
},
"additionalProperties": false,
"required": [
"deviceAuthToken",
"type"
"deviceAuthToken"
],
"definitions": definitions,
"$schema": "http://json-schema.org/draft-07/schema#"