2022-01-10 16:52:26 +01:00
|
|
|
import {create} from "../../common/utils/EntityUtils.js"
|
2021-12-23 14:03:23 +01:00
|
|
|
import {TypeRef, downcast} from "@tutao/tutanota-utils"
|
2022-01-10 16:52:26 +01:00
|
|
|
import type {TypeModel} from "../../common/EntityTypes.js"
|
2019-06-14 18:01:48 +02:00
|
|
|
|
2019-08-30 14:00:15 +02:00
|
|
|
|
2020-03-16 17:37:50 +01:00
|
|
|
export const NotificationSessionKeyTypeRef: TypeRef<NotificationSessionKey> = new TypeRef("sys", "NotificationSessionKey")
|
|
|
|
|
export const _TypeModel: TypeModel = {
|
|
|
|
|
"name": "NotificationSessionKey",
|
|
|
|
|
"since": 48,
|
|
|
|
|
"type": "AGGREGATED_TYPE",
|
|
|
|
|
"id": 1553,
|
|
|
|
|
"rootId": "A3N5cwAGEQ",
|
|
|
|
|
"versioned": false,
|
|
|
|
|
"encrypted": false,
|
|
|
|
|
"values": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"id": 1554,
|
|
|
|
|
"type": "CustomId",
|
|
|
|
|
"cardinality": "One",
|
|
|
|
|
"final": true,
|
|
|
|
|
"encrypted": false
|
|
|
|
|
},
|
|
|
|
|
"pushIdentifierSessionEncSessionKey": {
|
|
|
|
|
"id": 1556,
|
|
|
|
|
"type": "Bytes",
|
|
|
|
|
"cardinality": "One",
|
|
|
|
|
"final": false,
|
|
|
|
|
"encrypted": false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"associations": {
|
|
|
|
|
"pushIdentifier": {
|
|
|
|
|
"id": 1555,
|
|
|
|
|
"type": "LIST_ELEMENT_ASSOCIATION",
|
|
|
|
|
"cardinality": "One",
|
|
|
|
|
"final": false,
|
2019-09-13 13:49:11 +02:00
|
|
|
"refType": "PushIdentifier"
|
2020-03-16 17:37:50 +01:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"app": "sys",
|
2022-02-22 16:54:03 +01:00
|
|
|
"version": "73"
|
2020-03-16 17:37:50 +01:00
|
|
|
}
|
2019-06-14 18:01:48 +02:00
|
|
|
|
2021-12-23 14:03:23 +01:00
|
|
|
export function createNotificationSessionKey(values?: Partial<NotificationSessionKey>): NotificationSessionKey {
|
|
|
|
|
return Object.assign(create(_TypeModel, NotificationSessionKeyTypeRef), downcast<NotificationSessionKey>(values))
|
2019-06-14 18:01:48 +02:00
|
|
|
}
|
2019-08-30 14:00:15 +02:00
|
|
|
|
|
|
|
|
export type NotificationSessionKey = {
|
|
|
|
|
_type: TypeRef<NotificationSessionKey>;
|
|
|
|
|
|
|
|
|
|
_id: Id;
|
|
|
|
|
pushIdentifierSessionEncSessionKey: Uint8Array;
|
|
|
|
|
|
|
|
|
|
pushIdentifier: IdTuple;
|
|
|
|
|
}
|