Skip to content

Commit 917780a

Browse files
yoshi-automationsofisl
authored andcommitted
feat(playintegrity): update the API
#### playintegrity:v1 The following keys were added: - schemas.DeviceAttributes.description - schemas.DeviceAttributes.id - schemas.DeviceAttributes.properties.sdkVersion.description - schemas.DeviceAttributes.properties.sdkVersion.format - schemas.DeviceAttributes.properties.sdkVersion.type - schemas.DeviceAttributes.type - schemas.DeviceIntegrity.properties.deviceAttributes.$ref - schemas.DeviceIntegrity.properties.deviceAttributes.description - schemas.DeviceIntegrity.properties.legacyDeviceRecognitionVerdict.description - schemas.DeviceIntegrity.properties.legacyDeviceRecognitionVerdict.items.enum - schemas.DeviceIntegrity.properties.legacyDeviceRecognitionVerdict.items.enumDescriptions - schemas.DeviceIntegrity.properties.legacyDeviceRecognitionVerdict.items.type - schemas.DeviceIntegrity.properties.legacyDeviceRecognitionVerdict.type
1 parent 5fa6aaf commit 917780a

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

‎discovery/playintegrity-v1.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
}
171171
}
172172
},
173-
"revision": "20240813",
173+
"revision": "20241127",
174174
"rootUrl": "https://playintegrity.googleapis.com/",
175175
"schemas": {
176176
"AccountActivity": {
@@ -366,10 +366,26 @@
366366
},
367367
"type": "object"
368368
},
369+
"DeviceAttributes": {
370+
"description": "Contains information about the device for which the integrity token was generated, e.g. Android SDK version.",
371+
"id": "DeviceAttributes",
372+
"properties": {
373+
"sdkVersion": {
374+
"description": "Android SDK version of the device, as defined in the public Android documentation: https://developer.android.com/reference/android/os/Build.VERSION_CODES. It won't be set if a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar.",
375+
"format": "int32",
376+
"type": "integer"
377+
}
378+
},
379+
"type": "object"
380+
},
369381
"DeviceIntegrity": {
370382
"description": "Contains the device attestation information.",
371383
"id": "DeviceIntegrity",
372384
"properties": {
385+
"deviceAttributes": {
386+
"$ref": "DeviceAttributes",
387+
"description": "Attributes of the device where the integrity token was generated."
388+
},
373389
"deviceRecall": {
374390
"$ref": "DeviceRecall",
375391
"description": "Details about the device recall bits set by the developer."
@@ -395,6 +411,27 @@
395411
},
396412
"type": "array"
397413
},
414+
"legacyDeviceRecognitionVerdict": {
415+
"description": "Contains legacy details about the integrity of the device the app is running on. Only for devices with Android version T or higher and only for apps opted in to the new verdicts. Only available during the transition period to the new verdicts system and will be removed afterwards.",
416+
"items": {
417+
"enum": [
418+
"UNKNOWN",
419+
"MEETS_BASIC_INTEGRITY",
420+
"MEETS_DEVICE_INTEGRITY",
421+
"MEETS_STRONG_INTEGRITY",
422+
"MEETS_VIRTUAL_INTEGRITY"
423+
],
424+
"enumDescriptions": [
425+
"Play does not have sufficient information to evaluate device integrity",
426+
"App is running on a device that passes basic system integrity checks, but may not meet Android platform compatibility requirements and may not be approved to run Google Play services.",
427+
"App is running on GMS Android device with Google Play services.",
428+
"App is running on GMS Android device with Google Play services and has a strong guarantee of system integrity such as a hardware-backed keystore.",
429+
"App is running on an Android emulator with Google Play services which meets core Android compatibility requirements."
430+
],
431+
"type": "string"
432+
},
433+
"type": "array"
434+
},
398435
"recentDeviceActivity": {
399436
"$ref": "RecentDeviceActivity",
400437
"description": "Details about the device activity of the device the app is running on."

‎src/apis/playintegrity/v1.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,23 @@ export namespace playintegrity_v1 {
204204
*/
205205
tokenPayloadExternal?: Schema$TokenPayloadExternal;
206206
}
207+
/**
208+
* Contains information about the device for which the integrity token was generated, e.g. Android SDK version.
209+
*/
210+
export interface Schema$DeviceAttributes {
211+
/**
212+
* Android SDK version of the device, as defined in the public Android documentation: https://developer.android.com/reference/android/os/Build.VERSION_CODES. It won't be set if a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar.
213+
*/
214+
sdkVersion?: number | null;
215+
}
207216
/**
208217
* Contains the device attestation information.
209218
*/
210219
export interface Schema$DeviceIntegrity {
220+
/**
221+
* Attributes of the device where the integrity token was generated.
222+
*/
223+
deviceAttributes?: Schema$DeviceAttributes;
211224
/**
212225
* Details about the device recall bits set by the developer.
213226
*/
@@ -216,6 +229,10 @@ export namespace playintegrity_v1 {
216229
* Details about the integrity of the device the app is running on.
217230
*/
218231
deviceRecognitionVerdict?: string[] | null;
232+
/**
233+
* Contains legacy details about the integrity of the device the app is running on. Only for devices with Android version T or higher and only for apps opted in to the new verdicts. Only available during the transition period to the new verdicts system and will be removed afterwards.
234+
*/
235+
legacyDeviceRecognitionVerdict?: string[] | null;
219236
/**
220237
* Details about the device activity of the device the app is running on.
221238
*/

0 commit comments

Comments
 (0)