@cas-smartdesign/data-access 5.2.0 → 5.3.0

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 (196) 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/package.json +1 -1
@@ -1,2 +1,2 @@
1
- var ze=(r=>(r.ExternalAccess="CASExternalAccess",r.LoggedInUser="CASLoggedInUser",r.PublicRecords="CASPublicRecords",r))(ze||{}),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}},O=(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))(O||{}),Ke=(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))(Ke||{}),$e=(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))($e||{});var Xe=(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))(Xe||{});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 n=e,a="";r.params&&Object.keys(r.params).forEach(u=>{n=n.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(T=>o(T)).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],T=o(I);return T==null?null:`${this.camelToDash(u)}=${encodeURIComponent(T)}`}).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+n+a,r)}};var R=class extends Error{constructor(t,r,n=null){super("Server returned non ok response.");this.status=t;this.statusText=r;this.text=n}},i=class{constructor(e,t,r="GET",n={},a=o=>o.json().then(p=>p).catch(p=>({}))){this.typedFetch=e;this._path=t;this._method=r;this._parameters=n;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},H=class{createForPath(e){return{extract:(r,n)=>this.getIdFromLocation(r,e,n)}}getIdFromLocation(e,t,r){let n,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?n=Promise.resolve(c[1]):n=Promise.reject(new Error(`Location header (${a}) did not matches the given pattern ${t.toString()}!`))}else n=Promise.reject(new Error("Location header not found!"));return n}},l=new H;var Ze=100,F=class{constructor(e,t){this.typedFetch=e;this.dataObjectNormalizer=t}deleteObject(e,t){return new Y(this.typedFetch,e,t)}getObject(e,t){return new f(this.typedFetch,e,t)}getObjectList(e){return new P(this.typedFetch,e)}getPartialObjectList(e){return new m(this.typedFetch,e)}getObjectListCount(e){return new W(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 J(this.typedFetch,this.dataObjectNormalizer,e)}getPermissionInfo(e,t){return new K(this.typedFetch,e,t)}getPermissionInfoCount(e,t){return new $(this.typedFetch,e,t)}getPermissionDetails(e,t,r){return new z(this.typedFetch,e,t,r)}getObjectSchema(e){return new X(this.typedFetch,e)}getObjectDescription(e){return new Z(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 ee(this.typedFetch,e)}getRecentlyUsedObjectList(e){return new te(this.typedFetch,e)}maskAsRecentlyUsedDataObject(e,t){return new re(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 i{constructor(e,t,r,n){super(e,"/type/:dataObjectType/:dataObjectGGUID","PUT",{dataObjectType:r.objectType,dataObjectGGUID:r.id},n),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}},Y=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID","DELETE",{dataObjectType:t,dataObjectGGUID:r})}},f=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID","GET",{dataObjectType:t,dataObjectGGUID:r},n=>n.json().then(a=>b(n).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 i{constructor(e,t,r="GET",n={}){super(e,t,r,n)}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}},P=class extends D{constructor(e,t){super(e,"/type/:dataObjectType/full","GET",{dataObjectType:t}),this.withEntriesPerPage(Ze)}},m=class extends D{constructor(e,t){super(e,"/type/:dataObjectType/list","GET",{dataObjectType:t}),this.withEntriesPerPage(Ze)}},W=class extends i{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}},J=class extends i{constructor(t,r,n){super(t,"/type/:dataObjectType","POST",{dataObjectType:n},a=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(a,"dataObjectGGUID").then(o=>new f(t,n,o).then(c=>c.data)));this.dataObjectNormalizer=r;this.setDataObject({objectType:n,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}},z=class extends i{constructor(e,t,r,n){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID","GET",{dataObjectType:t,dataObjectGGUID:r,permissionGGUID:n})}},K=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/full","GET",{dataObjectType:t,dataObjectGGUID:r})}},$=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/count","GET",{dataObjectType:t,dataObjectGGUID:r})}},X=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/schema","GET",{dataObjectType:t},r=>r.json().then(n=>(Object.keys(n.properties.fields).map(a=>n.properties.fields[a]).forEach(a=>this.normalizeMandatoryAndOptionalFlag(a)),n)))}normalizeMandatoryAndOptionalFlag(e){return e.mandatory==null&&(e.mandatory=!e.optional),e.optional==null&&(e.optional=!e.mandatory),e}},Z=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/description","GET",{dataObjectType:t})}},ee=class extends i{constructor(e,t){super(e,"/query","POST",{},r=>r.json().catch(()=>null).then(n=>this.normalizeMassData(n))),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 i{constructor(e,t,r){super(e,"/type/:dataObjectType/image","GET",{dataObjectType:t},r),this.setAcceptHeader("image/*")}forIconType(e){return this._query.iconType=e,this}},te=class extends i{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}},re=class extends i{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 se(this.typedFetch,e,t)}deleteLink(e,t,r){let n;return s.isDossierEntry(e)?(n=e.fields.OBJECTTYPE1,t=e.fields.GGUID1,r=e.id):n=e,new ae(this.typedFetch,n,t,r)}getDossierEntry(e,t,r){return new M(this.typedFetch,e,t,r)}getDossierCount(e,t){return new ie(this.typedFetch,e,t)}getDossier(e,t){return new ne(this.typedFetch,e,t)}getPrimaryLinkParentsList(e,t){return new oe(this.typedFetch,e,t)}static isDossierEntry(e){return e&&e.id!=null}},se=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier","POST",{dataObjectGGUID:r,dataObjectType:t},n=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID").extract(n,"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 i{constructor(e,t,r,n){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID","GET",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:n},a=>a.json().then(o=>b(a).then(c=>o.ETAG=c).then(()=>o,()=>o)))}},ie=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/count","GET",{dataObjectType:t,dataObjectGGUID:r})}},ne=class extends i{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}},ae=class extends i{constructor(e,t,r,n){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID","DELETE",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:n})}},oe=class extends i{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 pe(this.typedFetch,e)}getUserImage(e){return this.addressService.getAddressImage(e.fields.GGUIDOFADDRESSRECORD)}getUserImageAsBlob(e){return this.addressService.getAddressImageAsBlob(e.fields.GGUIDOFADDRESSRECORD)}getUserCount(){return new ue(this.typedFetch)}getUserList(){return new ce(this.typedFetch)}getPartialUserList(){return new de(this.typedFetch)}getLoggedInUser(){return new Ie(this.typedFetch)}getLoginInformation(){return new le(this.typedFetch)}},pe=class extends i{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}},ue=class extends i{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 i{constructor(e,t,r="GET",n={}){super(e,t,r,n)}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}},ce=class extends x{constructor(e){super(e,"/user/full")}},de=class extends x{constructor(e){super(e,"/user/list")}},Ie=class extends i{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}},le=class extends i{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),n=r.length,a=new Uint8Array(n);for(let o=0;o<n;o++)a[o]=r.charCodeAt(o);this.setContentFromUInt8Array(e,a)}setContentFromFile(e,t=e.type){let r=new Promise((n,a)=>{let o=new FileReader;o.addEventListener("loadend",()=>{n(o.result)}),o.addEventListener("error",()=>{a(o.error)}),o.readAsArrayBuffer(e)});this._binaryInfo=r.then(n=>({buffer:n,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 Te(this.typedFetch,"address")}getPartialAddressList(){return new Oe(this.typedFetch,"address")}getAddressImage(e){return new ye(this.typedFetch,e)}getAddressImageAsBlob(e){return new he(this.typedFetch,e)}updateAddressImage(e,t){return new me(this.typedFetch,e,t)}deleteAddressImage(e){return new Pe(this.typedFetch,e)}},ye=class extends i{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}},he=class extends i{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}},Pe=class extends i{constructor(e,t){super(e,"/type/address/:dataObjectGGUID/image","DELETE",{dataObjectGGUID:t})}},me=class extends i{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())}},Te=class extends P{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}},Oe=class extends m{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 Re(this.typedFetch,e)}getParticipantInfoCount(e){return new be(this.typedFetch,e)}},ge=class extends i{constructor(e,t,r){super(e,"/type/appointment/:dataObjectGGUID/participant/:participantGGUID","GET",{dataObjectGGUID:t,participantGGUID:r})}},Re=class extends i{constructor(e,t){super(e,"/type/appointment/:dataObjectGGUID/participant/full","GET",{dataObjectGGUID:t})}},be=class extends i{constructor(e,t){super(e,"/type/appointment/:dataObjectGGUID/participant/count","GET",{dataObjectGGUID:t})}};var v=class{constructor(e){this.typedFetch=e}getServerVersion(){return new Fe(this.typedFetch)}},Fe=class extends i{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 Ge(this.typedFetch,e)}archiveEmail(){return new Ae(this.typedFetch,this.dataObjectService)}},y=class y extends i{constructor(e,t){super(e,"/type/emailstore/file","POST",{},r=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(r,"dataObjectGGUID").then(n=>t.getObject("EMAILSTORE",n).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 Ae=y,Ge=class extends i{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 fe(this.typedFetch,e)}getViewCountForType(e){return new De(this.typedFetch,e)}getViewDetails(e,t){return new Le(this.typedFetch,e,t)}getPartialItemsForView(e,t){return new Se(this.typedFetch,e,t)}getItemsForView(e,t){return new Me(this.typedFetch,e,t)}getItemCountForView(e,t){return new Ee(this.typedFetch,e,t)}},B=class extends i{constructor(e,t,r="GET",n={}){super(e,t,r,n)}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}},fe=class extends i{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}},De=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/view/count","GET",{dataObjectType:t})}},Le=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/view/:viewID","GET",{dataObjectType:t,viewID:r})}},Se=class extends B{constructor(e,t,r){super(e,"/type/:dataObjectType/view/:viewID/list","GET",{dataObjectType:t,viewID:r})}},Me=class extends B{constructor(e,t,r){super(e,"/type/:dataObjectType/view/:viewID/full","GET",{dataObjectType:t,viewID:r})}},Ee=class extends i{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 xe(this.typedFetch,e)}getGroupCount(){return new Ue(this.typedFetch)}getGroupList(){return new je(this.typedFetch)}getPartialGroupList(){return new ve(this.typedFetch)}},xe=class extends i{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}},Ue=class extends i{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 i{constructor(e,t,r="GET",n={}){super(e,t,r,n)}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}},je=class extends N{constructor(e){super(e,"/group/full")}},ve=class extends N{constructor(e){super(e,"/group/list")}};var C=class{constructor(e){this.typedFetch=e}getResource(e){return new we(this.typedFetch,e)}getResourceCount(){return new qe(this.typedFetch)}getResourceList(){return new Be(this.typedFetch)}getPartialResourceList(){return new _e(this.typedFetch)}},we=class extends i{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 i{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 i{constructor(e,t,r="GET",n={}){super(e,t,r,n)}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}},Be=class extends Q{constructor(e){super(e,"/resource/full")}},_e=class extends Q{constructor(e){super(e,"/resource/list")}};var V=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}createDocument(){return new Ne(this.typedFetch,this.dataObjectService)}getDocument(e){return new Ce(this.typedFetch,e)}uploadDocument(e,t,r){return new Qe(this.typedFetch,e,t,r)}},Ne=class extends i{constructor(e,t){super(e,"/type/document/file","POST",{},r=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(r,"dataObjectGGUID").then(n=>t.getObject("DOCUMENT",n).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())}},Ce=class extends i{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}},Qe=class extends i{constructor(t,r,n,a){super(t,"/type/document/:dataObjectGGUID/file","PUT",{dataObjectGGUID:r});this.eTagOfRecord=n;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 Ve(this.typedFetch)}getSchema(e){return new ke(this.typedFetch,e)}getAppSettings(e){return new He(this.typedFetch,"/settings/app/:appId",e)}setAppSettings(e,t){return new Ye(this.typedFetch,"/settings/app/:appId/user",e,{_apiVersion:"v1",properties:t!=null?t:{}})}changeAppSettings(e,t){return new We(this.typedFetch,"/settings/app/:appId/user",e,{_apiVersion:"v1",properties:t!=null?t:{},removedProperties:Object.keys(t).filter(r=>typeof t[r]=="undefined")})}},Ve=class extends i{constructor(e){super(e,"/settings/app/list","GET")}},ke=class extends i{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)}},He=class s extends i{constructor(t,r,n){super(t,r,"GET",{appId:n});this.appId=n}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)}},Ye=class s extends i{constructor(t,r,n,a){super(t,r,"PUT",{appId:n});this.appId=n;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)}},We=class s extends i{constructor(t,r,n,a){super(t,r,"POST",{appId:n});this.appId=n;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 Je=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 Ur(s,e="6.0",t="common"){return new Je(s,e,t)}export{Ke as AccessRight,Xe as DatePrecision,O as ForeignEditPermission,$e as HtmlFilter,ze as TeamFilterConstant,Ur as create};
1
+ var st=(r=>(r.ExternalAccess="CASExternalAccess",r.LoggedInUser="CASLoggedInUser",r.PublicRecords="CASPublicRecords",r))(st||{}),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}},O=(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))(O||{}),it=(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))(it||{}),at=(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))(at||{});var nt=(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))(nt||{});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 a=e,n="";r.params&&Object.keys(r.params).forEach(c=>{a=a.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(T=>o(T)).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],T=o(I);return T==null?null:`${this.camelToDash(c)}=${encodeURIComponent(T)}`}).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+a+n,r)}};var b=class extends Error{constructor(t,r,a=null){super("Server returned non ok response.");this.status=t;this.statusText=r;this.text=a}},i=class{constructor(e,t,r="GET",a={},n=o=>o.json().then(p=>p).catch(p=>({}))){this.typedFetch=e;this._path=t;this._method=r;this._parameters=a;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},H=class{createForPath(e){return{extract:(r,a)=>this.getIdFromLocation(r,e,a)}}getIdFromLocation(e,t,r){let a,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?a=Promise.resolve(d[1]):a=Promise.reject(new Error(`Location header (${n}) did not matches the given pattern ${t.toString()}!`))}else a=Promise.reject(new Error("Location header not found!"));return a}},l=new H;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),a=r.length,n=new Uint8Array(a);for(let o=0;o<a;o++)n[o]=r.charCodeAt(o);this.setContentFromUInt8Array(e,n)}setContentFromFile(e,t=e.type){let r=new Promise((a,n)=>{let o=new FileReader;o.addEventListener("loadend",()=>{a(o.result)}),o.addEventListener("error",()=>{n(o.error)}),o.readAsArrayBuffer(e)});this._binaryInfo=r.then(a=>({buffer:a,contentType:t}))}getBinary(){return this._binaryInfo?this._binaryInfo:Promise.reject(new Error("No binary was configured!"))}};var ot=100,F=class{constructor(e,t){this.typedFetch=e;this.dataObjectNormalizer=t}deleteObject(e,t){return new ee(this.typedFetch,e,t)}getObject(e,t){return new f(this.typedFetch,e,t)}getObjectList(e){return new P(this.typedFetch,e)}getPartialObjectList(e){return new m(this.typedFetch,e)}getObjectListCount(e){return new te(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 re(this.typedFetch,this.dataObjectNormalizer,e)}getPermissionInfo(e,t){return new ie(this.typedFetch,e,t)}getPermissionInfoCount(e,t){return new ae(this.typedFetch,e,t)}getPermissionDetails(e,t,r){return new se(this.typedFetch,e,t,r)}getObjectSchema(e){return new ne(this.typedFetch,e)}getObjectDescription(e){return new oe(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 pe(this.typedFetch,e)}getRecentlyUsedObjectList(e){return new ce(this.typedFetch,e)}maskAsRecentlyUsedDataObject(e,t){return new ue(this.typedFetch,e,t)}getDefaultRecordImage(e){return new Y(this.typedFetch,e)}getDefaultRecordImageAsBlob(e){return new W(this.typedFetch,e)}updateDefaultRecordImage(e,t){return new z(this.typedFetch,e,t)}deleteDefaultRecordImage(e){return new J(this.typedFetch,e)}getRecordImage(e,t){return new K(this.typedFetch,e,t)}getRecordImageAsBlob(e,t){return new $(this.typedFetch,e,t)}updateRecordImage(e,t,r,a){return new Z(this.typedFetch,e,t,r,a)}deleteRecordImage(e,t){return new X(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}))}},Y=class extends i{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}},W=class extends i{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}},J=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/image/default","DELETE",{dataObjectType:t})}},z=class extends i{constructor(t,r,a){super(t,"/type/:dataObjectType/image/default","PUT",{dataObjectType:r});this.fileExtension=a;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())}},K=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/image","GET",{dataObjectType:t,dataObjectGGUID:r},a=>a.arrayBuffer()),this.setAcceptHeader("image/*")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.height=e,this}},$=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/image","GET",{dataObjectType:t,dataObjectGGUID:r},a=>a.blob()),this.setAcceptHeader("image/*")}withMaxWidth(e){return this._query.width=e,this}withMaxHeight(e){return this._query.width=e,this}},X=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/image","DELETE",{dataObjectType:t,dataObjectGGUID:r})}},Z=class extends i{constructor(t,r,a,n,o){super(t,"/type/:dataObjectType/:dataObjectGGUID/image","PUT",{dataObjectType:r,dataObjectGGUID:a});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 i{constructor(e,t,r,a){super(e,"/type/:dataObjectType/:dataObjectGGUID","PUT",{dataObjectType:r.objectType,dataObjectGGUID:r.id},a),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}},ee=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID","DELETE",{dataObjectType:t,dataObjectGGUID:r})}},f=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID","GET",{dataObjectType:t,dataObjectGGUID:r},a=>a.json().then(n=>R(a).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 i{constructor(e,t,r="GET",a={}){super(e,t,r,a)}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}},P=class extends D{constructor(e,t){super(e,"/type/:dataObjectType/full","GET",{dataObjectType:t}),this.withEntriesPerPage(ot)}},m=class extends D{constructor(e,t){super(e,"/type/:dataObjectType/list","GET",{dataObjectType:t}),this.withEntriesPerPage(ot)}},te=class extends i{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}},re=class extends i{constructor(t,r,a){super(t,"/type/:dataObjectType","POST",{dataObjectType:a},n=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(n,"dataObjectGGUID").then(o=>new f(t,a,o).then(d=>d.data)));this.dataObjectNormalizer=r;this.setDataObject({objectType:a,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}},se=class extends i{constructor(e,t,r,a){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/:permissionGGUID","GET",{dataObjectType:t,dataObjectGGUID:r,permissionGGUID:a})}},ie=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/full","GET",{dataObjectType:t,dataObjectGGUID:r})}},ae=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/permission/count","GET",{dataObjectType:t,dataObjectGGUID:r})}},ne=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/schema","GET",{dataObjectType:t},r=>r.json().then(a=>(Object.keys(a.properties.fields).map(n=>a.properties.fields[n]).forEach(n=>this.normalizeMandatoryAndOptionalFlag(n)),a)))}normalizeMandatoryAndOptionalFlag(e){return e.mandatory==null&&(e.mandatory=!e.optional),e.optional==null&&(e.optional=!e.mandatory),e}},oe=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/description","GET",{dataObjectType:t})}},pe=class extends i{constructor(e,t){super(e,"/query","POST",{},r=>r.json().catch(()=>null).then(a=>this.normalizeMassData(a))),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 i{constructor(e,t,r){super(e,"/type/:dataObjectType/image","GET",{dataObjectType:t},r),this.setAcceptHeader("image/*")}forIconType(e){return this._query.iconType=e,this}},ce=class extends i{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}},ue=class extends i{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 de(this.typedFetch,e,t)}deleteLink(e,t,r){let a;return s.isDossierEntry(e)?(a=e.fields.OBJECTTYPE1,t=e.fields.GGUID1,r=e.id):a=e,new ye(this.typedFetch,a,t,r)}getDossierEntry(e,t,r){return new M(this.typedFetch,e,t,r)}getDossierCount(e,t){return new Ie(this.typedFetch,e,t)}getDossier(e,t){return new le(this.typedFetch,e,t)}getPrimaryLinkParentsList(e,t){return new he(this.typedFetch,e,t)}static isDossierEntry(e){return e&&e.id!=null}},de=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier","POST",{dataObjectGGUID:r,dataObjectType:t},a=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID").extract(a,"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 i{constructor(e,t,r,a){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID","GET",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:a},n=>n.json().then(o=>R(n).then(d=>o.ETAG=d).then(()=>o,()=>o)))}},Ie=class extends i{constructor(e,t,r){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/count","GET",{dataObjectType:t,dataObjectGGUID:r})}},le=class extends i{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}},ye=class extends i{constructor(e,t,r,a){super(e,"/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID","DELETE",{dataObjectType:t,dataObjectGGUID:r,dossierentryGGUID:a})}},he=class extends i{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 Pe(this.typedFetch,e)}getUserImage(e){return this.addressService.getAddressImage(e.fields.GGUIDOFADDRESSRECORD)}getUserImageAsBlob(e){return this.addressService.getAddressImageAsBlob(e.fields.GGUIDOFADDRESSRECORD)}getUserCount(){return new me(this.typedFetch)}getUserList(){return new Te(this.typedFetch)}getPartialUserList(){return new Oe(this.typedFetch)}getLoggedInUser(){return new ge(this.typedFetch)}getLoginInformation(){return new be(this.typedFetch)}},Pe=class extends i{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}},me=class extends i{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 i{constructor(e,t,r="GET",a={}){super(e,t,r,a)}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}},Te=class extends x{constructor(e){super(e,"/user/full")}},Oe=class extends x{constructor(e){super(e,"/user/list")}},ge=class extends i{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}},be=class extends i{constructor(e){super(e,"/user/self/logininformation")}};var j=class{constructor(e){this.typedFetch=e}getAddressList(){return new fe(this.typedFetch,"address")}getPartialAddressList(){return new De(this.typedFetch,"address")}getAddressImage(e){return new Re(this.typedFetch,e)}getAddressImageAsBlob(e){return new Fe(this.typedFetch,e)}updateAddressImage(e,t){return new Ge(this.typedFetch,e,t)}deleteAddressImage(e){return new Ae(this.typedFetch,e)}},Re=class extends i{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}},Fe=class extends i{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}},Ae=class extends i{constructor(e,t){super(e,"/type/address/:dataObjectGGUID/image","DELETE",{dataObjectGGUID:t})}},Ge=class extends i{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())}},fe=class extends P{usersOnly(e=!0){return this._query.isUser=e,this}whenBirthdayIsOn(e){return this._query.hasBirthdayOn=e,this}},De=class extends m{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 Le(this.typedFetch,e,t)}getParticipantInfo(e){return new Se(this.typedFetch,e)}getParticipantInfoCount(e){return new Me(this.typedFetch,e)}},Le=class extends i{constructor(e,t,r){super(e,"/type/appointment/:dataObjectGGUID/participant/:participantGGUID","GET",{dataObjectGGUID:t,participantGGUID:r})}},Se=class extends i{constructor(e,t){super(e,"/type/appointment/:dataObjectGGUID/participant/full","GET",{dataObjectGGUID:t})}},Me=class extends i{constructor(e,t){super(e,"/type/appointment/:dataObjectGGUID/participant/count","GET",{dataObjectGGUID:t})}};var v=class{constructor(e){this.typedFetch=e}getServerVersion(){return new Ee(this.typedFetch)}},Ee=class extends i{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 je(this.typedFetch,e)}archiveEmail(){return new xe(this.typedFetch,this.dataObjectService)}},y=class y extends i{constructor(e,t){super(e,"/type/emailstore/file","POST",{},r=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(r,"dataObjectGGUID").then(a=>t.getObject("EMAILSTORE",a).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 xe=y,je=class extends i{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 Ue(this.typedFetch,e)}getViewCountForType(e){return new ve(this.typedFetch,e)}getViewDetails(e,t){return new we(this.typedFetch,e,t)}getPartialItemsForView(e,t){return new qe(this.typedFetch,e,t)}getItemsForView(e,t){return new Be(this.typedFetch,e,t)}getItemCountForView(e,t){return new _e(this.typedFetch,e,t)}},B=class extends i{constructor(e,t,r="GET",a={}){super(e,t,r,a)}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}},Ue=class extends i{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}},ve=class extends i{constructor(e,t){super(e,"/type/:dataObjectType/view/count","GET",{dataObjectType:t})}},we=class extends i{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})}},Be=class extends B{constructor(e,t,r){super(e,"/type/:dataObjectType/view/:viewID/full","GET",{dataObjectType:t,viewID:r})}},_e=class extends i{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 Ce(this.typedFetch,e)}getGroupCount(){return new Ne(this.typedFetch)}getGroupList(){return new Qe(this.typedFetch)}getPartialGroupList(){return new Ve(this.typedFetch)}},Ce=class extends i{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}},Ne=class extends i{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 i{constructor(e,t,r="GET",a={}){super(e,t,r,a)}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}},Qe=class extends C{constructor(e){super(e,"/group/full")}},Ve=class extends C{constructor(e){super(e,"/group/list")}};var N=class{constructor(e){this.typedFetch=e}getResource(e){return new ke(this.typedFetch,e)}getResourceCount(){return new He(this.typedFetch)}getResourceList(){return new Ye(this.typedFetch)}getPartialResourceList(){return new We(this.typedFetch)}},ke=class extends i{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}},He=class extends i{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 i{constructor(e,t,r="GET",a={}){super(e,t,r,a)}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}},Ye=class extends Q{constructor(e){super(e,"/resource/full")}},We=class extends Q{constructor(e){super(e,"/resource/list")}};var V=class{constructor(e,t){this.typedFetch=e;this.dataObjectService=t}createDocument(){return new Je(this.typedFetch,this.dataObjectService)}getDocument(e){return new ze(this.typedFetch,e)}uploadDocument(e,t,r){return new Ke(this.typedFetch,e,t,r)}},Je=class extends i{constructor(e,t){super(e,"/type/document/file","POST",{},r=>l.createForPath("/type/:dataObjectType/:dataObjectGGUID").extract(r,"dataObjectGGUID").then(a=>t.getObject("DOCUMENT",a).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())}},ze=class extends i{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}},Ke=class extends i{constructor(t,r,a,n){super(t,"/type/document/:dataObjectGGUID/file","PUT",{dataObjectGGUID:r});this.eTagOfRecord=a;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 $e(this.typedFetch)}getSchema(e){return new Xe(this.typedFetch,e)}getAppSettings(e){return new Ze(this.typedFetch,"/settings/app/:appId",e)}setAppSettings(e,t){return new et(this.typedFetch,"/settings/app/:appId/user",e,{_apiVersion:"v1",properties:t!=null?t:{}})}changeAppSettings(e,t){return new tt(this.typedFetch,"/settings/app/:appId/user",e,{_apiVersion:"v1",properties:t!=null?t:{},removedProperties:Object.keys(t).filter(r=>typeof t[r]=="undefined")})}},$e=class extends i{constructor(e){super(e,"/settings/app/list","GET")}},Xe=class extends i{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)}},Ze=class s extends i{constructor(t,r,a){super(t,r,"GET",{appId:a});this.appId=a}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)}},et=class s extends i{constructor(t,r,a,n){super(t,r,"PUT",{appId:a});this.appId=a;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)}},tt=class s extends i{constructor(t,r,a,n){super(t,r,"POST",{appId:a});this.appId=a;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 rt=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 Hr(s,e="6.0",t="common"){return new rt(s,e,t)}export{it as AccessRight,nt as DatePrecision,O as ForeignEditPermission,at as HtmlFilter,st as TeamFilterConstant,Hr as create};
2
2
  //# sourceMappingURL=dataaccess.mjs.map