@cas-smartdesign/data-access 5.2.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/dataaccess.cjs +1 -1
  2. package/dist/dataaccess.cjs.map +1 -1
  3. package/dist/dataaccess.d.mts +202 -33
  4. package/dist/dataaccess.d.ts +202 -33
  5. package/dist/dataaccess.js +1 -1
  6. package/dist/dataaccess.js.map +1 -1
  7. package/dist/dataaccess.mjs +1 -1
  8. package/dist/dataaccess.mjs.map +1 -1
  9. package/dist/docs/assets/hierarchy.js +1 -1
  10. package/dist/docs/assets/navigation.js +1 -1
  11. package/dist/docs/assets/search.js +1 -1
  12. package/dist/docs/classes/FetchError.html +2 -2
  13. package/dist/docs/classes/RestypedFetch.html +2 -2
  14. package/dist/docs/classes/_internal_.CreateObjectRequestBuilder.html +2 -2
  15. package/dist/docs/classes/_internal_.DataObjectNormalizer.html +2 -2
  16. package/dist/docs/classes/_internal_.DeleteAddressImageRequestBuilder.html +2 -2
  17. package/dist/docs/classes/_internal_.DeleteDefaultRecordImageRequestBuilder.html +17 -0
  18. package/dist/docs/classes/_internal_.DeleteLinkRequestBuilder.html +2 -2
  19. package/dist/docs/classes/_internal_.DeleteObjectRequestBuilder.html +2 -2
  20. package/dist/docs/classes/_internal_.DeleteRecordImageRequestBuilder.html +17 -0
  21. package/dist/docs/classes/_internal_.ExtendAppSettingsRequestBuilder.html +2 -2
  22. package/dist/docs/classes/_internal_.GetAddressImageAsBlobRequestBuilder.html +2 -2
  23. package/dist/docs/classes/_internal_.GetAddressImageRequestBuilder.html +2 -2
  24. package/dist/docs/classes/_internal_.GetAddressListRequestBuilder.html +2 -2
  25. package/dist/docs/classes/_internal_.GetAppSettingsRequestBuilder.html +2 -2
  26. package/dist/docs/classes/_internal_.GetDefaultRecordImageAsBlobRequestBuilder.html +19 -0
  27. package/dist/docs/classes/_internal_.GetDefaultRecordImageRequestBuilder.html +19 -0
  28. package/dist/docs/classes/_internal_.GetDocumentRequestBuilder.html +2 -2
  29. package/dist/docs/classes/_internal_.GetDossierCountRequestBuilder.html +2 -2
  30. package/dist/docs/classes/_internal_.GetDossierEntryRequestBuilder.html +2 -2
  31. package/dist/docs/classes/_internal_.GetDossierRequestBuilder.html +2 -2
  32. package/dist/docs/classes/_internal_.GetEmailStoreRequestBuilder.html +2 -2
  33. package/dist/docs/classes/_internal_.GetFullGroupListRequestBuilder.html +2 -2
  34. package/dist/docs/classes/_internal_.GetFullObjectListRequestBuilder.html +2 -2
  35. package/dist/docs/classes/_internal_.GetFullResourceListRequestBuilder.html +2 -2
  36. package/dist/docs/classes/_internal_.GetFullUserListRequestBuilder.html +2 -2
  37. package/dist/docs/classes/_internal_.GetGroupCountRequestBuilder.html +2 -2
  38. package/dist/docs/classes/_internal_.GetGroupListRequestBuilder.html +2 -2
  39. package/dist/docs/classes/_internal_.GetGroupRequestBuilder.html +2 -2
  40. package/dist/docs/classes/_internal_.GetItemCountForViewRequestBuilder.html +2 -2
  41. package/dist/docs/classes/_internal_.GetItemsForViewRequestBuilder.html +2 -2
  42. package/dist/docs/classes/_internal_.GetLoggedInUserInfoRequestBuilder.html +2 -2
  43. package/dist/docs/classes/_internal_.GetLoginInformationRequestBuilder.html +2 -2
  44. package/dist/docs/classes/_internal_.GetObjectDescriptionRequestBuilder.html +2 -2
  45. package/dist/docs/classes/_internal_.GetObjectListCountRequestBuilder.html +2 -2
  46. package/dist/docs/classes/_internal_.GetObjectListRequestBuilder.html +2 -2
  47. package/dist/docs/classes/_internal_.GetObjectRequestBuilder.html +2 -2
  48. package/dist/docs/classes/_internal_.GetObjectSchemaRequestBuilder.html +2 -2
  49. package/dist/docs/classes/_internal_.GetPartialAddressListRequestBuilder.html +2 -2
  50. package/dist/docs/classes/_internal_.GetPartialGroupListRequestBuilder.html +2 -2
  51. package/dist/docs/classes/_internal_.GetPartialItemsForViewRequestBuilder.html +2 -2
  52. package/dist/docs/classes/_internal_.GetPartialObjectListRequestBuilder.html +2 -2
  53. package/dist/docs/classes/_internal_.GetPartialResourceListRequestBuilder.html +2 -2
  54. package/dist/docs/classes/_internal_.GetPartialUserListRequestBuilder.html +2 -2
  55. package/dist/docs/classes/_internal_.GetParticipantDetailsRequestBuilder.html +2 -2
  56. package/dist/docs/classes/_internal_.GetParticipantInfoCountRequestBuilder.html +2 -2
  57. package/dist/docs/classes/_internal_.GetParticipantInfoRequestBuilder.html +2 -2
  58. package/dist/docs/classes/_internal_.GetPermissionDetailsRequestBuilder.html +2 -2
  59. package/dist/docs/classes/_internal_.GetPermissionInfoCountRequestBuilder.html +2 -2
  60. package/dist/docs/classes/_internal_.GetPermissionInfoRequestBuilder.html +2 -2
  61. package/dist/docs/classes/_internal_.GetPrimaryParentsListRequestBuilder.html +2 -2
  62. package/dist/docs/classes/_internal_.GetRecentlyUsedObjectListRequestBuilder.html +2 -2
  63. package/dist/docs/classes/_internal_.GetRecordImageAsBlobRequestBuilder.html +19 -0
  64. package/dist/docs/classes/_internal_.GetRecordImageRequestBuilder.html +19 -0
  65. package/dist/docs/classes/_internal_.GetRecordTypeImageRequestBuilder.html +2 -2
  66. package/dist/docs/classes/_internal_.GetResourceCountRequestBuilder.html +2 -2
  67. package/dist/docs/classes/_internal_.GetResourceListRequestBuilder.html +2 -2
  68. package/dist/docs/classes/_internal_.GetResourceRequestBuilder.html +2 -2
  69. package/dist/docs/classes/_internal_.GetSchemaListRequestBuilder.html +2 -2
  70. package/dist/docs/classes/_internal_.GetSchemaRequestBuilder.html +2 -2
  71. package/dist/docs/classes/_internal_.GetUserCountRequestBuilder.html +2 -2
  72. package/dist/docs/classes/_internal_.GetUserListRequestBuilder.html +2 -2
  73. package/dist/docs/classes/_internal_.GetUserRequestBuilder.html +2 -2
  74. package/dist/docs/classes/_internal_.GetViewCountForTypeRequestBuilder.html +2 -2
  75. package/dist/docs/classes/_internal_.GetViewForTypeRequestBuilder.html +2 -2
  76. package/dist/docs/classes/_internal_.GetViewItemsRequestBuilder.html +2 -2
  77. package/dist/docs/classes/_internal_.GetViewsForTypeRequestBuilder.html +2 -2
  78. package/dist/docs/classes/_internal_.MaskAsRecentlyUsedDataObjectRequestBuilder.html +2 -2
  79. package/dist/docs/classes/_internal_.PostDocumentRequestBuilder.html +2 -2
  80. package/dist/docs/classes/_internal_.PostDossierRequestBuilder.html +2 -2
  81. package/dist/docs/classes/_internal_.PostEmailStoreRequestBuilder.html +2 -2
  82. package/dist/docs/classes/_internal_.PutAddressImageRequestBuilder.html +2 -2
  83. package/dist/docs/classes/_internal_.PutDefaultRecordImageRequestBuilder.html +21 -0
  84. package/dist/docs/classes/_internal_.PutDocumentRequestBuilder.html +2 -2
  85. package/dist/docs/classes/_internal_.PutObjectRequestBuilder.html +2 -2
  86. package/dist/docs/classes/_internal_.PutRecordImageRequestBuilder.html +21 -0
  87. package/dist/docs/classes/_internal_.QueryRequestBuilder.html +2 -2
  88. package/dist/docs/classes/_internal_.RequestBuilder.html +2 -2
  89. package/dist/docs/classes/_internal_.ServerVersionRequestBuilder.html +2 -2
  90. package/dist/docs/classes/_internal_.SetAppSettingsRequestBuilder.html +2 -2
  91. package/dist/docs/enums/DatePrecision.html +6 -6
  92. package/dist/docs/functions/create.html +1 -1
  93. package/dist/docs/hierarchy.html +1 -1
  94. package/dist/docs/interfaces/IAPIResponse.html +2 -2
  95. package/dist/docs/interfaces/IAPIVersions.html +2 -2
  96. package/dist/docs/interfaces/IAddressService.html +7 -7
  97. package/dist/docs/interfaces/IAppointmentService.html +4 -4
  98. package/dist/docs/interfaces/IDataObjectImagePart.html +3 -0
  99. package/dist/docs/interfaces/IDataObjectLinkQueryParameters.html +1 -1
  100. package/dist/docs/interfaces/IDataObjectQueryParameters.html +1 -1
  101. package/dist/docs/interfaces/IDataObjectSchemaPart.html +1 -1
  102. package/dist/docs/interfaces/IDataObjectTransferable.html +1 -1
  103. package/dist/docs/interfaces/IDataObjectTypeIconPart.html +2 -0
  104. package/dist/docs/interfaces/IDataObjectTypesQueryParameter.html +1 -1
  105. package/dist/docs/interfaces/IDateTimeField.html +1 -1
  106. package/dist/docs/interfaces/IDecimalField.html +1 -1
  107. package/dist/docs/interfaces/IDecimalSuggestField.html +1 -1
  108. package/dist/docs/interfaces/IDocumentService.html +4 -4
  109. package/dist/docs/interfaces/IDomainQueryParameter.html +1 -1
  110. package/dist/docs/interfaces/IDossierQueryParameters.html +1 -1
  111. package/dist/docs/interfaces/IDoubleField.html +1 -1
  112. package/dist/docs/interfaces/IDoubleSuggestField.html +1 -1
  113. package/dist/docs/interfaces/IEmailStoreService.html +3 -3
  114. package/dist/docs/interfaces/IFavoriteQueryParameter.html +1 -1
  115. package/dist/docs/interfaces/IFetchWrapper.html +2 -2
  116. package/dist/docs/interfaces/IGguidField.html +1 -1
  117. package/dist/docs/interfaces/IGroupService.html +5 -5
  118. package/dist/docs/interfaces/IGwSpecific.html +2 -2
  119. package/dist/docs/interfaces/IHasFormatOption.html +1 -1
  120. package/dist/docs/interfaces/IHasLength.html +1 -1
  121. package/dist/docs/interfaces/IHasMaxLength.html +1 -1
  122. package/dist/docs/interfaces/IHasOverflowLength.html +1 -1
  123. package/dist/docs/interfaces/IHasPrecision.html +1 -1
  124. package/dist/docs/interfaces/IHasPrecisionAndScale.html +1 -1
  125. package/dist/docs/interfaces/IHasSystemDefinedTranslated.html +1 -1
  126. package/dist/docs/interfaces/IIncludeMaxJournalIdQueryParameter.html +1 -1
  127. package/dist/docs/interfaces/IIncludePermissionsQueryParameter.html +1 -1
  128. package/dist/docs/interfaces/IIntField.html +1 -1
  129. package/dist/docs/interfaces/IIntSuggestField.html +1 -1
  130. package/dist/docs/interfaces/IInterPlatform.html +2 -3
  131. package/dist/docs/interfaces/ILastUsedDataObjectQueryParameters.html +1 -1
  132. package/dist/docs/interfaces/ILinkingService.html +8 -8
  133. package/dist/docs/interfaces/IOpenSpecific.html +2 -2
  134. package/dist/docs/interfaces/IOrderByQueryParameters.html +1 -1
  135. package/dist/docs/interfaces/IPagedQueryParameters.html +1 -1
  136. package/dist/docs/interfaces/IPartialObjectQueryParameters.html +1 -1
  137. package/dist/docs/interfaces/IPermissionRequirementQueryParameter.html +1 -1
  138. package/dist/docs/interfaces/IQueryPart.html +1 -1
  139. package/dist/docs/interfaces/IRecentlyUsedQueryParameter.html +1 -1
  140. package/dist/docs/interfaces/IResourceQueryParameters.html +1 -1
  141. package/dist/docs/interfaces/IResourceService.html +5 -5
  142. package/dist/docs/interfaces/ISearchQueryParameters.html +1 -1
  143. package/dist/docs/interfaces/ISelectionValueListField.html +1 -1
  144. package/dist/docs/interfaces/IServerInformationService.html +2 -2
  145. package/dist/docs/interfaces/IServerSpecificVersionAPIDefinition.html +2 -2
  146. package/dist/docs/interfaces/IServerVersionPart.html +1 -1
  147. package/dist/docs/interfaces/IServiceRegistry.html +14 -14
  148. package/dist/docs/interfaces/ISettingsService.html +9 -9
  149. package/dist/docs/interfaces/ISingleDataObjectQueryParameters.html +1 -1
  150. package/dist/docs/interfaces/ISingleDataObjectTypesQueryParameter.html +1 -1
  151. package/dist/docs/interfaces/IStringField.html +1 -1
  152. package/dist/docs/interfaces/IStringListSuggestField.html +1 -1
  153. package/dist/docs/interfaces/IStringSuggestField.html +1 -1
  154. package/dist/docs/interfaces/ISuggestField.html +1 -1
  155. package/dist/docs/interfaces/ISuggestionWithRawValue.html +2 -2
  156. package/dist/docs/interfaces/ITeamFilterQueryParameters.html +1 -1
  157. package/dist/docs/interfaces/ITextField.html +1 -1
  158. package/dist/docs/interfaces/ITypedJSONResponse.html +2 -2
  159. package/dist/docs/interfaces/ITypedRequestInit.html +2 -2
  160. package/dist/docs/interfaces/IUserService.html +9 -9
  161. package/dist/docs/interfaces/IVersion6.html +2 -2
  162. package/dist/docs/interfaces/IVersion7.html +2 -2
  163. package/dist/docs/interfaces/IViewItemsCountQueryParameters.html +1 -1
  164. package/dist/docs/interfaces/IViewItemsQueryParameters.html +1 -1
  165. package/dist/docs/interfaces/IViewKindQueryParameters.html +1 -1
  166. package/dist/docs/interfaces/IViewQueryParameters.html +1 -1
  167. package/dist/docs/interfaces/IViewService.html +7 -7
  168. package/dist/docs/interfaces/IWhereStringQueryParameters.html +1 -1
  169. package/dist/docs/interfaces/{IDataObjectService.html → _internal_.ICommonDataObjectService.html} +17 -28
  170. package/dist/docs/interfaces/_internal_.IDataObjectImageService.html +44 -0
  171. package/dist/docs/interfaces/_internal_.IDataObjectTypeIconService.html +11 -0
  172. package/dist/docs/modules/_internal_.html +1 -1
  173. package/dist/docs/modules.html +1 -1
  174. package/dist/docs/types/APIVersion.html +1 -1
  175. package/dist/docs/types/FieldCommon.html +1 -1
  176. package/dist/docs/types/FieldCommon7.html +1 -1
  177. package/dist/docs/types/FieldGw7.html +1 -1
  178. package/dist/docs/types/FieldTypes.html +1 -1
  179. package/dist/docs/types/FieldTypesV6.html +1 -1
  180. package/dist/docs/types/FieldTypesV7.html +1 -1
  181. package/dist/docs/types/IDataObjectService.html +2 -0
  182. package/dist/docs/types/InterPlatform6.html +1 -1
  183. package/dist/docs/types/InterPlatform6Common.html +1 -1
  184. package/dist/docs/types/InterPlatform6Gw.html +1 -1
  185. package/dist/docs/types/InterPlatform6Open.html +1 -1
  186. package/dist/docs/types/InterPlatform7.html +1 -1
  187. package/dist/docs/types/InterPlatform7Common.html +1 -1
  188. package/dist/docs/types/InterPlatform7Gw.html +1 -1
  189. package/dist/docs/types/InterPlatform7Open.html +1 -1
  190. package/dist/docs/types/InterPlatformGw.html +1 -1
  191. package/dist/docs/types/InterPlatformOpen.html +1 -1
  192. package/dist/docs/types/Methods.html +1 -1
  193. package/dist/docs/types/OmitProp.html +1 -1
  194. package/dist/docs/types/ServerType.html +1 -1
  195. package/dist/docs/types/V7SuggestField.html +1 -1
  196. package/npm-third-party-licenses.json +34 -34
  197. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["/build/workspace/smartdesign/smartdesign-elements/main/git/dataaccess/dist/dataaccess.cjs","../dataaccess.ts","../types/interplatform.ts","../types/restypedfetch.ts","../services/request/requestbuilder.ts","../services/response/headerutil.ts","../services/dataobjectservice.ts","../services/linkingservice.ts","../services/userservice.ts","../services/request/binaryloader.ts","../services/addressservice.ts","../services/appointmentservice.ts","../services/serverinformationservice.ts","../services/emailstoreservice.ts","../services/viewservice.ts","../services/groupservice.ts","../services/resourceservice.ts","../services/documentservice.ts","../services/settingsservice.ts"],"names":["H","Object","defineProperty","tt","getOwnPropertyDescriptor","rt","getOwnPropertyNames","st","prototype","hasOwnProperty","it","s","e","t","get","enumerable","nt","r","i","call","at","value","dataaccess_exports","__export","AccessRight","DatePrecision","ForeignEditPermission","HtmlFilter","TeamFilterConstant","create","module","exports","__toCommonJS","ExternalAccess","LoggedInUser","PublicRecords","TeamFilter","options","teamFilterIds","slice","role","convertToQueryParameterValue","teamFilterString","join","PRIVATE","CONFIDENTIAL","READ","DUPLICATE","READ_CHANGE_TIMES","EDIT","DELETE","IN_EFFECT","NO_ACCESS","INSERT","FULL_ACCESS","NOTHING","EXTERNAL_IMAGES","ALL_IMAGES","DANGEROUS_TAGS_AND_ATTRIBUTES","DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES","ALL","COMPLETE","NO_TIME","NO_SECONDS","NO_MILLISECONDS","NO_DATE","RestypedFetch","version","server","fetcher","path","config","proxy","post","put","delete","patch","head","camelToDash","str","replace","first","toLowerCase","letter","isBoolean","method","assign","resolvedPath","query","params","keys","forEach","prop","toString","RegExp","convert","result","Date","toJSON","Array","isArray","map","p","convertedValue","encodeURIComponent","filter","length","versionPath","indexOf","window","fetch","FetchError","status","statusText","text","Error","RequestBuilder","typedFetch","_path","_method","_parameters","_transform","response","json","then","catch","_query","_headers","setAcceptHeader","setQueryParameter","property","setBody","body","_body","accept","setHeader","setContentType","contentType","key","prepareRequest","headers","execute","_execution","ok","transformStream","data","handleErrorResponse","onfulfilled","onrejected","getETag","etag","resolution","split","Promise","resolve","reject","LocationHelper","createForPath","extract","pathParameter","getIdFromLocation","location","processedPattern","matches","exec","locationHelper","DEFAULT_PAGE_SIZE","DataObjectService","dataObjectNormalizer","deleteObject","type","gguid","DeleteObjectRequestBuilder","getObject","GetObjectRequestBuilder","getObjectList","GetFullObjectListRequestBuilder","getPartialObjectList","GetPartialObjectListRequestBuilder","getObjectListCount","GetObjectListCountRequestBuilder","saveObject","dataObject","PutObjectRequestBuilder","saveAndReturnObject","objectType","id","createObject","CreateObjectRequestBuilder","getPermissionInfo","GetPermissionInfoRequestBuilder","getPermissionInfoCount","GetPermissionInfoCountRequestBuilder","getPermissionDetails","permissionGguid","GetPermissionDetailsRequestBuilder","getObjectSchema","GetObjectSchemaRequestBuilder","getObjectDescription","GetObjectDescriptionRequestBuilder","getRecordTypeImage","GetRecordTypeImageRequestBuilder","arrayBuffer","getRecordTypeImageBlob","blob","QueryRequestBuilder","getRecentlyUsedObjectList","GetRecentlyUsedObjectListRequestBuilder","maskAsRecentlyUsedDataObject","MaskAsRecentlyUsedDataObjectRequestBuilder","DataObjectNormalizer","normalizeDataObject","fields","normalizedDataObject","foreignEditPermission","permissions","normalizePermissions","RIGHTOWNERGGUID","ACCESSRIGHT","ROLE","dao","transform","dataObjectType","dataObjectGGUID","JSON","stringify","ETAG","tagAsRecentlyUsed","eTag","withPreconfiguredFields","withFields","includePermissions","includeSyncrecordPermissions","includeMaxjournalid","isFavorite","isfavorite","GetObjectListRequestBuilder","forPage","page","withEntriesPerPage","entriesPerPage","withPreconfiguredTeamFilter","teamFilter","withTeamFilter","whenUpdatedAfter","updatedAfter","whenInsertedAfter","insertedAfter","withIntervalStart","intervalStart","withIntervalEnd","intervalEnd","withSearchTerm","searchTerm","search","withPreconfiguredOrderBy","orderBy","isAscending","sortOrder","push","whenLinkedTo","linkedToType","linkedTo","linkedToAttributes","setDataObject","withTemplateGguid","templateGguid","permissionGGUID","schema","properties","field","normalizeMandatoryAndOptionalFlag","mandatory","optional","normalizeMassData","unwrapped","isLegacyGwResponse","displayNames","displaynames","rows","types","includePrivateForeignrecords","forIconType","iconType","withWhereString","whereString","LinkingService","_LinkingService","linkDataObject","PostDossierRequestBuilder","deleteLink","typeOrDossierEntry","dossierentryGGUID","isDossierEntry","OBJECTTYPE1","GGUID1","DeleteLinkRequestBuilder","getDossierEntry","GetDossierEntryRequestBuilder","getDossierCount","GetDossierCountRequestBuilder","getDossier","GetDossierRequestBuilder","getPrimaryLinkParentsList","GetPrimaryParentsListRequestBuilder","dossierEntryOrGuid","withDataObject","objectType2","gguid2","withLinkAttribute","linkAttribute","attribute","withRole1","role1","withRole2","role2","withLinkDirection","linkDirection","withAdditionalField1","additionalField1","withAdditionalField2","additionalField2","forObjectTypes","objectTypes","UserService","addressService","getUser","GetUserRequestBuilder","getUserImage","user","getAddressImage","GGUIDOFADDRESSRECORD","getUserImageAsBlob","getAddressImageAsBlob","getUserCount","GetUserCountRequestBuilder","getUserList","GetFullUserListRequestBuilder","getPartialUserList","GetPartialUserListRequestBuilder","getLoggedInUser","GetLoggedInUserInfoRequestBuilder","getLoginInformation","GetLoginInformationRequestBuilder","GGUID","includePrivilegedOperations","forObjectType","withMinimumPermission","minPermission","GetUserListRequestBuilder","parameters","withDomainGuid","domainGuid","BinaryLoader","setContent","content","_binaryInfo","buffer","setContentFromArrayBuffer","setContentFromUInt8Array","uInt8Array","setContentFromBase64String","base64","binaryString","atob","len","bytes","Uint8Array","charCodeAt","setContentFromFile","file","fileLoaded","reader","FileReader","addEventListener","error","readAsArrayBuffer","getBinary","AddressService","getAddressList","GetAddressListRequestBuilder","getPartialAddressList","GetPartialAddressListRequestBuilder","addressGguid","GetAddressImageRequestBuilder","GetAddressImageAsBlobRequestBuilder","updateAddressImage","eTagOfAddress","PutAddressImageRequestBuilder","deleteAddressImage","DeleteAddressImageRequestBuilder","withMaxWidth","maxWidth","withMaxHeight","maxHeight","binaryLoader","setImageFromArrayBuffer","setImageFromUInt8Array","setImageFromBase64String","setImageFromFile","binary","_","usersOnly","isUser","whenBirthdayIsOn","hasBirthdayOn","AppointmentService","getParticipantDetails","participantGGUID","GetParticipantDetailsRequestBuilder","getParticipantInfo","GetParticipantInfoRequestBuilder","getParticipantInfoCount","GetParticipantInfoCountRequestBuilder","ServerInformationService","getServerVersion","ServerVersionRequestBuilder","isGwResponse","EmailStoreService","dataObjectService","getEmail","GetEmailStoreRequestBuilder","archiveEmail","PostEmailStoreRequestBuilder","_PostEmailStoreRequestBuilder","withForeignEditPermissionRestriction","foreignEditPermissionRestriction","DEFAULT_MESSAGE_MIME_TYPE","withHtmlFilter","htmlFilter","ViewService","getViewsForType","GetViewsForTypeRequestBuilder","getViewCountForType","GetViewCountForTypeRequestBuilder","getViewDetails","viewID","GetViewForTypeRequestBuilder","getPartialItemsForView","GetPartialItemsForViewRequestBuilder","getItemsForView","GetItemsForViewRequestBuilder","getItemCountForView","GetItemCountForViewRequestBuilder","GetViewItemsRequestBuilder","forViewKind","viewKind","GroupService","getGroup","GetGroupRequestBuilder","getGroupCount","GetGroupCountRequestBuilder","getGroupList","GetFullGroupListRequestBuilder","getPartialGroupList","GetPartialGroupListRequestBuilder","GetGroupListRequestBuilder","ResourceService","getResource","GetResourceRequestBuilder","getResourceCount","GetResourceCountRequestBuilder","getResourceList","GetFullResourceListRequestBuilder","getPartialResourceList","GetPartialResourceListRequestBuilder","guid","GetResourceListRequestBuilder","DocumentService","createDocument","PostDocumentRequestBuilder","getDocument","GetDocumentRequestBuilder","uploadDocument","eTagOfRecord","fileExtension","PutDocumentRequestBuilder","withReadOnlyInterest","readOnlyInterest","readOnly","withVersion","keepCheckedOut","createNewVersion","withVersionComment","versionComment","SettingsService","getSchemaList","GetSchemaListRequestBuilder","getSchema","appId","GetSchemaRequestBuilder","getAppSettings","GetAppSettingsRequestBuilder","setAppSettings","settings","SetAppSettingsRequestBuilder","_apiVersion","changeAppSettings","ExtendAppSettingsRequestBuilder","removedProperties","_GetAppSettingsRequestBuilder","endpoint","withScope","scope","_SetAppSettingsRequestBuilder","_ExtendAppSettingsRequestBuilder","ServiceRegistry","fetchHolder","api","linkingService","userService","appointmentService","serverInformationService","emailStoreService","viewService","groupService","resourceService","documentService","settingsService","serverType"],"mappings":"+iFAAA,IAAIA,EAAEC,OAAOC,cAAc,CAAC,IAAIC,EAAGF,OAAOG,wBAAwB,CAAC,IAAIC,EAAGJ,OAAOK,mBAAmB,CAAC,IAAIC,EAAGN,OAAOO,SAAS,CAACC,cAAc,CAAC,IAAIC,EAAG,SAACC,EAAEC,GAAK,IAAI,IAAIC,KAAKD,EAAEZ,EAAEW,EAAEE,EAAE,CAACC,IAAIF,CAAC,CAACC,EAAE,CAACE,WAAW,CAAC,CAAC,EAAE,EAAEC,EAAG,SAACL,EAAEC,EAAEC,EAAEI,OAAwD,OAAA,QAAA,YAAnD,GAAGL,GAAG,CAAA,OAAOA,4BAAP,EAAOA,EAAAA,GAAG,UAAU,OAAOA,GAAG,gCAAe,IAAIM,EAAJ,OAAe,EAACX,EAAGY,IAAI,CAACR,EAAEO,IAAIA,IAAIL,GAAGb,EAAEW,EAAEO,EAAE,CAACJ,IAAI,kBAAIF,CAAC,CAACM,EAAE,EAACH,WAAW,CAAEE,CAAAA,EAAEd,EAAGS,EAAEM,EAAC,GAAID,EAAEF,UAAU,IAAlG,QAAI,EAASV,EAAGO,sBAAZ,IAAA,GAAA,EAAA,gBAAA,oBAAA,OAAA,oBAAA,GAAA,gBAAA,uBAAA,SAAA,IAAiG,OAAOD,CAAC,EAAE,IAAIS,EAAGT,SAAAA,UAAGK,EAAGhB,EAAE,CAAC,EAAE,aAAa,CAACqB,MAAM,CAAC,CAAC,GAAGV,ICAna,IAAAW,EAAA,CAAA,EAAAC,EAAAD,EAAA,CAAAE,YAAA,kBAAAA,GAAAC,cAAA,kBAAAA,GAAAC,sBAAA,kBAAAA,GAAAC,WAAA,kBAAAA,GAAAC,mBAAA,kBAAAA,GAAAC,OAAA,kBAAAA,GAAAA,EAAAC,CAAAA,OAAAC,OAAA,CAAAC,EAAAV,GCqBO,IAAKM,EAAAA,SAAAA,UACR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IAAA,CAAKS,eAAA,CAAkB,IAAIjD,GAAgB,IAAA,CAAKwC,GAAA,CAAK,IAAA,CAAKzF,iBAAiB,EAC3E,IAAA,CAAKmG,eAAA,CAAkB,IAAIjC,GAAgB,IAAA,CAAKuB,GAAG,GAsEpD,SAAS/d,GACZ+d,CAAAA,MACAzb,EAAAA,uDAAmB,MACnBoc,EAAAA,uDAAqB,SAErB,OAAO,IAAIb,GAAgEE,EAAKzb,EAASoc,EAC7F,CAAA,GAAAze,CAAAA,OAAAC,OAAA,CAAA,CAAAP,YAAAA,YAAAC,cAAAA,cAAAC,sBAAAA,sBAAAC,WAAAA,WAAAC,mBAAAA,mBAAAC,OAAAA,MAAA,CAAA","sourcesContent":["var H=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var it=(s,e)=>{for(var t in e)H(s,t,{get:e[t],enumerable:!0})},nt=(s,e,t,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of rt(e))!st.call(s,i)&&i!==t&&H(s,i,{get:()=>e[i],enumerable:!(r=tt(e,i))||r.enumerable});return s};var at=s=>nt(H({},\"__esModule\",{value:!0}),s);var pt={};it(pt,{AccessRight:()=>W,DatePrecision:()=>z,ForeignEditPermission:()=>P,HtmlFilter:()=>J,TeamFilterConstant:()=>Y,create:()=>ot});module.exports=at(pt);var Y=(r=>(r.ExternalAccess=\"CASExternalAccess\",r.LoggedInUser=\"CASLoggedInUser\",r.PublicRecords=\"CASPublicRecords\",r))(Y||{}),h=class{constructor(e){this.teamFilterIds=[];e&&(this.teamFilterIds=e.teamFilterIds.slice(),this.role=e.role)}convertToQueryParameterValue(){let e=this.teamFilterIds.join(\",\");return this.role&&(e+=`;${this.role}`),e}},P=(p=>(p[p.PRIVATE=-1]=\"PRIVATE\",p[p.CONFIDENTIAL=0]=\"CONFIDENTIAL\",p[p.READ=64]=\"READ\",p[p.DUPLICATE=256]=\"DUPLICATE\",p[p.READ_CHANGE_TIMES=512]=\"READ_CHANGE_TIMES\",p[p.EDIT=2048]=\"EDIT\",p[p.DELETE=8192]=\"DELETE\",p[p.IN_EFFECT=65535]=\"IN_EFFECT\",p))(P||{}),W=(p=>(p[p.NO_ACCESS=0]=\"NO_ACCESS\",p[p.READ=64]=\"READ\",p[p.INSERT=128]=\"INSERT\",p[p.DUPLICATE=256]=\"DUPLICATE\",p[p.READ_CHANGE_TIMES=512]=\"READ_CHANGE_TIMES\",p[p.EDIT=2048]=\"EDIT\",p[p.DELETE=8192]=\"DELETE\",p[p.FULL_ACCESS=32768]=\"FULL_ACCESS\",p))(W||{}),J=(o=>(o[o.NOTHING=0]=\"NOTHING\",o[o.EXTERNAL_IMAGES=1]=\"EXTERNAL_IMAGES\",o[o.ALL_IMAGES=2]=\"ALL_IMAGES\",o[o.DANGEROUS_TAGS_AND_ATTRIBUTES=4]=\"DANGEROUS_TAGS_AND_ATTRIBUTES\",o[o.DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES=8]=\"DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES\",o[o.ALL=2147483647]=\"ALL\",o))(J||{});var z=(a=>(a[a.COMPLETE=2048]=\"COMPLETE\",a[a.NO_TIME=512]=\"NO_TIME\",a[a.NO_SECONDS=64]=\"NO_SECONDS\",a[a.NO_MILLISECONDS=0]=\"NO_MILLISECONDS\",a[a.NO_DATE=4096]=\"NO_DATE\",a))(z||{});var g=class{constructor(e=\"6.0\",t=\"common\",r){this.version=e;this.server=t;this.fetcher=r}get(e,t){return this.proxy(e,\"GET\",t)}post(e,t){return this.proxy(e,\"POST\",t)}put(e,t){return this.proxy(e,\"PUT\",t)}delete(e,t){return this.proxy(e,\"DELETE\",t)}patch(e,t){return this.proxy(e,\"PATCH\",t)}options(e,t){return this.proxy(e,\"OPTIONS\",t)}head(e,t){return this.proxy(e,\"HEAD\",t)}camelToDash(e){return e.replace(/(^[A-Z])/,t=>t.toLowerCase()).replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}isBoolean(e){return e===!0||e===!1}proxy(e,t,r){r=Object.assign({},r||{},{method:t});let i=e,a=\"\";r.params&&Object.keys(r.params).forEach(u=>{i=i.toString().replace(new RegExp(\":\"+u,\"g\"),r.params[u])});let o=u=>{let I;return u instanceof h?I=u.convertToQueryParameterValue():u instanceof Date?I=u.toJSON():Array.isArray(u)?I=u.map(O=>o(O)).join(\",\"):this.isBoolean(u)?I=u?\"true\":\"false\":I=u,I};r.query&&(a=Object.keys(r.query).map(u=>{let I=r.query[u],O=o(I);return O==null?null:`${this.camelToDash(u)}=${encodeURIComponent(O)}`}).filter(u=>u!=null).join(\"&\"),a.length>0&&(a=\"?\"+a));let p=(this.version.indexOf(\"v\")===0?\"\":\"v\")+this.version;return(this.fetcher||window).fetch(p+i+a,r)}};var R=class extends Error{constructor(t,r,i=null){super(\"Server returned non ok response.\");this.status=t;this.statusText=r;this.text=i}},n=class{constructor(e,t,r=\"GET\",i={},a=o=>o.json().then(p=>p).catch(p=>({}))){this.typedFetch=e;this._path=t;this._method=r;this._parameters=i;this._transform=a;this._query={};this._headers={};this.setAcceptHeader(\"application/json\")}setQueryParameter(e,t){return this._query[e]=t,this}setBody(e){return this._body=e,this}setAcceptHeader(e){return this.setHeader(\"Accept\",e)}setContentType(e){return this.setHeader(\"Content-Type\",e)}setHeader(e,t){return this._headers[e]=t,this}prepareRequest(){return this.typedFetch.proxy(this._path,this._method,{query:this._query,params:this._parameters,body:this._body,headers:this._headers})}execute(){return this._execution?this._execution:(this._execution=this.prepareRequest().then(e=>e.ok?this.transformStream(e).then(t=>({headers:e.headers,data:t})):this.handleErrorResponse(e).then(t=>({headers:e.headers,data:t}))),this._execution)}then(e,t){return this.execute().then(e,t)}catch(e){return this.execute().then(null,e)}transformStream(e){return this._transform(e)}handleErrorResponse(e){return e.text().catch(()=>{throw new R(e.status,e.statusText)}).then(t=>{throw new R(e.status,e.statusText,t)})}};var b=s=>{let e=s.headers.get(\"etag\"),t;return e?(e=`\"${e.replace(/\"/g,\"\").split(\"--\")[0]}\"`,t=Promise.resolve(e)):t=Promise.reject(new Error(\"ETag header not found\")),t},K=class{createForPath(e){return{extract:(r,i)=>this.getIdFromLocation(r,e,i)}}getIdFromLocation(e,t,r){let i,a=e.headers.get(\"location\")||\"\";if(a!=null&&a.length>0){let o=t.toString().replace(\":\"+r,\"([^/]+)\").replace(/:([^/]+)(\\/?)/g,\"[^/]+$2\").replace(/\\//g,\"\\\\/\");o=\".*\"+o;let c=new RegExp(o).exec(a);c&&c.length>0?i=Promise.resolve(c[1]):i=Promise.reject(new Error(`Location header (${a}) did not matches the given pattern ${t.toString()}!`))}else i=Promise.reject(new Error(\"Location header not found!\"));return i}},l=new K;var et=100,F=class{constructor(e,t){this.typedFetch=e;this.dataObjectNormalizer=t}deleteObject(e,t){return new $(this.typedFetch,e,t)}getObject(e,t){return new f(this.typedFetch,e,t)}getObjectList(e){return new m(this.typedFetch,e)}getPartialObjectList(e){return new T(this.typedFetch,e)}getObjectListCount(e){return new X(this.typedFetch,e)}saveObject(e){return new G(this.typedFetch,this.dataObjectNormalizer,e,()=>Promise.resolve())}saveAndReturnObject(e){return new G(this.typedFetch,this.dataObjectNormalizer,e,()=>this.getObject(e.objectType,e.id).then(t=>t.data))}createObject(e){return new Z(this.typedFetch,this.dataObjectNormalizer,e)}getPermissionInfo(e,t){return new te(this.typedFetch,e,t)}getPermissionInfoCount(e,t){return new re(this.typedFetch,e,t)}getPermissionDetails(e,t,r){return new ee(this.typedFetch,e,t,r)}getObjectSchema(e){return new se(this.typedFetch,e)}getObjectDescription(e){return new ie(this.typedFetch,e)}getRecordTypeImage(e){return new L(this.typedFetch,e,t=>t.arrayBuffer())}getRecordTypeImageBlob(e){return new L(this.typedFetch,e,t=>t.blob())}query(e){return new ne(this.typedFetch,e)}getRecentlyUsedObjectList(e){return new ae(this.typedFetch,e)}maskAsRecentlyUsedDataObject(e,t){return new oe(this.typedFetch,e,t)}},A=class{normalizeDataObject(e){e=e||{fields:{}};let t={fields:e.fields||{},foreignEditPermission:e.foreignEditPermission==null?-1:e.foreignEditPermission};return e.permissions&&(t.permissions=this.normalizePermissions(e.permissions)),t}normalizePermissions(e){return e.map(t=>({RIGHTOWNERGGUID:t.RIGHTOWNERGGUID,ACCESSRIGHT:t.ACCESSRIGHT,ROLE:t.ROLE}))}},G=class extends n{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"PUT\",{dataObjectType:r.objectType,dataObjectGGUID:r.id},i),this.setBody(JSON.stringify(t.normalizeDataObject(r))),this.setHeader(\"IF-MATCH\",r.ETAG),this.setContentType(\"application/json\")}tagAsRecentlyUsed(e=!0){return this._query.tagAsRecentlyUsed=e,this}},$=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"DELETE\",{dataObjectType:t,dataObjectGGUID:r})}},f=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r},i=>i.json().then(a=>b(i).then(o=>a.ETAG=o).then(()=>a,()=>a)))}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePermissions(e=!0){return this._query.includePermissions=e,this}includeSyncrecordPermissions(e=!0){return this._query.includeSyncrecordPermissions=e,this}tagAsRecentlyUsed(e=!0){return this._query.tagAsRecentlyUsed=e,this}includeMaxjournalid(e=!0){return this._query.includeMaxjournalid=e,this}isFavorite(e=!0){return this._query.isfavorite=e,this}},D=class extends n{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}withPreconfiguredTeamFilter(e){return this._query.teamFilter=e,this}withTeamFilter(e){return this._query.teamFilter=new h(e),this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}withPreconfiguredOrderBy(e){return this._query.orderBy=e,this}orderBy(e,t=!0){let r=t?\"ASC\":\"DESC\";return this._query.orderBy=this._query.orderBy||[],this._query.orderBy.push(`${e} ${r}`),this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},m=class extends D{constructor(e,t){super(e,\"/type/:dataObjectType/full\",\"GET\",{dataObjectType:t}),this.withEntriesPerPage(et)}},T=class extends D{constructor(e,t){super(e,\"/type/:dataObjectType/list\",\"GET\",{dataObjectType:t}),this.withEntriesPerPage(et)}},X=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/count\",\"GET\",{dataObjectType:t})}withPreconfiguredTeamFilter(e){return this._query.teamFilter=e,this}withTeamFilter(e){return this._query.teamFilter=new h(e),this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},Z=class extends n{constructor(t,r,i){super(t,\"/type/:dataObjectType\",\"POST\",{dataObjectType:i},a=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(a,\"dataObjectGGUID\").then(o=>new f(t,i,o).then(c=>c.data)));this.dataObjectNormalizer=r;this.setDataObject({objectType:i,fields:{}})}withTemplateGguid(t){return this._query.templateGguid=t,this}tagAsRecentlyUsed(t=!0){return this._query.tagAsRecentlyUsed=t,this}setDataObject(t){return this.setBody(JSON.stringify(this.dataObjectNormalizer.normalizeDataObject(t))),this}},ee=class extends n{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r,permissionGGUID:i})}},te=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/full\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},re=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/count\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},se=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/schema\",\"GET\",{dataObjectType:t},r=>r.json().then(i=>(Object.keys(i.properties.fields).map(a=>i.properties.fields[a]).forEach(a=>this.normalizeMandatoryAndOptionalFlag(a)),i)))}normalizeMandatoryAndOptionalFlag(e){return e.mandatory==null&&(e.mandatory=!e.optional),e.optional==null&&(e.optional=!e.mandatory),e}},ie=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/description\",\"GET\",{dataObjectType:t})}},ne=class extends n{constructor(e,t){super(e,\"/query\",\"POST\",{},r=>r.json().catch(()=>null).then(i=>this.normalizeMassData(i))),this.setBody(JSON.stringify({query:t}))}normalizeMassData(e){let t=null;return this.isLegacyGwResponse(e)?e.length>0&&(t=e[0]):t=e,t==null&&(t={}),{displayNames:t.displayNames||t.displaynames||{},rows:t.rows||[],types:t.types||{}}}isLegacyGwResponse(e){return Array.isArray(e)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}includePrivateForeignrecords(e){return this._query.includePrivateForeignrecords=e,this}},L=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/image\",\"GET\",{dataObjectType:t},r),this.setAcceptHeader(\"image/*\")}forIconType(e){return this._query.iconType=e,this}},ae=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/recent/list\",\"GET\",{dataObjectType:t})}withFields(e){return this._query.fields=e,this}withWhereString(e){return this._query.whereString=e,this}},oe=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/recent\",\"POST\",{dataObjectType:t,dataObjectGGUID:r})}};var S=class s{constructor(e){this.typedFetch=e}linkDataObject(e,t){return new pe(this.typedFetch,e,t)}deleteLink(e,t,r){let i;return s.isDossierEntry(e)?(i=e.fields.OBJECTTYPE1,t=e.fields.GGUID1,r=e.id):i=e,new de(this.typedFetch,i,t,r)}getDossierEntry(e,t,r){return new M(this.typedFetch,e,t,r)}getDossierCount(e,t){return new ue(this.typedFetch,e,t)}getDossier(e,t){return new ce(this.typedFetch,e,t)}getPrimaryLinkParentsList(e,t){return new Ie(this.typedFetch,e,t)}static isDossierEntry(e){return e&&e.id!=null}},pe=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier\",\"POST\",{dataObjectGGUID:r,dataObjectType:t},i=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\").extract(i,\"dossierentryGGUID\").then(a=>new M(e,t,r,a).then(o=>o.data)))}withDataObject(e,t){return this._query.objectType2=e,this._query.gguid2=t,this}withLinkAttribute(e){return this._query.attribute=e,this}withRole1(e){return this._query.role1=e,this}withRole2(e){return this._query.role2=e,this}withLinkDirection(e){return this._query.linkDirection=e,this}withAdditionalField1(e){return this._query.additionalField1=e,this}withAdditionalField2(e){return this._query.additionalField2=e,this}},M=class extends n{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:i},a=>a.json().then(o=>b(a).then(c=>o.ETAG=c).then(()=>o,()=>o)))}},ue=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/count\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},ce=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/full\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}forObjectTypes(e){return this._query.objectTypes=e,this}},de=class extends n{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\"DELETE\",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:i})}},Ie=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}};var E=class{constructor(e,t){this.typedFetch=e;this.addressService=t}getUser(e){return new le(this.typedFetch,e)}getUserImage(e){return this.addressService.getAddressImage(e.fields.GGUIDOFADDRESSRECORD)}getUserImageAsBlob(e){return this.addressService.getAddressImageAsBlob(e.fields.GGUIDOFADDRESSRECORD)}getUserCount(){return new ye(this.typedFetch)}getUserList(){return new he(this.typedFetch)}getPartialUserList(){return new Pe(this.typedFetch)}getLoggedInUser(){return new me(this.typedFetch)}getLoginInformation(){return new Te(this.typedFetch)}},le=class extends n{constructor(e,t){super(e,\"/user/:GGUID\",\"GET\",{GGUID:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePrivilegedOperations(e=!0){return this._query.includePrivilegedOperations=e,this}},ye=class extends n{constructor(e){super(e,\"/user/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},x=class extends n{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},he=class extends x{constructor(e){super(e,\"/user/full\")}},Pe=class extends x{constructor(e){super(e,\"/user/list\")}},me=class extends n{constructor(e){super(e,\"/user/self\")}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePrivilegedOperations(e=!0){return this._query.includePrivilegedOperations=e,this}},Te=class extends n{constructor(e){super(e,\"/user/self/logininformation\")}};var d=class{setContent(e,t){this._binaryInfo=Promise.resolve({buffer:t,contentType:e})}setContentFromArrayBuffer(e,t){this._binaryInfo=Promise.resolve({buffer:t,contentType:e})}setContentFromUInt8Array(e,t){this.setContentFromArrayBuffer(e,t.buffer)}setContentFromBase64String(e,t){let r=window.atob(t),i=r.length,a=new Uint8Array(i);for(let o=0;o<i;o++)a[o]=r.charCodeAt(o);this.setContentFromUInt8Array(e,a)}setContentFromFile(e,t=e.type){let r=new Promise((i,a)=>{let o=new FileReader;o.addEventListener(\"loadend\",()=>{i(o.result)}),o.addEventListener(\"error\",()=>{a(o.error)}),o.readAsArrayBuffer(e)});this._binaryInfo=r.then(i=>({buffer:i,contentType:t}))}getBinary(){return this._binaryInfo?this._binaryInfo:Promise.reject(new Error(\"No binary was configured!\"))}};var U=class{constructor(e){this.typedFetch=e}getAddressList(){return new Fe(this.typedFetch,\"address\")}getPartialAddressList(){return new Ae(this.typedFetch,\"address\")}getAddressImage(e){return new Oe(this.typedFetch,e)}getAddressImageAsBlob(e){return new ge(this.typedFetch,e)}updateAddressImage(e,t){return new be(this.typedFetch,e,t)}deleteAddressImage(e){return new Re(this.typedFetch,e)}},Oe=class extends n{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.maxWidth=e,this}withMaxHeight(e){return this._query.maxHeight=e,this}},ge=class extends n{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"GET\",{dataObjectGGUID:t},r=>r.blob()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.maxWidth=e,this}withMaxHeight(e){return this._query.maxHeight=e,this}},Re=class extends n{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"DELETE\",{dataObjectGGUID:t})}},be=class extends n{constructor(e,t,r){super(e,\"/type/address/:dataObjectGGUID/image\",\"PUT\",{dataObjectGGUID:t}),this.setHeader(\"IF-MATCH\",r),this.binaryLoader=new d}setImageFromArrayBuffer(e,t){return this.binaryLoader.setContentFromArrayBuffer(e,t),this}setImageFromUInt8Array(e,t){return this.binaryLoader.setContentFromUInt8Array(e,t),this}setImageFromBase64String(e,t){return this.binaryLoader.setContentFromBase64String(e,t),this}setImageFromFile(e,t=e.type){return this.binaryLoader.setContentFromFile(e,t),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}},Fe=class extends m{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}},Ae=class extends T{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}};var j=class{constructor(e){this.typedFetch=e}getParticipantDetails(e,t){return new Ge(this.typedFetch,e,t)}getParticipantInfo(e){return new fe(this.typedFetch,e)}getParticipantInfoCount(e){return new De(this.typedFetch,e)}},Ge=class extends n{constructor(e,t,r){super(e,\"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\",\"GET\",{dataObjectGGUID:t,participantGGUID:r})}},fe=class extends n{constructor(e,t){super(e,\"/type/appointment/:dataObjectGGUID/participant/full\",\"GET\",{dataObjectGGUID:t})}},De=class extends n{constructor(e,t){super(e,\"/type/appointment/:dataObjectGGUID/participant/count\",\"GET\",{dataObjectGGUID:t})}};var v=class{constructor(e){this.typedFetch=e}getServerVersion(){return new Le(this.typedFetch)}},Le=class extends n{constructor(e){super(e,\"/version/server\",\"GET\",{},t=>t.json().then(r=>this.isGwResponse(r)?r.fields:r))}isGwResponse(e){return e.fields!=null}};var w=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}getEmail(e){return new Me(this.typedFetch,e)}archiveEmail(){return new Se(this.typedFetch,this.dataObjectService)}},y=class y extends n{constructor(e,t){super(e,\"/type/emailstore/file\",\"POST\",{},r=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(r,\"dataObjectGGUID\").then(i=>t.getObject(\"EMAILSTORE\",i).then(a=>a.data))),this.setHeader(\"EXPECT\",\"100-continue\"),this.withForeignEditPermissionRestriction(-1),this.binaryLoader=new d}withForeignEditPermissionRestriction(e){return this._query.foreignEditPermissionRestriction=e,this}setContentFromArrayBuffer(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromArrayBuffer(t,e),this}setContentFromUInt8Array(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromUInt8Array(t,e),this}setContentFromBase64String(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromBase64String(t,e),this}setContentFromFile(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromFile(e,t),this}setContent(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContent(t,e),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}};y.DEFAULT_MESSAGE_MIME_TYPE=\"message/rfc822\";var Se=y,Me=class extends n{constructor(e,t){super(e,\"/type/emailstore/:dataObjectGGUID/file\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.setAcceptHeader(\"*/*\")}withHtmlFilter(e){return this._query.htmlFilter=e,this}};var q=class{constructor(e){this.typedFetch=e}getViewsForType(e){return new Ee(this.typedFetch,e)}getViewCountForType(e){return new xe(this.typedFetch,e)}getViewDetails(e,t){return new Ue(this.typedFetch,e,t)}getPartialItemsForView(e,t){return new je(this.typedFetch,e,t)}getItemsForView(e,t){return new ve(this.typedFetch,e,t)}getItemCountForView(e,t){return new we(this.typedFetch,e,t)}},B=class extends n{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}withPreconfiguredOrderBy(e){return this._query.orderBy=e,this}orderBy(e,t=!0){let r=t?\"ASC\":\"DESC\";return this._query.orderBy=this._query.orderBy||[],this._query.orderBy.push(`${e} ${r}`),this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},Ee=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/view/list\",\"GET\",{dataObjectType:t})}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}forViewKind(e){return this._query.viewKind=e,this}},xe=class extends n{constructor(e,t){super(e,\"/type/:dataObjectType/view/count\",\"GET\",{dataObjectType:t})}},Ue=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID\",\"GET\",{dataObjectType:t,viewID:r})}},je=class extends B{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/list\",\"GET\",{dataObjectType:t,viewID:r})}},ve=class extends B{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/full\",\"GET\",{dataObjectType:t,viewID:r})}},we=class extends n{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/count\",\"GET\",{dataObjectType:t,viewID:r})}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}};var _=class{constructor(e){this.typedFetch=e}getGroup(e){return new qe(this.typedFetch,e)}getGroupCount(){return new Be(this.typedFetch)}getGroupList(){return new _e(this.typedFetch)}getPartialGroupList(){return new Ne(this.typedFetch)}},qe=class extends n{constructor(e,t){super(e,\"/group/:GGUID\",\"GET\",{GGUID:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}},Be=class extends n{constructor(e){super(e,\"/group/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},N=class extends n{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},_e=class extends N{constructor(e){super(e,\"/group/full\")}},Ne=class extends N{constructor(e){super(e,\"/group/list\")}};var C=class{constructor(e){this.typedFetch=e}getResource(e){return new Ce(this.typedFetch,e)}getResourceCount(){return new Qe(this.typedFetch)}getResourceList(){return new Ve(this.typedFetch)}getPartialResourceList(){return new ke(this.typedFetch)}},Ce=class extends n{constructor(e,t){super(e,\"/resource/:guid\",\"GET\",{guid:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}},Qe=class extends n{constructor(e){super(e,\"/resource/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},Q=class extends n{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},Ve=class extends Q{constructor(e){super(e,\"/resource/full\")}},ke=class extends Q{constructor(e){super(e,\"/resource/list\")}};var V=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}createDocument(){return new He(this.typedFetch,this.dataObjectService)}getDocument(e){return new Ye(this.typedFetch,e)}uploadDocument(e,t,r){return new We(this.typedFetch,e,t,r)}},He=class extends n{constructor(e,t){super(e,\"/type/document/file\",\"POST\",{},r=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(r,\"dataObjectGGUID\").then(i=>t.getObject(\"DOCUMENT\",i).then(a=>a.data))),this.binaryLoader=new d}setContentFromArrayBuffer(e,t){return this.binaryLoader.setContentFromArrayBuffer(e,t),this}setContentFromUInt8Array(e,t){return this.binaryLoader.setContentFromUInt8Array(e,t),this}setContentFromBase64String(e,t){return this.binaryLoader.setContentFromBase64String(e,t),this}setContentFromFile(e,t=e.type){return this.binaryLoader.setContentFromFile(e,t),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}},Ye=class extends n{constructor(e,t){super(e,\"/type/document/:dataObjectGGUID/file\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.withReadOnlyInterest(),this.setAcceptHeader(\"*/*\")}withReadOnlyInterest(e=!0){return this._query.readOnly=e,this}withVersion(e){return this._query.version=e,this}},We=class extends n{constructor(t,r,i,a){super(t,\"/type/document/:dataObjectGGUID/file\",\"PUT\",{dataObjectGGUID:r});this.eTagOfRecord=i;this.fileExtension=a;this.binaryLoader=new d}setContentFromArrayBuffer(t,r){return this.binaryLoader.setContentFromArrayBuffer(t,r),this}setContentFromUInt8Array(t,r){return this.binaryLoader.setContentFromUInt8Array(t,r),this}setContentFromBase64String(t,r){return this.binaryLoader.setContentFromBase64String(t,r),this}setContentFromFile(t,r=t.type){return this.binaryLoader.setContentFromFile(t,r),this}execute(){return this.binaryLoader.getBinary().then(t=>{this.setHeader(\"IF-MATCH\",this.eTagOfRecord),this.setHeader(\"CAS-FILE-EXTENSION\",this.fileExtension),this.setContentType(t.contentType),this.setBody(t.buffer)}).then(t=>super.execute())}keepCheckedOut(t=!0){return this._query.keepCheckedOut=t,this}createNewVersion(t=!0){return this._query.createNewVersion=t,this}withVersionComment(t){return this._query.versionComment=t,this}};var k=class{constructor(e){this.typedFetch=e}getSchemaList(){return new Je(this.typedFetch)}getSchema(e){return new ze(this.typedFetch,e)}getAppSettings(e){return new Ke(this.typedFetch,\"/settings/app/:appId\",e)}setAppSettings(e,t){return new $e(this.typedFetch,\"/settings/app/:appId/user\",e,{_apiVersion:\"v1\",properties:t??{}})}changeAppSettings(e,t){return new Xe(this.typedFetch,\"/settings/app/:appId/user\",e,{_apiVersion:\"v1\",properties:t??{},removedProperties:Object.keys(t).filter(r=>typeof t[r]>\"u\")})}},Je=class extends n{constructor(e){super(e,\"/settings/app/list\",\"GET\")}},ze=class extends n{constructor(e,t){super(e,\"/settings/app/:appId/schema\",\"GET\",{appId:t})}handleErrorResponse(e){return e.status==404?Promise.resolve({_apiVersion:\"v1\",properties:{}}):super.handleErrorResponse(e)}},Ke=class s extends n{constructor(t,r,i){super(t,r,\"GET\",{appId:i});this.appId=i}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId)}handleErrorResponse(t){return t.status==404?Promise.resolve({_apiVersion:\"v1\",properties:{}}):super.handleErrorResponse(t)}},$e=class s extends n{constructor(t,r,i,a){super(t,r,\"PUT\",{appId:i});this.appId=i;this.settings=a;this.setBody(JSON.stringify(a))}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId,this.settings):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId,this.settings)}},Xe=class s extends n{constructor(t,r,i,a){super(t,r,\"POST\",{appId:i});this.appId=i;this.settings=a;this.setBody(JSON.stringify(a))}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId,this.settings):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId,this.settings)}};var Ze=class{constructor(e,t,r){this.api=new g(t,r,e),this.dataObjectService=new F(this.api,new A),this.linkingService=new S(this.api),this.addressService=new U(this.api),this.userService=new E(this.api,this.addressService),this.appointmentService=new j(this.api),this.serverInformationService=new v(this.api),this.emailStoreService=new w(this.api,this.dataObjectService),this.viewService=new q(this.api),this.groupService=new _(this.api),this.resourceService=new C(this.api),this.documentService=new V(this.api,this.dataObjectService),this.settingsService=new k(this.api)}};function ot(s,e=\"6.0\",t=\"common\"){return new Ze(s,e,t)}0&&(module.exports={AccessRight,DatePrecision,ForeignEditPermission,HtmlFilter,TeamFilterConstant,create});\n","import { RestypedFetch, IFetchWrapper } from \"./types/restypedfetch\";\nimport { IInterPlatform } from \"./types/interplatform\";\nimport { DataObjectService, IDataObjectService, DataObjectNormalizer } from \"./services/dataobjectservice\";\nimport { LinkingService, ILinkingService } from \"./services/linkingservice\";\nimport { UserService, IUserService } from \"./services/userservice\";\nimport { AddressService, IAddressService } from \"./services/addressservice\";\nimport { AppointmentService, IAppointmentService } from \"./services/appointmentservice\";\nimport { ServerInformationService, IServerInformationService } from \"./services/serverinformationservice\";\nimport { EmailStoreService, IEmailStoreService } from \"./services/emailstoreservice\";\nimport { ViewService, IViewService } from \"./services/viewservice\";\nimport { GroupService, IGroupService } from \"./services/groupservice\";\nimport { IResourceService, ResourceService } from \"./services/resourceservice\";\nimport { IDocumentService, DocumentService } from \"./services/documentservice\";\nimport { ServerType, APIVersion, IAPIVersions } from \"./types/api\";\nimport { ISettingsService, SettingsService } from \"./services/settingsservice\";\n\nexport type * from \"./types/api\";\nexport type * from \"./types/appsettings\";\nexport {\n AccessRight,\n DatePrecision,\n ForeignEditPermission,\n HtmlFilter,\n TeamFilterConstant,\n} from \"./types/interplatform\";\nexport type * from \"./types/interplatform\";\nexport type * from \"./types/interplatform6\";\nexport type * from \"./types/interplatform7\";\nexport type * from \"./types/restyped\";\nexport type * from \"./types/restypedfetch\";\n\nexport type { Methods, FetchError, IAPIResponse } from \"./services/request/requestbuilder\";\nexport type { IDataObjectService } from \"./services/dataobjectservice\";\nexport type { ILinkingService } from \"./services/linkingservice\";\nexport type { IUserService } from \"./services/userservice\";\nexport type { IAddressService } from \"./services/addressservice\";\nexport type { IAppointmentService } from \"./services/appointmentservice\";\nexport type { IServerInformationService } from \"./services/serverinformationservice\";\nexport type { IEmailStoreService } from \"./services/emailstoreservice\";\nexport type { IViewService } from \"./services/viewservice\";\nexport type { IGroupService } from \"./services/groupservice\";\nexport type { IResourceService } from \"./services/resourceservice\";\nexport type { IDocumentService } from \"./services/documentservice\";\nexport type { ISettingsService } from \"./services/settingsservice\";\n\nclass ServiceRegistry<VERSION extends APIVersion, SERVER extends ServerType, PLATFORM extends IInterPlatform>\n implements IServiceRegistry<PLATFORM>\n{\n public readonly api: RestypedFetch<PLATFORM>;\n public readonly dataObjectService: IDataObjectService<PLATFORM>;\n public readonly linkingService: ILinkingService<PLATFORM>;\n public readonly userService: IUserService<PLATFORM>;\n public readonly addressService: IAddressService<PLATFORM>;\n public readonly appointmentService: IAppointmentService<PLATFORM>;\n public readonly serverInformationService: IServerInformationService<PLATFORM>;\n public readonly emailStoreService: IEmailStoreService<PLATFORM>;\n public readonly viewService: IViewService<PLATFORM>;\n public readonly groupService: IGroupService<PLATFORM>;\n public readonly resourceService: IResourceService<PLATFORM>;\n public readonly documentService: IDocumentService<PLATFORM>;\n public readonly settingsService: ISettingsService<PLATFORM>;\n\n constructor(fetchHolder: IFetchWrapper, version: VERSION, server: SERVER) {\n this.api = new RestypedFetch<PLATFORM>(version, server, fetchHolder);\n this.dataObjectService = new DataObjectService<PLATFORM>(this.api, new DataObjectNormalizer());\n this.linkingService = new LinkingService(this.api);\n this.addressService = new AddressService(this.api);\n this.userService = new UserService(this.api, this.addressService);\n this.appointmentService = new AppointmentService(this.api);\n this.serverInformationService = new ServerInformationService(this.api);\n this.emailStoreService = new EmailStoreService(this.api, this.dataObjectService);\n this.viewService = new ViewService(this.api);\n this.groupService = new GroupService(this.api);\n this.resourceService = new ResourceService(this.api);\n this.documentService = new DocumentService(this.api, this.dataObjectService);\n this.settingsService = new SettingsService(this.api);\n }\n}\n\n/**\n * Provides access to the various domain specific services.\n */\nexport interface IServiceRegistry<PLATFORM extends IInterPlatform> {\n /**\n * Provides access to the REST endpoints in a type safe fashion\n */\n readonly api: RestypedFetch<PLATFORM>;\n /**\n * Provides access to address specific REST operations\n */\n readonly addressService: IAddressService<PLATFORM>;\n /**\n * Provides access to appointment specific REST operations\n */\n readonly appointmentService: IAppointmentService<PLATFORM>;\n /**\n * Provides access to data object specific REST operations\n */\n readonly dataObjectService: IDataObjectService<PLATFORM>;\n /**\n * Provides access to link specific REST operations\n */\n readonly linkingService: ILinkingService<PLATFORM>;\n /**\n * Provides access to user specific REST operations\n */\n readonly userService: IUserService<PLATFORM>;\n /**\n * Provides access to server version information\n */\n readonly serverInformationService: IServerInformationService<PLATFORM>;\n /**\n * Provides access to email store specific REST operations\n */\n readonly emailStoreService: IEmailStoreService<PLATFORM>;\n /**\n * Provides access to view specific REST operations\n */\n readonly viewService: IViewService<PLATFORM>;\n /**\n * Provides access to group specific REST operations\n */\n readonly groupService: IGroupService<PLATFORM>;\n /**\n * Provides access to resource specific REST operations\n */\n readonly resourceService: IResourceService<PLATFORM>;\n /**\n * Provides access to document specific REST operations\n */\n readonly documentService: IDocumentService<PLATFORM>;\n /**\n * Provides access to settings related REST operations\n */\n readonly settingsService: ISettingsService<PLATFORM>;\n}\n\n/**\n * Creates an instance of [[IServiceRegistry]] which provides access to the various\n * services.\n * @param {IFetchWrapper} api An authorized fetch api to use for the connection\n * @param {VERSION} version REST api version to be used (\"6.0\" or above is recommended)\n * @param {SERVER} serverType Type of the server\n * @return {IServiceRegistry} An instance of [[IServiceRegistry]] for the given configuration\n */\nexport function create<VERSION extends APIVersion = \"6.0\", SERVER extends ServerType = \"common\">(\n api: IFetchWrapper,\n version: VERSION = \"6.0\" as VERSION,\n serverType: SERVER = \"common\" as SERVER,\n): IServiceRegistry<IAPIVersions[VERSION][SERVER]> {\n return new ServiceRegistry<VERSION, SERVER, IAPIVersions[VERSION][SERVER]>(api, version, serverType);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AppSettings, AppSettingsChange, AppSettingsListResponse, AppSettingsSchemaResponse } from \"./appsettings\";\n\n/**\n * This gguid is associated with the special permission All Public which can\n * be used to make an object accessible for everyone.\n */\nexport const ALL_PUBLIC_PERMISSION_GGUID: GUID = \"00000000000000000000000000000000\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type NoQueryParams = {};\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type NoPathParams = {};\n\nexport interface IStringKeyed<T = any> {\n [key: string]: T;\n}\n\nexport type GUID = string;\n\nexport enum TeamFilterConstant {\n ExternalAccess = \"CASExternalAccess\",\n LoggedInUser = \"CASLoggedInUser\",\n PublicRecords = \"CASPublicRecords\",\n}\nexport interface ITeamFilter {\n teamFilterIds: Array<GUID | TeamFilterConstant>;\n role?: string;\n}\nexport class TeamFilter implements ITeamFilter {\n public teamFilterIds: Array<GUID | TeamFilterConstant> = [];\n public role?: string;\n constructor(options: ITeamFilter) {\n if (options) {\n this.teamFilterIds = options.teamFilterIds.slice();\n this.role = options.role;\n }\n }\n public convertToQueryParameterValue(): string {\n let teamFilterString = this.teamFilterIds.join(\",\");\n if (this.role) {\n teamFilterString += `;${this.role}`;\n }\n return teamFilterString;\n }\n}\n\nexport enum ForeignEditPermission {\n /**\n * The object is private.\n */\n PRIVATE = -1,\n\n /**\n * The object is confidential.\n */\n CONFIDENTIAL = 0,\n\n /**\n * The object is readable.\n */\n READ = 64,\n\n /**\n * The object is duplicateable.\n */\n DUPLICATE = 256,\n\n /**\n * The object is readable and change time of time based DataObjects is allowed.\n */\n READ_CHANGE_TIMES = 512,\n\n /**\n * The object is editable.\n */\n EDIT = 2048,\n\n /**\n * The object is deleteable.\n */\n DELETE = 8192,\n\n /**\n * The object is neither private nor confidential.\n */\n IN_EFFECT = 65535,\n}\nexport enum AccessRight {\n /**\n * Indicates that the PermissionOwner has no direct right on this DataObject.\n */\n NO_ACCESS = 0,\n\n /**\n * Indicates that the PermissionOwner has the direct right to read this DataObject.\n */\n READ = 64,\n\n /**\n * Indicates that the PermissionOwner has the direct right to insert this DataObject.\n * @deprecated\n */\n INSERT = 128,\n\n /**\n * Indicates that the PermissionOwner has the direct right to read and duplicate this DataObject.\n */\n DUPLICATE = 256,\n\n /**\n * Indicates that the PermissionOwner has the direct right\n * to read this DataObject and change the times (only for time based DataObjects, e.g. an appointment).\n */\n READ_CHANGE_TIMES = 512,\n\n /**\n * Indicates that the PermissionOwner has the direct right to edit this DataObject.\n */\n EDIT = 2048,\n\n /**\n * Indicates that the PermissionOwner has the direct right to delete this DataObject (move to recycle bin).\n */\n DELETE = 8192,\n\n /**\n * Indicates that the PermissionOwner has full access rights on this DataObject including deleting from recycle bin.\n */\n FULL_ACCESS = 32768,\n}\n\nexport enum HtmlFilter {\n /**\n * Removes nothing.\n */\n NOTHING = 0,\n\n /**\n * Removes external images.\n */\n EXTERNAL_IMAGES = 1,\n\n /**\n * Removes all images.\n */\n ALL_IMAGES = 2,\n\n /**\n * Removes dangerous content like IFRAME tags and ONCLICK attributes.\n */\n DANGEROUS_TAGS_AND_ATTRIBUTES = 4,\n\n /**\n * Removes dangerous content like IFRAME tags and ONCLICK attributes.\n */\n DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES = 8,\n\n /**\n * Filter everything.\n */\n ALL = 0x7fffffff,\n}\n\nexport type FieldType =\n | \"DATETIME\"\n | \"STRINGSUGGEST\"\n | \"INT\"\n | \"TEXT\"\n | \"DECIMAL\"\n | \"CURRENCY\"\n | \"STRING\"\n | \"STRINGLISTSUGGEST\"\n | \"STRINGTREESUGGEST\"\n | \"BOOLEAN\"\n | \"GGUID\"\n | \"DOUBLE\"\n | \"INTSUGGEST\"\n | \"DECIMALSUGGEST\"\n | \"CURRENCYSUGGEST\"\n | \"DOUBLESUGGEST\"\n | \"SELECTIONVALUELIST\";\n\nexport type ServerIndependentFieldTypes =\n | IDateTimeField\n | IIntField\n | ITextField\n | IDecimalField\n | IStringField\n | IBooleanField\n | IGguidField\n | IDoubleField;\n\nexport type FieldGw =\n | ServerIndependentFieldTypes\n | IStringSuggestField\n | IStringListSuggestField\n | IIntSuggestField\n | IDecimalSuggestField\n | IDoubleSuggestField;\n\nexport type FieldOpen = ServerIndependentFieldTypes | ISelectionValueListField;\n\nexport type LinkDirection = \"LEFT_TO_RIGHT\" | \"RIGHT_TO_LEFT\" | \"BIDIRECTIONAL\";\n\nexport interface ISelectionValueListField extends ICommonField, ISuggestField<ISelectionValue> {\n type: \"SELECTIONVALUELIST\";\n lengthOfBinaryShadowField: number;\n cardinality: \"ZERO_TO_ONE\" | \"ONE\" | \"ONE_TO_N\" | \"ZERO_TO_N\";\n}\nexport interface IStringSuggestField\n extends ICommonField,\n ISuggestField<string>,\n IHasMaxLength,\n IHasSystemDefinedTranslated {\n type: \"STRINGSUGGEST\";\n}\nexport interface IStringListSuggestField\n extends ICommonField,\n ISuggestField<string>,\n IHasMaxLength,\n IHasSystemDefinedTranslated {\n type: \"STRINGLISTSUGGEST\";\n}\nexport interface IIntSuggestField extends ICommonField, ISuggestField<number>, IHasFormatOption, IHasPrecisionAndScale {\n type: \"INTSUGGEST\";\n}\nexport interface IDecimalSuggestField\n extends ICommonField,\n ISuggestField<number>,\n IHasFormatOption,\n IHasPrecisionAndScale {\n type: \"DECIMALSUGGEST\";\n}\nexport interface IDoubleSuggestField\n extends ICommonField,\n ISuggestField<number>,\n IHasFormatOption,\n IHasPrecisionAndScale {\n type: \"DOUBLESUGGEST\";\n}\n\nexport interface IDecimalField extends ICommonField, IHasFormatOption, IHasPrecisionAndScale {\n type: \"DECIMAL\";\n}\nexport interface IDateTimeField extends ICommonField, IHasFormatOption, IHasPrecision {\n type: \"DATETIME\";\n}\nexport interface IIntField extends ICommonField, IHasFormatOption {\n type: \"INT\";\n}\nexport interface ITextField\n extends ICommonField,\n IHasMaxLength,\n IHasSystemDefinedTranslated,\n IHasOverflowLength,\n IHasFormatOption {\n type: \"TEXT\";\n}\nexport interface IStringField extends ICommonField, IHasMaxLength, IHasSystemDefinedTranslated {\n type: \"STRING\";\n}\nexport interface IDoubleField extends ICommonField, IHasFormatOption, IHasPrecisionAndScale {\n type: \"DOUBLE\";\n}\nexport interface IGguidField extends ICommonField, IHasLength {\n type: \"GGUID\";\n}\nexport interface IBooleanField extends ICommonField {\n type: \"BOOLEAN\";\n}\n\nexport interface ISelectionValue {\n userEditable: boolean;\n systemDefinedDeleted: boolean;\n sortIndex: number;\n displayName: string;\n deletable: boolean;\n GGUID: GUID;\n displayID: string;\n systemDefined: boolean;\n}\n\nexport interface ISuggestField<T> extends ICommonField {\n suggestedValues: T[];\n customValueAllowed: boolean;\n}\nexport interface IHasMaxLength {\n maxLength: number;\n}\nexport interface IHasLength {\n length: number;\n}\nexport interface IHasSystemDefinedTranslated {\n systemDefinedTranslated: boolean;\n}\nexport interface IHasOverflowLength {\n overflowLength: number;\n}\nexport interface IHasFormatOption {\n formatOption: string;\n}\nexport interface IHasPrecisionAndScale extends IHasPrecision {\n scale: number;\n}\nexport interface IHasPrecision {\n precision: number;\n}\nexport interface ICommonField {\n id: number;\n name: string;\n type: FieldType;\n mandatory: boolean;\n hidden: boolean;\n updateable: boolean;\n displayname: string;\n displaynameShort: string;\n allowedForMassUpdate: boolean;\n duplicatable: boolean;\n accessPermission: number;\n minAccessPermission: number;\n inListEditable: boolean;\n\n recommended: boolean;\n optional: boolean;\n custom: boolean;\n systemField: boolean;\n}\n\nexport interface IMassQueryResult {\n types: { [key: string]: string };\n displayNames: { [key: string]: string };\n rows: Array<{ [key: string]: any }>;\n}\nexport interface IViewInfo {\n fields: {\n VIEWID: GUID;\n VIEWKIND: string;\n VIEWNAME: string;\n VIEWTYPE: string;\n VIEWURI: string;\n };\n id: GUID;\n}\nexport interface IDataObject extends IDataObjectTransferable {\n objectType: string;\n ETAG?: string;\n id: GUID;\n links?: IStringKeyed<string>;\n\n foreignEditPermission?: ForeignEditPermission;\n foreignEditPermissionRestriction?: ForeignEditPermission;\n permissions?: IPermission[];\n writable?: boolean;\n}\n\nexport interface IPermissionInfo {\n fields: IPermission;\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IPermission {\n ACCESSRIGHT: AccessRight;\n GGUID?: GUID;\n RIGHTOWNERGGUID: GUID;\n RIGHTOWNERID?: number;\n TYPE?: \"USER\" | \"GROUP\" | \"RESOURCE\";\n ROLE?: string;\n}\n\nexport interface IDataObjectTransferable {\n fields: IStringKeyed<any>;\n}\n\nexport interface ICountInfo {\n count: number;\n}\n\nexport interface ICommonPermissionOwnerFields {\n EMAILADDRESS: string;\n HIDDEN: boolean;\n CLIENT: GUID;\n DESCRIPTION: string;\n GGUID: GUID;\n ENABLED: boolean;\n DISPLAYNAME: string;\n DOMAINGUID?: GUID;\n DOMAINNAME?: string;\n DOMAINISLOCAL?: boolean;\n}\n\nexport interface IAddressRelatedPermissionOwnerInfoFields extends ICommonPermissionOwnerFields {\n GGUIDOFADDRESSRECORD: string;\n GUEST: boolean;\n TIMEZONE: string;\n USERTYPE: string;\n ACTIONADMINISTRATOR: boolean;\n ADMINISTRATOR: boolean;\n OID: string;\n PREFERREDCOUNTRY: string;\n PREFERREDLANGUAGE: string;\n ALLOWMOBILEAPPSOFFLINE: boolean;\n}\n\nexport interface IGroupInfo {\n directSuperGroups: string[];\n members: string[];\n links: IStringKeyed<string>;\n id: GUID;\n fields: ICommonPermissionOwnerFields & {\n GID: string;\n };\n}\n\nexport class PrimaryLinkedParent {\n public gguid: GUID;\n public objectType: string;\n public caption: string;\n public description: string;\n}\n\nexport interface IDossierEntry {\n ETAG: string;\n id: GUID;\n fields: {\n GGUID: string;\n GGUID1: string;\n GGUID2: string;\n KEYWORD: string;\n LINKDIRECTION?: LinkDirection;\n OBJECTTYPE1: string;\n OBJECTTYPE2: string;\n PLUSINFO: string;\n DOCEXT?: string;\n SORTDATE?: string;\n };\n}\n\nexport interface IUserInfo {\n directSuperGroups: string[];\n fields: IAddressRelatedPermissionOwnerInfoFields;\n id: GUID;\n links: IStringKeyed<string>;\n PrivilegedOperations: string[];\n}\n\nexport interface IServerVersion {\n serverVersion: string;\n productversion: string;\n major: string;\n minor: string;\n build: string;\n}\n\nexport interface ILoginInformation {\n CLIENTNAME: string;\n LOGINTIMESTAMP: string;\n LOGINCOUNT: string;\n CLIENTVERSION: string;\n}\n\nexport interface IResourceInfo {\n directSuperGroups: string[];\n fields: IAddressRelatedPermissionOwnerInfoFields;\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IParticipantInfo {\n fields: {\n DISPLAYNAME: string;\n PARTICIPANTGGUID: GUID;\n DESCRIPTION: string;\n TYPE: string;\n };\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IDataObjectSchema<FieldTypes> {\n name: string;\n properties: {\n fields: IStringKeyed<FieldTypes>;\n };\n}\n\nexport interface IDataObjectDescription {\n displayNameSingular: string;\n displayNamePlural: string;\n dataObjectTypePermission: number;\n isUserSensitive: boolean;\n isTaggable: boolean;\n isLinkable: boolean;\n isRecycleBinActivated: boolean;\n isTemplateActivated: boolean;\n primaryLinkParents: {\n parentObjectTypes: string[];\n mandatoryParentObjectTypes: string[];\n };\n searchFieldsString: string;\n searchColumnNames: string[];\n linkAttributes: IStringKeyed<IStringKeyed<string>>;\n}\n\nexport interface IDataObjectDateChangeQueryParameters {\n updatedAfter?: Date;\n insertedAfter?: Date;\n}\nexport interface IDataObjectDateIntervalQueryParameters {\n intervalStart?: Date;\n intervalEnd?: Date;\n}\nexport interface IDataObjectLinkQueryParameters {\n linkedToType?: string;\n linkedTo?: GUID[];\n linkedToAttributes?: string[];\n}\nexport interface IPagedQueryParameters {\n page?: number;\n entriesPerPage?: number;\n}\nexport interface IAddressSpecificQueryParameters {\n isUser?: boolean | null;\n hasBirthdayOn?: Date;\n}\nexport interface IPartialObjectQueryParameters {\n fields?: string | string[];\n}\nexport interface IOrderByQueryParameters {\n orderBy?: string | string[];\n}\nexport interface ITeamFilterQueryParameters {\n teamFilter?: string | TeamFilter;\n}\nexport interface ISearchQueryParameters {\n search?: string;\n}\nexport interface IDataObjectTypesQueryParameter {\n objectTypes?: string | string[];\n}\nexport interface ISingleDataObjectTypesQueryParameter {\n objectType?: string;\n}\n\nexport interface IIncludePermissionsQueryParameter {\n includePermissions?: boolean;\n includeSyncrecordPermissions?: boolean;\n}\n\nexport interface IIncludePrivateForeignrecordsQueryParameter {\n includePrivateForeignrecords?: boolean;\n}\n\nexport interface IRecentlyUsedQueryParameter {\n tagAsRecentlyUsed?: boolean;\n}\n\nexport interface IFavoriteQueryParameter {\n isfavorite?: boolean;\n}\nexport interface IIncludeMaxJournalIdQueryParameter {\n includeMaxjournalid?: boolean;\n}\n\nexport interface IViewItemsCountQueryParameters\n extends ISearchQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters {}\nexport interface IViewQueryParameters extends IViewKindQueryParameters, IPagedQueryParameters {}\nexport interface IViewKindQueryParameters {\n viewKind?: string;\n}\nexport interface IViewItemsQueryParameters\n extends IPagedQueryParameters,\n ISearchQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IPartialObjectQueryParameters,\n IOrderByQueryParameters,\n IAddressSpecificQueryParameters {}\nexport interface ISingleDataObjectQueryParameters\n extends IPartialObjectQueryParameters,\n IIncludePermissionsQueryParameter,\n IRecentlyUsedQueryParameter,\n IFavoriteQueryParameter,\n IIncludeMaxJournalIdQueryParameter {}\n\nexport interface IDataObjectQueryParameters\n extends IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectLinkQueryParameters,\n IPagedQueryParameters,\n IAddressSpecificQueryParameters,\n IPartialObjectQueryParameters,\n IOrderByQueryParameters,\n ITeamFilterQueryParameters,\n ISearchQueryParameters {}\n\nexport interface IDataObjectCountQueryParameters\n extends ITeamFilterQueryParameters,\n ISearchQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectLinkQueryParameters {}\n\nexport interface IDossierQueryParameters extends IPagedQueryParameters, IDataObjectTypesQueryParameter {}\n\nexport interface IPermissionRequirementQueryParameter {\n minPermission?: ForeignEditPermission;\n}\nexport interface IDomainQueryParameter {\n domainGuid?: GUID;\n}\nexport interface IResourceQueryParameters\n extends IPagedQueryParameters,\n ISingleDataObjectTypesQueryParameter,\n IDataObjectTypesQueryParameter,\n IPermissionRequirementQueryParameter,\n IDomainQueryParameter {}\n\nexport interface IWhereStringQueryParameters {\n whereString: string;\n}\n\nexport interface ILastUsedDataObjectQueryParameters\n extends IPartialObjectQueryParameters,\n IWhereStringQueryParameters {}\n\nexport interface IDataObjectSchemaPart<FIELDTYPES> {\n \"/type/:dataObjectType/schema\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: IDataObjectSchema<FIELDTYPES>;\n };\n };\n}\n\nexport interface IServerVersionResponseGw {\n fields: IServerVersion;\n}\n\nexport interface IServerVersionPart<RESPONSETYPE> {\n \"/version/server\": {\n GET: {\n query: NoQueryParams;\n response: RESPONSETYPE;\n };\n };\n}\n\nexport type QueryResponseLegacyGw = [IMassQueryResult];\n\nexport interface IQueryPart<RESPONSETYPE> {\n \"/query\": {\n POST: {\n query: IPagedQueryParameters & IIncludePrivateForeignrecordsQueryParameter;\n params: NoPathParams;\n body: {\n query: string;\n };\n response: RESPONSETYPE;\n };\n };\n}\n\nexport interface IGwSpecific {\n gwSpecific: true;\n}\nexport interface IOpenSpecific {\n openSpecific: true;\n}\n\nexport type InterPlatformOpen = IInterPlatform &\n IDataObjectSchemaPart<FieldOpen> &\n IServerVersionPart<IServerVersion> &\n IQueryPart<IMassQueryResult> &\n IOpenSpecific;\n\nexport type InterPlatformGw = IInterPlatform & IServerVersionPart<IServerVersionResponseGw> & IGwSpecific;\n\nexport interface IInterPlatform\n extends IDataObjectSchemaPart<ICommonField>,\n IServerVersionPart<IServerVersion | IServerVersionResponseGw>,\n IQueryPart<IMassQueryResult | QueryResponseLegacyGw> {\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n dossierentryGGUID: GUID;\n };\n response: IDossierEntry;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n dossierentryGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n permissionGGUID: GUID;\n };\n response: IPermissionInfo;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n permissionGGUID: GUID;\n };\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n participantGGUID: GUID;\n };\n response: IParticipantInfo;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n participantGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID\": {\n PUT: {\n query: {\n tagAsRecentlyUsed?: boolean;\n };\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n body: string;\n };\n GET: {\n query: ISingleDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IDataObject;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/address/:dataObjectGGUID/image\": {\n PUT: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n body: ArrayBuffer;\n };\n GET: {\n query: {\n maxWidth?: number;\n maxHeight?: number;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/document/:dataObjectGGUID/file\": {\n PUT: {\n query: {\n keepCheckedOut?: boolean;\n createNewVersion?: boolean;\n versionComment?: string;\n };\n body: ArrayBuffer;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n POST: {\n query: {\n keepCheckedOut?: boolean;\n createNewVersion?: boolean;\n versionComment?: string;\n };\n body: ArrayBuffer;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n GET: {\n query: {\n version?: string;\n readOnly?: boolean;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/type/:dataObjectType\": {\n POST: {\n query: {\n templateGguid?: GUID;\n tagAsRecentlyUsed?: boolean;\n };\n params: {\n dataObjectType: string;\n };\n body: string;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\": {\n POST: {\n query: {\n gguid2?: GUID;\n objectType2?: string;\n attribute?: string;\n role1?: string;\n role2?: string;\n linkDirection?: LinkDirection;\n additionalField1?: string;\n additionalField2?: string;\n };\n params: {\n dataObjectGGUID: GUID;\n dataObjectType: string;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission\": {\n POST: {\n query: {\n rightOwnerGguid?: GUID;\n accessRight?: number;\n };\n params: {\n dataObjectGGUID: GUID;\n dataObjectType: string;\n };\n response: any;\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant\": {\n POST: {\n query: {\n gguid?: GUID;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: any;\n };\n };\n \"/type/document/file\": {\n POST: {\n query: NoQueryParams;\n body: ArrayBuffer;\n };\n };\n \"/type/emailstore/file\": {\n POST: {\n query: {\n foreignEditPermissionRestriction?: number;\n };\n body: string;\n };\n };\n \"/checklogin\": {\n GET: {\n query: {\n silent?: boolean;\n };\n };\n };\n \"/group/:GGUID\": {\n GET: {\n query: IPartialObjectQueryParameters;\n params: {\n GGUID: GUID;\n };\n response: IGroupInfo;\n };\n };\n \"/group/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/group/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IGroupInfo[];\n };\n };\n \"/group/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IGroupInfo[];\n };\n };\n \"/resource/:guid\": {\n GET: {\n query: {\n fields?: string | string[];\n };\n params: {\n guid: GUID;\n };\n response: IResourceInfo;\n };\n };\n \"/resource/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/resource/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IResourceInfo[];\n };\n };\n \"/resource/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IResourceInfo[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\": {\n GET: {\n query: IDossierQueryParameters;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IDossierEntry[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/full\": {\n GET: {\n query: {\n page?: number;\n entriesPerPage?: number;\n };\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IPermissionInfo[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: PrimaryLinkedParent[];\n };\n };\n \"/type/:dataObjectType/count\": {\n GET: {\n query: IDataObjectCountQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/full\": {\n GET: {\n query: IDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/image\": {\n GET: {\n query: {\n iconType?: string;\n };\n params: {\n dataObjectType: string;\n };\n };\n };\n \"/type/:dataObjectType/list\": {\n GET: {\n query: IDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/recent/list\": {\n GET: {\n query: ILastUsedDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/recent\": {\n POST: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/view/:viewID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IViewInfo;\n };\n };\n \"/type/:dataObjectType/view/:viewID/count\": {\n GET: {\n query: IViewItemsCountQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/view/:viewID/full\": {\n GET: {\n query: IViewItemsQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/view/:viewID/list\": {\n GET: {\n query: IViewItemsQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/view/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/view/list\": {\n GET: {\n query: IViewQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IViewInfo[];\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/full\": {\n GET: {\n query: {\n page?: number;\n entriesPerPage?: number;\n domainGuid?: GUID;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: IParticipantInfo[];\n };\n };\n \"/user/:GGUID\": {\n GET: {\n query: {\n fields?: string | string[];\n includePrivilegedOperations?: boolean;\n };\n params: {\n GGUID: GUID;\n };\n response: IUserInfo;\n };\n };\n \"/user/:GGUID/image\": {\n GET: {\n query: {\n maxWidth?: number;\n maxHeight?: number;\n };\n params: {\n GGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/user/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/user/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IUserInfo[];\n };\n };\n \"/user/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IUserInfo[];\n };\n };\n \"/user/self\": {\n GET: {\n query: {\n fields?: string | string[];\n includePrivilegedOperations?: boolean;\n };\n response: IUserInfo;\n };\n };\n \"/user/self/logininformation\": {\n GET: {\n query: NoQueryParams;\n response: ILoginInformation[];\n };\n };\n \"/type/:dataObjectType/description\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: IDataObjectDescription;\n };\n };\n \"/type/emailstore/:dataObjectGGUID/file\": {\n GET: {\n query: {\n htmlFilter?: HtmlFilter;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/settings/app/list\": {\n GET: {\n response: AppSettingsListResponse;\n };\n };\n \"/settings/app/:appId/schema\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n };\n \"/settings/app/:appId\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n };\n \"/settings/app/:appId/user\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n PUT: {\n params: {\n appId: string;\n };\n body: AppSettings;\n };\n POST: {\n params: {\n appId: string;\n };\n body: AppSettingsChange;\n };\n };\n \"/settings/app/:appId/global\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n PUT: {\n params: {\n appId: string;\n };\n body: AppSettings;\n };\n POST: {\n params: {\n appId: string;\n };\n body: AppSettingsChange;\n };\n };\n}\n\nexport enum DatePrecision {\n /**\n * Complete precision, that includes year, month, day, hour, minute, second and millisecond\n */\n COMPLETE = 2048,\n\n /**\n * Only year, month, day\n */\n NO_TIME = 512,\n\n /**\n * Only year, month, day, hour, minute\n */\n NO_SECONDS = 64,\n\n /**\n * Only year, month, day, hour, minute, seconds\n */\n NO_MILLISECONDS = 0,\n\n /**\n * Time, no date\n */\n NO_DATE = 4096,\n}\n","import { IRestypedBase, IRestypedRoute } from \"./restyped\";\nimport { TeamFilter } from \"./interplatform\";\nimport { APIVersion, ServerType } from \"./api\";\n\nexport interface IFetchWrapper {\n fetch: typeof fetch;\n}\n\nexport interface ITypedJSONResponse<T> extends Response {\n json(): Promise<T>;\n}\n\nexport interface ITypedRequestInit<T extends IRestypedRoute> extends RequestInit {\n body?: T[\"body\"];\n params?: T[\"params\"];\n query?: T[\"query\"];\n}\n\nexport class RestypedFetch<APIDef extends IRestypedBase> {\n constructor(\n private version: APIVersion = \"6.0\",\n private server: ServerType = \"common\",\n private fetcher?: IFetchWrapper,\n ) {}\n\n public get<Path extends keyof APIDef>(\n path: Path,\n config?: ITypedRequestInit<APIDef[Path][\"GET\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"GET\"][\"response\"]>> {\n return this.proxy(path, \"GET\", config);\n }\n public post<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"POST\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"POST\"][\"response\"]>> {\n return this.proxy(path, \"POST\", config);\n }\n public put<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"PUT\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"PUT\"][\"response\"]>> {\n return this.proxy(path, \"PUT\", config);\n }\n public delete<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"DELETE\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"DELETE\"][\"response\"]>> {\n return this.proxy(path, \"DELETE\", config);\n }\n public patch<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"PATCH\"]>,\n ): Promise<APIDef[Path][\"PATCH\"][\"response\"]> {\n return this.proxy(path, \"PATCH\", config);\n }\n public options<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"OPTIONS\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"OPTIONS\"][\"response\"]>> {\n return this.proxy(path, \"OPTIONS\", config);\n }\n public head<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"HEAD\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"HEAD\"][\"response\"]>> {\n return this.proxy(path, \"HEAD\", config);\n }\n\n private camelToDash(str: string): string {\n return str\n .replace(/(^[A-Z])/, (first) => first.toLowerCase())\n .replace(/([A-Z])/g, (letter) => `-${letter.toLowerCase()}`);\n }\n\n private isBoolean(value: unknown): boolean {\n return value === true || value === false;\n }\n\n public proxy<Path extends keyof APIDef, Method extends keyof APIDef[Path]>(\n path: Path | string,\n method: Method,\n config?: ITypedRequestInit<IRestypedRoute>,\n ): Promise<ITypedJSONResponse<APIDef[Path][Method][\"response\"]>> {\n config = Object.assign({}, config || {}, { method });\n let resolvedPath: string = path as string;\n let query = \"\";\n if (config.params) {\n Object.keys(config.params).forEach((prop) => {\n resolvedPath = resolvedPath.toString().replace(new RegExp(\":\" + prop, \"g\"), config.params[prop]);\n });\n }\n const convert = (value) => {\n let result;\n if (value instanceof TeamFilter) {\n result = value.convertToQueryParameterValue();\n } else if (value instanceof Date) {\n result = value.toJSON();\n } else if (Array.isArray(value)) {\n result = value.map((p) => convert(p)).join(\",\");\n } else if (this.isBoolean(value)) {\n result = value ? \"true\" : \"false\";\n } else {\n result = value;\n }\n return result;\n };\n if (config.query) {\n query = Object.keys(config.query)\n .map((prop) => {\n const value = config.query[prop];\n const convertedValue = convert(value);\n\n if (convertedValue == null) {\n return null;\n }\n\n return `${this.camelToDash(prop)}=${encodeURIComponent(convertedValue)}`;\n })\n .filter((p) => p != null)\n .join(\"&\");\n\n if (query.length > 0) {\n query = \"?\" + query;\n }\n }\n\n const versionPrefix = this.version.indexOf(\"v\") === 0 ? \"\" : \"v\";\n const versionPath = versionPrefix + this.version;\n\n return (this.fetcher || window).fetch(versionPath + resolvedPath + query, config);\n }\n}\n","import { RestypedFetch, ITypedJSONResponse } from \"../../types/restypedfetch\";\nimport { IRestypedBase } from \"../../types/restyped\";\nimport { NoPathParams } from \"../../types/interplatform\";\n\nexport type Methods = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"HEAD\" | \"DELETE\" | \"OPTIONS\";\n\nexport interface IAPIResponse<T> {\n readonly headers: Headers;\n readonly data: T;\n}\n\nexport class FetchError extends Error {\n constructor(\n public status: number,\n public statusText: string,\n public text: string = null,\n ) {\n super(\"Server returned non ok response.\");\n }\n}\n\nexport abstract class RequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n ReturnType = ApiDef[Path][Method][\"response\"],\n ServerResponseType = ApiDef[Path][Method][\"response\"],\n> {\n protected _query: ApiDef[Path][Method][\"query\"] = {};\n protected _body: unknown;\n protected _headers: HeadersInit = {};\n\n private _execution: Promise<IAPIResponse<ReturnType>>;\n\n constructor(\n protected typedFetch: RestypedFetch<ApiDef>,\n private _path: Path,\n private _method: Method = \"GET\" as Method,\n private _parameters: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n private _transform: (response: ITypedJSONResponse<ServerResponseType>) => Promise<ReturnType> = (response) => {\n const json = response.json().then((result) => result as unknown as ReturnType);\n return json.catch((e) => {\n return {} as ReturnType;\n });\n },\n ) {\n this.setAcceptHeader(\"application/json\");\n }\n\n public setQueryParameter<Property extends keyof ApiDef[Path][Method][\"query\"]>(\n property: Property,\n value: ApiDef[Path][Method][\"query\"][Property],\n ): this {\n this._query[property] = value;\n return this;\n }\n\n protected setBody(body: unknown): this {\n this._body = body;\n return this;\n }\n\n public setAcceptHeader(accept: string): this {\n return this.setHeader(\"Accept\", accept);\n }\n\n public setContentType(contentType: string): this {\n return this.setHeader(\"Content-Type\", contentType);\n }\n public setHeader(key: string, value: string): this {\n this._headers[key] = value;\n return this;\n }\n\n protected prepareRequest(): Promise<ITypedJSONResponse<ReturnType>> {\n return this.typedFetch.proxy(this._path, this._method, {\n query: this._query,\n params: this._parameters,\n body: this._body,\n headers: this._headers,\n });\n }\n\n public execute(): Promise<IAPIResponse<ReturnType>> {\n if (this._execution) {\n return this._execution;\n }\n\n this._execution = this.prepareRequest().then((response) => {\n if (!response.ok) {\n return this.handleErrorResponse(response).then((data) => {\n return {\n headers: response.headers,\n data,\n };\n });\n }\n return this.transformStream(response).then((data) => {\n return {\n headers: response.headers,\n data,\n };\n });\n });\n return this._execution;\n }\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n public then<TResult1 = IAPIResponse<ReturnType>, TResult2 = never>(\n onfulfilled?: ((value: IAPIResponse<ReturnType>) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): Promise<TResult1 | TResult2> {\n return this.execute().then(onfulfilled, onrejected);\n }\n public catch<TResult = never>(\n onrejected?: (reason: any) => TResult | PromiseLike<TResult>,\n ): Promise<IAPIResponse<ReturnType> | TResult> {\n return this.execute().then(null, onrejected);\n }\n\n protected transformStream(response: Response): Promise<ReturnType> {\n return this._transform(response);\n }\n\n protected handleErrorResponse(response: Response): Promise<ReturnType> {\n return response\n .text()\n .catch(() => {\n throw new FetchError(response.status, response.statusText);\n })\n .then((text) => {\n throw new FetchError(response.status, response.statusText, text);\n });\n }\n}\n","import { GUID } from \"../../types/interplatform\";\nimport { IRestypedBase } from \"../../types/restyped\";\nimport { IInterPlatform } from \"../../dataaccess\";\n\nexport const getETag = (response: Response): Promise<string> => {\n let etag = response.headers.get(\"etag\");\n let resolution: Promise<string>;\n if (etag) {\n etag = `\"${etag.replace(/\"/g, \"\").split(\"--\")[0]}\"`;\n resolution = Promise.resolve(etag);\n } else {\n resolution = Promise.reject(new Error(\"ETag header not found\"));\n }\n return resolution;\n};\n\nexport class LocationHelper<APIDef extends IRestypedBase> {\n public createForPath<Path extends keyof APIDef>(\n path: Path,\n ): { extract: (response: Response, pathParameter: keyof APIDef[Path][\"GET\"][\"params\"]) => Promise<GUID> } {\n const resolver = {\n extract: (response, pathParameter) => this.getIdFromLocation(response, path, pathParameter),\n };\n return resolver;\n }\n\n private getIdFromLocation<Path extends keyof APIDef>(\n response: Response,\n path: Path,\n pathParameter: keyof APIDef[Path][\"GET\"][\"params\"] & string,\n ): Promise<GUID> {\n let resolution: Promise<GUID>;\n const location = response.headers.get(\"location\") || \"\";\n\n if (location != null && location.length > 0) {\n let processedPattern = path\n .toString()\n .replace(\":\" + pathParameter, \"([^/]+)\") // create a capturing group for the given path parameter\n .replace(/:([^/]+)(\\/?)/g, \"[^/]+$2\") // create non capturing groups for every other path parameter\n .replace(/\\//g, \"\\\\/\"); // escape slashes\n\n processedPattern = \".*\" + processedPattern; // allow any leading characters\n\n const matches = new RegExp(processedPattern).exec(location);\n if (matches && matches.length > 0) {\n resolution = Promise.resolve(matches[1]);\n } else {\n resolution = Promise.reject(\n new Error(`Location header (${location}) did not matches the given pattern ${path.toString()}!`),\n );\n }\n } else {\n resolution = Promise.reject(new Error(\"Location header not found!\"));\n }\n return resolution;\n }\n}\n\nexport const locationHelper = new LocationHelper<IInterPlatform>();\n","import {\n IDataObject,\n IInterPlatform,\n IPermission,\n ForeignEditPermission,\n ITeamFilter,\n TeamFilter,\n GUID,\n IMassQueryResult,\n ICommonField,\n QueryResponseLegacyGw,\n NoPathParams,\n} from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\nimport { getETag, locationHelper } from \"./response/headerutil\";\n\nconst DEFAULT_PAGE_SIZE = 100;\n\n/**\n * Provides builders for record specific REST operations\n */\nexport interface IDataObjectService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to delete a given record\n * @param type type of the record to be deleted e.g. ADDRESS\n * @param gguid unique identifier of the record to be deleted\n */\n deleteObject(type: string, gguid: GUID): DeleteObjectRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a given record\n * @param type type of the record to be retrieved e.g. ADDRESS\n * @param gguid unique identifier of the record to be retrieved\n */\n getObject(type: string, gguid: GUID): GetObjectRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * @param type type of the record to be retrieved e.g. ADDRESS\n */\n getObjectList(type: string): GetFullObjectListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n * @param type type of the records to be retrieved e.g. ADDRESS\n */\n getPartialObjectList(type: string): GetPartialObjectListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of records\n * for the given type.\n * @param type type of the records to operate on e.g. ADDRESS\n */\n getObjectListCount(type: string): GetObjectListCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to save a given record.\n * Please note that during the saving process the object is going\n * to be normalized to match the contract given by the API.\n * @param dataObject the record to be saved\n */\n saveObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, void>;\n\n /**\n * Creates a builder which can be used to save and then retrieve\n * a given record.\n * Please note that during the saving process the object is going\n * to be normalized to match the contract given by the API.\n * @param dataObject the record to be saved\n */\n saveAndReturnObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, IDataObject>;\n\n /**\n * Creates a builder which can be used to create a new record.\n * @param type type of the record to be created e.g. ADDRESS\n */\n createObject(type: string): CreateObjectRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve the list of permisisons\n * for the given object.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getPermissionInfo(type: string, gguid: GUID): GetPermissionInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of permisisons\n * for the given object.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getPermissionInfoCount(type: string, gguid: GUID): GetPermissionInfoCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the detailed permission\n * information for the given record and permission.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n * @param permissionGguid gguid of the permission\n */\n getPermissionDetails(\n type: string,\n gguid: GUID,\n permissionGguid: string,\n ): GetPermissionDetailsRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve schema information for\n * the given type. The schema contains detailed information about the record\n * type e.g. all available fields and their types.\n * @param type record type e.g. ADDRESS\n */\n getObjectSchema(type: string): GetObjectSchemaRequestBuilder<PLATFORM>;\n /** Creates a builder which can be used to retrieve meta information for\n * the given type. This contains information like translations, link\n * attributes, flags which indicate whether the type is user sensitive,\n * linkable and more.\n * @param type record type e.g. ADDRESS\n */\n getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image\n * for a given record type.\n * @param type record type e.g. ADDRESS\n */\n getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;\n /**\n * Creates a builder which can be used to retrieve the image\n * for a given record type.\n * This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param type record type e.g. ADDRESS\n */\n getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;\n /**\n * Creates a builder which can be used to retrieve the result of the given\n * query.\n * Please note that the query syntax is limited to the Select operation.\n * @param query the query to be executed\n */\n query(query: string): QueryRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve a list of recently\n * used records.\n * @param type type of the record to be retrieved e.g. ADDRESS\n */\n getRecentlyUsedObjectList(type: string): GetRecentlyUsedObjectListRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to mask the given record\n * as recently used.\n * @param type record type e.g. ADDRESS\n * @param gguid gguid of the record\n */\n maskAsRecentlyUsedDataObject(type: string, gguid: GUID): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM>;\n}\n\nexport class DataObjectService<PLATFORM extends IInterPlatform> implements IDataObjectService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectNormalizer: DataObjectNormalizer,\n ) {}\n\n public deleteObject(type: string, gguid: GUID): DeleteObjectRequestBuilder<PLATFORM> {\n return new DeleteObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n\n public getObject(type: string, gguid: GUID): GetObjectRequestBuilder<PLATFORM> {\n return new GetObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n public getObjectList(type: string): GetFullObjectListRequestBuilder<PLATFORM> {\n return new GetFullObjectListRequestBuilder(this.typedFetch, type);\n }\n public getPartialObjectList(type: string): GetPartialObjectListRequestBuilder<PLATFORM> {\n return new GetPartialObjectListRequestBuilder(this.typedFetch, type);\n }\n\n public getObjectListCount(type: string): GetObjectListCountRequestBuilder<PLATFORM> {\n return new GetObjectListCountRequestBuilder(this.typedFetch, type);\n }\n\n public saveObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, void> {\n return new PutObjectRequestBuilder<PLATFORM, void>(this.typedFetch, this.dataObjectNormalizer, dataObject, () =>\n Promise.resolve(),\n );\n }\n\n public saveAndReturnObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, IDataObject> {\n return new PutObjectRequestBuilder<PLATFORM, IDataObject>(\n this.typedFetch,\n this.dataObjectNormalizer,\n dataObject,\n () => this.getObject(dataObject.objectType, dataObject.id).then((p) => p.data),\n );\n }\n\n public createObject(type: string): CreateObjectRequestBuilder<PLATFORM> {\n return new CreateObjectRequestBuilder(this.typedFetch, this.dataObjectNormalizer, type);\n }\n\n public getPermissionInfo(type: string, gguid: GUID): GetPermissionInfoRequestBuilder<PLATFORM> {\n return new GetPermissionInfoRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPermissionInfoCount(type: string, gguid: GUID): GetPermissionInfoCountRequestBuilder<PLATFORM> {\n return new GetPermissionInfoCountRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPermissionDetails(\n type: string,\n gguid: GUID,\n permissionGguid: string,\n ): GetPermissionDetailsRequestBuilder<PLATFORM> {\n return new GetPermissionDetailsRequestBuilder(this.typedFetch, type, gguid, permissionGguid);\n }\n\n public getObjectSchema(type: string): GetObjectSchemaRequestBuilder<PLATFORM> {\n return new GetObjectSchemaRequestBuilder<PLATFORM>(this.typedFetch, type);\n }\n public getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM> {\n return new GetObjectDescriptionRequestBuilder(this.typedFetch, type);\n }\n public getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer> {\n return new GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>(this.typedFetch, type, (p) =>\n p.arrayBuffer(),\n );\n }\n\n public getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob> {\n return new GetRecordTypeImageRequestBuilder<PLATFORM, Blob>(this.typedFetch, type, (p) => p.blob());\n }\n\n public query(query: string): QueryRequestBuilder<PLATFORM> {\n return new QueryRequestBuilder(this.typedFetch, query);\n }\n\n public getRecentlyUsedObjectList(type: string): GetRecentlyUsedObjectListRequestBuilder<PLATFORM> {\n return new GetRecentlyUsedObjectListRequestBuilder(this.typedFetch, type);\n }\n\n public maskAsRecentlyUsedDataObject(\n type: string,\n gguid: GUID,\n ): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM> {\n return new MaskAsRecentlyUsedDataObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n}\n\nexport class DataObjectNormalizer {\n public normalizeDataObject(dataObject: Partial<IDataObject>): Partial<IDataObject> {\n dataObject = dataObject || { fields: {} };\n const normalizedDataObject: Partial<IDataObject> = {\n fields: dataObject.fields || {},\n foreignEditPermission:\n dataObject.foreignEditPermission == null\n ? ForeignEditPermission.PRIVATE\n : dataObject.foreignEditPermission,\n };\n if (dataObject.permissions) {\n normalizedDataObject.permissions = this.normalizePermissions(dataObject.permissions);\n }\n return normalizedDataObject;\n }\n public normalizePermissions(permissions?: IPermission[]): IPermission[] {\n return permissions.map((p) => {\n return {\n RIGHTOWNERGGUID: p.RIGHTOWNERGGUID,\n ACCESSRIGHT: p.ACCESSRIGHT,\n ROLE: p.ROLE,\n };\n });\n }\n}\n\nexport class PutObjectRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"PUT\",\n T\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectNormalizer: DataObjectNormalizer,\n dao: IDataObject,\n transform: (response: Response) => Promise<T>,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"PUT\",\n {\n dataObjectType: dao.objectType,\n dataObjectGGUID: dao.id,\n },\n transform,\n );\n this.setBody(JSON.stringify(dataObjectNormalizer.normalizeDataObject(dao)));\n this.setHeader(\"IF-MATCH\", dao.ETAG);\n this.setContentType(\"application/json\");\n }\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n}\n\nexport class DeleteObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"DELETE\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID\", \"DELETE\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\n\nexport class GetObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"GET\",\n {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n },\n (response) =>\n response.json().then((dao) => {\n return getETag(response)\n .then((eTag) => (dao.ETAG = eTag))\n .then(\n () => dao,\n () => dao,\n );\n }),\n );\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePermissions(includePermissions = true): this {\n this._query.includePermissions = includePermissions;\n return this;\n }\n public includeSyncrecordPermissions(includeSyncrecordPermissions = true): this {\n this._query.includeSyncrecordPermissions = includeSyncrecordPermissions;\n return this;\n }\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n public includeMaxjournalid(includeMaxjournalid = true): this {\n this._query.includeMaxjournalid = includeMaxjournalid;\n return this;\n }\n public isFavorite(isFavorite = true): this {\n this._query.isfavorite = isFavorite;\n return this;\n }\n}\nexport abstract class GetObjectListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IDataObject[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n _path: Path,\n _method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, _path, _method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public withPreconfiguredTeamFilter(teamFilter: string): this {\n this._query.teamFilter = teamFilter;\n return this;\n }\n public withTeamFilter(teamFilter: ITeamFilter): this {\n this._query.teamFilter = new TeamFilter(teamFilter);\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n public withPreconfiguredOrderBy(orderBy: string): this {\n this._query.orderBy = orderBy;\n return this;\n }\n public orderBy(orderBy: string, isAscending = true): this {\n const sortOrder = isAscending ? \"ASC\" : \"DESC\";\n this._query.orderBy = this._query.orderBy || [];\n this._query.orderBy.push(`${orderBy} ${sortOrder}`);\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: string[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class GetFullObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends GetObjectListRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/full\", \"GET\", {\n dataObjectType: type,\n });\n this.withEntriesPerPage(DEFAULT_PAGE_SIZE);\n }\n}\n\nexport class GetPartialObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends GetObjectListRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/list\", \"GET\", {\n dataObjectType: type,\n });\n this.withEntriesPerPage(DEFAULT_PAGE_SIZE);\n }\n}\n\nexport class GetObjectListCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/count\", \"GET\", {\n dataObjectType: type,\n });\n }\n public withPreconfiguredTeamFilter(teamFilter: string): this {\n this._query.teamFilter = teamFilter;\n return this;\n }\n public withTeamFilter(teamFilter: ITeamFilter): this {\n this._query.teamFilter = new TeamFilter(teamFilter);\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: GUID[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class CreateObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType\",\n \"POST\",\n IDataObject\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectNormalizer: DataObjectNormalizer,\n type: string,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType\",\n \"POST\",\n {\n dataObjectType: type,\n },\n (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => new GetObjectRequestBuilder(typedFetch, type, id).then((p) => p.data));\n },\n );\n this.setDataObject({ objectType: type, fields: {} });\n }\n\n public withTemplateGguid(templateGguid: GUID): this {\n this._query.templateGguid = templateGguid;\n return this;\n }\n\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n\n public setDataObject(dataObject: Partial<IDataObject>): this {\n this.setBody(JSON.stringify(this.dataObjectNormalizer.normalizeDataObject(dataObject)));\n return this;\n }\n}\n\nexport class GetPermissionDetailsRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID, permissionGGUID: string) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n permissionGGUID,\n });\n }\n}\nexport class GetPermissionInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/full\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\nexport class GetPermissionInfoCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/count\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\n\nexport class GetObjectSchemaRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/schema\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(\n typedFetch,\n \"/type/:dataObjectType/schema\",\n \"GET\",\n {\n dataObjectType: type,\n },\n (response) =>\n response.json().then((schema) => {\n Object.keys(schema.properties.fields)\n .map((p) => schema.properties.fields[p])\n .forEach((field) => this.normalizeMandatoryAndOptionalFlag(field));\n return schema;\n }),\n );\n }\n private normalizeMandatoryAndOptionalFlag(field: ICommonField) {\n if (field.mandatory == null) {\n field.mandatory = !field.optional;\n }\n if (field.optional == null) {\n field.optional = !field.mandatory;\n }\n return field;\n }\n}\n\nexport class GetObjectDescriptionRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/description\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/description\", \"GET\", {\n dataObjectType: type,\n });\n }\n}\n\nexport class QueryRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/query\",\n \"POST\",\n IMassQueryResult,\n IMassQueryResult | QueryResponseLegacyGw\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, query: string) {\n super(typedFetch, \"/query\", \"POST\", {}, (response) =>\n response\n .json()\n .catch(() => null)\n .then((p) => this.normalizeMassData(p)),\n );\n this.setBody(\n JSON.stringify({\n query,\n }),\n );\n }\n\n private normalizeMassData(result: IMassQueryResult | QueryResponseLegacyGw) {\n let unwrapped: IMassQueryResult = null;\n\n if (this.isLegacyGwResponse(result)) {\n if (result.length > 0) {\n unwrapped = result[0];\n }\n } else {\n unwrapped = result;\n }\n\n if (unwrapped == null) {\n unwrapped = {} as IMassQueryResult;\n }\n\n const normalized = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n displayNames: unwrapped.displayNames || (unwrapped as any).displaynames || {},\n rows: unwrapped.rows || ([] as Record<string, unknown>[]),\n types: unwrapped.types || {},\n };\n\n return normalized;\n }\n\n private isLegacyGwResponse(response: IMassQueryResult | QueryResponseLegacyGw): response is QueryResponseLegacyGw {\n return Array.isArray(response);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public includePrivateForeignrecords(includePrivateForeignrecords: boolean): this {\n this._query.includePrivateForeignrecords = includePrivateForeignrecords;\n return this;\n }\n}\n\nexport class GetRecordTypeImageRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/image\",\n \"GET\",\n T\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, transform: (response: Response) => Promise<T>) {\n super(\n typedFetch,\n \"/type/:dataObjectType/image\",\n \"GET\",\n {\n dataObjectType: type,\n },\n transform,\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public forIconType(iconType: string): this {\n this._query.iconType = iconType;\n return this;\n }\n}\n\nexport class GetRecentlyUsedObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/recent/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/recent/list\", \"GET\", {\n dataObjectType: type,\n });\n }\n\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public withWhereString(whereString: string): this {\n this._query.whereString = whereString;\n return this;\n }\n}\n\nexport class MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/recent\",\n \"POST\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/recent\", \"POST\", { dataObjectType, dataObjectGGUID });\n }\n}\n","import { RestypedFetch } from \"../types/restypedfetch\";\nimport { IInterPlatform, IDossierEntry, LinkDirection, GUID } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { locationHelper, getETag } from \"./response/headerutil\";\n\n/**\n * Provides builders to link specific REST operations\n */\nexport interface ILinkingService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to create a link between two objects\n * @param type the type of the record to be linked e.g. ADDRESS\n * @param gguid the gguid of the record to be linked\n */\n linkDataObject(type: string, gguid: GUID): PostDossierRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete an existing dossier entry.\n */\n deleteLink(dossierEntry: IDossierEntry): DeleteLinkRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete an existing link between two objects.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n * @param dossierentryGGUID the gguid of the dossier entry\n */\n deleteLink(type: string, gguid: GUID, dossierentryGGUID: GUID): DeleteLinkRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the detailed information\n * of a dossier entry which is linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n * @param dossierentryGGUID the gguid of the dossier entry\n */\n getDossierEntry(type: string, gguid: GUID, dossierentryGGUID: GUID): GetDossierEntryRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve amount of dossier entries\n * which are linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getDossierCount(type: string, gguid: GUID): GetDossierCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of dossier entries\n * which are linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getDossier(type: string, gguid: GUID): GetDossierRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve the list of primary linked\n * parent records\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getPrimaryLinkParentsList(type: string, gguid: GUID): GetPrimaryParentsListRequestBuilder<PLATFORM>;\n}\nexport class LinkingService<PLATFORM extends IInterPlatform> implements ILinkingService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public linkDataObject(type: string, gguid: GUID): PostDossierRequestBuilder<PLATFORM> {\n return new PostDossierRequestBuilder(this.typedFetch, type, gguid);\n }\n public deleteLink(dossierEntry: IDossierEntry): DeleteLinkRequestBuilder<PLATFORM>;\n public deleteLink(type: string, gguid: GUID, dossierentryGGUID: GUID): DeleteLinkRequestBuilder<PLATFORM>;\n public deleteLink(\n typeOrDossierEntry: string | IDossierEntry,\n gguid?: GUID,\n dossierentryGGUID?: GUID,\n ): DeleteLinkRequestBuilder<PLATFORM> {\n let type: string;\n if (LinkingService.isDossierEntry(typeOrDossierEntry)) {\n type = typeOrDossierEntry.fields.OBJECTTYPE1;\n gguid = typeOrDossierEntry.fields.GGUID1;\n dossierentryGGUID = typeOrDossierEntry.id;\n } else {\n type = typeOrDossierEntry;\n }\n return new DeleteLinkRequestBuilder(this.typedFetch, type, gguid, dossierentryGGUID);\n }\n public getDossierEntry(\n type: string,\n gguid: GUID,\n dossierentryGGUID: GUID,\n ): GetDossierEntryRequestBuilder<PLATFORM> {\n return new GetDossierEntryRequestBuilder(this.typedFetch, type, gguid, dossierentryGGUID);\n }\n public getDossierCount(type: string, gguid: GUID): GetDossierCountRequestBuilder<PLATFORM> {\n return new GetDossierCountRequestBuilder(this.typedFetch, type, gguid);\n }\n public getDossier(type: string, gguid: GUID): GetDossierRequestBuilder<PLATFORM> {\n return new GetDossierRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPrimaryLinkParentsList(type: string, gguid: GUID): GetPrimaryParentsListRequestBuilder<PLATFORM> {\n return new GetPrimaryParentsListRequestBuilder(this.typedFetch, type, gguid);\n }\n\n private static isDossierEntry(dossierEntryOrGuid: GUID | IDossierEntry): dossierEntryOrGuid is IDossierEntry {\n return dossierEntryOrGuid && (dossierEntryOrGuid as IDossierEntry).id != null;\n }\n}\n\nexport class PostDossierRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\",\n \"POST\",\n IDossierEntry\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\",\n \"POST\",\n {\n dataObjectGGUID: gguid,\n dataObjectType: type,\n },\n (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\")\n .extract(response, \"dossierentryGGUID\")\n .then((id) => new GetDossierEntryRequestBuilder(typedFetch, type, gguid, id).then((p) => p.data));\n },\n );\n }\n public withDataObject(type: string, gguid: GUID): this {\n this._query.objectType2 = type;\n this._query.gguid2 = gguid;\n return this;\n }\n public withLinkAttribute(linkAttribute: string): this {\n this._query.attribute = linkAttribute;\n return this;\n }\n public withRole1(role1: string): this {\n this._query.role1 = role1;\n return this;\n }\n public withRole2(role2: string): this {\n this._query.role2 = role2;\n return this;\n }\n public withLinkDirection(linkDirection: LinkDirection): this {\n this._query.linkDirection = linkDirection;\n return this;\n }\n public withAdditionalField1(additionalField1: string): this {\n this._query.additionalField1 = additionalField1;\n return this;\n }\n public withAdditionalField2(additionalField2: string): this {\n this._query.additionalField2 = additionalField2;\n return this;\n }\n}\n\nexport class GetDossierEntryRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\"\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectType: string,\n dataObjectGGUID: GUID,\n dossierentryGGUID: GUID,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\n \"GET\",\n {\n dataObjectType,\n dataObjectGGUID,\n dossierentryGGUID,\n },\n (response) =>\n response.json().then((dao) => {\n return getETag(response)\n .then((eTag) => (dao.ETAG = eTag))\n .then(\n () => dao,\n () => dao,\n );\n }),\n );\n }\n}\n\nexport class GetDossierCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n}\n\nexport class GetDossierRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n\n public forPage(page: number) {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number) {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n\n public forObjectTypes(objectTypes: string | string[]) {\n this._query.objectTypes = objectTypes;\n return this;\n }\n}\n\nexport class DeleteLinkRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\n \"DELETE\"\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectType: string,\n dataObjectGGUID: GUID,\n dossierentryGGUID: GUID,\n ) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\", \"DELETE\", {\n dataObjectType,\n dataObjectGGUID,\n dossierentryGGUID,\n });\n }\n}\nexport class GetPrimaryParentsListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n}\n","import { IUserInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IAddressService, GetAddressImageRequestBuilder, GetAddressImageAsBlobRequestBuilder } from \"./addressservice\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for user specific REST operations\n */\nexport interface IUserService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given user.\n * @param gguid the id of the user\n */\n getUser(gguid: GUID): GetUserRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the user image\n * for a given user.\n * @param user the user for whom the image should be retrieved\n */\n getUserImage(user: IUserInfo): GetAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the user image\n * of a given user as a [[Blob]].\n * This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param user the user for whom the image should be retrieved\n */\n getUserImageAsBlob(user: IUserInfo): GetAddressImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of users.\n */\n getUserCount(): GetUserCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of users.\n */\n getUserList(): GetFullUserListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of users.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialUserList(): GetPartialUserListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve information about\n * the currently logged in user.\n */\n getLoggedInUser(): GetLoggedInUserInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve login related information.\n */\n getLoginInformation(): GetLoginInformationRequestBuilder<PLATFORM>;\n}\nexport class UserService<PLATFORM extends IInterPlatform> implements IUserService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private addressService: IAddressService<PLATFORM>,\n ) {}\n public getUser(gguid: GUID): GetUserRequestBuilder<PLATFORM> {\n return new GetUserRequestBuilder(this.typedFetch, gguid);\n }\n public getUserImage(user: IUserInfo): GetAddressImageRequestBuilder<PLATFORM> {\n return this.addressService.getAddressImage(user.fields.GGUIDOFADDRESSRECORD);\n }\n public getUserImageAsBlob(user: IUserInfo): GetAddressImageAsBlobRequestBuilder<PLATFORM> {\n return this.addressService.getAddressImageAsBlob(user.fields.GGUIDOFADDRESSRECORD);\n }\n public getUserCount(): GetUserCountRequestBuilder<PLATFORM> {\n return new GetUserCountRequestBuilder(this.typedFetch);\n }\n public getUserList(): GetFullUserListRequestBuilder<PLATFORM> {\n return new GetFullUserListRequestBuilder(this.typedFetch);\n }\n public getPartialUserList(): GetPartialUserListRequestBuilder<PLATFORM> {\n return new GetPartialUserListRequestBuilder(this.typedFetch);\n }\n public getLoggedInUser(): GetLoggedInUserInfoRequestBuilder<PLATFORM> {\n return new GetLoggedInUserInfoRequestBuilder(this.typedFetch);\n }\n public getLoginInformation(): GetLoginInformationRequestBuilder<PLATFORM> {\n return new GetLoginInformationRequestBuilder(this.typedFetch);\n }\n}\nexport class GetUserRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<PLATFORM, \"/user/:GGUID\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/user/:GGUID\", \"GET\", {\n GGUID: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePrivilegedOperations(includePrivilegedOperations = true): this {\n this._query.includePrivilegedOperations = includePrivilegedOperations;\n return this;\n }\n}\n\nexport class GetUserCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetUserListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IUserInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n parameters: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, parameters);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullUserListRequestBuilder<PLATFORM extends IInterPlatform> extends GetUserListRequestBuilder<\n PLATFORM,\n \"/user/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/full\");\n }\n}\nexport class GetPartialUserListRequestBuilder<PLATFORM extends IInterPlatform> extends GetUserListRequestBuilder<\n PLATFORM,\n \"/user/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/list\");\n }\n}\nexport class GetLoggedInUserInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/self\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/self\");\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePrivilegedOperations(includePrivilegedOperations = true): this {\n this._query.includePrivilegedOperations = includePrivilegedOperations;\n return this;\n }\n}\nexport class GetLoginInformationRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/self/logininformation\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/self/logininformation\");\n }\n}\n","export interface IBinaryInfo {\n buffer: ArrayBuffer | SharedArrayBuffer | string;\n contentType: string;\n}\nexport class BinaryLoader {\n private _binaryInfo: Promise<IBinaryInfo>;\n\n public setContent(contentType: string, content: string) {\n this._binaryInfo = Promise.resolve({ buffer: content, contentType });\n }\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer | SharedArrayBuffer) {\n this._binaryInfo = Promise.resolve({ buffer, contentType });\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array) {\n this.setContentFromArrayBuffer(contentType, uInt8Array.buffer);\n }\n public setContentFromBase64String(contentType: string, base64: string) {\n const binaryString = window.atob(base64);\n const len = binaryString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n this.setContentFromUInt8Array(contentType, bytes);\n }\n public setContentFromFile(file: File, contentType: string = file.type) {\n const fileLoaded: Promise<string | ArrayBuffer> = new Promise<string | ArrayBuffer>((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener(\"loadend\", () => {\n resolve(reader.result);\n });\n reader.addEventListener(\"error\", () => {\n reject(reader.error);\n });\n reader.readAsArrayBuffer(file);\n });\n this._binaryInfo = fileLoaded.then((buffer) => {\n return { buffer, contentType };\n });\n }\n public getBinary(): Promise<IBinaryInfo> {\n if (this._binaryInfo) {\n return this._binaryInfo;\n }\n return Promise.reject(new Error(\"No binary was configured!\"));\n }\n}\n","import { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { IInterPlatform, GUID } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { GetFullObjectListRequestBuilder, GetPartialObjectListRequestBuilder } from \"./dataobjectservice\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for address specific REST operations\n */\nexport interface IAddressService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve a list of addresses.\n */\n getAddressList(): GetAddressListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of addresses.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialAddressList(): GetPartialAddressListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image of the address\n * @param addressGguid the id of the address record\n * Please note that the returned image is an ArrayBuffer in this case.\n * To display the image it might be more appropriate to use\n * [[IAddressService.getAddressImageAsBlob]]\n */\n getAddressImage(addressGguid: GUID): GetAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image of the address\n * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param addressGguid the id of the address record\n */\n getAddressImageAsBlob(addressGguid: GUID): GetAddressImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the image of a given address\n * @param addressGguid the id of the address record\n * @param eTagOfAddress the ETAG field of an address object, please note that\n * it is used to guarantee update safety. It can be aquired from a previously\n * fetched address object.\n */\n updateAddressImage(addressGguid: GUID, eTagOfAddress: string): PutAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete the image of a given address\n * @param addressGguid the id of the address record\n */\n deleteAddressImage(addressGguid: GUID): DeleteAddressImageRequestBuilder<PLATFORM>;\n}\n\nexport class AddressService<PLATFORM extends IInterPlatform> implements IAddressService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n\n public getAddressList(): GetAddressListRequestBuilder<PLATFORM> {\n return new GetAddressListRequestBuilder(this.typedFetch, \"address\");\n }\n public getPartialAddressList(): GetPartialAddressListRequestBuilder<PLATFORM> {\n return new GetPartialAddressListRequestBuilder(this.typedFetch, \"address\");\n }\n public getAddressImage(addressGguid: GUID): GetAddressImageRequestBuilder<PLATFORM> {\n return new GetAddressImageRequestBuilder(this.typedFetch, addressGguid);\n }\n public getAddressImageAsBlob(addressGguid: GUID): GetAddressImageAsBlobRequestBuilder<PLATFORM> {\n return new GetAddressImageAsBlobRequestBuilder(this.typedFetch, addressGguid);\n }\n public updateAddressImage(addressGguid: GUID, eTagOfAddress: GUID): PutAddressImageRequestBuilder<PLATFORM> {\n return new PutAddressImageRequestBuilder(this.typedFetch, addressGguid, eTagOfAddress);\n }\n public deleteAddressImage(addressGguid: GUID): DeleteAddressImageRequestBuilder<PLATFORM> {\n return new DeleteAddressImageRequestBuilder(this.typedFetch, addressGguid);\n }\n}\n\nexport class GetAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(\n typedFetch,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectGGUID: addressGguid,\n },\n (p) => p.arrayBuffer(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.maxWidth = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.maxHeight = maxHeight;\n return this;\n }\n}\n\nexport class GetAddressImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n Blob\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(\n typedFetch,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectGGUID: addressGguid,\n },\n (p) => p.blob(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.maxWidth = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.maxHeight = maxHeight;\n return this;\n }\n}\n\nexport class DeleteAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"DELETE\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(typedFetch, \"/type/address/:dataObjectGGUID/image\", \"DELETE\", {\n dataObjectGGUID: addressGguid,\n });\n }\n}\nexport class PutAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"PUT\",\n void\n> {\n private binaryLoader: BinaryLoader;\n\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID, eTagOfAddress: string) {\n super(typedFetch, \"/type/address/:dataObjectGGUID/image\", \"PUT\", {\n dataObjectGGUID: addressGguid,\n });\n this.setHeader(\"IF-MATCH\", eTagOfAddress);\n this.binaryLoader = new BinaryLoader();\n }\n\n public setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setImageFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setImageFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\n\nexport class GetAddressListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetFullObjectListRequestBuilder<PLATFORM> {\n public usersOnly(isUser: boolean | null = true): this {\n this._query.isUser = isUser;\n return this;\n }\n public whenBirthdayIsOn(hasBirthdayOn: Date): this {\n this._query.hasBirthdayOn = hasBirthdayOn;\n return this;\n }\n}\n\nexport class GetPartialAddressListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetPartialObjectListRequestBuilder<PLATFORM> {\n public usersOnly(isUser: boolean | null = true): this {\n this._query.isUser = isUser;\n return this;\n }\n public whenBirthdayIsOn(hasBirthdayOn: Date): this {\n this._query.hasBirthdayOn = hasBirthdayOn;\n return this;\n }\n}\n","import { IInterPlatform, GUID } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\n\n/**\n * Provides builders for appointment specific REST operations\n */\nexport interface IAppointmentService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve the detailed participant information\n * for the given appointment and participant.\n * @param gguid unique identifier of the record to be retrieved\n * @param participantGGUID gguid of the participant\n */\n getParticipantDetails(gguid: GUID, participantGGUID: GUID): GetParticipantDetailsRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the list of participant\n * information for the given appointment.\n * @param gguid unique identifier of the record to be retrieved\n */\n getParticipantInfo(gguid: GUID): GetParticipantInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of participants\n * for the given appointment.\n * @param gguid unique identifier of the record to be retrieved\n */\n getParticipantInfoCount(gguid: GUID): GetParticipantInfoCountRequestBuilder<PLATFORM>;\n}\n\nexport class AppointmentService<PLATFORM extends IInterPlatform> implements IAppointmentService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getParticipantDetails(gguid: GUID, participantGGUID: GUID): GetParticipantDetailsRequestBuilder<PLATFORM> {\n return new GetParticipantDetailsRequestBuilder(this.typedFetch, gguid, participantGGUID);\n }\n public getParticipantInfo(gguid: GUID): GetParticipantInfoRequestBuilder<PLATFORM> {\n return new GetParticipantInfoRequestBuilder(this.typedFetch, gguid);\n }\n public getParticipantInfoCount(gguid: GUID): GetParticipantInfoCountRequestBuilder<PLATFORM> {\n return new GetParticipantInfoCountRequestBuilder(this.typedFetch, gguid);\n }\n}\n\nexport class GetParticipantDetailsRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID, participantGGUID: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\", \"GET\", {\n dataObjectGGUID: gguid,\n participantGGUID,\n });\n }\n}\n\nexport class GetParticipantInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/full\", \"GET\", {\n dataObjectGGUID: gguid,\n });\n }\n}\nexport class GetParticipantInfoCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/count\", \"GET\", {\n dataObjectGGUID: gguid,\n });\n }\n}\n","import { IInterPlatform, IServerVersion, IServerVersionResponseGw } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\n\n/**\n * Provides a builder to retrieve server version information\n */\nexport interface IServerInformationService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve server version information\n */\n getServerVersion(): ServerVersionRequestBuilder<PLATFORM>;\n}\n\nexport class ServerInformationService<PLATFORM extends IInterPlatform> implements IServerInformationService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getServerVersion(): ServerVersionRequestBuilder<PLATFORM> {\n return new ServerVersionRequestBuilder(this.typedFetch);\n }\n}\n\nexport class ServerVersionRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/version/server\",\n \"GET\",\n IServerVersion,\n IServerVersion | IServerVersionResponseGw\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/version/server\", \"GET\", {}, (response) =>\n response.json().then((result) => (this.isGwResponse(result) ? result.fields : result)),\n );\n }\n\n private isGwResponse(response: IServerVersionResponseGw | IServerVersion): response is IServerVersionResponseGw {\n return (response as IServerVersionResponseGw).fields != null;\n }\n}\n","import { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { IDataObject, IInterPlatform, HtmlFilter, GUID, ForeignEditPermission } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IDataObjectService } from \"./dataobjectservice\";\nimport { locationHelper } from \"./response/headerutil\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for email store specific REST operations.\n */\nexport interface IEmailStoreService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve content associated\n * with the given email store record\n * @param dataObjectGGUID unique identifier of the email store record\n */\n getEmail(dataObjectGGUID: GUID): GetEmailStoreRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the content associated\n * with the given the email store record\n * @param dataObjectGGUID unique identifier of the email store record\n */\n archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM>;\n}\n\nexport class EmailStoreService<PLATFORM extends IInterPlatform> implements IEmailStoreService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectService: IDataObjectService<PLATFORM>,\n ) {}\n public getEmail(dataObjectGGUID: GUID): GetEmailStoreRequestBuilder<PLATFORM> {\n return new GetEmailStoreRequestBuilder(this.typedFetch, dataObjectGGUID);\n }\n public archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM> {\n return new PostEmailStoreRequestBuilder<PLATFORM>(this.typedFetch, this.dataObjectService);\n }\n}\n\nexport class PostEmailStoreRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/emailstore/file\",\n \"POST\",\n IDataObject\n> {\n private static readonly DEFAULT_MESSAGE_MIME_TYPE = \"message/rfc822\";\n\n private binaryLoader: BinaryLoader;\n\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectService: IDataObjectService<PLATFORM>) {\n super(typedFetch, \"/type/emailstore/file\", \"POST\", {}, (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => dataObjectService.getObject(\"EMAILSTORE\", id).then((p) => p.data));\n });\n this.setHeader(\"EXPECT\", \"100-continue\");\n this.withForeignEditPermissionRestriction(ForeignEditPermission.PRIVATE);\n this.binaryLoader = new BinaryLoader();\n }\n\n public withForeignEditPermissionRestriction(foreignEditPermissionRestriction: ForeignEditPermission): this {\n this._query.foreignEditPermissionRestriction = foreignEditPermissionRestriction;\n return this;\n }\n\n public setContentFromArrayBuffer(\n buffer: ArrayBuffer,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(\n uInt8Array: Uint8Array,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(\n base64: string,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(\n file: File,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n public setContent(\n content: string,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContent(contentType, content);\n return this;\n }\n public execute(): Promise<IAPIResponse<IDataObject>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\nexport class GetEmailStoreRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/emailstore/:dataObjectGGUID/file\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectGGUID: GUID) {\n super(\n typedFetch,\n \"/type/emailstore/:dataObjectGGUID/file\",\n \"GET\",\n {\n dataObjectGGUID,\n },\n (response) => response.arrayBuffer(),\n );\n this.setAcceptHeader(\"*/*\");\n }\n public withHtmlFilter(htmlFilter: HtmlFilter): this {\n this._query.htmlFilter = htmlFilter;\n return this;\n }\n}\n","import { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { IDataObject, IInterPlatform, NoPathParams } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for view specific REST operations\n */\nexport interface IViewService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve the list of views\n * for the given type\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n */\n getViewsForType(dataObjectType: string): GetViewsForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of views\n * for the given type\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n */\n getViewCountForType(dataObjectType: string): GetViewCountForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve additional information\n * about the given view\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getViewDetails(dataObjectType: string, viewID: string): GetViewForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * for the given view\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getPartialItemsForView(dataObjectType: string, viewID: string): GetPartialItemsForViewRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * for the given view\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getItemsForView(dataObjectType: string, viewID: string): GetItemsForViewRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of records\n * for the given view\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getItemCountForView(dataObjectType: string, viewID: string): GetItemCountForViewRequestBuilder<PLATFORM>;\n}\n\nexport class ViewService<PLATFORM extends IInterPlatform> implements IViewService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getViewsForType(dataObjectType: string): GetViewsForTypeRequestBuilder<PLATFORM> {\n return new GetViewsForTypeRequestBuilder(this.typedFetch, dataObjectType);\n }\n public getViewCountForType(dataObjectType: string): GetViewCountForTypeRequestBuilder<PLATFORM> {\n return new GetViewCountForTypeRequestBuilder(this.typedFetch, dataObjectType);\n }\n public getViewDetails(dataObjectType: string, viewID: string): GetViewForTypeRequestBuilder<PLATFORM> {\n return new GetViewForTypeRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getPartialItemsForView(\n dataObjectType: string,\n viewID: string,\n ): GetPartialItemsForViewRequestBuilder<PLATFORM> {\n return new GetPartialItemsForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getItemsForView(dataObjectType: string, viewID: string): GetItemsForViewRequestBuilder<PLATFORM> {\n return new GetItemsForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getItemCountForView(dataObjectType: string, viewID: string): GetItemCountForViewRequestBuilder<PLATFORM> {\n return new GetItemCountForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n}\n\nexport abstract class GetViewItemsRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IDataObject[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n _path: Path,\n _method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, _path, _method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n public withPreconfiguredOrderBy(orderBy: string): this {\n this._query.orderBy = orderBy;\n return this;\n }\n public orderBy(orderBy: string, isAscending = true): this {\n const sortOrder = isAscending ? \"ASC\" : \"DESC\";\n this._query.orderBy = this._query.orderBy || [];\n this._query.orderBy.push(`${orderBy} ${sortOrder}`);\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: string[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class GetViewsForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string) {\n super(typedFetch, \"/type/:dataObjectType/view/list\", \"GET\", {\n dataObjectType,\n });\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public forViewKind(viewKind: string): this {\n this._query.viewKind = viewKind;\n return this;\n }\n}\nexport class GetViewCountForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string) {\n super(typedFetch, \"/type/:dataObjectType/view/count\", \"GET\", {\n dataObjectType,\n });\n }\n}\nexport class GetViewForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetPartialItemsForViewRequestBuilder<PLATFORM extends IInterPlatform> extends GetViewItemsRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/list\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetItemsForViewRequestBuilder<PLATFORM extends IInterPlatform> extends GetViewItemsRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/full\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetItemCountForViewRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/count\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n}\n","import { IGroupInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for group specific REST operations\n */\nexport interface IGroupService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given group.\n * @param gguid the id of the group\n */\n getGroup(gguid: GUID): GetGroupRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of groups.\n */\n getGroupCount(): GetGroupCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of groups.\n */\n getGroupList(): GetFullGroupListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of groups.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialGroupList(): GetPartialGroupListRequestBuilder<PLATFORM>;\n}\nexport class GroupService<PLATFORM extends IInterPlatform> implements IGroupService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getGroup(gguid: GUID): GetGroupRequestBuilder<PLATFORM> {\n return new GetGroupRequestBuilder(this.typedFetch, gguid);\n }\n public getGroupCount(): GetGroupCountRequestBuilder<PLATFORM> {\n return new GetGroupCountRequestBuilder(this.typedFetch);\n }\n public getGroupList(): GetFullGroupListRequestBuilder<PLATFORM> {\n return new GetFullGroupListRequestBuilder(this.typedFetch);\n }\n public getPartialGroupList(): GetPartialGroupListRequestBuilder<PLATFORM> {\n return new GetPartialGroupListRequestBuilder(this.typedFetch);\n }\n}\nexport class GetGroupRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<PLATFORM, \"/group/:GGUID\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/group/:GGUID\", \"GET\", {\n GGUID: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n}\n\nexport class GetGroupCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/group/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetGroupListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IGroupInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, params);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullGroupListRequestBuilder<PLATFORM extends IInterPlatform> extends GetGroupListRequestBuilder<\n PLATFORM,\n \"/group/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/full\");\n }\n}\nexport class GetPartialGroupListRequestBuilder<PLATFORM extends IInterPlatform> extends GetGroupListRequestBuilder<\n PLATFORM,\n \"/group/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/list\");\n }\n}\n","import { IResourceInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for resource specific REST operations\n */\nexport interface IResourceService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given resource.\n * @param gguid the id of the resource\n */\n getResource(gguid: GUID): GetResourceRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of resources.\n */\n getResourceCount(): GetResourceCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of resources.\n */\n getResourceList(): GetFullResourceListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of resources.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialResourceList(): GetPartialResourceListRequestBuilder<PLATFORM>;\n}\nexport class ResourceService<PLATFORM extends IInterPlatform> implements IResourceService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getResource(gguid: GUID): GetResourceRequestBuilder<PLATFORM> {\n return new GetResourceRequestBuilder(this.typedFetch, gguid);\n }\n public getResourceCount(): GetResourceCountRequestBuilder<PLATFORM> {\n return new GetResourceCountRequestBuilder(this.typedFetch);\n }\n public getResourceList(): GetFullResourceListRequestBuilder<PLATFORM> {\n return new GetFullResourceListRequestBuilder(this.typedFetch);\n }\n public getPartialResourceList(): GetPartialResourceListRequestBuilder<PLATFORM> {\n return new GetPartialResourceListRequestBuilder(this.typedFetch);\n }\n}\nexport class GetResourceRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/resource/:guid\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/resource/:guid\", \"GET\", {\n guid: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n}\n\nexport class GetResourceCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/resource/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetResourceListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IResourceInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullResourceListRequestBuilder<PLATFORM extends IInterPlatform> extends GetResourceListRequestBuilder<\n PLATFORM,\n \"/resource/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/full\");\n }\n}\nexport class GetPartialResourceListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetResourceListRequestBuilder<PLATFORM, \"/resource/list\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/list\");\n }\n}\n","import { RestypedFetch } from \"../types/restypedfetch\";\nimport { IInterPlatform, IDataObject, GUID } from \"../types/interplatform\";\nimport { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { locationHelper } from \"./response/headerutil\";\nimport { IDataObjectService } from \"./dataobjectservice\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for document specific REST operations\n */\nexport interface IDocumentService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to upload a file.\n * Please note that after a successful upload a new document\n * record is going to be created as well. This new record can\n * be used to access the file later.\n */\n createDocument(): PostDocumentRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrive the file\n * associated with the given document record.\n * @param gguid unique identifier of the document record\n */\n getDocument(gguid: GUID): GetDocumentRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to upload a new version for\n * the given document\n * @param gguid unique identifier of the document record\n * @param eTagOfRecord the ETAG field of the document object, please note that\n * it is used to guarantee update safety. It can be aquired from a previously\n * fetched document object.\n * @param fileExtension the file extension for the uploaded content\n */\n uploadDocument(gguid: GUID, eTagOfRecord: string, fileExtension: string): PutDocumentRequestBuilder<PLATFORM>;\n}\n\nexport class DocumentService<PLATFORM extends IInterPlatform> implements IDocumentService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectService: IDataObjectService<PLATFORM>,\n ) {}\n\n public createDocument(): PostDocumentRequestBuilder<PLATFORM> {\n return new PostDocumentRequestBuilder(this.typedFetch, this.dataObjectService);\n }\n public getDocument(gguid: GUID): GetDocumentRequestBuilder<PLATFORM> {\n return new GetDocumentRequestBuilder(this.typedFetch, gguid);\n }\n public uploadDocument(\n gguid: GUID,\n eTagOfRecord: string,\n fileExtension: string,\n ): PutDocumentRequestBuilder<PLATFORM> {\n return new PutDocumentRequestBuilder(this.typedFetch, gguid, eTagOfRecord, fileExtension);\n }\n}\n\nexport class PostDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/file\",\n \"POST\",\n IDataObject\n> {\n private binaryLoader: BinaryLoader;\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectService: IDataObjectService<PLATFORM>) {\n super(typedFetch, \"/type/document/file\", \"POST\", {}, (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => dataObjectService.getObject(\"DOCUMENT\", id).then((p) => p.data));\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n\n public execute(): Promise<IAPIResponse<IDataObject>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\nexport class GetDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/:dataObjectGGUID/file\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(\n typedFetch,\n \"/type/document/:dataObjectGGUID/file\",\n \"GET\",\n {\n dataObjectGGUID: gguid,\n },\n (response) => response.arrayBuffer(),\n );\n this.withReadOnlyInterest();\n this.setAcceptHeader(\"*/*\");\n }\n public withReadOnlyInterest(readOnlyInterest = true): this {\n this._query.readOnly = readOnlyInterest;\n return this;\n }\n public withVersion(version: string): this {\n this._query.version = version;\n return this;\n }\n}\nexport class PutDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/:dataObjectGGUID/file\",\n \"PUT\",\n void\n> {\n private binaryLoader: BinaryLoader;\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n gguid: GUID,\n private eTagOfRecord: string,\n private fileExtension: string,\n ) {\n super(typedFetch, \"/type/document/:dataObjectGGUID/file\", \"PUT\", {\n dataObjectGGUID: gguid,\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setHeader(\"IF-MATCH\", this.eTagOfRecord);\n this.setHeader(\"CAS-FILE-EXTENSION\", this.fileExtension);\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n\n public keepCheckedOut(keepCheckedOut = true): this {\n this._query.keepCheckedOut = keepCheckedOut;\n return this;\n }\n public createNewVersion(createNewVersion = true): this {\n this._query.createNewVersion = createNewVersion;\n return this;\n }\n public withVersionComment(versionComment: string): this {\n this._query.versionComment = versionComment;\n return this;\n }\n}\n","import { IInterPlatform, IServerVersion, IServerVersionResponseGw } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport {\n AppSettings,\n AppSettingsChange,\n AppSettingsEndpoint,\n AppSettingsSchema,\n AppSettingsSchemaPropertyScope,\n AppSettingsValues,\n StringKeyOf,\n} from \"../types/appsettings\";\n\n/**\n * Provides methods to retrieve information about settings and to get or set the settings themselves.\n */\nexport interface ISettingsService<PLATFORM extends IInterPlatform> {\n /**\n * Gets the settings schema for apps where it's defined.\n */\n getSchemaList(): GetSchemaListRequestBuilder<PLATFORM>;\n\n /**\n * Gets the settings schema for the given app. If the app has no schema, an empty one will be returned.\n */\n getSchema(appId: string): GetSchemaRequestBuilder<PLATFORM>;\n\n /**\n * Gets the effective settings stored for the given app. The effective settings contains all the properties\n * that affects the current user, including the global properties and the schema defaults as fallback.\n *\n * To get the settings only for the user or global\n * scope, use the {@link GetAppSettingsRequestBuilder.withScope} method on the returned builder.\n */\n getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE>;\n\n /**\n * Replaces all settings for the given app withing the scope. By default, the user settings are changed. To change the global settings,\n * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings\n * needs administrator privileges.\n *\n * Properties that are absent on the given settings object will removed on the scope.\n */\n setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: SETTINGSTYPE | null,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;\n\n /**\n * Changes the settings for the given app withing the scope partially. By default, the user settings are changed. To change the global settings,\n * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings\n * needs administrator privileges.\n *\n * Properties that are absent on the given settings object will be left untouched.\n */\n changeAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: Partial<SETTINGSTYPE>,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;\n}\n\nexport class SettingsService<PLATFORM extends IInterPlatform> implements ISettingsService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n\n public getSchemaList(): GetSchemaListRequestBuilder<PLATFORM> {\n return new GetSchemaListRequestBuilder(this.typedFetch);\n }\n\n public getSchema(appId: string): GetSchemaRequestBuilder<PLATFORM> {\n return new GetSchemaRequestBuilder(this.typedFetch, appId);\n }\n\n public getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE> {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId\", appId);\n }\n\n public setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: SETTINGSTYPE | null,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n return new SetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", appId, {\n _apiVersion: \"v1\",\n properties: settings ?? {},\n });\n }\n\n public changeAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: Partial<SETTINGSTYPE>,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n return new ExtendAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", appId, {\n _apiVersion: \"v1\",\n properties: settings ?? {},\n // JSON does not support \"undefined\", therefore we send the removed properties separately\n removedProperties: Object.keys(settings).filter((key) => typeof settings[key] === \"undefined\"),\n });\n }\n}\n\nexport class GetSchemaListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/settings/app/list\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/settings/app/list\", \"GET\");\n }\n}\n\nexport class GetSchemaRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/settings/app/:appId/schema\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, appId: string) {\n super(typedFetch, \"/settings/app/:appId/schema\", \"GET\", { appId: appId });\n }\n\n protected handleErrorResponse(response: Response): Promise<AppSettingsSchema> {\n if (response.status == 404) {\n return Promise.resolve({\n _apiVersion: \"v1\",\n properties: {},\n });\n }\n return super.handleErrorResponse(response);\n }\n}\n\nexport class GetAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n SETTINGSTYPE extends AppSettingsValues = AppSettingsValues,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"GET\", AppSettings<SETTINGSTYPE>> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n ) {\n super(typedFetch, endpoint, \"GET\", { appId: appId });\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE> {\n if (scope == \"global\") {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/global\", this.appId);\n } else {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", this.appId);\n }\n }\n\n protected handleErrorResponse(response: Response): Promise<AppSettings<SETTINGSTYPE>> {\n if (response.status == 404) {\n return Promise.resolve({\n _apiVersion: \"v1\",\n properties: {} as unknown as SETTINGSTYPE,\n });\n }\n return super.handleErrorResponse(response);\n }\n}\n\nexport class SetAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"PUT\", AppSettings> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n private settings: AppSettings,\n ) {\n super(typedFetch, endpoint, \"PUT\", { appId: appId });\n this.setBody(JSON.stringify(settings));\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n if (scope == \"global\") {\n return new SetAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/global\",\n this.appId,\n this.settings,\n );\n } else {\n return new SetAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/user\",\n this.appId,\n this.settings,\n );\n }\n }\n}\n\nexport class ExtendAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"POST\", AppSettingsChange> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n private settings: AppSettingsChange,\n ) {\n super(typedFetch, endpoint, \"POST\", { appId: appId });\n this.setBody(JSON.stringify(settings));\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n if (scope == \"global\") {\n return new ExtendAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/global\",\n this.appId,\n this.settings,\n );\n } else {\n return new ExtendAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/user\",\n this.appId,\n this.settings,\n );\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["/build/workspace/smartdesign/smartdesign-elements/main/git/dataaccess/dist/dataaccess.cjs","../dataaccess.ts","../types/interplatform.ts","../types/restypedfetch.ts","../services/request/requestbuilder.ts","../services/response/headerutil.ts","../services/request/binaryloader.ts","../services/dataobjectservice.ts","../services/linkingservice.ts","../services/userservice.ts","../services/addressservice.ts","../services/appointmentservice.ts","../services/serverinformationservice.ts","../services/emailstoreservice.ts","../services/viewservice.ts","../services/groupservice.ts","../services/resourceservice.ts","../services/documentservice.ts","../services/settingsservice.ts"],"names":["H","Object","defineProperty","ct","getOwnPropertyDescriptor","ut","getOwnPropertyNames","dt","prototype","hasOwnProperty","It","s","e","t","get","enumerable","lt","r","i","call","yt","value","dataaccess_exports","__export","AccessRight","DatePrecision","ForeignEditPermission","HtmlFilter","TeamFilterConstant","create","module","exports","__toCommonJS","ExternalAccess","LoggedInUser","PublicRecords","TeamFilter","options","teamFilterIds","slice","role","convertToQueryParameterValue","teamFilterString","join","PRIVATE","CONFIDENTIAL","READ","DUPLICATE","READ_CHANGE_TIMES","EDIT","DELETE","IN_EFFECT","NO_ACCESS","INSERT","FULL_ACCESS","NOTHING","EXTERNAL_IMAGES","ALL_IMAGES","DANGEROUS_TAGS_AND_ATTRIBUTES","DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES","ALL","COMPLETE","NO_TIME","NO_SECONDS","NO_MILLISECONDS","NO_DATE","RestypedFetch","version","server","fetcher","path","config","proxy","post","put","delete","patch","head","camelToDash","str","replace","first","toLowerCase","letter","isBoolean","method","assign","resolvedPath","query","params","keys","forEach","prop","toString","RegExp","convert","result","Date","toJSON","Array","isArray","map","p","convertedValue","encodeURIComponent","filter","length","versionPath","indexOf","window","fetch","FetchError","status","statusText","text","Error","RequestBuilder","typedFetch","_path","_method","_parameters","_transform","response","json","then","catch","_query","_headers","setAcceptHeader","setQueryParameter","property","setBody","body","_body","accept","setHeader","setContentType","contentType","key","prepareRequest","headers","execute","_execution","ok","transformStream","data","handleErrorResponse","onfulfilled","onrejected","getETag","etag","resolution","split","Promise","resolve","reject","LocationHelper","createForPath","extract","pathParameter","getIdFromLocation","location","processedPattern","matches","exec","locationHelper","BinaryLoader","setContent","content","_binaryInfo","buffer","setContentFromArrayBuffer","setContentFromUInt8Array","uInt8Array","setContentFromBase64String","base64","binaryString","atob","len","bytes","Uint8Array","charCodeAt","setContentFromFile","file","type","fileLoaded","reader","FileReader","addEventListener","error","readAsArrayBuffer","getBinary","DEFAULT_PAGE_SIZE","DataObjectService","dataObjectNormalizer","deleteObject","gguid","DeleteObjectRequestBuilder","getObject","GetObjectRequestBuilder","getObjectList","GetFullObjectListRequestBuilder","getPartialObjectList","GetPartialObjectListRequestBuilder","getObjectListCount","GetObjectListCountRequestBuilder","saveObject","dataObject","PutObjectRequestBuilder","saveAndReturnObject","objectType","id","createObject","CreateObjectRequestBuilder","getPermissionInfo","GetPermissionInfoRequestBuilder","getPermissionInfoCount","GetPermissionInfoCountRequestBuilder","getPermissionDetails","permissionGguid","GetPermissionDetailsRequestBuilder","getObjectSchema","GetObjectSchemaRequestBuilder","getObjectDescription","GetObjectDescriptionRequestBuilder","getRecordTypeImage","GetRecordTypeImageRequestBuilder","arrayBuffer","getRecordTypeImageBlob","blob","QueryRequestBuilder","getRecentlyUsedObjectList","GetRecentlyUsedObjectListRequestBuilder","maskAsRecentlyUsedDataObject","MaskAsRecentlyUsedDataObjectRequestBuilder","getDefaultRecordImage","GetDefaultRecordImageRequestBuilder","getDefaultRecordImageAsBlob","GetDefaultRecordImageAsBlobRequestBuilder","updateDefaultRecordImage","fileExtension","PutDefaultRecordImageRequestBuilder","deleteDefaultRecordImage","DeleteDefaultRecordImageRequestBuilder","getRecordImage","GetRecordImageRequestBuilder","getRecordImageAsBlob","GetRecordImageAsBlobRequestBuilder","updateRecordImage","eTagOfRecord","PutRecordImageRequestBuilder","deleteRecordImage","DeleteRecordImageRequestBuilder","DataObjectNormalizer","normalizeDataObject","fields","normalizedDataObject","foreignEditPermission","permissions","normalizePermissions","RIGHTOWNERGGUID","ACCESSRIGHT","ROLE","dataObjectType","withMaxWidth","maxWidth","width","withMaxHeight","maxHeight","height","binaryLoader","setImageFromArrayBuffer","setImageFromUInt8Array","setImageFromBase64String","setImageFromFile","binary","_","addressGguid","dataObjectGGUID","dao","transform","JSON","stringify","ETAG","tagAsRecentlyUsed","eTag","withPreconfiguredFields","withFields","includePermissions","includeSyncrecordPermissions","includeMaxjournalid","isFavorite","isfavorite","GetObjectListRequestBuilder","forPage","page","withEntriesPerPage","entriesPerPage","withPreconfiguredTeamFilter","teamFilter","withTeamFilter","whenUpdatedAfter","updatedAfter","whenInsertedAfter","insertedAfter","withIntervalStart","intervalStart","withIntervalEnd","intervalEnd","withSearchTerm","searchTerm","search","withPreconfiguredOrderBy","orderBy","isAscending","sortOrder","push","whenLinkedTo","linkedToType","linkedTo","linkedToAttributes","setDataObject","withTemplateGguid","templateGguid","permissionGGUID","schema","properties","field","normalizeMandatoryAndOptionalFlag","mandatory","optional","normalizeMassData","unwrapped","isLegacyGwResponse","displayNames","displaynames","rows","types","includePrivateForeignrecords","forIconType","iconType","withWhereString","whereString","LinkingService","_LinkingService","linkDataObject","PostDossierRequestBuilder","deleteLink","typeOrDossierEntry","dossierentryGGUID","isDossierEntry","OBJECTTYPE1","GGUID1","DeleteLinkRequestBuilder","getDossierEntry","GetDossierEntryRequestBuilder","getDossierCount","GetDossierCountRequestBuilder","getDossier","GetDossierRequestBuilder","getPrimaryLinkParentsList","GetPrimaryParentsListRequestBuilder","dossierEntryOrGuid","withDataObject","objectType2","gguid2","withLinkAttribute","linkAttribute","attribute","withRole1","role1","withRole2","role2","withLinkDirection","linkDirection","withAdditionalField1","additionalField1","withAdditionalField2","additionalField2","forObjectTypes","objectTypes","UserService","addressService","getUser","GetUserRequestBuilder","getUserImage","user","getAddressImage","GGUIDOFADDRESSRECORD","getUserImageAsBlob","getAddressImageAsBlob","getUserCount","GetUserCountRequestBuilder","getUserList","GetFullUserListRequestBuilder","getPartialUserList","GetPartialUserListRequestBuilder","getLoggedInUser","GetLoggedInUserInfoRequestBuilder","getLoginInformation","GetLoginInformationRequestBuilder","GGUID","includePrivilegedOperations","forObjectType","withMinimumPermission","minPermission","GetUserListRequestBuilder","parameters","withDomainGuid","domainGuid","AddressService","getAddressList","GetAddressListRequestBuilder","getPartialAddressList","GetPartialAddressListRequestBuilder","GetAddressImageRequestBuilder","GetAddressImageAsBlobRequestBuilder","updateAddressImage","eTagOfAddress","PutAddressImageRequestBuilder","deleteAddressImage","DeleteAddressImageRequestBuilder","usersOnly","isUser","whenBirthdayIsOn","hasBirthdayOn","AppointmentService","getParticipantDetails","participantGGUID","GetParticipantDetailsRequestBuilder","getParticipantInfo","GetParticipantInfoRequestBuilder","getParticipantInfoCount","GetParticipantInfoCountRequestBuilder","ServerInformationService","getServerVersion","ServerVersionRequestBuilder","isGwResponse","EmailStoreService","dataObjectService","getEmail","GetEmailStoreRequestBuilder","archiveEmail","PostEmailStoreRequestBuilder","_PostEmailStoreRequestBuilder","withForeignEditPermissionRestriction","foreignEditPermissionRestriction","DEFAULT_MESSAGE_MIME_TYPE","withHtmlFilter","htmlFilter","ViewService","getViewsForType","GetViewsForTypeRequestBuilder","getViewCountForType","GetViewCountForTypeRequestBuilder","getViewDetails","viewID","GetViewForTypeRequestBuilder","getPartialItemsForView","GetPartialItemsForViewRequestBuilder","getItemsForView","GetItemsForViewRequestBuilder","getItemCountForView","GetItemCountForViewRequestBuilder","GetViewItemsRequestBuilder","forViewKind","viewKind","GroupService","getGroup","GetGroupRequestBuilder","getGroupCount","GetGroupCountRequestBuilder","getGroupList","GetFullGroupListRequestBuilder","getPartialGroupList","GetPartialGroupListRequestBuilder","GetGroupListRequestBuilder","ResourceService","getResource","GetResourceRequestBuilder","getResourceCount","GetResourceCountRequestBuilder","getResourceList","GetFullResourceListRequestBuilder","getPartialResourceList","GetPartialResourceListRequestBuilder","guid","GetResourceListRequestBuilder","DocumentService","createDocument","PostDocumentRequestBuilder","getDocument","GetDocumentRequestBuilder","uploadDocument","PutDocumentRequestBuilder","withReadOnlyInterest","readOnlyInterest","readOnly","withVersion","keepCheckedOut","createNewVersion","withVersionComment","versionComment","SettingsService","getSchemaList","GetSchemaListRequestBuilder","getSchema","appId","GetSchemaRequestBuilder","getAppSettings","GetAppSettingsRequestBuilder","setAppSettings","settings","SetAppSettingsRequestBuilder","_apiVersion","changeAppSettings","ExtendAppSettingsRequestBuilder","removedProperties","_GetAppSettingsRequestBuilder","endpoint","withScope","scope","_SetAppSettingsRequestBuilder","_ExtendAppSettingsRequestBuilder","ServiceRegistry","fetchHolder","api","linkingService","userService","appointmentService","serverInformationService","emailStoreService","viewService","groupService","resourceService","documentService","settingsService","serverType"],"mappings":"+iFAAA,IAAIA,EAAEC,OAAOC,cAAc,CAAC,IAAIC,EAAGF,OAAOG,wBAAwB,CAAC,IAAIC,EAAGJ,OAAOK,mBAAmB,CAAC,IAAIC,EAAGN,OAAOO,SAAS,CAACC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EACzD,IAAA,CAAKI,wBAAA,CAA2B,IAAIhG,GAAyB,IAAA,CAAK4F,GAAG,EACrE,IAAA,CAAKK,iBAAA,CAAoB,IAAI7F,GAAkB,IAAA,CAAKwF,GAAA,CAAK,IAAA,CAAKvF,iBAAiB,EAC/E,IAAA,CAAK6F,WAAA,CAAc,IAAIlF,GAAY,IAAA,CAAK4E,GAAG,EAC3C,IAAA,CAAKO,YAAA,CAAe,IAAIlE,GAAa,IAAA,CAAK2D,GAAG,EAC7C,IAAA,CAAKQ,eAAA,CAAkB,IAAIzD,GAAgB,IAAA,CAAKiD,GAAG,EACnD,IAAA,CAAKS,eAAA,CAAkB,IAAI/C,GAAgB,IAAA,CAAKsC,GAAA,CAAK,IAAA,CAAKvF,iBAAiB,EAC3E,IAAA,CAAKiG,eAAA,CAAkB,IAAIjC,GAAgB,IAAA,CAAKuB,GAAG,GAsEpD,SAASjf,GACZif,CAAAA,MACA3c,EAAAA,uDAAmB,MACnBsd,EAAAA,uDAAqB,SAErB,OAAO,IAAIb,GAAgEE,EAAK3c,EAASsd,EAC7F,CAAA,GAAA3f,CAAAA,OAAAC,OAAA,CAAA,CAAAP,YAAAA,YAAAC,cAAAA,cAAAC,sBAAAA,sBAAAC,WAAAA,WAAAC,mBAAAA,mBAAAC,OAAAA,MAAA,CAAA","sourcesContent":["var H=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var It=(s,e)=>{for(var t in e)H(s,t,{get:e[t],enumerable:!0})},lt=(s,e,t,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of ut(e))!dt.call(s,i)&&i!==t&&H(s,i,{get:()=>e[i],enumerable:!(r=ct(e,i))||r.enumerable});return s};var yt=s=>lt(H({},\"__esModule\",{value:!0}),s);var Pt={};It(Pt,{AccessRight:()=>W,DatePrecision:()=>z,ForeignEditPermission:()=>P,HtmlFilter:()=>J,TeamFilterConstant:()=>Y,create:()=>ht});module.exports=yt(Pt);var Y=(r=>(r.ExternalAccess=\"CASExternalAccess\",r.LoggedInUser=\"CASLoggedInUser\",r.PublicRecords=\"CASPublicRecords\",r))(Y||{}),h=class{constructor(e){this.teamFilterIds=[];e&&(this.teamFilterIds=e.teamFilterIds.slice(),this.role=e.role)}convertToQueryParameterValue(){let e=this.teamFilterIds.join(\",\");return this.role&&(e+=`;${this.role}`),e}},P=(p=>(p[p.PRIVATE=-1]=\"PRIVATE\",p[p.CONFIDENTIAL=0]=\"CONFIDENTIAL\",p[p.READ=64]=\"READ\",p[p.DUPLICATE=256]=\"DUPLICATE\",p[p.READ_CHANGE_TIMES=512]=\"READ_CHANGE_TIMES\",p[p.EDIT=2048]=\"EDIT\",p[p.DELETE=8192]=\"DELETE\",p[p.IN_EFFECT=65535]=\"IN_EFFECT\",p))(P||{}),W=(p=>(p[p.NO_ACCESS=0]=\"NO_ACCESS\",p[p.READ=64]=\"READ\",p[p.INSERT=128]=\"INSERT\",p[p.DUPLICATE=256]=\"DUPLICATE\",p[p.READ_CHANGE_TIMES=512]=\"READ_CHANGE_TIMES\",p[p.EDIT=2048]=\"EDIT\",p[p.DELETE=8192]=\"DELETE\",p[p.FULL_ACCESS=32768]=\"FULL_ACCESS\",p))(W||{}),J=(o=>(o[o.NOTHING=0]=\"NOTHING\",o[o.EXTERNAL_IMAGES=1]=\"EXTERNAL_IMAGES\",o[o.ALL_IMAGES=2]=\"ALL_IMAGES\",o[o.DANGEROUS_TAGS_AND_ATTRIBUTES=4]=\"DANGEROUS_TAGS_AND_ATTRIBUTES\",o[o.DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES=8]=\"DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES\",o[o.ALL=2147483647]=\"ALL\",o))(J||{});var z=(n=>(n[n.COMPLETE=2048]=\"COMPLETE\",n[n.NO_TIME=512]=\"NO_TIME\",n[n.NO_SECONDS=64]=\"NO_SECONDS\",n[n.NO_MILLISECONDS=0]=\"NO_MILLISECONDS\",n[n.NO_DATE=4096]=\"NO_DATE\",n))(z||{});var g=class{constructor(e=\"6.0\",t=\"common\",r){this.version=e;this.server=t;this.fetcher=r}get(e,t){return this.proxy(e,\"GET\",t)}post(e,t){return this.proxy(e,\"POST\",t)}put(e,t){return this.proxy(e,\"PUT\",t)}delete(e,t){return this.proxy(e,\"DELETE\",t)}patch(e,t){return this.proxy(e,\"PATCH\",t)}options(e,t){return this.proxy(e,\"OPTIONS\",t)}head(e,t){return this.proxy(e,\"HEAD\",t)}camelToDash(e){return e.replace(/(^[A-Z])/,t=>t.toLowerCase()).replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}isBoolean(e){return e===!0||e===!1}proxy(e,t,r){r=Object.assign({},r||{},{method:t});let i=e,n=\"\";r.params&&Object.keys(r.params).forEach(c=>{i=i.toString().replace(new RegExp(\":\"+c,\"g\"),r.params[c])});let o=c=>{let I;return c instanceof h?I=c.convertToQueryParameterValue():c instanceof Date?I=c.toJSON():Array.isArray(c)?I=c.map(O=>o(O)).join(\",\"):this.isBoolean(c)?I=c?\"true\":\"false\":I=c,I};r.query&&(n=Object.keys(r.query).map(c=>{let I=r.query[c],O=o(I);return O==null?null:`${this.camelToDash(c)}=${encodeURIComponent(O)}`}).filter(c=>c!=null).join(\"&\"),n.length>0&&(n=\"?\"+n));let p=(this.version.indexOf(\"v\")===0?\"\":\"v\")+this.version;return(this.fetcher||window).fetch(p+i+n,r)}};var b=class extends Error{constructor(t,r,i=null){super(\"Server returned non ok response.\");this.status=t;this.statusText=r;this.text=i}},a=class{constructor(e,t,r=\"GET\",i={},n=o=>o.json().then(p=>p).catch(p=>({}))){this.typedFetch=e;this._path=t;this._method=r;this._parameters=i;this._transform=n;this._query={};this._headers={};this.setAcceptHeader(\"application/json\")}setQueryParameter(e,t){return this._query[e]=t,this}setBody(e){return this._body=e,this}setAcceptHeader(e){return this.setHeader(\"Accept\",e)}setContentType(e){return this.setHeader(\"Content-Type\",e)}setHeader(e,t){return this._headers[e]=t,this}prepareRequest(){return this.typedFetch.proxy(this._path,this._method,{query:this._query,params:this._parameters,body:this._body,headers:this._headers})}execute(){return this._execution?this._execution:(this._execution=this.prepareRequest().then(e=>e.ok?this.transformStream(e).then(t=>({headers:e.headers,data:t})):this.handleErrorResponse(e).then(t=>({headers:e.headers,data:t}))),this._execution)}then(e,t){return this.execute().then(e,t)}catch(e){return this.execute().then(null,e)}transformStream(e){return this._transform(e)}handleErrorResponse(e){return e.text().catch(()=>{throw new b(e.status,e.statusText)}).then(t=>{throw new b(e.status,e.statusText,t)})}};var R=s=>{let e=s.headers.get(\"etag\"),t;return e?(e=`\"${e.replace(/\"/g,\"\").split(\"--\")[0]}\"`,t=Promise.resolve(e)):t=Promise.reject(new Error(\"ETag header not found\")),t},K=class{createForPath(e){return{extract:(r,i)=>this.getIdFromLocation(r,e,i)}}getIdFromLocation(e,t,r){let i,n=e.headers.get(\"location\")||\"\";if(n!=null&&n.length>0){let o=t.toString().replace(\":\"+r,\"([^/]+)\").replace(/:([^/]+)(\\/?)/g,\"[^/]+$2\").replace(/\\//g,\"\\\\/\");o=\".*\"+o;let d=new RegExp(o).exec(n);d&&d.length>0?i=Promise.resolve(d[1]):i=Promise.reject(new Error(`Location header (${n}) did not matches the given pattern ${t.toString()}!`))}else i=Promise.reject(new Error(\"Location header not found!\"));return i}},l=new K;var u=class{setContent(e,t){this._binaryInfo=Promise.resolve({buffer:t,contentType:e})}setContentFromArrayBuffer(e,t){this._binaryInfo=Promise.resolve({buffer:t,contentType:e})}setContentFromUInt8Array(e,t){this.setContentFromArrayBuffer(e,t.buffer)}setContentFromBase64String(e,t){let r=window.atob(t),i=r.length,n=new Uint8Array(i);for(let o=0;o<i;o++)n[o]=r.charCodeAt(o);this.setContentFromUInt8Array(e,n)}setContentFromFile(e,t=e.type){let r=new Promise((i,n)=>{let o=new FileReader;o.addEventListener(\"loadend\",()=>{i(o.result)}),o.addEventListener(\"error\",()=>{n(o.error)}),o.readAsArrayBuffer(e)});this._binaryInfo=r.then(i=>({buffer:i,contentType:t}))}getBinary(){return this._binaryInfo?this._binaryInfo:Promise.reject(new Error(\"No binary was configured!\"))}};var pt=100,F=class{constructor(e,t){this.typedFetch=e;this.dataObjectNormalizer=t}deleteObject(e,t){return new ae(this.typedFetch,e,t)}getObject(e,t){return new f(this.typedFetch,e,t)}getObjectList(e){return new m(this.typedFetch,e)}getPartialObjectList(e){return new T(this.typedFetch,e)}getObjectListCount(e){return new ne(this.typedFetch,e)}saveObject(e){return new G(this.typedFetch,this.dataObjectNormalizer,e,()=>Promise.resolve())}saveAndReturnObject(e){return new G(this.typedFetch,this.dataObjectNormalizer,e,()=>this.getObject(e.objectType,e.id).then(t=>t.data))}createObject(e){return new oe(this.typedFetch,this.dataObjectNormalizer,e)}getPermissionInfo(e,t){return new ce(this.typedFetch,e,t)}getPermissionInfoCount(e,t){return new ue(this.typedFetch,e,t)}getPermissionDetails(e,t,r){return new pe(this.typedFetch,e,t,r)}getObjectSchema(e){return new de(this.typedFetch,e)}getObjectDescription(e){return new Ie(this.typedFetch,e)}getRecordTypeImage(e){return new L(this.typedFetch,e,t=>t.arrayBuffer())}getRecordTypeImageBlob(e){return new L(this.typedFetch,e,t=>t.blob())}query(e){return new le(this.typedFetch,e)}getRecentlyUsedObjectList(e){return new ye(this.typedFetch,e)}maskAsRecentlyUsedDataObject(e,t){return new he(this.typedFetch,e,t)}getDefaultRecordImage(e){return new $(this.typedFetch,e)}getDefaultRecordImageAsBlob(e){return new X(this.typedFetch,e)}updateDefaultRecordImage(e,t){return new ee(this.typedFetch,e,t)}deleteDefaultRecordImage(e){return new Z(this.typedFetch,e)}getRecordImage(e,t){return new te(this.typedFetch,e,t)}getRecordImageAsBlob(e,t){return new re(this.typedFetch,e,t)}updateRecordImage(e,t,r,i){return new ie(this.typedFetch,e,t,r,i)}deleteRecordImage(e,t){return new se(this.typedFetch,e,t)}},A=class{normalizeDataObject(e){e=e||{fields:{}};let t={fields:e.fields||{},foreignEditPermission:e.foreignEditPermission==null?-1:e.foreignEditPermission};return e.permissions&&(t.permissions=this.normalizePermissions(e.permissions)),t}normalizePermissions(e){return e.map(t=>({RIGHTOWNERGGUID:t.RIGHTOWNERGGUID,ACCESSRIGHT:t.ACCESSRIGHT,ROLE:t.ROLE}))}},$=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/image/default\",\"GET\",{dataObjectType:t},r=>r.arrayBuffer()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.height=e,this}},X=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/image/default\",\"GET\",{dataObjectType:t},r=>r.blob()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.height=e,this}},Z=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/image/default\",\"DELETE\",{dataObjectType:t})}},ee=class extends a{constructor(t,r,i){super(t,\"/type/:dataObjectType/image/default\",\"PUT\",{dataObjectType:r});this.fileExtension=i;this.binaryLoader=new u}setImageFromArrayBuffer(t,r){return this.binaryLoader.setContentFromArrayBuffer(t,r),this}setImageFromUInt8Array(t,r){return this.binaryLoader.setContentFromUInt8Array(t,r),this}setImageFromBase64String(t,r){return this.binaryLoader.setContentFromBase64String(t,r),this}setImageFromFile(t,r=t.type){return this.binaryLoader.setContentFromFile(t,r),this}execute(){return this.binaryLoader.getBinary().then(t=>{this.setContentType(t.contentType),this.setHeader(\"CAS-FILE-EXTENSION\",this.fileExtension),this.setBody(t.buffer)}).then(t=>super.execute())}},te=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/image\",\"GET\",{dataObjectType:t,dataObjectGGUID:r},i=>i.arrayBuffer()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.height=e,this}},re=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/image\",\"GET\",{dataObjectType:t,dataObjectGGUID:r},i=>i.blob()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.width=e,this}},se=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/image\",\"DELETE\",{dataObjectType:t,dataObjectGGUID:r})}},ie=class extends a{constructor(t,r,i,n,o){super(t,\"/type/:dataObjectType/:dataObjectGGUID/image\",\"PUT\",{dataObjectType:r,dataObjectGGUID:i});this.eTagOfRecord=n;this.fileExtension=o;this.binaryLoader=new u}setImageFromArrayBuffer(t,r){return this.binaryLoader.setContentFromArrayBuffer(t,r),this}setImageFromUInt8Array(t,r){return this.binaryLoader.setContentFromUInt8Array(t,r),this}setImageFromBase64String(t,r){return this.binaryLoader.setContentFromBase64String(t,r),this}setImageFromFile(t,r=t.type){return this.binaryLoader.setContentFromFile(t,r),this}execute(){return this.binaryLoader.getBinary().then(t=>{this.setHeader(\"IF-MATCH\",this.eTagOfRecord),this.setHeader(\"CAS-FILE-EXTENSION\",this.fileExtension),this.setContentType(t.contentType),this.setBody(t.buffer)}).then(t=>super.execute())}},G=class extends a{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"PUT\",{dataObjectType:r.objectType,dataObjectGGUID:r.id},i),this.setBody(JSON.stringify(t.normalizeDataObject(r))),this.setHeader(\"IF-MATCH\",r.ETAG),this.setContentType(\"application/json\")}tagAsRecentlyUsed(e=!0){return this._query.tagAsRecentlyUsed=e,this}},ae=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"DELETE\",{dataObjectType:t,dataObjectGGUID:r})}},f=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r},i=>i.json().then(n=>R(i).then(o=>n.ETAG=o).then(()=>n,()=>n)))}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePermissions(e=!0){return this._query.includePermissions=e,this}includeSyncrecordPermissions(e=!0){return this._query.includeSyncrecordPermissions=e,this}tagAsRecentlyUsed(e=!0){return this._query.tagAsRecentlyUsed=e,this}includeMaxjournalid(e=!0){return this._query.includeMaxjournalid=e,this}isFavorite(e=!0){return this._query.isfavorite=e,this}},D=class extends a{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}withPreconfiguredTeamFilter(e){return this._query.teamFilter=e,this}withTeamFilter(e){return this._query.teamFilter=new h(e),this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}withPreconfiguredOrderBy(e){return this._query.orderBy=e,this}orderBy(e,t=!0){let r=t?\"ASC\":\"DESC\";return this._query.orderBy=this._query.orderBy||[],this._query.orderBy.push(`${e} ${r}`),this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},m=class extends D{constructor(e,t){super(e,\"/type/:dataObjectType/full\",\"GET\",{dataObjectType:t}),this.withEntriesPerPage(pt)}},T=class extends D{constructor(e,t){super(e,\"/type/:dataObjectType/list\",\"GET\",{dataObjectType:t}),this.withEntriesPerPage(pt)}},ne=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/count\",\"GET\",{dataObjectType:t})}withPreconfiguredTeamFilter(e){return this._query.teamFilter=e,this}withTeamFilter(e){return this._query.teamFilter=new h(e),this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},oe=class extends a{constructor(t,r,i){super(t,\"/type/:dataObjectType\",\"POST\",{dataObjectType:i},n=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(n,\"dataObjectGGUID\").then(o=>new f(t,i,o).then(d=>d.data)));this.dataObjectNormalizer=r;this.setDataObject({objectType:i,fields:{}})}withTemplateGguid(t){return this._query.templateGguid=t,this}tagAsRecentlyUsed(t=!0){return this._query.tagAsRecentlyUsed=t,this}setDataObject(t){return this.setBody(JSON.stringify(this.dataObjectNormalizer.normalizeDataObject(t))),this}},pe=class extends a{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r,permissionGGUID:i})}},ce=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/full\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},ue=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/permission/count\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},de=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/schema\",\"GET\",{dataObjectType:t},r=>r.json().then(i=>(Object.keys(i.properties.fields).map(n=>i.properties.fields[n]).forEach(n=>this.normalizeMandatoryAndOptionalFlag(n)),i)))}normalizeMandatoryAndOptionalFlag(e){return e.mandatory==null&&(e.mandatory=!e.optional),e.optional==null&&(e.optional=!e.mandatory),e}},Ie=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/description\",\"GET\",{dataObjectType:t})}},le=class extends a{constructor(e,t){super(e,\"/query\",\"POST\",{},r=>r.json().catch(()=>null).then(i=>this.normalizeMassData(i))),this.setBody(JSON.stringify({query:t}))}normalizeMassData(e){let t=null;return this.isLegacyGwResponse(e)?e.length>0&&(t=e[0]):t=e,t==null&&(t={}),{displayNames:t.displayNames||t.displaynames||{},rows:t.rows||[],types:t.types||{}}}isLegacyGwResponse(e){return Array.isArray(e)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}includePrivateForeignrecords(e){return this._query.includePrivateForeignrecords=e,this}},L=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/image\",\"GET\",{dataObjectType:t},r),this.setAcceptHeader(\"image/*\")}forIconType(e){return this._query.iconType=e,this}},ye=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/recent/list\",\"GET\",{dataObjectType:t})}withFields(e){return this._query.fields=e,this}withWhereString(e){return this._query.whereString=e,this}},he=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/recent\",\"POST\",{dataObjectType:t,dataObjectGGUID:r})}};var S=class s{constructor(e){this.typedFetch=e}linkDataObject(e,t){return new Pe(this.typedFetch,e,t)}deleteLink(e,t,r){let i;return s.isDossierEntry(e)?(i=e.fields.OBJECTTYPE1,t=e.fields.GGUID1,r=e.id):i=e,new Oe(this.typedFetch,i,t,r)}getDossierEntry(e,t,r){return new M(this.typedFetch,e,t,r)}getDossierCount(e,t){return new me(this.typedFetch,e,t)}getDossier(e,t){return new Te(this.typedFetch,e,t)}getPrimaryLinkParentsList(e,t){return new ge(this.typedFetch,e,t)}static isDossierEntry(e){return e&&e.id!=null}},Pe=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier\",\"POST\",{dataObjectGGUID:r,dataObjectType:t},i=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\").extract(i,\"dossierentryGGUID\").then(n=>new M(e,t,r,n).then(o=>o.data)))}withDataObject(e,t){return this._query.objectType2=e,this._query.gguid2=t,this}withLinkAttribute(e){return this._query.attribute=e,this}withRole1(e){return this._query.role1=e,this}withRole2(e){return this._query.role2=e,this}withLinkDirection(e){return this._query.linkDirection=e,this}withAdditionalField1(e){return this._query.additionalField1=e,this}withAdditionalField2(e){return this._query.additionalField2=e,this}},M=class extends a{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\"GET\",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:i},n=>n.json().then(o=>R(n).then(d=>o.ETAG=d).then(()=>o,()=>o)))}},me=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/count\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}},Te=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/full\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}forObjectTypes(e){return this._query.objectTypes=e,this}},Oe=class extends a{constructor(e,t,r,i){super(e,\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\"DELETE\",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:i})}},ge=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\",\"GET\",{dataObjectType:t,dataObjectGGUID:r})}};var E=class{constructor(e,t){this.typedFetch=e;this.addressService=t}getUser(e){return new be(this.typedFetch,e)}getUserImage(e){return this.addressService.getAddressImage(e.fields.GGUIDOFADDRESSRECORD)}getUserImageAsBlob(e){return this.addressService.getAddressImageAsBlob(e.fields.GGUIDOFADDRESSRECORD)}getUserCount(){return new Re(this.typedFetch)}getUserList(){return new Fe(this.typedFetch)}getPartialUserList(){return new Ae(this.typedFetch)}getLoggedInUser(){return new Ge(this.typedFetch)}getLoginInformation(){return new fe(this.typedFetch)}},be=class extends a{constructor(e,t){super(e,\"/user/:GGUID\",\"GET\",{GGUID:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePrivilegedOperations(e=!0){return this._query.includePrivilegedOperations=e,this}},Re=class extends a{constructor(e){super(e,\"/user/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},x=class extends a{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},Fe=class extends x{constructor(e){super(e,\"/user/full\")}},Ae=class extends x{constructor(e){super(e,\"/user/list\")}},Ge=class extends a{constructor(e){super(e,\"/user/self\")}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}includePrivilegedOperations(e=!0){return this._query.includePrivilegedOperations=e,this}},fe=class extends a{constructor(e){super(e,\"/user/self/logininformation\")}};var j=class{constructor(e){this.typedFetch=e}getAddressList(){return new Ee(this.typedFetch,\"address\")}getPartialAddressList(){return new xe(this.typedFetch,\"address\")}getAddressImage(e){return new De(this.typedFetch,e)}getAddressImageAsBlob(e){return new Le(this.typedFetch,e)}updateAddressImage(e,t){return new Me(this.typedFetch,e,t)}deleteAddressImage(e){return new Se(this.typedFetch,e)}},De=class extends a{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.maxWidth=e,this}withMaxHeight(e){return this._query.maxHeight=e,this}},Le=class extends a{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"GET\",{dataObjectGGUID:t},r=>r.blob()),this.setAcceptHeader(\"image/*\")}withMaxWidth(e){return this._query.maxWidth=e,this}withMaxHeight(e){return this._query.maxHeight=e,this}},Se=class extends a{constructor(e,t){super(e,\"/type/address/:dataObjectGGUID/image\",\"DELETE\",{dataObjectGGUID:t})}},Me=class extends a{constructor(e,t,r){super(e,\"/type/address/:dataObjectGGUID/image\",\"PUT\",{dataObjectGGUID:t}),this.setHeader(\"IF-MATCH\",r),this.binaryLoader=new u}setImageFromArrayBuffer(e,t){return this.binaryLoader.setContentFromArrayBuffer(e,t),this}setImageFromUInt8Array(e,t){return this.binaryLoader.setContentFromUInt8Array(e,t),this}setImageFromBase64String(e,t){return this.binaryLoader.setContentFromBase64String(e,t),this}setImageFromFile(e,t=e.type){return this.binaryLoader.setContentFromFile(e,t),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}},Ee=class extends m{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}},xe=class extends T{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}};var U=class{constructor(e){this.typedFetch=e}getParticipantDetails(e,t){return new je(this.typedFetch,e,t)}getParticipantInfo(e){return new Ue(this.typedFetch,e)}getParticipantInfoCount(e){return new ve(this.typedFetch,e)}},je=class extends a{constructor(e,t,r){super(e,\"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\",\"GET\",{dataObjectGGUID:t,participantGGUID:r})}},Ue=class extends a{constructor(e,t){super(e,\"/type/appointment/:dataObjectGGUID/participant/full\",\"GET\",{dataObjectGGUID:t})}},ve=class extends a{constructor(e,t){super(e,\"/type/appointment/:dataObjectGGUID/participant/count\",\"GET\",{dataObjectGGUID:t})}};var v=class{constructor(e){this.typedFetch=e}getServerVersion(){return new we(this.typedFetch)}},we=class extends a{constructor(e){super(e,\"/version/server\",\"GET\",{},t=>t.json().then(r=>this.isGwResponse(r)?r.fields:r))}isGwResponse(e){return e.fields!=null}};var w=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}getEmail(e){return new Be(this.typedFetch,e)}archiveEmail(){return new qe(this.typedFetch,this.dataObjectService)}},y=class y extends a{constructor(e,t){super(e,\"/type/emailstore/file\",\"POST\",{},r=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(r,\"dataObjectGGUID\").then(i=>t.getObject(\"EMAILSTORE\",i).then(n=>n.data))),this.setHeader(\"EXPECT\",\"100-continue\"),this.withForeignEditPermissionRestriction(-1),this.binaryLoader=new u}withForeignEditPermissionRestriction(e){return this._query.foreignEditPermissionRestriction=e,this}setContentFromArrayBuffer(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromArrayBuffer(t,e),this}setContentFromUInt8Array(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromUInt8Array(t,e),this}setContentFromBase64String(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromBase64String(t,e),this}setContentFromFile(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContentFromFile(e,t),this}setContent(e,t=y.DEFAULT_MESSAGE_MIME_TYPE){return this.binaryLoader.setContent(t,e),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}};y.DEFAULT_MESSAGE_MIME_TYPE=\"message/rfc822\";var qe=y,Be=class extends a{constructor(e,t){super(e,\"/type/emailstore/:dataObjectGGUID/file\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.setAcceptHeader(\"*/*\")}withHtmlFilter(e){return this._query.htmlFilter=e,this}};var q=class{constructor(e){this.typedFetch=e}getViewsForType(e){return new _e(this.typedFetch,e)}getViewCountForType(e){return new Ce(this.typedFetch,e)}getViewDetails(e,t){return new Ne(this.typedFetch,e,t)}getPartialItemsForView(e,t){return new Qe(this.typedFetch,e,t)}getItemsForView(e,t){return new Ve(this.typedFetch,e,t)}getItemCountForView(e,t){return new ke(this.typedFetch,e,t)}},B=class extends a{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}withPreconfiguredOrderBy(e){return this._query.orderBy=e,this}orderBy(e,t=!0){let r=t?\"ASC\":\"DESC\";return this._query.orderBy=this._query.orderBy||[],this._query.orderBy.push(`${e} ${r}`),this}whenLinkedTo(e,t,r){return this._query.linkedToType=e,this._query.linkedTo=t,this._query.linkedToAttributes=r,this}},_e=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/view/list\",\"GET\",{dataObjectType:t})}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}forViewKind(e){return this._query.viewKind=e,this}},Ce=class extends a{constructor(e,t){super(e,\"/type/:dataObjectType/view/count\",\"GET\",{dataObjectType:t})}},Ne=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID\",\"GET\",{dataObjectType:t,viewID:r})}},Qe=class extends B{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/list\",\"GET\",{dataObjectType:t,viewID:r})}},Ve=class extends B{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/full\",\"GET\",{dataObjectType:t,viewID:r})}},ke=class extends a{constructor(e,t,r){super(e,\"/type/:dataObjectType/view/:viewID/count\",\"GET\",{dataObjectType:t,viewID:r})}whenUpdatedAfter(e){return this._query.updatedAfter=e,this}whenInsertedAfter(e){return this._query.insertedAfter=e,this}withIntervalStart(e){return this._query.intervalStart=e,this}withIntervalEnd(e){return this._query.intervalEnd=e,this}withSearchTerm(e){return this._query.search=e,this}};var _=class{constructor(e){this.typedFetch=e}getGroup(e){return new He(this.typedFetch,e)}getGroupCount(){return new Ye(this.typedFetch)}getGroupList(){return new We(this.typedFetch)}getPartialGroupList(){return new Je(this.typedFetch)}},He=class extends a{constructor(e,t){super(e,\"/group/:GGUID\",\"GET\",{GGUID:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}},Ye=class extends a{constructor(e){super(e,\"/group/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},C=class extends a{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},We=class extends C{constructor(e){super(e,\"/group/full\")}},Je=class extends C{constructor(e){super(e,\"/group/list\")}};var N=class{constructor(e){this.typedFetch=e}getResource(e){return new ze(this.typedFetch,e)}getResourceCount(){return new Ke(this.typedFetch)}getResourceList(){return new $e(this.typedFetch)}getPartialResourceList(){return new Xe(this.typedFetch)}},ze=class extends a{constructor(e,t){super(e,\"/resource/:guid\",\"GET\",{guid:t})}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}},Ke=class extends a{constructor(e){super(e,\"/resource/count\")}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}},Q=class extends a{constructor(e,t,r=\"GET\",i={}){super(e,t,r,i)}forPage(e){return this._query.page=e,this}withEntriesPerPage(e){return this._query.entriesPerPage=e,this}withPreconfiguredFields(e){return this._query.fields=e,this}withFields(e){return this._query.fields=e,this}forObjectType(e){return this._query.objectType=e,this}withMinimumPermission(e){return this._query.minPermission=e,this}withDomainGuid(e){return this._query.domainGuid=e,this}},$e=class extends Q{constructor(e){super(e,\"/resource/full\")}},Xe=class extends Q{constructor(e){super(e,\"/resource/list\")}};var V=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}createDocument(){return new Ze(this.typedFetch,this.dataObjectService)}getDocument(e){return new et(this.typedFetch,e)}uploadDocument(e,t,r){return new tt(this.typedFetch,e,t,r)}},Ze=class extends a{constructor(e,t){super(e,\"/type/document/file\",\"POST\",{},r=>l.createForPath(\"/type/:dataObjectType/:dataObjectGGUID\").extract(r,\"dataObjectGGUID\").then(i=>t.getObject(\"DOCUMENT\",i).then(n=>n.data))),this.binaryLoader=new u}setContentFromArrayBuffer(e,t){return this.binaryLoader.setContentFromArrayBuffer(e,t),this}setContentFromUInt8Array(e,t){return this.binaryLoader.setContentFromUInt8Array(e,t),this}setContentFromBase64String(e,t){return this.binaryLoader.setContentFromBase64String(e,t),this}setContentFromFile(e,t=e.type){return this.binaryLoader.setContentFromFile(e,t),this}execute(){return this.binaryLoader.getBinary().then(e=>{this.setContentType(e.contentType),this.setBody(e.buffer)}).then(e=>super.execute())}},et=class extends a{constructor(e,t){super(e,\"/type/document/:dataObjectGGUID/file\",\"GET\",{dataObjectGGUID:t},r=>r.arrayBuffer()),this.withReadOnlyInterest(),this.setAcceptHeader(\"*/*\")}withReadOnlyInterest(e=!0){return this._query.readOnly=e,this}withVersion(e){return this._query.version=e,this}},tt=class extends a{constructor(t,r,i,n){super(t,\"/type/document/:dataObjectGGUID/file\",\"PUT\",{dataObjectGGUID:r});this.eTagOfRecord=i;this.fileExtension=n;this.binaryLoader=new u}setContentFromArrayBuffer(t,r){return this.binaryLoader.setContentFromArrayBuffer(t,r),this}setContentFromUInt8Array(t,r){return this.binaryLoader.setContentFromUInt8Array(t,r),this}setContentFromBase64String(t,r){return this.binaryLoader.setContentFromBase64String(t,r),this}setContentFromFile(t,r=t.type){return this.binaryLoader.setContentFromFile(t,r),this}execute(){return this.binaryLoader.getBinary().then(t=>{this.setHeader(\"IF-MATCH\",this.eTagOfRecord),this.setHeader(\"CAS-FILE-EXTENSION\",this.fileExtension),this.setContentType(t.contentType),this.setBody(t.buffer)}).then(t=>super.execute())}keepCheckedOut(t=!0){return this._query.keepCheckedOut=t,this}createNewVersion(t=!0){return this._query.createNewVersion=t,this}withVersionComment(t){return this._query.versionComment=t,this}};var k=class{constructor(e){this.typedFetch=e}getSchemaList(){return new rt(this.typedFetch)}getSchema(e){return new st(this.typedFetch,e)}getAppSettings(e){return new it(this.typedFetch,\"/settings/app/:appId\",e)}setAppSettings(e,t){return new at(this.typedFetch,\"/settings/app/:appId/user\",e,{_apiVersion:\"v1\",properties:t??{}})}changeAppSettings(e,t){return new nt(this.typedFetch,\"/settings/app/:appId/user\",e,{_apiVersion:\"v1\",properties:t??{},removedProperties:Object.keys(t).filter(r=>typeof t[r]>\"u\")})}},rt=class extends a{constructor(e){super(e,\"/settings/app/list\",\"GET\")}},st=class extends a{constructor(e,t){super(e,\"/settings/app/:appId/schema\",\"GET\",{appId:t})}handleErrorResponse(e){return e.status==404?Promise.resolve({_apiVersion:\"v1\",properties:{}}):super.handleErrorResponse(e)}},it=class s extends a{constructor(t,r,i){super(t,r,\"GET\",{appId:i});this.appId=i}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId)}handleErrorResponse(t){return t.status==404?Promise.resolve({_apiVersion:\"v1\",properties:{}}):super.handleErrorResponse(t)}},at=class s extends a{constructor(t,r,i,n){super(t,r,\"PUT\",{appId:i});this.appId=i;this.settings=n;this.setBody(JSON.stringify(n))}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId,this.settings):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId,this.settings)}},nt=class s extends a{constructor(t,r,i,n){super(t,r,\"POST\",{appId:i});this.appId=i;this.settings=n;this.setBody(JSON.stringify(n))}withScope(t){return t==\"global\"?new s(this.typedFetch,\"/settings/app/:appId/global\",this.appId,this.settings):new s(this.typedFetch,\"/settings/app/:appId/user\",this.appId,this.settings)}};var ot=class{constructor(e,t,r){this.api=new g(t,r,e),this.dataObjectService=new F(this.api,new A),this.linkingService=new S(this.api),this.addressService=new j(this.api),this.userService=new E(this.api,this.addressService),this.appointmentService=new U(this.api),this.serverInformationService=new v(this.api),this.emailStoreService=new w(this.api,this.dataObjectService),this.viewService=new q(this.api),this.groupService=new _(this.api),this.resourceService=new N(this.api),this.documentService=new V(this.api,this.dataObjectService),this.settingsService=new k(this.api)}};function ht(s,e=\"6.0\",t=\"common\"){return new ot(s,e,t)}0&&(module.exports={AccessRight,DatePrecision,ForeignEditPermission,HtmlFilter,TeamFilterConstant,create});\n","import { RestypedFetch, IFetchWrapper } from \"./types/restypedfetch\";\nimport { IDataObjectImagePart, IDataObjectTypeIconPart, IInterPlatform } from \"./types/interplatform\";\nimport { DataObjectService, IDataObjectService, DataObjectNormalizer } from \"./services/dataobjectservice\";\nimport { LinkingService, ILinkingService } from \"./services/linkingservice\";\nimport { UserService, IUserService } from \"./services/userservice\";\nimport { AddressService, IAddressService } from \"./services/addressservice\";\nimport { AppointmentService, IAppointmentService } from \"./services/appointmentservice\";\nimport { ServerInformationService, IServerInformationService } from \"./services/serverinformationservice\";\nimport { EmailStoreService, IEmailStoreService } from \"./services/emailstoreservice\";\nimport { ViewService, IViewService } from \"./services/viewservice\";\nimport { GroupService, IGroupService } from \"./services/groupservice\";\nimport { IResourceService, ResourceService } from \"./services/resourceservice\";\nimport { IDocumentService, DocumentService } from \"./services/documentservice\";\nimport { ServerType, APIVersion, IAPIVersions } from \"./types/api\";\nimport { ISettingsService, SettingsService } from \"./services/settingsservice\";\n\nexport type * from \"./types/api\";\nexport type * from \"./types/appsettings\";\nexport {\n AccessRight,\n DatePrecision,\n ForeignEditPermission,\n HtmlFilter,\n TeamFilterConstant,\n} from \"./types/interplatform\";\nexport type * from \"./types/interplatform\";\nexport type * from \"./types/interplatform6\";\nexport type * from \"./types/interplatform7\";\nexport type * from \"./types/restyped\";\nexport type * from \"./types/restypedfetch\";\n\nexport type { Methods, FetchError, IAPIResponse } from \"./services/request/requestbuilder\";\nexport type { IDataObjectService } from \"./services/dataobjectservice\";\nexport type { ILinkingService } from \"./services/linkingservice\";\nexport type { IUserService } from \"./services/userservice\";\nexport type { IAddressService } from \"./services/addressservice\";\nexport type { IAppointmentService } from \"./services/appointmentservice\";\nexport type { IServerInformationService } from \"./services/serverinformationservice\";\nexport type { IEmailStoreService } from \"./services/emailstoreservice\";\nexport type { IViewService } from \"./services/viewservice\";\nexport type { IGroupService } from \"./services/groupservice\";\nexport type { IResourceService } from \"./services/resourceservice\";\nexport type { IDocumentService } from \"./services/documentservice\";\nexport type { ISettingsService } from \"./services/settingsservice\";\n\nclass ServiceRegistry<VERSION extends APIVersion, SERVER extends ServerType, PLATFORM extends IInterPlatform>\n implements IServiceRegistry<PLATFORM>\n{\n public readonly api: RestypedFetch<PLATFORM>;\n public readonly dataObjectService: IDataObjectService<PLATFORM>;\n public readonly linkingService: ILinkingService<PLATFORM>;\n public readonly userService: IUserService<PLATFORM>;\n public readonly addressService: IAddressService<PLATFORM>;\n public readonly appointmentService: IAppointmentService<PLATFORM>;\n public readonly serverInformationService: IServerInformationService<PLATFORM>;\n public readonly emailStoreService: IEmailStoreService<PLATFORM>;\n public readonly viewService: IViewService<PLATFORM>;\n public readonly groupService: IGroupService<PLATFORM>;\n public readonly resourceService: IResourceService<PLATFORM>;\n public readonly documentService: IDocumentService<PLATFORM>;\n public readonly settingsService: ISettingsService<PLATFORM>;\n\n constructor(fetchHolder: IFetchWrapper, version: VERSION, server: SERVER) {\n this.api = new RestypedFetch<PLATFORM>(version, server, fetchHolder);\n this.dataObjectService = new DataObjectService(\n this.api as RestypedFetch<PLATFORM & IDataObjectImagePart & IDataObjectTypeIconPart>,\n new DataObjectNormalizer(),\n ) as unknown as IDataObjectService<PLATFORM>;\n\n this.linkingService = new LinkingService(this.api);\n this.addressService = new AddressService(this.api);\n this.userService = new UserService(this.api, this.addressService);\n this.appointmentService = new AppointmentService(this.api);\n this.serverInformationService = new ServerInformationService(this.api);\n this.emailStoreService = new EmailStoreService(this.api, this.dataObjectService);\n this.viewService = new ViewService(this.api);\n this.groupService = new GroupService(this.api);\n this.resourceService = new ResourceService(this.api);\n this.documentService = new DocumentService(this.api, this.dataObjectService);\n this.settingsService = new SettingsService(this.api);\n }\n}\n\n/**\n * Provides access to the various domain specific services.\n */\nexport interface IServiceRegistry<PLATFORM extends IInterPlatform> {\n /**\n * Provides access to the REST endpoints in a type safe fashion\n */\n readonly api: RestypedFetch<PLATFORM>;\n /**\n * Provides access to address specific REST operations\n */\n readonly addressService: IAddressService<PLATFORM>;\n /**\n * Provides access to appointment specific REST operations\n */\n readonly appointmentService: IAppointmentService<PLATFORM>;\n /**\n * Provides access to data object specific REST operations\n */\n readonly dataObjectService: IDataObjectService<PLATFORM>;\n /**\n * Provides access to link specific REST operations\n */\n readonly linkingService: ILinkingService<PLATFORM>;\n /**\n * Provides access to user specific REST operations\n */\n readonly userService: IUserService<PLATFORM>;\n /**\n * Provides access to server version information\n */\n readonly serverInformationService: IServerInformationService<PLATFORM>;\n /**\n * Provides access to email store specific REST operations\n */\n readonly emailStoreService: IEmailStoreService<PLATFORM>;\n /**\n * Provides access to view specific REST operations\n */\n readonly viewService: IViewService<PLATFORM>;\n /**\n * Provides access to group specific REST operations\n */\n readonly groupService: IGroupService<PLATFORM>;\n /**\n * Provides access to resource specific REST operations\n */\n readonly resourceService: IResourceService<PLATFORM>;\n /**\n * Provides access to document specific REST operations\n */\n readonly documentService: IDocumentService<PLATFORM>;\n /**\n * Provides access to settings related REST operations\n */\n readonly settingsService: ISettingsService<PLATFORM>;\n}\n\n/**\n * Creates an instance of [[IServiceRegistry]] which provides access to the various\n * services.\n * @param {IFetchWrapper} api An authorized fetch api to use for the connection\n * @param {VERSION} version REST api version to be used (\"6.0\" or above is recommended)\n * @param {SERVER} serverType Type of the server\n * @return {IServiceRegistry} An instance of [[IServiceRegistry]] for the given configuration\n */\nexport function create<VERSION extends APIVersion = \"6.0\", SERVER extends ServerType = \"common\">(\n api: IFetchWrapper,\n version: VERSION = \"6.0\" as VERSION,\n serverType: SERVER = \"common\" as SERVER,\n): IServiceRegistry<IAPIVersions[VERSION][SERVER]> {\n return new ServiceRegistry<VERSION, SERVER, IAPIVersions[VERSION][SERVER]>(api, version, serverType);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AppSettings, AppSettingsChange, AppSettingsListResponse, AppSettingsSchemaResponse } from \"./appsettings\";\n\n/**\n * This gguid is associated with the special permission All Public which can\n * be used to make an object accessible for everyone.\n */\nexport const ALL_PUBLIC_PERMISSION_GGUID: GUID = \"00000000000000000000000000000000\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type NoQueryParams = {};\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type NoPathParams = {};\n\nexport interface IStringKeyed<T = any> {\n [key: string]: T;\n}\n\nexport type GUID = string;\n\nexport enum TeamFilterConstant {\n ExternalAccess = \"CASExternalAccess\",\n LoggedInUser = \"CASLoggedInUser\",\n PublicRecords = \"CASPublicRecords\",\n}\nexport interface ITeamFilter {\n teamFilterIds: Array<GUID | TeamFilterConstant>;\n role?: string;\n}\nexport class TeamFilter implements ITeamFilter {\n public teamFilterIds: Array<GUID | TeamFilterConstant> = [];\n public role?: string;\n constructor(options: ITeamFilter) {\n if (options) {\n this.teamFilterIds = options.teamFilterIds.slice();\n this.role = options.role;\n }\n }\n public convertToQueryParameterValue(): string {\n let teamFilterString = this.teamFilterIds.join(\",\");\n if (this.role) {\n teamFilterString += `;${this.role}`;\n }\n return teamFilterString;\n }\n}\n\nexport enum ForeignEditPermission {\n /**\n * The object is private.\n */\n PRIVATE = -1,\n\n /**\n * The object is confidential.\n */\n CONFIDENTIAL = 0,\n\n /**\n * The object is readable.\n */\n READ = 64,\n\n /**\n * The object is duplicateable.\n */\n DUPLICATE = 256,\n\n /**\n * The object is readable and change time of time based DataObjects is allowed.\n */\n READ_CHANGE_TIMES = 512,\n\n /**\n * The object is editable.\n */\n EDIT = 2048,\n\n /**\n * The object is deleteable.\n */\n DELETE = 8192,\n\n /**\n * The object is neither private nor confidential.\n */\n IN_EFFECT = 65535,\n}\nexport enum AccessRight {\n /**\n * Indicates that the PermissionOwner has no direct right on this DataObject.\n */\n NO_ACCESS = 0,\n\n /**\n * Indicates that the PermissionOwner has the direct right to read this DataObject.\n */\n READ = 64,\n\n /**\n * Indicates that the PermissionOwner has the direct right to insert this DataObject.\n * @deprecated\n */\n INSERT = 128,\n\n /**\n * Indicates that the PermissionOwner has the direct right to read and duplicate this DataObject.\n */\n DUPLICATE = 256,\n\n /**\n * Indicates that the PermissionOwner has the direct right\n * to read this DataObject and change the times (only for time based DataObjects, e.g. an appointment).\n */\n READ_CHANGE_TIMES = 512,\n\n /**\n * Indicates that the PermissionOwner has the direct right to edit this DataObject.\n */\n EDIT = 2048,\n\n /**\n * Indicates that the PermissionOwner has the direct right to delete this DataObject (move to recycle bin).\n */\n DELETE = 8192,\n\n /**\n * Indicates that the PermissionOwner has full access rights on this DataObject including deleting from recycle bin.\n */\n FULL_ACCESS = 32768,\n}\n\nexport enum HtmlFilter {\n /**\n * Removes nothing.\n */\n NOTHING = 0,\n\n /**\n * Removes external images.\n */\n EXTERNAL_IMAGES = 1,\n\n /**\n * Removes all images.\n */\n ALL_IMAGES = 2,\n\n /**\n * Removes dangerous content like IFRAME tags and ONCLICK attributes.\n */\n DANGEROUS_TAGS_AND_ATTRIBUTES = 4,\n\n /**\n * Removes dangerous content like IFRAME tags and ONCLICK attributes.\n */\n DANGEROUS_TAGS_AND_ATTRIBUTES_EXCLUDE_STYLES = 8,\n\n /**\n * Filter everything.\n */\n ALL = 0x7fffffff,\n}\n\nexport type FieldType =\n | \"DATETIME\"\n | \"STRINGSUGGEST\"\n | \"INT\"\n | \"TEXT\"\n | \"DECIMAL\"\n | \"CURRENCY\"\n | \"STRING\"\n | \"STRINGLISTSUGGEST\"\n | \"STRINGTREESUGGEST\"\n | \"BOOLEAN\"\n | \"GGUID\"\n | \"DOUBLE\"\n | \"INTSUGGEST\"\n | \"DECIMALSUGGEST\"\n | \"CURRENCYSUGGEST\"\n | \"DOUBLESUGGEST\"\n | \"SELECTIONVALUELIST\";\n\nexport type ServerIndependentFieldTypes =\n | IDateTimeField\n | IIntField\n | ITextField\n | IDecimalField\n | IStringField\n | IBooleanField\n | IGguidField\n | IDoubleField;\n\nexport type FieldGw =\n | ServerIndependentFieldTypes\n | IStringSuggestField\n | IStringListSuggestField\n | IIntSuggestField\n | IDecimalSuggestField\n | IDoubleSuggestField;\n\nexport type FieldOpen = ServerIndependentFieldTypes | ISelectionValueListField;\n\nexport type LinkDirection = \"LEFT_TO_RIGHT\" | \"RIGHT_TO_LEFT\" | \"BIDIRECTIONAL\";\n\nexport interface ISelectionValueListField extends ICommonField, ISuggestField<ISelectionValue> {\n type: \"SELECTIONVALUELIST\";\n lengthOfBinaryShadowField: number;\n cardinality: \"ZERO_TO_ONE\" | \"ONE\" | \"ONE_TO_N\" | \"ZERO_TO_N\";\n}\nexport interface IStringSuggestField\n extends ICommonField,\n ISuggestField<string>,\n IHasMaxLength,\n IHasSystemDefinedTranslated {\n type: \"STRINGSUGGEST\";\n}\nexport interface IStringListSuggestField\n extends ICommonField,\n ISuggestField<string>,\n IHasMaxLength,\n IHasSystemDefinedTranslated {\n type: \"STRINGLISTSUGGEST\";\n}\nexport interface IIntSuggestField extends ICommonField, ISuggestField<number>, IHasFormatOption, IHasPrecisionAndScale {\n type: \"INTSUGGEST\";\n}\nexport interface IDecimalSuggestField\n extends ICommonField,\n ISuggestField<number>,\n IHasFormatOption,\n IHasPrecisionAndScale {\n type: \"DECIMALSUGGEST\";\n}\nexport interface IDoubleSuggestField\n extends ICommonField,\n ISuggestField<number>,\n IHasFormatOption,\n IHasPrecisionAndScale {\n type: \"DOUBLESUGGEST\";\n}\n\nexport interface IDecimalField extends ICommonField, IHasFormatOption, IHasPrecisionAndScale {\n type: \"DECIMAL\";\n}\nexport interface IDateTimeField extends ICommonField, IHasFormatOption, IHasPrecision {\n type: \"DATETIME\";\n}\nexport interface IIntField extends ICommonField, IHasFormatOption {\n type: \"INT\";\n}\nexport interface ITextField\n extends ICommonField,\n IHasMaxLength,\n IHasSystemDefinedTranslated,\n IHasOverflowLength,\n IHasFormatOption {\n type: \"TEXT\";\n}\nexport interface IStringField extends ICommonField, IHasMaxLength, IHasSystemDefinedTranslated {\n type: \"STRING\";\n}\nexport interface IDoubleField extends ICommonField, IHasFormatOption, IHasPrecisionAndScale {\n type: \"DOUBLE\";\n}\nexport interface IGguidField extends ICommonField, IHasLength {\n type: \"GGUID\";\n}\nexport interface IBooleanField extends ICommonField {\n type: \"BOOLEAN\";\n}\n\nexport interface ISelectionValue {\n userEditable: boolean;\n systemDefinedDeleted: boolean;\n sortIndex: number;\n displayName: string;\n deletable: boolean;\n GGUID: GUID;\n displayID: string;\n systemDefined: boolean;\n}\n\nexport interface ISuggestField<T> extends ICommonField {\n suggestedValues: T[];\n customValueAllowed: boolean;\n}\nexport interface IHasMaxLength {\n maxLength: number;\n}\nexport interface IHasLength {\n length: number;\n}\nexport interface IHasSystemDefinedTranslated {\n systemDefinedTranslated: boolean;\n}\nexport interface IHasOverflowLength {\n overflowLength: number;\n}\nexport interface IHasFormatOption {\n formatOption: string;\n}\nexport interface IHasPrecisionAndScale extends IHasPrecision {\n scale: number;\n}\nexport interface IHasPrecision {\n precision: number;\n}\nexport interface ICommonField {\n id: number;\n name: string;\n type: FieldType;\n mandatory: boolean;\n hidden: boolean;\n updateable: boolean;\n displayname: string;\n displaynameShort: string;\n allowedForMassUpdate: boolean;\n duplicatable: boolean;\n accessPermission: number;\n minAccessPermission: number;\n inListEditable: boolean;\n\n recommended: boolean;\n optional: boolean;\n custom: boolean;\n systemField: boolean;\n}\n\nexport interface IMassQueryResult {\n types: { [key: string]: string };\n displayNames: { [key: string]: string };\n rows: Array<{ [key: string]: any }>;\n}\nexport interface IViewInfo {\n fields: {\n VIEWID: GUID;\n VIEWKIND: string;\n VIEWNAME: string;\n VIEWTYPE: string;\n VIEWURI: string;\n };\n id: GUID;\n}\nexport interface IDataObject extends IDataObjectTransferable {\n objectType: string;\n ETAG?: string;\n id: GUID;\n links?: IStringKeyed<string>;\n\n foreignEditPermission?: ForeignEditPermission;\n foreignEditPermissionRestriction?: ForeignEditPermission;\n permissions?: IPermission[];\n writable?: boolean;\n}\n\nexport interface IPermissionInfo {\n fields: IPermission;\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IPermission {\n ACCESSRIGHT: AccessRight;\n GGUID?: GUID;\n RIGHTOWNERGGUID: GUID;\n RIGHTOWNERID?: number;\n TYPE?: \"USER\" | \"GROUP\" | \"RESOURCE\";\n ROLE?: string;\n}\n\nexport interface IDataObjectTransferable {\n fields: IStringKeyed<any>;\n}\n\nexport interface ICountInfo {\n count: number;\n}\n\nexport interface ICommonPermissionOwnerFields {\n EMAILADDRESS: string;\n HIDDEN: boolean;\n CLIENT: GUID;\n DESCRIPTION: string;\n GGUID: GUID;\n ENABLED: boolean;\n DISPLAYNAME: string;\n DOMAINGUID?: GUID;\n DOMAINNAME?: string;\n DOMAINISLOCAL?: boolean;\n}\n\nexport interface IAddressRelatedPermissionOwnerInfoFields extends ICommonPermissionOwnerFields {\n GGUIDOFADDRESSRECORD: string;\n GUEST: boolean;\n TIMEZONE: string;\n USERTYPE: string;\n ACTIONADMINISTRATOR: boolean;\n ADMINISTRATOR: boolean;\n OID: string;\n PREFERREDCOUNTRY: string;\n PREFERREDLANGUAGE: string;\n ALLOWMOBILEAPPSOFFLINE: boolean;\n}\n\nexport interface IGroupInfo {\n directSuperGroups: string[];\n members: string[];\n links: IStringKeyed<string>;\n id: GUID;\n fields: ICommonPermissionOwnerFields & {\n GID: string;\n };\n}\n\nexport class PrimaryLinkedParent {\n public gguid: GUID;\n public objectType: string;\n public caption: string;\n public description: string;\n}\n\nexport interface IDossierEntry {\n ETAG: string;\n id: GUID;\n fields: {\n GGUID: string;\n GGUID1: string;\n GGUID2: string;\n KEYWORD: string;\n LINKDIRECTION?: LinkDirection;\n OBJECTTYPE1: string;\n OBJECTTYPE2: string;\n PLUSINFO: string;\n DOCEXT?: string;\n SORTDATE?: string;\n };\n}\n\nexport interface IUserInfo {\n directSuperGroups: string[];\n fields: IAddressRelatedPermissionOwnerInfoFields;\n id: GUID;\n links: IStringKeyed<string>;\n PrivilegedOperations: string[];\n}\n\nexport interface IServerVersion {\n serverVersion: string;\n productversion: string;\n major: string;\n minor: string;\n build: string;\n}\n\nexport interface ILoginInformation {\n CLIENTNAME: string;\n LOGINTIMESTAMP: string;\n LOGINCOUNT: string;\n CLIENTVERSION: string;\n}\n\nexport interface IResourceInfo {\n directSuperGroups: string[];\n fields: IAddressRelatedPermissionOwnerInfoFields;\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IParticipantInfo {\n fields: {\n DISPLAYNAME: string;\n PARTICIPANTGGUID: GUID;\n DESCRIPTION: string;\n TYPE: string;\n };\n id: GUID;\n links: IStringKeyed<string>;\n}\n\nexport interface IDataObjectSchema<FieldTypes> {\n name: string;\n properties: {\n fields: IStringKeyed<FieldTypes>;\n };\n}\n\nexport interface IDataObjectDescription {\n displayNameSingular: string;\n displayNamePlural: string;\n dataObjectTypePermission: number;\n isUserSensitive: boolean;\n isTaggable: boolean;\n isLinkable: boolean;\n isRecycleBinActivated: boolean;\n isTemplateActivated: boolean;\n primaryLinkParents: {\n parentObjectTypes: string[];\n mandatoryParentObjectTypes: string[];\n };\n searchFieldsString: string;\n searchColumnNames: string[];\n linkAttributes: IStringKeyed<IStringKeyed<string>>;\n}\n\nexport interface IDataObjectDateChangeQueryParameters {\n updatedAfter?: Date;\n insertedAfter?: Date;\n}\nexport interface IDataObjectDateIntervalQueryParameters {\n intervalStart?: Date;\n intervalEnd?: Date;\n}\nexport interface IDataObjectLinkQueryParameters {\n linkedToType?: string;\n linkedTo?: GUID[];\n linkedToAttributes?: string[];\n}\nexport interface IPagedQueryParameters {\n page?: number;\n entriesPerPage?: number;\n}\nexport interface IAddressSpecificQueryParameters {\n isUser?: boolean | null;\n hasBirthdayOn?: Date;\n}\nexport interface IPartialObjectQueryParameters {\n fields?: string | string[];\n}\nexport interface IOrderByQueryParameters {\n orderBy?: string | string[];\n}\nexport interface ITeamFilterQueryParameters {\n teamFilter?: string | TeamFilter;\n}\nexport interface ISearchQueryParameters {\n search?: string;\n}\nexport interface IDataObjectTypesQueryParameter {\n objectTypes?: string | string[];\n}\nexport interface ISingleDataObjectTypesQueryParameter {\n objectType?: string;\n}\n\nexport interface IIncludePermissionsQueryParameter {\n includePermissions?: boolean;\n includeSyncrecordPermissions?: boolean;\n}\n\nexport interface IIncludePrivateForeignrecordsQueryParameter {\n includePrivateForeignrecords?: boolean;\n}\n\nexport interface IRecentlyUsedQueryParameter {\n tagAsRecentlyUsed?: boolean;\n}\n\nexport interface IFavoriteQueryParameter {\n isfavorite?: boolean;\n}\nexport interface IIncludeMaxJournalIdQueryParameter {\n includeMaxjournalid?: boolean;\n}\n\nexport interface IViewItemsCountQueryParameters\n extends ISearchQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters {}\nexport interface IViewQueryParameters extends IViewKindQueryParameters, IPagedQueryParameters {}\nexport interface IViewKindQueryParameters {\n viewKind?: string;\n}\nexport interface IViewItemsQueryParameters\n extends IPagedQueryParameters,\n ISearchQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IPartialObjectQueryParameters,\n IOrderByQueryParameters,\n IAddressSpecificQueryParameters {}\nexport interface ISingleDataObjectQueryParameters\n extends IPartialObjectQueryParameters,\n IIncludePermissionsQueryParameter,\n IRecentlyUsedQueryParameter,\n IFavoriteQueryParameter,\n IIncludeMaxJournalIdQueryParameter {}\n\nexport interface IDataObjectQueryParameters\n extends IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectLinkQueryParameters,\n IPagedQueryParameters,\n IAddressSpecificQueryParameters,\n IPartialObjectQueryParameters,\n IOrderByQueryParameters,\n ITeamFilterQueryParameters,\n ISearchQueryParameters {}\n\nexport interface IDataObjectCountQueryParameters\n extends ITeamFilterQueryParameters,\n ISearchQueryParameters,\n IDataObjectDateChangeQueryParameters,\n IDataObjectDateIntervalQueryParameters,\n IDataObjectLinkQueryParameters {}\n\nexport interface IDossierQueryParameters extends IPagedQueryParameters, IDataObjectTypesQueryParameter {}\n\nexport interface IPermissionRequirementQueryParameter {\n minPermission?: ForeignEditPermission;\n}\nexport interface IDomainQueryParameter {\n domainGuid?: GUID;\n}\nexport interface IResourceQueryParameters\n extends IPagedQueryParameters,\n ISingleDataObjectTypesQueryParameter,\n IDataObjectTypesQueryParameter,\n IPermissionRequirementQueryParameter,\n IDomainQueryParameter {}\n\nexport interface IWhereStringQueryParameters {\n whereString: string;\n}\n\nexport interface ILastUsedDataObjectQueryParameters\n extends IPartialObjectQueryParameters,\n IWhereStringQueryParameters {}\n\nexport interface IDataObjectSchemaPart<FIELDTYPES> {\n \"/type/:dataObjectType/schema\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: IDataObjectSchema<FIELDTYPES>;\n };\n };\n}\n\nexport interface IServerVersionResponseGw {\n fields: IServerVersion;\n}\n\nexport interface IServerVersionPart<RESPONSETYPE> {\n \"/version/server\": {\n GET: {\n query: NoQueryParams;\n response: RESPONSETYPE;\n };\n };\n}\n\nexport type QueryResponseLegacyGw = [IMassQueryResult];\n\nexport interface IQueryPart<RESPONSETYPE> {\n \"/query\": {\n POST: {\n query: IPagedQueryParameters & IIncludePrivateForeignrecordsQueryParameter;\n params: NoPathParams;\n body: {\n query: string;\n };\n response: RESPONSETYPE;\n };\n };\n}\nexport interface IDataObjectImagePart {\n \"/type/:dataObjectType/image/default\": {\n PUT: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n body: ArrayBuffer;\n };\n GET: {\n query: {\n width?: number;\n height?: number;\n };\n params: {\n dataObjectType: string;\n };\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/image\": {\n PUT: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n body: ArrayBuffer;\n };\n GET: {\n query: {\n width?: number;\n height?: number;\n };\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n };\n}\n\nexport interface IDataObjectTypeIconPart {\n \"/type/:dataObjectType/image\": {\n GET: {\n query: {\n iconType?: string;\n };\n params: {\n dataObjectType: string;\n };\n };\n };\n}\n\nexport interface IGwSpecific {\n gwSpecific: true;\n}\nexport interface IOpenSpecific {\n openSpecific: true;\n}\n\nexport type InterPlatformOpen = IInterPlatform &\n IDataObjectSchemaPart<FieldOpen> &\n IServerVersionPart<IServerVersion> &\n IQueryPart<IMassQueryResult> &\n IDataObjectImagePart &\n IOpenSpecific;\n\nexport type InterPlatformGw = IInterPlatform &\n IServerVersionPart<IServerVersionResponseGw> &\n IDataObjectTypeIconPart &\n IGwSpecific;\n\nexport interface IInterPlatform\n extends IDataObjectSchemaPart<ICommonField>,\n IServerVersionPart<IServerVersion | IServerVersionResponseGw>,\n IQueryPart<IMassQueryResult | QueryResponseLegacyGw> {\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n dossierentryGGUID: GUID;\n };\n response: IDossierEntry;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n dossierentryGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n permissionGGUID: GUID;\n };\n response: IPermissionInfo;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n permissionGGUID: GUID;\n };\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n participantGGUID: GUID;\n };\n response: IParticipantInfo;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n participantGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID\": {\n PUT: {\n query: {\n tagAsRecentlyUsed?: boolean;\n };\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n body: string;\n };\n GET: {\n query: ISingleDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IDataObject;\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/address/:dataObjectGGUID/image\": {\n PUT: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n body: ArrayBuffer;\n };\n GET: {\n query: {\n maxWidth?: number;\n maxHeight?: number;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n };\n DELETE: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/document/:dataObjectGGUID/file\": {\n PUT: {\n query: {\n keepCheckedOut?: boolean;\n createNewVersion?: boolean;\n versionComment?: string;\n };\n body: ArrayBuffer;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n POST: {\n query: {\n keepCheckedOut?: boolean;\n createNewVersion?: boolean;\n versionComment?: string;\n };\n body: ArrayBuffer;\n params: {\n dataObjectGGUID: GUID;\n };\n };\n GET: {\n query: {\n version?: string;\n readOnly?: boolean;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/type/:dataObjectType\": {\n POST: {\n query: {\n templateGguid?: GUID;\n tagAsRecentlyUsed?: boolean;\n };\n params: {\n dataObjectType: string;\n };\n body: string;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\": {\n POST: {\n query: {\n gguid2?: GUID;\n objectType2?: string;\n attribute?: string;\n role1?: string;\n role2?: string;\n linkDirection?: LinkDirection;\n additionalField1?: string;\n additionalField2?: string;\n };\n params: {\n dataObjectGGUID: GUID;\n dataObjectType: string;\n };\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission\": {\n POST: {\n query: {\n rightOwnerGguid?: GUID;\n accessRight?: number;\n };\n params: {\n dataObjectGGUID: GUID;\n dataObjectType: string;\n };\n response: any;\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant\": {\n POST: {\n query: {\n gguid?: GUID;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: any;\n };\n };\n \"/type/document/file\": {\n POST: {\n query: NoQueryParams;\n body: ArrayBuffer;\n };\n };\n \"/type/emailstore/file\": {\n POST: {\n query: {\n foreignEditPermissionRestriction?: number;\n };\n body: string;\n };\n };\n \"/checklogin\": {\n GET: {\n query: {\n silent?: boolean;\n };\n };\n };\n \"/group/:GGUID\": {\n GET: {\n query: IPartialObjectQueryParameters;\n params: {\n GGUID: GUID;\n };\n response: IGroupInfo;\n };\n };\n \"/group/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/group/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IGroupInfo[];\n };\n };\n \"/group/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IGroupInfo[];\n };\n };\n \"/resource/:guid\": {\n GET: {\n query: {\n fields?: string | string[];\n };\n params: {\n guid: GUID;\n };\n response: IResourceInfo;\n };\n };\n \"/resource/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/resource/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IResourceInfo[];\n };\n };\n \"/resource/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IResourceInfo[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\": {\n GET: {\n query: IDossierQueryParameters;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IDossierEntry[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/permission/full\": {\n GET: {\n query: {\n page?: number;\n entriesPerPage?: number;\n };\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: IPermissionInfo[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n response: PrimaryLinkedParent[];\n };\n };\n \"/type/:dataObjectType/count\": {\n GET: {\n query: IDataObjectCountQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/full\": {\n GET: {\n query: IDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/list\": {\n GET: {\n query: IDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/recent/list\": {\n GET: {\n query: ILastUsedDataObjectQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/:dataObjectGGUID/recent\": {\n POST: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n dataObjectGGUID: GUID;\n };\n };\n };\n \"/type/:dataObjectType/view/:viewID\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IViewInfo;\n };\n };\n \"/type/:dataObjectType/view/:viewID/count\": {\n GET: {\n query: IViewItemsCountQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/view/:viewID/full\": {\n GET: {\n query: IViewItemsQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/view/:viewID/list\": {\n GET: {\n query: IViewItemsQueryParameters;\n params: {\n dataObjectType: string;\n viewID: GUID;\n };\n response: IDataObject[];\n };\n };\n \"/type/:dataObjectType/view/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: ICountInfo;\n };\n };\n \"/type/:dataObjectType/view/list\": {\n GET: {\n query: IViewQueryParameters;\n params: {\n dataObjectType: string;\n };\n response: IViewInfo[];\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/count\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectGGUID: GUID;\n };\n response: ICountInfo;\n };\n };\n \"/type/appointment/:dataObjectGGUID/participant/full\": {\n GET: {\n query: {\n page?: number;\n entriesPerPage?: number;\n domainGuid?: GUID;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: IParticipantInfo[];\n };\n };\n \"/user/:GGUID\": {\n GET: {\n query: {\n fields?: string | string[];\n includePrivilegedOperations?: boolean;\n };\n params: {\n GGUID: GUID;\n };\n response: IUserInfo;\n };\n };\n \"/user/:GGUID/image\": {\n GET: {\n query: {\n maxWidth?: number;\n maxHeight?: number;\n };\n params: {\n GGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/user/count\": {\n GET: {\n query: {\n objectType?: string;\n minPermission?: ForeignEditPermission;\n };\n response: ICountInfo;\n };\n };\n \"/user/full\": {\n GET: {\n query: IResourceQueryParameters;\n response: IUserInfo[];\n };\n };\n \"/user/list\": {\n GET: {\n query: IResourceQueryParameters;\n response: IUserInfo[];\n };\n };\n \"/user/self\": {\n GET: {\n query: {\n fields?: string | string[];\n includePrivilegedOperations?: boolean;\n };\n response: IUserInfo;\n };\n };\n \"/user/self/logininformation\": {\n GET: {\n query: NoQueryParams;\n response: ILoginInformation[];\n };\n };\n \"/type/:dataObjectType/description\": {\n GET: {\n query: NoQueryParams;\n params: {\n dataObjectType: string;\n };\n response: IDataObjectDescription;\n };\n };\n \"/type/emailstore/:dataObjectGGUID/file\": {\n GET: {\n query: {\n htmlFilter?: HtmlFilter;\n };\n params: {\n dataObjectGGUID: GUID;\n };\n response: ArrayBuffer;\n };\n };\n \"/settings/app/list\": {\n GET: {\n response: AppSettingsListResponse;\n };\n };\n \"/settings/app/:appId/schema\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n };\n \"/settings/app/:appId\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n };\n \"/settings/app/:appId/user\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n PUT: {\n params: {\n appId: string;\n };\n body: AppSettings;\n };\n POST: {\n params: {\n appId: string;\n };\n body: AppSettingsChange;\n };\n };\n \"/settings/app/:appId/global\": {\n GET: {\n params: {\n appId: string;\n };\n response: AppSettingsSchemaResponse;\n };\n PUT: {\n params: {\n appId: string;\n };\n body: AppSettings;\n };\n POST: {\n params: {\n appId: string;\n };\n body: AppSettingsChange;\n };\n };\n}\n\nexport enum DatePrecision {\n /**\n * Complete precision, that includes year, month, day, hour, minute, second and millisecond\n */\n COMPLETE = 2048,\n\n /**\n * Only year, month, day\n */\n NO_TIME = 512,\n\n /**\n * Only year, month, day, hour, minute\n */\n NO_SECONDS = 64,\n\n /**\n * Only year, month, day, hour, minute, seconds\n */\n NO_MILLISECONDS = 0,\n\n /**\n * Time, no date\n */\n NO_DATE = 4096,\n}\n","import { IRestypedBase, IRestypedRoute } from \"./restyped\";\nimport { TeamFilter } from \"./interplatform\";\nimport { APIVersion, ServerType } from \"./api\";\n\nexport interface IFetchWrapper {\n fetch: typeof fetch;\n}\n\nexport interface ITypedJSONResponse<T> extends Response {\n json(): Promise<T>;\n}\n\nexport interface ITypedRequestInit<T extends IRestypedRoute> extends RequestInit {\n body?: T[\"body\"];\n params?: T[\"params\"];\n query?: T[\"query\"];\n}\n\nexport class RestypedFetch<APIDef extends IRestypedBase> {\n constructor(\n private version: APIVersion = \"6.0\",\n private server: ServerType = \"common\",\n private fetcher?: IFetchWrapper,\n ) {}\n\n public get<Path extends keyof APIDef>(\n path: Path,\n config?: ITypedRequestInit<APIDef[Path][\"GET\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"GET\"][\"response\"]>> {\n return this.proxy(path, \"GET\", config);\n }\n public post<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"POST\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"POST\"][\"response\"]>> {\n return this.proxy(path, \"POST\", config);\n }\n public put<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"PUT\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"PUT\"][\"response\"]>> {\n return this.proxy(path, \"PUT\", config);\n }\n public delete<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"DELETE\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"DELETE\"][\"response\"]>> {\n return this.proxy(path, \"DELETE\", config);\n }\n public patch<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"PATCH\"]>,\n ): Promise<APIDef[Path][\"PATCH\"][\"response\"]> {\n return this.proxy(path, \"PATCH\", config);\n }\n public options<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"OPTIONS\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"OPTIONS\"][\"response\"]>> {\n return this.proxy(path, \"OPTIONS\", config);\n }\n public head<Path extends keyof APIDef>(\n path: Path,\n config: ITypedRequestInit<APIDef[Path][\"HEAD\"]>,\n ): Promise<ITypedJSONResponse<APIDef[Path][\"HEAD\"][\"response\"]>> {\n return this.proxy(path, \"HEAD\", config);\n }\n\n private camelToDash(str: string): string {\n return str\n .replace(/(^[A-Z])/, (first) => first.toLowerCase())\n .replace(/([A-Z])/g, (letter) => `-${letter.toLowerCase()}`);\n }\n\n private isBoolean(value: unknown): boolean {\n return value === true || value === false;\n }\n\n public proxy<Path extends keyof APIDef, Method extends keyof APIDef[Path]>(\n path: Path | string,\n method: Method,\n config?: ITypedRequestInit<IRestypedRoute>,\n ): Promise<ITypedJSONResponse<APIDef[Path][Method][\"response\"]>> {\n config = Object.assign({}, config || {}, { method });\n let resolvedPath: string = path as string;\n let query = \"\";\n if (config.params) {\n Object.keys(config.params).forEach((prop) => {\n resolvedPath = resolvedPath.toString().replace(new RegExp(\":\" + prop, \"g\"), config.params[prop]);\n });\n }\n const convert = (value) => {\n let result;\n if (value instanceof TeamFilter) {\n result = value.convertToQueryParameterValue();\n } else if (value instanceof Date) {\n result = value.toJSON();\n } else if (Array.isArray(value)) {\n result = value.map((p) => convert(p)).join(\",\");\n } else if (this.isBoolean(value)) {\n result = value ? \"true\" : \"false\";\n } else {\n result = value;\n }\n return result;\n };\n if (config.query) {\n query = Object.keys(config.query)\n .map((prop) => {\n const value = config.query[prop];\n const convertedValue = convert(value);\n\n if (convertedValue == null) {\n return null;\n }\n\n return `${this.camelToDash(prop)}=${encodeURIComponent(convertedValue)}`;\n })\n .filter((p) => p != null)\n .join(\"&\");\n\n if (query.length > 0) {\n query = \"?\" + query;\n }\n }\n\n const versionPrefix = this.version.indexOf(\"v\") === 0 ? \"\" : \"v\";\n const versionPath = versionPrefix + this.version;\n\n return (this.fetcher || window).fetch(versionPath + resolvedPath + query, config);\n }\n}\n","import { RestypedFetch, ITypedJSONResponse } from \"../../types/restypedfetch\";\nimport { IRestypedBase } from \"../../types/restyped\";\nimport { NoPathParams } from \"../../types/interplatform\";\n\nexport type Methods = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"HEAD\" | \"DELETE\" | \"OPTIONS\";\n\nexport interface IAPIResponse<T> {\n readonly headers: Headers;\n readonly data: T;\n}\n\nexport class FetchError extends Error {\n constructor(\n public status: number,\n public statusText: string,\n public text: string = null,\n ) {\n super(\"Server returned non ok response.\");\n }\n}\n\nexport abstract class RequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n ReturnType = ApiDef[Path][Method][\"response\"],\n ServerResponseType = ApiDef[Path][Method][\"response\"],\n> {\n protected _query: ApiDef[Path][Method][\"query\"] = {};\n protected _body: unknown;\n protected _headers: HeadersInit = {};\n\n private _execution: Promise<IAPIResponse<ReturnType>>;\n\n constructor(\n protected typedFetch: RestypedFetch<ApiDef>,\n private _path: Path,\n private _method: Method = \"GET\" as Method,\n private _parameters: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n private _transform: (response: ITypedJSONResponse<ServerResponseType>) => Promise<ReturnType> = (response) => {\n const json = response.json().then((result) => result as unknown as ReturnType);\n return json.catch((e) => {\n return {} as ReturnType;\n });\n },\n ) {\n this.setAcceptHeader(\"application/json\");\n }\n\n public setQueryParameter<Property extends keyof ApiDef[Path][Method][\"query\"]>(\n property: Property,\n value: ApiDef[Path][Method][\"query\"][Property],\n ): this {\n this._query[property] = value;\n return this;\n }\n\n protected setBody(body: unknown): this {\n this._body = body;\n return this;\n }\n\n public setAcceptHeader(accept: string): this {\n return this.setHeader(\"Accept\", accept);\n }\n\n public setContentType(contentType: string): this {\n return this.setHeader(\"Content-Type\", contentType);\n }\n public setHeader(key: string, value: string): this {\n this._headers[key] = value;\n return this;\n }\n\n protected prepareRequest(): Promise<ITypedJSONResponse<ReturnType>> {\n return this.typedFetch.proxy(this._path, this._method, {\n query: this._query,\n params: this._parameters,\n body: this._body,\n headers: this._headers,\n });\n }\n\n public execute(): Promise<IAPIResponse<ReturnType>> {\n if (this._execution) {\n return this._execution;\n }\n\n this._execution = this.prepareRequest().then((response) => {\n if (!response.ok) {\n return this.handleErrorResponse(response).then((data) => {\n return {\n headers: response.headers,\n data,\n };\n });\n }\n return this.transformStream(response).then((data) => {\n return {\n headers: response.headers,\n data,\n };\n });\n });\n return this._execution;\n }\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n public then<TResult1 = IAPIResponse<ReturnType>, TResult2 = never>(\n onfulfilled?: ((value: IAPIResponse<ReturnType>) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): Promise<TResult1 | TResult2> {\n return this.execute().then(onfulfilled, onrejected);\n }\n public catch<TResult = never>(\n onrejected?: (reason: any) => TResult | PromiseLike<TResult>,\n ): Promise<IAPIResponse<ReturnType> | TResult> {\n return this.execute().then(null, onrejected);\n }\n\n protected transformStream(response: Response): Promise<ReturnType> {\n return this._transform(response);\n }\n\n protected handleErrorResponse(response: Response): Promise<ReturnType> {\n return response\n .text()\n .catch(() => {\n throw new FetchError(response.status, response.statusText);\n })\n .then((text) => {\n throw new FetchError(response.status, response.statusText, text);\n });\n }\n}\n","import { GUID } from \"../../types/interplatform\";\nimport { IRestypedBase } from \"../../types/restyped\";\nimport { IInterPlatform } from \"../../dataaccess\";\n\nexport const getETag = (response: Response): Promise<string> => {\n let etag = response.headers.get(\"etag\");\n let resolution: Promise<string>;\n if (etag) {\n etag = `\"${etag.replace(/\"/g, \"\").split(\"--\")[0]}\"`;\n resolution = Promise.resolve(etag);\n } else {\n resolution = Promise.reject(new Error(\"ETag header not found\"));\n }\n return resolution;\n};\n\nexport class LocationHelper<APIDef extends IRestypedBase> {\n public createForPath<Path extends keyof APIDef>(\n path: Path,\n ): { extract: (response: Response, pathParameter: keyof APIDef[Path][\"GET\"][\"params\"]) => Promise<GUID> } {\n const resolver = {\n extract: (response, pathParameter) => this.getIdFromLocation(response, path, pathParameter),\n };\n return resolver;\n }\n\n private getIdFromLocation<Path extends keyof APIDef>(\n response: Response,\n path: Path,\n pathParameter: keyof APIDef[Path][\"GET\"][\"params\"] & string,\n ): Promise<GUID> {\n let resolution: Promise<GUID>;\n const location = response.headers.get(\"location\") || \"\";\n\n if (location != null && location.length > 0) {\n let processedPattern = path\n .toString()\n .replace(\":\" + pathParameter, \"([^/]+)\") // create a capturing group for the given path parameter\n .replace(/:([^/]+)(\\/?)/g, \"[^/]+$2\") // create non capturing groups for every other path parameter\n .replace(/\\//g, \"\\\\/\"); // escape slashes\n\n processedPattern = \".*\" + processedPattern; // allow any leading characters\n\n const matches = new RegExp(processedPattern).exec(location);\n if (matches && matches.length > 0) {\n resolution = Promise.resolve(matches[1]);\n } else {\n resolution = Promise.reject(\n new Error(`Location header (${location}) did not matches the given pattern ${path.toString()}!`),\n );\n }\n } else {\n resolution = Promise.reject(new Error(\"Location header not found!\"));\n }\n return resolution;\n }\n}\n\nexport const locationHelper = new LocationHelper<IInterPlatform>();\n","export interface IBinaryInfo {\n buffer: ArrayBuffer | SharedArrayBuffer | string;\n contentType: string;\n}\nexport class BinaryLoader {\n private _binaryInfo: Promise<IBinaryInfo>;\n\n public setContent(contentType: string, content: string) {\n this._binaryInfo = Promise.resolve({ buffer: content, contentType });\n }\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer | SharedArrayBuffer) {\n this._binaryInfo = Promise.resolve({ buffer, contentType });\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array) {\n this.setContentFromArrayBuffer(contentType, uInt8Array.buffer);\n }\n public setContentFromBase64String(contentType: string, base64: string) {\n const binaryString = window.atob(base64);\n const len = binaryString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n this.setContentFromUInt8Array(contentType, bytes);\n }\n public setContentFromFile(file: File, contentType: string = file.type) {\n const fileLoaded: Promise<string | ArrayBuffer> = new Promise<string | ArrayBuffer>((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener(\"loadend\", () => {\n resolve(reader.result);\n });\n reader.addEventListener(\"error\", () => {\n reject(reader.error);\n });\n reader.readAsArrayBuffer(file);\n });\n this._binaryInfo = fileLoaded.then((buffer) => {\n return { buffer, contentType };\n });\n }\n public getBinary(): Promise<IBinaryInfo> {\n if (this._binaryInfo) {\n return this._binaryInfo;\n }\n return Promise.reject(new Error(\"No binary was configured!\"));\n }\n}\n","import {\n IDataObject,\n IInterPlatform,\n IPermission,\n ForeignEditPermission,\n ITeamFilter,\n TeamFilter,\n GUID,\n IMassQueryResult,\n ICommonField,\n QueryResponseLegacyGw,\n NoPathParams,\n IDataObjectImagePart,\n IDataObjectTypeIconPart,\n} from \"../types/interplatform\";\nimport { RequestBuilder, Methods, IAPIResponse } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\nimport { getETag, locationHelper } from \"./response/headerutil\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\nconst DEFAULT_PAGE_SIZE = 100;\n\n/**\n * Provides builders for record specific REST operations\n */\nexport type IDataObjectService<PLATFORM extends IInterPlatform> = ICommonDataObjectService<PLATFORM> &\n (PLATFORM extends IDataObjectImagePart ? IDataObjectImageService<PLATFORM> : unknown) &\n (PLATFORM extends IDataObjectTypeIconPart ? IDataObjectTypeIconService<PLATFORM> : unknown);\n\nexport interface ICommonDataObjectService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to delete a given record\n * @param type type of the record to be deleted e.g. ADDRESS\n * @param gguid unique identifier of the record to be deleted\n */\n deleteObject(type: string, gguid: GUID): DeleteObjectRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a given record\n * @param type type of the record to be retrieved e.g. ADDRESS\n * @param gguid unique identifier of the record to be retrieved\n */\n getObject(type: string, gguid: GUID): GetObjectRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * @param type type of the record to be retrieved e.g. ADDRESS\n */\n getObjectList(type: string): GetFullObjectListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n * @param type type of the records to be retrieved e.g. ADDRESS\n */\n getPartialObjectList(type: string): GetPartialObjectListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of records\n * for the given type.\n * @param type type of the records to operate on e.g. ADDRESS\n */\n getObjectListCount(type: string): GetObjectListCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to save a given record.\n * Please note that during the saving process the object is going\n * to be normalized to match the contract given by the API.\n * @param dataObject the record to be saved\n */\n saveObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, void>;\n\n /**\n * Creates a builder which can be used to save and then retrieve\n * a given record.\n * Please note that during the saving process the object is going\n * to be normalized to match the contract given by the API.\n * @param dataObject the record to be saved\n */\n saveAndReturnObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, IDataObject>;\n\n /**\n * Creates a builder which can be used to create a new record.\n * @param type type of the record to be created e.g. ADDRESS\n */\n createObject(type: string): CreateObjectRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve the list of permisisons\n * for the given object.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getPermissionInfo(type: string, gguid: GUID): GetPermissionInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of permisisons\n * for the given object.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getPermissionInfoCount(type: string, gguid: GUID): GetPermissionInfoCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the detailed permission\n * information for the given record and permission.\n * @param type type of the record e.g. ADDRESS\n * @param gguid gguid of the record\n * @param permissionGguid gguid of the permission\n */\n getPermissionDetails(\n type: string,\n gguid: GUID,\n permissionGguid: string,\n ): GetPermissionDetailsRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve schema information for\n * the given type. The schema contains detailed information about the record\n * type e.g. all available fields and their types.\n * @param type record type e.g. ADDRESS\n */\n getObjectSchema(type: string): GetObjectSchemaRequestBuilder<PLATFORM>;\n /** Creates a builder which can be used to retrieve meta information for\n * the given type. This contains information like translations, link\n * attributes, flags which indicate whether the type is user sensitive,\n * linkable and more.\n * @param type record type e.g. ADDRESS\n */\n getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the result of the given\n * query.\n * Please note that the query syntax is limited to the Select operation.\n * @param query the query to be executed\n */\n query(query: string): QueryRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve a list of recently\n * used records.\n * @param type type of the record to be retrieved e.g. ADDRESS\n */\n getRecentlyUsedObjectList(type: string): GetRecentlyUsedObjectListRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to mask the given record\n * as recently used.\n * @param type record type e.g. ADDRESS\n * @param gguid gguid of the record\n */\n maskAsRecentlyUsedDataObject(type: string, gguid: GUID): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM>;\n}\n\nexport interface IDataObjectImageService<PLATFORM extends IInterPlatform & IDataObjectImagePart> {\n /**\n * Creates a builder which can be used to retrieve the default image associated with the record type.\n * Please note that the returned image is an ArrayBuffer in this case.\n * To display the image it might be more appropriate to use\n * [[IDataObjectService.getRecordImageAsBlob]]\n *\n * @param type record e.g. ADDRESS\n */\n getDefaultRecordImage(type: string): GetDefaultRecordImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image associated with the record type\n * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n *\n * @param type record e.g. ADDRESS\n */\n getDefaultRecordImageAsBlob(type: string): GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the image associated with the record type.\n * @param type record e.g. ADDRESS\n * @param fileExtension the file extension for the uploaded content\n */\n updateDefaultRecordImage(type: string, fileExtension: string): PutDefaultRecordImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete the image associated with the record type.\n * @param type record e.g. ADDRESS\n */\n deleteDefaultRecordImage(type: string): DeleteDefaultRecordImageRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve the image associated with the record.\n * Please note that the returned image is an ArrayBuffer in this case.\n * To display the image it might be more appropriate to use\n * [[IDataObjectService.getRecordImageAsBlob]]\n *\n * @param type record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getRecordImage(type: string, gguid: GUID): GetRecordImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image associated with the record\n * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n *\n * @param type record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n getRecordImageAsBlob(type: string, gguid: GUID): GetRecordImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the image associated with the given record.\n * @param type record e.g. ADDRESS\n * @param gguid gguid of the record\n * @param eTagOfRecord the ETAG field of the record, please note that\n * it is used to guarantee update safety. It can be aquired from a previously\n * fetched record.\n * @param fileExtension the file extension for the uploaded content\n */\n updateRecordImage(\n type: string,\n gguid: GUID,\n eTagOfRecord: string,\n fileExtension: string,\n ): PutRecordImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete the image associated with the given record.\n * @param type record e.g. ADDRESS\n * @param gguid gguid of the record\n */\n deleteRecordImage(type: string, gguid: GUID): DeleteRecordImageRequestBuilder<PLATFORM>;\n}\n\nexport interface IDataObjectTypeIconService<PLATFORM extends IInterPlatform & IDataObjectTypeIconPart> {\n /**\n * Creates a builder which can be used to retrieve the image\n * for a given record type.\n * @param type record type e.g. ADDRESS\n */\n getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;\n /**\n * Creates a builder which can be used to retrieve the image\n * for a given record type.\n * This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param type record type e.g. ADDRESS\n */\n getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;\n}\n\nexport class DataObjectService<PLATFORM extends IInterPlatform>\n implements\n ICommonDataObjectService<PLATFORM>,\n IDataObjectImageService<PLATFORM & IDataObjectImagePart>,\n IDataObjectTypeIconService<PLATFORM & IDataObjectTypeIconPart>\n{\n constructor(\n private typedFetch: RestypedFetch<PLATFORM & IDataObjectImagePart & IDataObjectTypeIconPart>,\n private dataObjectNormalizer: DataObjectNormalizer,\n ) {}\n\n public deleteObject(type: string, gguid: GUID): DeleteObjectRequestBuilder<PLATFORM> {\n return new DeleteObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n\n public getObject(type: string, gguid: GUID): GetObjectRequestBuilder<PLATFORM> {\n return new GetObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n public getObjectList(type: string): GetFullObjectListRequestBuilder<PLATFORM> {\n return new GetFullObjectListRequestBuilder(this.typedFetch, type);\n }\n public getPartialObjectList(type: string): GetPartialObjectListRequestBuilder<PLATFORM> {\n return new GetPartialObjectListRequestBuilder(this.typedFetch, type);\n }\n\n public getObjectListCount(type: string): GetObjectListCountRequestBuilder<PLATFORM> {\n return new GetObjectListCountRequestBuilder(this.typedFetch, type);\n }\n\n public saveObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, void> {\n return new PutObjectRequestBuilder<PLATFORM, void>(this.typedFetch, this.dataObjectNormalizer, dataObject, () =>\n Promise.resolve(),\n );\n }\n\n public saveAndReturnObject(dataObject: IDataObject): PutObjectRequestBuilder<PLATFORM, IDataObject> {\n return new PutObjectRequestBuilder<PLATFORM, IDataObject>(\n this.typedFetch,\n this.dataObjectNormalizer,\n dataObject,\n () => this.getObject(dataObject.objectType, dataObject.id).then((p) => p.data),\n );\n }\n\n public createObject(type: string): CreateObjectRequestBuilder<PLATFORM> {\n return new CreateObjectRequestBuilder(this.typedFetch, this.dataObjectNormalizer, type);\n }\n\n public getPermissionInfo(type: string, gguid: GUID): GetPermissionInfoRequestBuilder<PLATFORM> {\n return new GetPermissionInfoRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPermissionInfoCount(type: string, gguid: GUID): GetPermissionInfoCountRequestBuilder<PLATFORM> {\n return new GetPermissionInfoCountRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPermissionDetails(\n type: string,\n gguid: GUID,\n permissionGguid: string,\n ): GetPermissionDetailsRequestBuilder<PLATFORM> {\n return new GetPermissionDetailsRequestBuilder(this.typedFetch, type, gguid, permissionGguid);\n }\n\n public getObjectSchema(type: string): GetObjectSchemaRequestBuilder<PLATFORM> {\n return new GetObjectSchemaRequestBuilder<PLATFORM>(this.typedFetch, type);\n }\n public getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM> {\n return new GetObjectDescriptionRequestBuilder(this.typedFetch, type);\n }\n public getRecordTypeImage(\n type: string,\n ): GetRecordTypeImageRequestBuilder<PLATFORM & IDataObjectTypeIconPart, ArrayBuffer> {\n return new GetRecordTypeImageRequestBuilder<PLATFORM & IDataObjectTypeIconPart, ArrayBuffer>(\n this.typedFetch,\n type,\n (p) => p.arrayBuffer(),\n );\n }\n\n public getRecordTypeImageBlob(\n type: string,\n ): GetRecordTypeImageRequestBuilder<PLATFORM & IDataObjectTypeIconPart, Blob> {\n return new GetRecordTypeImageRequestBuilder<PLATFORM & IDataObjectTypeIconPart, Blob>(\n this.typedFetch,\n type,\n (p) => p.blob(),\n );\n }\n\n public query(query: string): QueryRequestBuilder<PLATFORM> {\n return new QueryRequestBuilder(this.typedFetch, query);\n }\n\n public getRecentlyUsedObjectList(type: string): GetRecentlyUsedObjectListRequestBuilder<PLATFORM> {\n return new GetRecentlyUsedObjectListRequestBuilder(this.typedFetch, type);\n }\n\n public maskAsRecentlyUsedDataObject(\n type: string,\n gguid: GUID,\n ): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM> {\n return new MaskAsRecentlyUsedDataObjectRequestBuilder(this.typedFetch, type, gguid);\n }\n\n public getDefaultRecordImage(type: string): GetDefaultRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new GetDefaultRecordImageRequestBuilder(this.typedFetch, type);\n }\n public getDefaultRecordImageAsBlob(\n type: string,\n ): GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new GetDefaultRecordImageAsBlobRequestBuilder(this.typedFetch, type);\n }\n public updateDefaultRecordImage(\n type: string,\n fileExtension: string,\n ): PutDefaultRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new PutDefaultRecordImageRequestBuilder(this.typedFetch, type, fileExtension);\n }\n public deleteDefaultRecordImage(\n type: string,\n ): DeleteDefaultRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new DeleteDefaultRecordImageRequestBuilder(this.typedFetch, type);\n }\n\n public getRecordImage(type: string, gguid: GUID): GetRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new GetRecordImageRequestBuilder(this.typedFetch, type, gguid);\n }\n public getRecordImageAsBlob(\n type: string,\n gguid: GUID,\n ): GetRecordImageAsBlobRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new GetRecordImageAsBlobRequestBuilder(this.typedFetch, type, gguid);\n }\n public updateRecordImage(\n type: string,\n gguid: GUID,\n eTagOfRecord: string,\n fileExtension: string,\n ): PutRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new PutRecordImageRequestBuilder(this.typedFetch, type, gguid, eTagOfRecord, fileExtension);\n }\n public deleteRecordImage(\n type: string,\n gguid: GUID,\n ): DeleteRecordImageRequestBuilder<PLATFORM & IDataObjectImagePart> {\n return new DeleteRecordImageRequestBuilder(this.typedFetch, type, gguid);\n }\n}\n\nexport class DataObjectNormalizer {\n public normalizeDataObject(dataObject: Partial<IDataObject>): Partial<IDataObject> {\n dataObject = dataObject || { fields: {} };\n const normalizedDataObject: Partial<IDataObject> = {\n fields: dataObject.fields || {},\n foreignEditPermission:\n dataObject.foreignEditPermission == null\n ? ForeignEditPermission.PRIVATE\n : dataObject.foreignEditPermission,\n };\n if (dataObject.permissions) {\n normalizedDataObject.permissions = this.normalizePermissions(dataObject.permissions);\n }\n return normalizedDataObject;\n }\n public normalizePermissions(permissions?: IPermission[]): IPermission[] {\n return permissions.map((p) => {\n return {\n RIGHTOWNERGGUID: p.RIGHTOWNERGGUID,\n ACCESSRIGHT: p.ACCESSRIGHT,\n ROLE: p.ROLE,\n };\n });\n }\n}\n\nexport class GetDefaultRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/image/default\", \"GET\", ArrayBuffer> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(\n typedFetch,\n \"/type/:dataObjectType/image/default\",\n \"GET\",\n {\n dataObjectType: type,\n },\n (p) => p.arrayBuffer(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.width = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.height = maxHeight;\n return this;\n }\n}\n\nexport class GetDefaultRecordImageAsBlobRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/image/default\", \"GET\", Blob> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(\n typedFetch,\n \"/type/:dataObjectType/image/default\",\n \"GET\",\n {\n dataObjectType: type,\n },\n (p) => p.blob(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.width = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.height = maxHeight;\n return this;\n }\n}\n\nexport class DeleteDefaultRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/image/default\", \"DELETE\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/image/default\", \"DELETE\", {\n dataObjectType: type,\n });\n }\n}\nexport class PutDefaultRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/image/default\", \"PUT\", void> {\n private binaryLoader: BinaryLoader;\n\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n type: string,\n private fileExtension: string,\n ) {\n super(typedFetch, \"/type/:dataObjectType/image/default\", \"PUT\", {\n dataObjectType: type,\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setImageFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setImageFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setHeader(\"CAS-FILE-EXTENSION\", this.fileExtension);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\n\nexport class GetRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"GET\", ArrayBuffer> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, addressGguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectType: type,\n dataObjectGGUID: addressGguid,\n },\n (p) => p.arrayBuffer(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.width = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.height = maxHeight;\n return this;\n }\n}\n\nexport class GetRecordImageAsBlobRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"GET\", Blob> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n },\n (p) => p.blob(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.width = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.width = maxHeight;\n return this;\n }\n}\n\nexport class DeleteRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"DELETE\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"DELETE\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\nexport class PutRecordImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectImagePart,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"PUT\", void> {\n private binaryLoader: BinaryLoader;\n\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n type: string,\n gguid: GUID,\n private eTagOfRecord: string,\n private fileExtension: string,\n ) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/image\", \"PUT\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setImageFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setImageFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setHeader(\"IF-MATCH\", this.eTagOfRecord);\n this.setHeader(\"CAS-FILE-EXTENSION\", this.fileExtension);\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\n\nexport class PutObjectRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"PUT\",\n T\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectNormalizer: DataObjectNormalizer,\n dao: IDataObject,\n transform: (response: Response) => Promise<T>,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"PUT\",\n {\n dataObjectType: dao.objectType,\n dataObjectGGUID: dao.id,\n },\n transform,\n );\n this.setBody(JSON.stringify(dataObjectNormalizer.normalizeDataObject(dao)));\n this.setHeader(\"IF-MATCH\", dao.ETAG);\n this.setContentType(\"application/json\");\n }\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n}\n\nexport class DeleteObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"DELETE\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID\", \"DELETE\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\n\nexport class GetObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID\",\n \"GET\",\n {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n },\n (response) =>\n response.json().then((dao) => {\n return getETag(response)\n .then((eTag) => (dao.ETAG = eTag))\n .then(\n () => dao,\n () => dao,\n );\n }),\n );\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePermissions(includePermissions = true): this {\n this._query.includePermissions = includePermissions;\n return this;\n }\n public includeSyncrecordPermissions(includeSyncrecordPermissions = true): this {\n this._query.includeSyncrecordPermissions = includeSyncrecordPermissions;\n return this;\n }\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n public includeMaxjournalid(includeMaxjournalid = true): this {\n this._query.includeMaxjournalid = includeMaxjournalid;\n return this;\n }\n public isFavorite(isFavorite = true): this {\n this._query.isfavorite = isFavorite;\n return this;\n }\n}\nexport abstract class GetObjectListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IDataObject[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n _path: Path,\n _method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, _path, _method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public withPreconfiguredTeamFilter(teamFilter: string): this {\n this._query.teamFilter = teamFilter;\n return this;\n }\n public withTeamFilter(teamFilter: ITeamFilter): this {\n this._query.teamFilter = new TeamFilter(teamFilter);\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n public withPreconfiguredOrderBy(orderBy: string): this {\n this._query.orderBy = orderBy;\n return this;\n }\n public orderBy(orderBy: string, isAscending = true): this {\n const sortOrder = isAscending ? \"ASC\" : \"DESC\";\n this._query.orderBy = this._query.orderBy || [];\n this._query.orderBy.push(`${orderBy} ${sortOrder}`);\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: string[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class GetFullObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends GetObjectListRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/full\", \"GET\", {\n dataObjectType: type,\n });\n this.withEntriesPerPage(DEFAULT_PAGE_SIZE);\n }\n}\n\nexport class GetPartialObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends GetObjectListRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/list\", \"GET\", {\n dataObjectType: type,\n });\n this.withEntriesPerPage(DEFAULT_PAGE_SIZE);\n }\n}\n\nexport class GetObjectListCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/count\", \"GET\", {\n dataObjectType: type,\n });\n }\n public withPreconfiguredTeamFilter(teamFilter: string): this {\n this._query.teamFilter = teamFilter;\n return this;\n }\n public withTeamFilter(teamFilter: ITeamFilter): this {\n this._query.teamFilter = new TeamFilter(teamFilter);\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: GUID[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class CreateObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType\",\n \"POST\",\n IDataObject\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectNormalizer: DataObjectNormalizer,\n type: string,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType\",\n \"POST\",\n {\n dataObjectType: type,\n },\n (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => new GetObjectRequestBuilder(typedFetch, type, id).then((p) => p.data));\n },\n );\n this.setDataObject({ objectType: type, fields: {} });\n }\n\n public withTemplateGguid(templateGguid: GUID): this {\n this._query.templateGguid = templateGguid;\n return this;\n }\n\n public tagAsRecentlyUsed(tagAsRecentlyUsed = true): this {\n this._query.tagAsRecentlyUsed = tagAsRecentlyUsed;\n return this;\n }\n\n public setDataObject(dataObject: Partial<IDataObject>): this {\n this.setBody(JSON.stringify(this.dataObjectNormalizer.normalizeDataObject(dataObject)));\n return this;\n }\n}\n\nexport class GetPermissionDetailsRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID, permissionGGUID: string) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n permissionGGUID,\n });\n }\n}\nexport class GetPermissionInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/full\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\nexport class GetPermissionInfoCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/permission/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/permission/count\", \"GET\", {\n dataObjectType: type,\n dataObjectGGUID: gguid,\n });\n }\n}\n\nexport class GetObjectSchemaRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/schema\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(\n typedFetch,\n \"/type/:dataObjectType/schema\",\n \"GET\",\n {\n dataObjectType: type,\n },\n (response) =>\n response.json().then((schema) => {\n Object.keys(schema.properties.fields)\n .map((p) => schema.properties.fields[p])\n .forEach((field) => this.normalizeMandatoryAndOptionalFlag(field));\n return schema;\n }),\n );\n }\n private normalizeMandatoryAndOptionalFlag(field: ICommonField) {\n if (field.mandatory == null) {\n field.mandatory = !field.optional;\n }\n if (field.optional == null) {\n field.optional = !field.mandatory;\n }\n return field;\n }\n}\n\nexport class GetObjectDescriptionRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/description\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/description\", \"GET\", {\n dataObjectType: type,\n });\n }\n}\n\nexport class QueryRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/query\",\n \"POST\",\n IMassQueryResult,\n IMassQueryResult | QueryResponseLegacyGw\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, query: string) {\n super(typedFetch, \"/query\", \"POST\", {}, (response) =>\n response\n .json()\n .catch(() => null)\n .then((p) => this.normalizeMassData(p)),\n );\n this.setBody(\n JSON.stringify({\n query,\n }),\n );\n }\n\n private normalizeMassData(result: IMassQueryResult | QueryResponseLegacyGw) {\n let unwrapped: IMassQueryResult = null;\n\n if (this.isLegacyGwResponse(result)) {\n if (result.length > 0) {\n unwrapped = result[0];\n }\n } else {\n unwrapped = result;\n }\n\n if (unwrapped == null) {\n unwrapped = {} as IMassQueryResult;\n }\n\n const normalized = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n displayNames: unwrapped.displayNames || (unwrapped as any).displaynames || {},\n rows: unwrapped.rows || ([] as Record<string, unknown>[]),\n types: unwrapped.types || {},\n };\n\n return normalized;\n }\n\n private isLegacyGwResponse(response: IMassQueryResult | QueryResponseLegacyGw): response is QueryResponseLegacyGw {\n return Array.isArray(response);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public includePrivateForeignrecords(includePrivateForeignrecords: boolean): this {\n this._query.includePrivateForeignrecords = includePrivateForeignrecords;\n return this;\n }\n}\n\nexport class GetRecordTypeImageRequestBuilder<\n PLATFORM extends IInterPlatform & IDataObjectTypeIconPart,\n T,\n> extends RequestBuilder<PLATFORM, \"/type/:dataObjectType/image\", \"GET\", T> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, transform: (response: Response) => Promise<T>) {\n super(\n typedFetch,\n \"/type/:dataObjectType/image\",\n \"GET\",\n {\n dataObjectType: type,\n },\n transform,\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public forIconType(iconType: string): this {\n this._query.iconType = iconType;\n return this;\n }\n}\n\nexport class GetRecentlyUsedObjectListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/recent/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string) {\n super(typedFetch, \"/type/:dataObjectType/recent/list\", \"GET\", {\n dataObjectType: type,\n });\n }\n\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public withWhereString(whereString: string): this {\n this._query.whereString = whereString;\n return this;\n }\n}\n\nexport class MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/recent\",\n \"POST\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/recent\", \"POST\", { dataObjectType, dataObjectGGUID });\n }\n}\n","import { RestypedFetch } from \"../types/restypedfetch\";\nimport { IInterPlatform, IDossierEntry, LinkDirection, GUID } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { locationHelper, getETag } from \"./response/headerutil\";\n\n/**\n * Provides builders to link specific REST operations\n */\nexport interface ILinkingService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to create a link between two objects\n * @param type the type of the record to be linked e.g. ADDRESS\n * @param gguid the gguid of the record to be linked\n */\n linkDataObject(type: string, gguid: GUID): PostDossierRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete an existing dossier entry.\n */\n deleteLink(dossierEntry: IDossierEntry): DeleteLinkRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete an existing link between two objects.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n * @param dossierentryGGUID the gguid of the dossier entry\n */\n deleteLink(type: string, gguid: GUID, dossierentryGGUID: GUID): DeleteLinkRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the detailed information\n * of a dossier entry which is linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n * @param dossierentryGGUID the gguid of the dossier entry\n */\n getDossierEntry(type: string, gguid: GUID, dossierentryGGUID: GUID): GetDossierEntryRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve amount of dossier entries\n * which are linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getDossierCount(type: string, gguid: GUID): GetDossierCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of dossier entries\n * which are linked to a given record.\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getDossier(type: string, gguid: GUID): GetDossierRequestBuilder<PLATFORM>;\n\n /**\n * Creates a builder which can be used to retrieve the list of primary linked\n * parent records\n * @param type the type of the record e.g. ADDRESS\n * @param gguid the gguid of the record\n */\n getPrimaryLinkParentsList(type: string, gguid: GUID): GetPrimaryParentsListRequestBuilder<PLATFORM>;\n}\nexport class LinkingService<PLATFORM extends IInterPlatform> implements ILinkingService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public linkDataObject(type: string, gguid: GUID): PostDossierRequestBuilder<PLATFORM> {\n return new PostDossierRequestBuilder(this.typedFetch, type, gguid);\n }\n public deleteLink(dossierEntry: IDossierEntry): DeleteLinkRequestBuilder<PLATFORM>;\n public deleteLink(type: string, gguid: GUID, dossierentryGGUID: GUID): DeleteLinkRequestBuilder<PLATFORM>;\n public deleteLink(\n typeOrDossierEntry: string | IDossierEntry,\n gguid?: GUID,\n dossierentryGGUID?: GUID,\n ): DeleteLinkRequestBuilder<PLATFORM> {\n let type: string;\n if (LinkingService.isDossierEntry(typeOrDossierEntry)) {\n type = typeOrDossierEntry.fields.OBJECTTYPE1;\n gguid = typeOrDossierEntry.fields.GGUID1;\n dossierentryGGUID = typeOrDossierEntry.id;\n } else {\n type = typeOrDossierEntry;\n }\n return new DeleteLinkRequestBuilder(this.typedFetch, type, gguid, dossierentryGGUID);\n }\n public getDossierEntry(\n type: string,\n gguid: GUID,\n dossierentryGGUID: GUID,\n ): GetDossierEntryRequestBuilder<PLATFORM> {\n return new GetDossierEntryRequestBuilder(this.typedFetch, type, gguid, dossierentryGGUID);\n }\n public getDossierCount(type: string, gguid: GUID): GetDossierCountRequestBuilder<PLATFORM> {\n return new GetDossierCountRequestBuilder(this.typedFetch, type, gguid);\n }\n public getDossier(type: string, gguid: GUID): GetDossierRequestBuilder<PLATFORM> {\n return new GetDossierRequestBuilder(this.typedFetch, type, gguid);\n }\n public getPrimaryLinkParentsList(type: string, gguid: GUID): GetPrimaryParentsListRequestBuilder<PLATFORM> {\n return new GetPrimaryParentsListRequestBuilder(this.typedFetch, type, gguid);\n }\n\n private static isDossierEntry(dossierEntryOrGuid: GUID | IDossierEntry): dossierEntryOrGuid is IDossierEntry {\n return dossierEntryOrGuid && (dossierEntryOrGuid as IDossierEntry).id != null;\n }\n}\n\nexport class PostDossierRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\",\n \"POST\",\n IDossierEntry\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier\",\n \"POST\",\n {\n dataObjectGGUID: gguid,\n dataObjectType: type,\n },\n (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\")\n .extract(response, \"dossierentryGGUID\")\n .then((id) => new GetDossierEntryRequestBuilder(typedFetch, type, gguid, id).then((p) => p.data));\n },\n );\n }\n public withDataObject(type: string, gguid: GUID): this {\n this._query.objectType2 = type;\n this._query.gguid2 = gguid;\n return this;\n }\n public withLinkAttribute(linkAttribute: string): this {\n this._query.attribute = linkAttribute;\n return this;\n }\n public withRole1(role1: string): this {\n this._query.role1 = role1;\n return this;\n }\n public withRole2(role2: string): this {\n this._query.role2 = role2;\n return this;\n }\n public withLinkDirection(linkDirection: LinkDirection): this {\n this._query.linkDirection = linkDirection;\n return this;\n }\n public withAdditionalField1(additionalField1: string): this {\n this._query.additionalField1 = additionalField1;\n return this;\n }\n public withAdditionalField2(additionalField2: string): this {\n this._query.additionalField2 = additionalField2;\n return this;\n }\n}\n\nexport class GetDossierEntryRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\"\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectType: string,\n dataObjectGGUID: GUID,\n dossierentryGGUID: GUID,\n ) {\n super(\n typedFetch,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\n \"GET\",\n {\n dataObjectType,\n dataObjectGGUID,\n dossierentryGGUID,\n },\n (response) =>\n response.json().then((dao) => {\n return getETag(response)\n .then((eTag) => (dao.ETAG = eTag))\n .then(\n () => dao,\n () => dao,\n );\n }),\n );\n }\n}\n\nexport class GetDossierCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/count\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n}\n\nexport class GetDossierRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/full\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n\n public forPage(page: number) {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number) {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n\n public forObjectTypes(objectTypes: string | string[]) {\n this._query.objectTypes = objectTypes;\n return this;\n }\n}\n\nexport class DeleteLinkRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\",\n \"DELETE\"\n> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n dataObjectType: string,\n dataObjectGGUID: GUID,\n dossierentryGGUID: GUID,\n ) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID\", \"DELETE\", {\n dataObjectType,\n dataObjectGGUID,\n dossierentryGGUID,\n });\n }\n}\nexport class GetPrimaryParentsListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, dataObjectGGUID: GUID) {\n super(typedFetch, \"/type/:dataObjectType/:dataObjectGGUID/primarylinkparents\", \"GET\", {\n dataObjectType,\n dataObjectGGUID,\n });\n }\n}\n","import { IUserInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IAddressService, GetAddressImageRequestBuilder, GetAddressImageAsBlobRequestBuilder } from \"./addressservice\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for user specific REST operations\n */\nexport interface IUserService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given user.\n * @param gguid the id of the user\n */\n getUser(gguid: GUID): GetUserRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the user image\n * for a given user.\n * @param user the user for whom the image should be retrieved\n */\n getUserImage(user: IUserInfo): GetAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the user image\n * of a given user as a [[Blob]].\n * This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param user the user for whom the image should be retrieved\n */\n getUserImageAsBlob(user: IUserInfo): GetAddressImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of users.\n */\n getUserCount(): GetUserCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of users.\n */\n getUserList(): GetFullUserListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of users.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialUserList(): GetPartialUserListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve information about\n * the currently logged in user.\n */\n getLoggedInUser(): GetLoggedInUserInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve login related information.\n */\n getLoginInformation(): GetLoginInformationRequestBuilder<PLATFORM>;\n}\nexport class UserService<PLATFORM extends IInterPlatform> implements IUserService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private addressService: IAddressService<PLATFORM>,\n ) {}\n public getUser(gguid: GUID): GetUserRequestBuilder<PLATFORM> {\n return new GetUserRequestBuilder(this.typedFetch, gguid);\n }\n public getUserImage(user: IUserInfo): GetAddressImageRequestBuilder<PLATFORM> {\n return this.addressService.getAddressImage(user.fields.GGUIDOFADDRESSRECORD);\n }\n public getUserImageAsBlob(user: IUserInfo): GetAddressImageAsBlobRequestBuilder<PLATFORM> {\n return this.addressService.getAddressImageAsBlob(user.fields.GGUIDOFADDRESSRECORD);\n }\n public getUserCount(): GetUserCountRequestBuilder<PLATFORM> {\n return new GetUserCountRequestBuilder(this.typedFetch);\n }\n public getUserList(): GetFullUserListRequestBuilder<PLATFORM> {\n return new GetFullUserListRequestBuilder(this.typedFetch);\n }\n public getPartialUserList(): GetPartialUserListRequestBuilder<PLATFORM> {\n return new GetPartialUserListRequestBuilder(this.typedFetch);\n }\n public getLoggedInUser(): GetLoggedInUserInfoRequestBuilder<PLATFORM> {\n return new GetLoggedInUserInfoRequestBuilder(this.typedFetch);\n }\n public getLoginInformation(): GetLoginInformationRequestBuilder<PLATFORM> {\n return new GetLoginInformationRequestBuilder(this.typedFetch);\n }\n}\nexport class GetUserRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<PLATFORM, \"/user/:GGUID\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/user/:GGUID\", \"GET\", {\n GGUID: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePrivilegedOperations(includePrivilegedOperations = true): this {\n this._query.includePrivilegedOperations = includePrivilegedOperations;\n return this;\n }\n}\n\nexport class GetUserCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetUserListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IUserInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n parameters: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, parameters);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullUserListRequestBuilder<PLATFORM extends IInterPlatform> extends GetUserListRequestBuilder<\n PLATFORM,\n \"/user/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/full\");\n }\n}\nexport class GetPartialUserListRequestBuilder<PLATFORM extends IInterPlatform> extends GetUserListRequestBuilder<\n PLATFORM,\n \"/user/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/list\");\n }\n}\nexport class GetLoggedInUserInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/self\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/self\");\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public includePrivilegedOperations(includePrivilegedOperations = true): this {\n this._query.includePrivilegedOperations = includePrivilegedOperations;\n return this;\n }\n}\nexport class GetLoginInformationRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/user/self/logininformation\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/user/self/logininformation\");\n }\n}\n","import { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { IInterPlatform, GUID } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { GetFullObjectListRequestBuilder, GetPartialObjectListRequestBuilder } from \"./dataobjectservice\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for address specific REST operations\n */\nexport interface IAddressService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve a list of addresses.\n */\n getAddressList(): GetAddressListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of addresses.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialAddressList(): GetPartialAddressListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image of the address\n * @param addressGguid the id of the address record\n * Please note that the returned image is an ArrayBuffer in this case.\n * To display the image it might be more appropriate to use\n * [[IAddressService.getAddressImageAsBlob]]\n */\n getAddressImage(addressGguid: GUID): GetAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the image of the address\n * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.\n * the src attribute of an img element.\n * @param addressGguid the id of the address record\n */\n getAddressImageAsBlob(addressGguid: GUID): GetAddressImageAsBlobRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the image of a given address\n * @param addressGguid the id of the address record\n * @param eTagOfAddress the ETAG field of an address object, please note that\n * it is used to guarantee update safety. It can be aquired from a previously\n * fetched address object.\n */\n updateAddressImage(addressGguid: GUID, eTagOfAddress: string): PutAddressImageRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to delete the image of a given address\n * @param addressGguid the id of the address record\n */\n deleteAddressImage(addressGguid: GUID): DeleteAddressImageRequestBuilder<PLATFORM>;\n}\n\nexport class AddressService<PLATFORM extends IInterPlatform> implements IAddressService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n\n public getAddressList(): GetAddressListRequestBuilder<PLATFORM> {\n return new GetAddressListRequestBuilder(this.typedFetch, \"address\");\n }\n public getPartialAddressList(): GetPartialAddressListRequestBuilder<PLATFORM> {\n return new GetPartialAddressListRequestBuilder(this.typedFetch, \"address\");\n }\n public getAddressImage(addressGguid: GUID): GetAddressImageRequestBuilder<PLATFORM> {\n return new GetAddressImageRequestBuilder(this.typedFetch, addressGguid);\n }\n public getAddressImageAsBlob(addressGguid: GUID): GetAddressImageAsBlobRequestBuilder<PLATFORM> {\n return new GetAddressImageAsBlobRequestBuilder(this.typedFetch, addressGguid);\n }\n public updateAddressImage(addressGguid: GUID, eTagOfAddress: GUID): PutAddressImageRequestBuilder<PLATFORM> {\n return new PutAddressImageRequestBuilder(this.typedFetch, addressGguid, eTagOfAddress);\n }\n public deleteAddressImage(addressGguid: GUID): DeleteAddressImageRequestBuilder<PLATFORM> {\n return new DeleteAddressImageRequestBuilder(this.typedFetch, addressGguid);\n }\n}\n\nexport class GetAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(\n typedFetch,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectGGUID: addressGguid,\n },\n (p) => p.arrayBuffer(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.maxWidth = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.maxHeight = maxHeight;\n return this;\n }\n}\n\nexport class GetAddressImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n Blob\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(\n typedFetch,\n \"/type/address/:dataObjectGGUID/image\",\n \"GET\",\n {\n dataObjectGGUID: addressGguid,\n },\n (p) => p.blob(),\n );\n this.setAcceptHeader(\"image/*\");\n }\n\n public withMaxWidth(maxWidth: number): this {\n this._query.maxWidth = maxWidth;\n return this;\n }\n\n public withMaxHeight(maxHeight: number): this {\n this._query.maxHeight = maxHeight;\n return this;\n }\n}\n\nexport class DeleteAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"DELETE\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID) {\n super(typedFetch, \"/type/address/:dataObjectGGUID/image\", \"DELETE\", {\n dataObjectGGUID: addressGguid,\n });\n }\n}\nexport class PutAddressImageRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/address/:dataObjectGGUID/image\",\n \"PUT\",\n void\n> {\n private binaryLoader: BinaryLoader;\n\n constructor(typedFetch: RestypedFetch<PLATFORM>, addressGguid: GUID, eTagOfAddress: string) {\n super(typedFetch, \"/type/address/:dataObjectGGUID/image\", \"PUT\", {\n dataObjectGGUID: addressGguid,\n });\n this.setHeader(\"IF-MATCH\", eTagOfAddress);\n this.binaryLoader = new BinaryLoader();\n }\n\n public setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setImageFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setImageFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\n\nexport class GetAddressListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetFullObjectListRequestBuilder<PLATFORM> {\n public usersOnly(isUser: boolean | null = true): this {\n this._query.isUser = isUser;\n return this;\n }\n public whenBirthdayIsOn(hasBirthdayOn: Date): this {\n this._query.hasBirthdayOn = hasBirthdayOn;\n return this;\n }\n}\n\nexport class GetPartialAddressListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetPartialObjectListRequestBuilder<PLATFORM> {\n public usersOnly(isUser: boolean | null = true): this {\n this._query.isUser = isUser;\n return this;\n }\n public whenBirthdayIsOn(hasBirthdayOn: Date): this {\n this._query.hasBirthdayOn = hasBirthdayOn;\n return this;\n }\n}\n","import { IInterPlatform, GUID } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\n\n/**\n * Provides builders for appointment specific REST operations\n */\nexport interface IAppointmentService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve the detailed participant information\n * for the given appointment and participant.\n * @param gguid unique identifier of the record to be retrieved\n * @param participantGGUID gguid of the participant\n */\n getParticipantDetails(gguid: GUID, participantGGUID: GUID): GetParticipantDetailsRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the list of participant\n * information for the given appointment.\n * @param gguid unique identifier of the record to be retrieved\n */\n getParticipantInfo(gguid: GUID): GetParticipantInfoRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of participants\n * for the given appointment.\n * @param gguid unique identifier of the record to be retrieved\n */\n getParticipantInfoCount(gguid: GUID): GetParticipantInfoCountRequestBuilder<PLATFORM>;\n}\n\nexport class AppointmentService<PLATFORM extends IInterPlatform> implements IAppointmentService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getParticipantDetails(gguid: GUID, participantGGUID: GUID): GetParticipantDetailsRequestBuilder<PLATFORM> {\n return new GetParticipantDetailsRequestBuilder(this.typedFetch, gguid, participantGGUID);\n }\n public getParticipantInfo(gguid: GUID): GetParticipantInfoRequestBuilder<PLATFORM> {\n return new GetParticipantInfoRequestBuilder(this.typedFetch, gguid);\n }\n public getParticipantInfoCount(gguid: GUID): GetParticipantInfoCountRequestBuilder<PLATFORM> {\n return new GetParticipantInfoCountRequestBuilder(this.typedFetch, gguid);\n }\n}\n\nexport class GetParticipantDetailsRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID, participantGGUID: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/:participantGGUID\", \"GET\", {\n dataObjectGGUID: gguid,\n participantGGUID,\n });\n }\n}\n\nexport class GetParticipantInfoRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/full\", \"GET\", {\n dataObjectGGUID: gguid,\n });\n }\n}\nexport class GetParticipantInfoCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/appointment/:dataObjectGGUID/participant/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/type/appointment/:dataObjectGGUID/participant/count\", \"GET\", {\n dataObjectGGUID: gguid,\n });\n }\n}\n","import { IInterPlatform, IServerVersion, IServerVersionResponseGw } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\n\n/**\n * Provides a builder to retrieve server version information\n */\nexport interface IServerInformationService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve server version information\n */\n getServerVersion(): ServerVersionRequestBuilder<PLATFORM>;\n}\n\nexport class ServerInformationService<PLATFORM extends IInterPlatform> implements IServerInformationService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getServerVersion(): ServerVersionRequestBuilder<PLATFORM> {\n return new ServerVersionRequestBuilder(this.typedFetch);\n }\n}\n\nexport class ServerVersionRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/version/server\",\n \"GET\",\n IServerVersion,\n IServerVersion | IServerVersionResponseGw\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/version/server\", \"GET\", {}, (response) =>\n response.json().then((result) => (this.isGwResponse(result) ? result.fields : result)),\n );\n }\n\n private isGwResponse(response: IServerVersionResponseGw | IServerVersion): response is IServerVersionResponseGw {\n return (response as IServerVersionResponseGw).fields != null;\n }\n}\n","import { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { IDataObject, IInterPlatform, HtmlFilter, GUID, ForeignEditPermission } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IDataObjectService } from \"./dataobjectservice\";\nimport { locationHelper } from \"./response/headerutil\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for email store specific REST operations.\n */\nexport interface IEmailStoreService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve content associated\n * with the given email store record\n * @param dataObjectGGUID unique identifier of the email store record\n */\n getEmail(dataObjectGGUID: GUID): GetEmailStoreRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to update the content associated\n * with the given the email store record\n */\n archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM>;\n}\n\nexport class EmailStoreService<PLATFORM extends IInterPlatform> implements IEmailStoreService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectService: IDataObjectService<PLATFORM>,\n ) {}\n public getEmail(dataObjectGGUID: GUID): GetEmailStoreRequestBuilder<PLATFORM> {\n return new GetEmailStoreRequestBuilder(this.typedFetch, dataObjectGGUID);\n }\n public archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM> {\n return new PostEmailStoreRequestBuilder<PLATFORM>(this.typedFetch, this.dataObjectService);\n }\n}\n\nexport class PostEmailStoreRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/emailstore/file\",\n \"POST\",\n IDataObject\n> {\n private static readonly DEFAULT_MESSAGE_MIME_TYPE = \"message/rfc822\";\n\n private binaryLoader: BinaryLoader;\n\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectService: IDataObjectService<PLATFORM>) {\n super(typedFetch, \"/type/emailstore/file\", \"POST\", {}, (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => dataObjectService.getObject(\"EMAILSTORE\", id).then((p) => p.data));\n });\n this.setHeader(\"EXPECT\", \"100-continue\");\n this.withForeignEditPermissionRestriction(ForeignEditPermission.PRIVATE);\n this.binaryLoader = new BinaryLoader();\n }\n\n public withForeignEditPermissionRestriction(foreignEditPermissionRestriction: ForeignEditPermission): this {\n this._query.foreignEditPermissionRestriction = foreignEditPermissionRestriction;\n return this;\n }\n\n public setContentFromArrayBuffer(\n buffer: ArrayBuffer,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(\n uInt8Array: Uint8Array,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(\n base64: string,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(\n file: File,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n public setContent(\n content: string,\n contentType: string = PostEmailStoreRequestBuilder.DEFAULT_MESSAGE_MIME_TYPE,\n ): this {\n this.binaryLoader.setContent(contentType, content);\n return this;\n }\n public execute(): Promise<IAPIResponse<IDataObject>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\nexport class GetEmailStoreRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/emailstore/:dataObjectGGUID/file\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectGGUID: GUID) {\n super(\n typedFetch,\n \"/type/emailstore/:dataObjectGGUID/file\",\n \"GET\",\n {\n dataObjectGGUID,\n },\n (response) => response.arrayBuffer(),\n );\n this.setAcceptHeader(\"*/*\");\n }\n public withHtmlFilter(htmlFilter: HtmlFilter): this {\n this._query.htmlFilter = htmlFilter;\n return this;\n }\n}\n","import { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { IDataObject, IInterPlatform, NoPathParams } from \"../types/interplatform\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for view specific REST operations\n */\nexport interface IViewService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve the list of views\n * for the given type\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n */\n getViewsForType(dataObjectType: string): GetViewsForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of views\n * for the given type\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n */\n getViewCountForType(dataObjectType: string): GetViewCountForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve additional information\n * about the given view\n * @param dataObjectType type of the view to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getViewDetails(dataObjectType: string, viewID: string): GetViewForTypeRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * for the given view\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getPartialItemsForView(dataObjectType: string, viewID: string): GetPartialItemsForViewRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of records\n * for the given view\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getItemsForView(dataObjectType: string, viewID: string): GetItemsForViewRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of records\n * for the given view\n * @param dataObjectType type of the records to be retrieved e.g. ADDRESS\n * @param viewID unique identifier of the view to be retrieved\n */\n getItemCountForView(dataObjectType: string, viewID: string): GetItemCountForViewRequestBuilder<PLATFORM>;\n}\n\nexport class ViewService<PLATFORM extends IInterPlatform> implements IViewService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getViewsForType(dataObjectType: string): GetViewsForTypeRequestBuilder<PLATFORM> {\n return new GetViewsForTypeRequestBuilder(this.typedFetch, dataObjectType);\n }\n public getViewCountForType(dataObjectType: string): GetViewCountForTypeRequestBuilder<PLATFORM> {\n return new GetViewCountForTypeRequestBuilder(this.typedFetch, dataObjectType);\n }\n public getViewDetails(dataObjectType: string, viewID: string): GetViewForTypeRequestBuilder<PLATFORM> {\n return new GetViewForTypeRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getPartialItemsForView(\n dataObjectType: string,\n viewID: string,\n ): GetPartialItemsForViewRequestBuilder<PLATFORM> {\n return new GetPartialItemsForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getItemsForView(dataObjectType: string, viewID: string): GetItemsForViewRequestBuilder<PLATFORM> {\n return new GetItemsForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n public getItemCountForView(dataObjectType: string, viewID: string): GetItemCountForViewRequestBuilder<PLATFORM> {\n return new GetItemCountForViewRequestBuilder(this.typedFetch, dataObjectType, viewID);\n }\n}\n\nexport abstract class GetViewItemsRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IDataObject[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n _path: Path,\n _method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, _path, _method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n public withPreconfiguredOrderBy(orderBy: string): this {\n this._query.orderBy = orderBy;\n return this;\n }\n public orderBy(orderBy: string, isAscending = true): this {\n const sortOrder = isAscending ? \"ASC\" : \"DESC\";\n this._query.orderBy = this._query.orderBy || [];\n this._query.orderBy.push(`${orderBy} ${sortOrder}`);\n return this;\n }\n\n public whenLinkedTo(linkedToType: string, linkedTo: string[], linkedToAttributes?: string[]): this {\n this._query.linkedToType = linkedToType;\n this._query.linkedTo = linkedTo;\n this._query.linkedToAttributes = linkedToAttributes;\n return this;\n }\n}\n\nexport class GetViewsForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string) {\n super(typedFetch, \"/type/:dataObjectType/view/list\", \"GET\", {\n dataObjectType,\n });\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public forViewKind(viewKind: string): this {\n this._query.viewKind = viewKind;\n return this;\n }\n}\nexport class GetViewCountForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string) {\n super(typedFetch, \"/type/:dataObjectType/view/count\", \"GET\", {\n dataObjectType,\n });\n }\n}\nexport class GetViewForTypeRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetPartialItemsForViewRequestBuilder<PLATFORM extends IInterPlatform> extends GetViewItemsRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/list\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetItemsForViewRequestBuilder<PLATFORM extends IInterPlatform> extends GetViewItemsRequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/full\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n}\nexport class GetItemCountForViewRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/:dataObjectType/view/:viewID/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectType: string, viewID: string) {\n super(typedFetch, \"/type/:dataObjectType/view/:viewID/count\", \"GET\", {\n dataObjectType,\n viewID,\n });\n }\n public whenUpdatedAfter(updatedAfter: Date): this {\n this._query.updatedAfter = updatedAfter;\n return this;\n }\n public whenInsertedAfter(insertedAfter: Date): this {\n this._query.insertedAfter = insertedAfter;\n return this;\n }\n\n public withIntervalStart(intervalStart: Date): this {\n this._query.intervalStart = intervalStart;\n return this;\n }\n public withIntervalEnd(intervalEnd: Date): this {\n this._query.intervalEnd = intervalEnd;\n return this;\n }\n public withSearchTerm(searchTerm: string): this {\n this._query.search = searchTerm;\n return this;\n }\n}\n","import { IGroupInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for group specific REST operations\n */\nexport interface IGroupService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given group.\n * @param gguid the id of the group\n */\n getGroup(gguid: GUID): GetGroupRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of groups.\n */\n getGroupCount(): GetGroupCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of groups.\n */\n getGroupList(): GetFullGroupListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of groups.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialGroupList(): GetPartialGroupListRequestBuilder<PLATFORM>;\n}\nexport class GroupService<PLATFORM extends IInterPlatform> implements IGroupService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getGroup(gguid: GUID): GetGroupRequestBuilder<PLATFORM> {\n return new GetGroupRequestBuilder(this.typedFetch, gguid);\n }\n public getGroupCount(): GetGroupCountRequestBuilder<PLATFORM> {\n return new GetGroupCountRequestBuilder(this.typedFetch);\n }\n public getGroupList(): GetFullGroupListRequestBuilder<PLATFORM> {\n return new GetFullGroupListRequestBuilder(this.typedFetch);\n }\n public getPartialGroupList(): GetPartialGroupListRequestBuilder<PLATFORM> {\n return new GetPartialGroupListRequestBuilder(this.typedFetch);\n }\n}\nexport class GetGroupRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<PLATFORM, \"/group/:GGUID\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/group/:GGUID\", \"GET\", {\n GGUID: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n}\n\nexport class GetGroupCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/group/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetGroupListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IGroupInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, params);\n }\n\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullGroupListRequestBuilder<PLATFORM extends IInterPlatform> extends GetGroupListRequestBuilder<\n PLATFORM,\n \"/group/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/full\");\n }\n}\nexport class GetPartialGroupListRequestBuilder<PLATFORM extends IInterPlatform> extends GetGroupListRequestBuilder<\n PLATFORM,\n \"/group/list\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/group/list\");\n }\n}\n","import { IResourceInfo, IInterPlatform, GUID, ForeignEditPermission, NoPathParams } from \"../types/interplatform\";\nimport { RequestBuilder, Methods } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport { IRestypedBase } from \"../types/restyped\";\n\n/**\n * Provides builders for resource specific REST operations\n */\nexport interface IResourceService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to retrieve detailed\n * information about a given resource.\n * @param gguid the id of the resource\n */\n getResource(gguid: GUID): GetResourceRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve the amount of resources.\n */\n getResourceCount(): GetResourceCountRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of resources.\n */\n getResourceList(): GetFullResourceListRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrieve a list of resources.\n * Please note that the result contains only a fraction of the available\n * information. It can be used to access data in an efficient way with\n * less network traffic.\n */\n getPartialResourceList(): GetPartialResourceListRequestBuilder<PLATFORM>;\n}\nexport class ResourceService<PLATFORM extends IInterPlatform> implements IResourceService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n public getResource(gguid: GUID): GetResourceRequestBuilder<PLATFORM> {\n return new GetResourceRequestBuilder(this.typedFetch, gguid);\n }\n public getResourceCount(): GetResourceCountRequestBuilder<PLATFORM> {\n return new GetResourceCountRequestBuilder(this.typedFetch);\n }\n public getResourceList(): GetFullResourceListRequestBuilder<PLATFORM> {\n return new GetFullResourceListRequestBuilder(this.typedFetch);\n }\n public getPartialResourceList(): GetPartialResourceListRequestBuilder<PLATFORM> {\n return new GetPartialResourceListRequestBuilder(this.typedFetch);\n }\n}\nexport class GetResourceRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/resource/:guid\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(typedFetch, \"/resource/:guid\", \"GET\", {\n guid: gguid,\n });\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n}\n\nexport class GetResourceCountRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/resource/count\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/count\");\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n}\n\nexport class GetResourceListRequestBuilder<\n ApiDef extends IRestypedBase,\n Path extends keyof ApiDef,\n Method extends Methods = \"GET\",\n> extends RequestBuilder<ApiDef, Path, Method, IResourceInfo[]> {\n constructor(\n typedFetch: RestypedFetch<ApiDef>,\n path: Path,\n method: Method = \"GET\" as Method,\n params: ApiDef[Path][Method][\"params\"] | NoPathParams = {},\n ) {\n super(typedFetch, path, method, params);\n }\n public forPage(page: number): this {\n this._query.page = page;\n return this;\n }\n public withEntriesPerPage(entriesPerPage: number): this {\n this._query.entriesPerPage = entriesPerPage;\n return this;\n }\n public withPreconfiguredFields(fields: string): this {\n this._query.fields = fields;\n return this;\n }\n public withFields(fields: string[]): this {\n this._query.fields = fields;\n return this;\n }\n public forObjectType(objectType: string): this {\n this._query.objectType = objectType;\n return this;\n }\n public withMinimumPermission(minPermission: ForeignEditPermission): this {\n this._query.minPermission = minPermission;\n return this;\n }\n public withDomainGuid(domainGuid: string): this {\n this._query.domainGuid = domainGuid;\n return this;\n }\n}\n\nexport class GetFullResourceListRequestBuilder<PLATFORM extends IInterPlatform> extends GetResourceListRequestBuilder<\n PLATFORM,\n \"/resource/full\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/full\");\n }\n}\nexport class GetPartialResourceListRequestBuilder<\n PLATFORM extends IInterPlatform,\n> extends GetResourceListRequestBuilder<PLATFORM, \"/resource/list\"> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/resource/list\");\n }\n}\n","import { RestypedFetch } from \"../types/restypedfetch\";\nimport { IInterPlatform, IDataObject, GUID } from \"../types/interplatform\";\nimport { RequestBuilder, IAPIResponse } from \"./request/requestbuilder\";\nimport { locationHelper } from \"./response/headerutil\";\nimport { IDataObjectService } from \"./dataobjectservice\";\nimport { BinaryLoader } from \"./request/binaryloader\";\n\n/**\n * Provides builders for document specific REST operations\n */\nexport interface IDocumentService<PLATFORM extends IInterPlatform> {\n /**\n * Creates a builder which can be used to upload a file.\n * Please note that after a successful upload a new document\n * record is going to be created as well. This new record can\n * be used to access the file later.\n */\n createDocument(): PostDocumentRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to retrive the file\n * associated with the given document record.\n * @param gguid unique identifier of the document record\n */\n getDocument(gguid: GUID): GetDocumentRequestBuilder<PLATFORM>;\n /**\n * Creates a builder which can be used to upload a new version for\n * the given document\n * @param gguid unique identifier of the document record\n * @param eTagOfRecord the ETAG field of the document object, please note that\n * it is used to guarantee update safety. It can be aquired from a previously\n * fetched document object.\n * @param fileExtension the file extension for the uploaded content\n */\n uploadDocument(gguid: GUID, eTagOfRecord: string, fileExtension: string): PutDocumentRequestBuilder<PLATFORM>;\n}\n\nexport class DocumentService<PLATFORM extends IInterPlatform> implements IDocumentService<PLATFORM> {\n constructor(\n private typedFetch: RestypedFetch<PLATFORM>,\n private dataObjectService: IDataObjectService<PLATFORM>,\n ) {}\n\n public createDocument(): PostDocumentRequestBuilder<PLATFORM> {\n return new PostDocumentRequestBuilder(this.typedFetch, this.dataObjectService);\n }\n public getDocument(gguid: GUID): GetDocumentRequestBuilder<PLATFORM> {\n return new GetDocumentRequestBuilder(this.typedFetch, gguid);\n }\n public uploadDocument(\n gguid: GUID,\n eTagOfRecord: string,\n fileExtension: string,\n ): PutDocumentRequestBuilder<PLATFORM> {\n return new PutDocumentRequestBuilder(this.typedFetch, gguid, eTagOfRecord, fileExtension);\n }\n}\n\nexport class PostDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/file\",\n \"POST\",\n IDataObject\n> {\n private binaryLoader: BinaryLoader;\n constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectService: IDataObjectService<PLATFORM>) {\n super(typedFetch, \"/type/document/file\", \"POST\", {}, (response) => {\n return locationHelper\n .createForPath(\"/type/:dataObjectType/:dataObjectGGUID\")\n .extract(response, \"dataObjectGGUID\")\n .then((id) => dataObjectService.getObject(\"DOCUMENT\", id).then((p) => p.data));\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n\n public execute(): Promise<IAPIResponse<IDataObject>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n}\nexport class GetDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/:dataObjectGGUID/file\",\n \"GET\",\n ArrayBuffer\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, gguid: GUID) {\n super(\n typedFetch,\n \"/type/document/:dataObjectGGUID/file\",\n \"GET\",\n {\n dataObjectGGUID: gguid,\n },\n (response) => response.arrayBuffer(),\n );\n this.withReadOnlyInterest();\n this.setAcceptHeader(\"*/*\");\n }\n public withReadOnlyInterest(readOnlyInterest = true): this {\n this._query.readOnly = readOnlyInterest;\n return this;\n }\n public withVersion(version: string): this {\n this._query.version = version;\n return this;\n }\n}\nexport class PutDocumentRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/type/document/:dataObjectGGUID/file\",\n \"PUT\",\n void\n> {\n private binaryLoader: BinaryLoader;\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n gguid: GUID,\n private eTagOfRecord: string,\n private fileExtension: string,\n ) {\n super(typedFetch, \"/type/document/:dataObjectGGUID/file\", \"PUT\", {\n dataObjectGGUID: gguid,\n });\n this.binaryLoader = new BinaryLoader();\n }\n\n public setContentFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this {\n this.binaryLoader.setContentFromArrayBuffer(contentType, buffer);\n return this;\n }\n public setContentFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this {\n this.binaryLoader.setContentFromUInt8Array(contentType, uInt8Array);\n return this;\n }\n public setContentFromBase64String(contentType: string, base64: string): this {\n this.binaryLoader.setContentFromBase64String(contentType, base64);\n return this;\n }\n public setContentFromFile(file: File, contentType: string = file.type): this {\n this.binaryLoader.setContentFromFile(file, contentType);\n return this;\n }\n\n public execute(): Promise<IAPIResponse<void>> {\n return this.binaryLoader\n .getBinary()\n .then((binary) => {\n this.setHeader(\"IF-MATCH\", this.eTagOfRecord);\n this.setHeader(\"CAS-FILE-EXTENSION\", this.fileExtension);\n this.setContentType(binary.contentType);\n this.setBody(binary.buffer);\n })\n .then((_) => super.execute());\n }\n\n public keepCheckedOut(keepCheckedOut = true): this {\n this._query.keepCheckedOut = keepCheckedOut;\n return this;\n }\n public createNewVersion(createNewVersion = true): this {\n this._query.createNewVersion = createNewVersion;\n return this;\n }\n public withVersionComment(versionComment: string): this {\n this._query.versionComment = versionComment;\n return this;\n }\n}\n","import { IInterPlatform, IServerVersion, IServerVersionResponseGw } from \"../types/interplatform\";\nimport { RequestBuilder } from \"./request/requestbuilder\";\nimport { RestypedFetch } from \"../types/restypedfetch\";\nimport {\n AppSettings,\n AppSettingsChange,\n AppSettingsEndpoint,\n AppSettingsSchema,\n AppSettingsSchemaPropertyScope,\n AppSettingsValues,\n StringKeyOf,\n} from \"../types/appsettings\";\n\n/**\n * Provides methods to retrieve information about settings and to get or set the settings themselves.\n */\nexport interface ISettingsService<PLATFORM extends IInterPlatform> {\n /**\n * Gets the settings schema for apps where it's defined.\n */\n getSchemaList(): GetSchemaListRequestBuilder<PLATFORM>;\n\n /**\n * Gets the settings schema for the given app. If the app has no schema, an empty one will be returned.\n */\n getSchema(appId: string): GetSchemaRequestBuilder<PLATFORM>;\n\n /**\n * Gets the effective settings stored for the given app. The effective settings contains all the properties\n * that affects the current user, including the global properties and the schema defaults as fallback.\n *\n * To get the settings only for the user or global\n * scope, use the [[GetAppSettingsRequestBuilder.withScope]] method on the returned builder.\n */\n getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE>;\n\n /**\n * Replaces all settings for the given app withing the scope. By default, the user settings are changed. To change the global settings,\n * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings\n * needs administrator privileges.\n *\n * Properties that are absent on the given settings object will removed on the scope.\n */\n setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: SETTINGSTYPE | null,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;\n\n /**\n * Changes the settings for the given app withing the scope partially. By default, the user settings are changed. To change the global settings,\n * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings\n * needs administrator privileges.\n *\n * Properties that are absent on the given settings object will be left untouched.\n */\n changeAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: Partial<SETTINGSTYPE>,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;\n}\n\nexport class SettingsService<PLATFORM extends IInterPlatform> implements ISettingsService<PLATFORM> {\n constructor(private typedFetch: RestypedFetch<PLATFORM>) {}\n\n public getSchemaList(): GetSchemaListRequestBuilder<PLATFORM> {\n return new GetSchemaListRequestBuilder(this.typedFetch);\n }\n\n public getSchema(appId: string): GetSchemaRequestBuilder<PLATFORM> {\n return new GetSchemaRequestBuilder(this.typedFetch, appId);\n }\n\n public getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE> {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId\", appId);\n }\n\n public setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: SETTINGSTYPE | null,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n return new SetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", appId, {\n _apiVersion: \"v1\",\n properties: settings ?? {},\n });\n }\n\n public changeAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(\n appId: string,\n settings: Partial<SETTINGSTYPE>,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n return new ExtendAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", appId, {\n _apiVersion: \"v1\",\n properties: settings ?? {},\n // JSON does not support \"undefined\", therefore we send the removed properties separately\n removedProperties: Object.keys(settings).filter((key) => typeof settings[key] === \"undefined\"),\n });\n }\n}\n\nexport class GetSchemaListRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/settings/app/list\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>) {\n super(typedFetch, \"/settings/app/list\", \"GET\");\n }\n}\n\nexport class GetSchemaRequestBuilder<PLATFORM extends IInterPlatform> extends RequestBuilder<\n PLATFORM,\n \"/settings/app/:appId/schema\",\n \"GET\"\n> {\n constructor(typedFetch: RestypedFetch<PLATFORM>, appId: string) {\n super(typedFetch, \"/settings/app/:appId/schema\", \"GET\", { appId: appId });\n }\n\n protected handleErrorResponse(response: Response): Promise<AppSettingsSchema> {\n if (response.status == 404) {\n return Promise.resolve({\n _apiVersion: \"v1\",\n properties: {},\n });\n }\n return super.handleErrorResponse(response);\n }\n}\n\nexport class GetAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n SETTINGSTYPE extends AppSettingsValues = AppSettingsValues,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"GET\", AppSettings<SETTINGSTYPE>> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n ) {\n super(typedFetch, endpoint, \"GET\", { appId: appId });\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE> {\n if (scope == \"global\") {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/global\", this.appId);\n } else {\n return new GetAppSettingsRequestBuilder(this.typedFetch, \"/settings/app/:appId/user\", this.appId);\n }\n }\n\n protected handleErrorResponse(response: Response): Promise<AppSettings<SETTINGSTYPE>> {\n if (response.status == 404) {\n return Promise.resolve({\n _apiVersion: \"v1\",\n properties: {} as unknown as SETTINGSTYPE,\n });\n }\n return super.handleErrorResponse(response);\n }\n}\n\nexport class SetAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"PUT\", AppSettings> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n private settings: AppSettings,\n ) {\n super(typedFetch, endpoint, \"PUT\", { appId: appId });\n this.setBody(JSON.stringify(settings));\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n if (scope == \"global\") {\n return new SetAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/global\",\n this.appId,\n this.settings,\n );\n } else {\n return new SetAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/user\",\n this.appId,\n this.settings,\n );\n }\n }\n}\n\nexport class ExtendAppSettingsRequestBuilder<\n PLATFORM extends IInterPlatform,\n ENDPOINT extends AppSettingsEndpoint,\n> extends RequestBuilder<PLATFORM, ENDPOINT, \"POST\", AppSettingsChange> {\n constructor(\n typedFetch: RestypedFetch<PLATFORM>,\n endpoint: ENDPOINT,\n private appId: string,\n private settings: AppSettingsChange,\n ) {\n super(typedFetch, endpoint, \"POST\", { appId: appId });\n this.setBody(JSON.stringify(settings));\n }\n\n public withScope(\n scope: AppSettingsSchemaPropertyScope,\n ): ExtendAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint> {\n if (scope == \"global\") {\n return new ExtendAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/global\",\n this.appId,\n this.settings,\n );\n } else {\n return new ExtendAppSettingsRequestBuilder(\n this.typedFetch,\n \"/settings/app/:appId/user\",\n this.appId,\n this.settings,\n );\n }\n }\n}\n"]}