InDesign 2021 breaks old PDF export script


I have used an export script for batch exporting multiple InDesign documents to PDFs for years.
However, once I have updated InDesign to the 2021 version, it has changed how it will call out a PDF export. Currently written as:

tell application "Finder"
	set DeskDir to path to desktop
	--return DeskDir
		make new folder at DeskDir with properties {name:"Fast PDFs"}
	end try
	set FastPDF_folder to (DeskDir & "Fast PDFs" & ":" as string)
	--return FastPDF_folder
end tell
tell application "Adobe InDesign 2021"
	set theseDocs to the name of every document
	set thesePresets to the name of every PDF export preset
	set New_PDF_Name to ""
	set SaveTheDate to button returned of (display dialog "Will you add the date to the end of the filename?" buttons {"Yes", "No"} default button 1)
	--return SaveTheDate
	my DateItem(SaveTheDate)
	set theDate to result as string
	--return theDate
	set thePDFing to (choose from list thesePresets with prompt "Choose your PDF preset!") as string --if not as string, then it is a list!
	--return thePDFing
	repeat with n from 1 to count of theseDocs
		set TheName to item n of theseDocs
		my CullName(TheName) --this gets rid of the ".indd" extension
		set ThisDoc to result
		--return ThisDoc
		set page range of PDF export preferences to "all pages"
		set view PDF of PDF export preferences to true
		export document TheName format PDF type to ((DeskDir as string) & "Fast PDFs:" & ThisDoc & theDate & ".pdf") using PDF export preset thePDFing
	end repeat
end tell
tell application "Finder"
	open folder FastPDF_folder
end tell

on DateItem(SaveTheDate)
	set thisMonth to month of (current date) as integer as string
	if (count of characters of thisMonth) = 1 then
		set thisMonth to "0" & thisMonth as string
	end if
	--return thisMonth
	set thisDay to day of (current date) as integer as string
	if (count of characters of thisDay) = 1 then
		set thisDay to "0" & thisDay as string
	end if
	set thisDateNow to "_" & thisMonth & thisDay as string
	if SaveTheDate is "No" then
		set thisDateNow to ""
	end if
	return thisDateNow
end DateItem

on CullName(TheName)
	set thisName to (characters 1 through ((offset of ".indd" in TheName) - 1) of TheName) as string
	return thisName
end CullName

Now the export line is written out as:

set «class pcty» of «class DFpf» to "all pages"
                                    set «class vaFe» of «class DFpf» to true
                                    «event K2  expt» document TheName given «class exft»:«constant eXftt_PD», «class kfil»:((DeskDir as string) & "Fast PDFs:" & ThisDoc & theDate & ".pdf"), «class usng»:«class PFst» thePDFing

So now I would like some insight into what the new InDesign dictionary wants for new syntax for this part.

Thanks for help!

No problems here, works as aspected.

macOS 11.3.1
InDesign CC 2021 (16.2.1)

Well, it all ended up being a permissions issue with the Mac OS. This was on my work Mac, not the one I have in my profile.

Giving AppleScript Editor and InDesign 2021 Full Disk Access in the Privacy prefs got rid of the odd references in the script, and it worked fine.