Based on your clarification in the comments, I suggest configuring the .recordFields dictionary when you create the subscription. You can pass a limited amount of info in this dictionary, such as the record type. When you receive the deletion notification, you can unpack the recordFields from the notification object.
You can find more info in Apple's docs at https://developer.apple.com/documentation/cloudkit/ckquerynotification/1428114-recordfields
Update
Here's how I do it. I use objective-C, so you'll have to sort out the SWIFT syntax. But the steps are:
Create an array of records I want sent in the notif
Create a subscription
Create a notificationInfo object
Add my desired keys array to the notificationInfo object
Create the sub using a CKModifySubscriptionsOperation
NSArray *desiredKeys = @[fieldname1, fieldname1, fieldname1];
CKQuerySubscription *subscription = [[CKQuerySubscription alloc] initWithRecordType:recordName
predicate:searchConditions
subscriptionID:subscriptionID
options:fireOn];
CKNotificationInfo *notificationInfo = [CKNotificationInfo new];
notificationInfo.shouldBadge = shouldBadge;
notificationInfo.desiredKeys = desiredKeys;
subscription.notificationInfo = notificationInfo;
CKModifySubscriptionsOperation *subOp = [[CKModifySubscriptionsOperation alloc] initWithSubscriptionsToSave:subsToCreate subscriptionIDsToDelete:subsToDelete];
subOp.modifySubscriptionsCompletionBlock = ^(NSArray<CKSubscription *> *savedSubscriptions,
NSArray<NSString *> *deletedSubscriptionIDs,
NSError *operationError)
{
//do whatever
}
subOp.database = database; //set to either public or private DB
[myQueue addOperation:subOp];
When you receive a notification, you just pull the objects back out of the notificationInfo:
NSString *value1 = [queryNotification.recordFields objectForKey:fieldname1];
If it won't let you actually add the recordType, then you may have to create a custom field with some indicator of the record type, and then pass that as I described above, or fetch the record in question by using the recordID you received in the notification.
recordIDor is it something CloudKit generates for you? And does CloudKit really not give you any information about the CK record type that was deleted?