@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
@@ -578,14 +578,79 @@ interface IQueryPart<RESPONSETYPE> {
578
578
  };
579
579
  };
580
580
  }
581
+ interface IDataObjectImagePart {
582
+ "/type/:dataObjectType/image/default": {
583
+ PUT: {
584
+ query: NoQueryParams;
585
+ params: {
586
+ dataObjectType: string;
587
+ };
588
+ body: ArrayBuffer;
589
+ };
590
+ GET: {
591
+ query: {
592
+ width?: number;
593
+ height?: number;
594
+ };
595
+ params: {
596
+ dataObjectType: string;
597
+ };
598
+ };
599
+ DELETE: {
600
+ query: NoQueryParams;
601
+ params: {
602
+ dataObjectType: string;
603
+ };
604
+ };
605
+ };
606
+ "/type/:dataObjectType/:dataObjectGGUID/image": {
607
+ PUT: {
608
+ query: NoQueryParams;
609
+ params: {
610
+ dataObjectType: string;
611
+ dataObjectGGUID: GUID;
612
+ };
613
+ body: ArrayBuffer;
614
+ };
615
+ GET: {
616
+ query: {
617
+ width?: number;
618
+ height?: number;
619
+ };
620
+ params: {
621
+ dataObjectType: string;
622
+ dataObjectGGUID: GUID;
623
+ };
624
+ };
625
+ DELETE: {
626
+ query: NoQueryParams;
627
+ params: {
628
+ dataObjectType: string;
629
+ dataObjectGGUID: GUID;
630
+ };
631
+ };
632
+ };
633
+ }
634
+ interface IDataObjectTypeIconPart {
635
+ "/type/:dataObjectType/image": {
636
+ GET: {
637
+ query: {
638
+ iconType?: string;
639
+ };
640
+ params: {
641
+ dataObjectType: string;
642
+ };
643
+ };
644
+ };
645
+ }
581
646
  interface IGwSpecific {
582
647
  gwSpecific: true;
583
648
  }
584
649
  interface IOpenSpecific {
585
650
  openSpecific: true;
586
651
  }
587
- type InterPlatformOpen = IInterPlatform & IDataObjectSchemaPart<FieldOpen> & IServerVersionPart<IServerVersion> & IQueryPart<IMassQueryResult> & IOpenSpecific;
588
- type InterPlatformGw = IInterPlatform & IServerVersionPart<IServerVersionResponseGw> & IGwSpecific;
652
+ type InterPlatformOpen = IInterPlatform & IDataObjectSchemaPart<FieldOpen> & IServerVersionPart<IServerVersion> & IQueryPart<IMassQueryResult> & IDataObjectImagePart & IOpenSpecific;
653
+ type InterPlatformGw = IInterPlatform & IServerVersionPart<IServerVersionResponseGw> & IDataObjectTypeIconPart & IGwSpecific;
589
654
  interface IInterPlatform extends IDataObjectSchemaPart<ICommonField>, IServerVersionPart<IServerVersion | IServerVersionResponseGw>, IQueryPart<IMassQueryResult | QueryResponseLegacyGw> {
590
655
  "/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID": {
591
656
  GET: {
@@ -935,16 +1000,6 @@ interface IInterPlatform extends IDataObjectSchemaPart<ICommonField>, IServerVer
935
1000
  response: IDataObject[];
936
1001
  };
937
1002
  };
938
- "/type/:dataObjectType/image": {
939
- GET: {
940
- query: {
941
- iconType?: string;
942
- };
943
- params: {
944
- dataObjectType: string;
945
- };
946
- };
947
- };
948
1003
  "/type/:dataObjectType/list": {
949
1004
  GET: {
950
1005
  query: IDataObjectQueryParameters;
@@ -1340,7 +1395,8 @@ declare abstract class RequestBuilder<ApiDef extends IRestypedBase, Path extends
1340
1395
  /**
1341
1396
  * Provides builders for record specific REST operations
1342
1397
  */
1343
- interface IDataObjectService<PLATFORM extends IInterPlatform> {
1398
+ type IDataObjectService<PLATFORM extends IInterPlatform> = ICommonDataObjectService<PLATFORM> & (PLATFORM extends IDataObjectImagePart ? IDataObjectImageService<PLATFORM> : unknown) & (PLATFORM extends IDataObjectTypeIconPart ? IDataObjectTypeIconService<PLATFORM> : unknown);
1399
+ interface ICommonDataObjectService<PLATFORM extends IInterPlatform> {
1344
1400
  /**
1345
1401
  * Creates a builder which can be used to delete a given record
1346
1402
  * @param type type of the record to be deleted e.g. ADDRESS
@@ -1428,20 +1484,6 @@ interface IDataObjectService<PLATFORM extends IInterPlatform> {
1428
1484
  * @param type record type e.g. ADDRESS
1429
1485
  */
1430
1486
  getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM>;
1431
- /**
1432
- * Creates a builder which can be used to retrieve the image
1433
- * for a given record type.
1434
- * @param type record type e.g. ADDRESS
1435
- */
1436
- getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;
1437
- /**
1438
- * Creates a builder which can be used to retrieve the image
1439
- * for a given record type.
1440
- * This can then be used to create a URL which can be used as e.g.
1441
- * the src attribute of an img element.
1442
- * @param type record type e.g. ADDRESS
1443
- */
1444
- getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;
1445
1487
  /**
1446
1488
  * Creates a builder which can be used to retrieve the result of the given
1447
1489
  * query.
@@ -1463,10 +1505,138 @@ interface IDataObjectService<PLATFORM extends IInterPlatform> {
1463
1505
  */
1464
1506
  maskAsRecentlyUsedDataObject(type: string, gguid: GUID): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM>;
1465
1507
  }
1508
+ interface IDataObjectImageService<PLATFORM extends IInterPlatform & IDataObjectImagePart> {
1509
+ /**
1510
+ * Creates a builder which can be used to retrieve the default image associated with the record type.
1511
+ * Please note that the returned image is an ArrayBuffer in this case.
1512
+ * To display the image it might be more appropriate to use
1513
+ * [[IDataObjectService.getRecordImageAsBlob]]
1514
+ *
1515
+ * @param type record e.g. ADDRESS
1516
+ */
1517
+ getDefaultRecordImage(type: string): GetDefaultRecordImageRequestBuilder<PLATFORM>;
1518
+ /**
1519
+ * Creates a builder which can be used to retrieve the image associated with the record type
1520
+ * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.
1521
+ * the src attribute of an img element.
1522
+ *
1523
+ * @param type record e.g. ADDRESS
1524
+ */
1525
+ getDefaultRecordImageAsBlob(type: string): GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM>;
1526
+ /**
1527
+ * Creates a builder which can be used to update the image associated with the record type.
1528
+ * @param type record e.g. ADDRESS
1529
+ * @param fileExtension the file extension for the uploaded content
1530
+ */
1531
+ updateDefaultRecordImage(type: string, fileExtension: string): PutDefaultRecordImageRequestBuilder<PLATFORM>;
1532
+ /**
1533
+ * Creates a builder which can be used to delete the image associated with the record type.
1534
+ * @param type record e.g. ADDRESS
1535
+ */
1536
+ deleteDefaultRecordImage(type: string): DeleteDefaultRecordImageRequestBuilder<PLATFORM>;
1537
+ /**
1538
+ * Creates a builder which can be used to retrieve the image associated with the record.
1539
+ * Please note that the returned image is an ArrayBuffer in this case.
1540
+ * To display the image it might be more appropriate to use
1541
+ * [[IDataObjectService.getRecordImageAsBlob]]
1542
+ *
1543
+ * @param type record e.g. ADDRESS
1544
+ * @param gguid gguid of the record
1545
+ */
1546
+ getRecordImage(type: string, gguid: GUID): GetRecordImageRequestBuilder<PLATFORM>;
1547
+ /**
1548
+ * Creates a builder which can be used to retrieve the image associated with the record
1549
+ * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.
1550
+ * the src attribute of an img element.
1551
+ *
1552
+ * @param type record e.g. ADDRESS
1553
+ * @param gguid gguid of the record
1554
+ */
1555
+ getRecordImageAsBlob(type: string, gguid: GUID): GetRecordImageAsBlobRequestBuilder<PLATFORM>;
1556
+ /**
1557
+ * Creates a builder which can be used to update the image associated with the given record.
1558
+ * @param type record e.g. ADDRESS
1559
+ * @param gguid gguid of the record
1560
+ * @param eTagOfRecord the ETAG field of the record, please note that
1561
+ * it is used to guarantee update safety. It can be aquired from a previously
1562
+ * fetched record.
1563
+ * @param fileExtension the file extension for the uploaded content
1564
+ */
1565
+ updateRecordImage(type: string, gguid: GUID, eTagOfRecord: string, fileExtension: string): PutRecordImageRequestBuilder<PLATFORM>;
1566
+ /**
1567
+ * Creates a builder which can be used to delete the image associated with the given record.
1568
+ * @param type record e.g. ADDRESS
1569
+ * @param gguid gguid of the record
1570
+ */
1571
+ deleteRecordImage(type: string, gguid: GUID): DeleteRecordImageRequestBuilder<PLATFORM>;
1572
+ }
1573
+ interface IDataObjectTypeIconService<PLATFORM extends IInterPlatform & IDataObjectTypeIconPart> {
1574
+ /**
1575
+ * Creates a builder which can be used to retrieve the image
1576
+ * for a given record type.
1577
+ * @param type record type e.g. ADDRESS
1578
+ */
1579
+ getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;
1580
+ /**
1581
+ * Creates a builder which can be used to retrieve the image
1582
+ * for a given record type.
1583
+ * This can then be used to create a URL which can be used as e.g.
1584
+ * the src attribute of an img element.
1585
+ * @param type record type e.g. ADDRESS
1586
+ */
1587
+ getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;
1588
+ }
1466
1589
  declare class DataObjectNormalizer {
1467
1590
  normalizeDataObject(dataObject: Partial<IDataObject>): Partial<IDataObject>;
1468
1591
  normalizePermissions(permissions?: IPermission[]): IPermission[];
1469
1592
  }
1593
+ declare class GetDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "GET", ArrayBuffer> {
1594
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1595
+ withMaxWidth(maxWidth: number): this;
1596
+ withMaxHeight(maxHeight: number): this;
1597
+ }
1598
+ declare class GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "GET", Blob> {
1599
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1600
+ withMaxWidth(maxWidth: number): this;
1601
+ withMaxHeight(maxHeight: number): this;
1602
+ }
1603
+ declare class DeleteDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "DELETE"> {
1604
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1605
+ }
1606
+ declare class PutDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "PUT", void> {
1607
+ private fileExtension;
1608
+ private binaryLoader;
1609
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, fileExtension: string);
1610
+ setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this;
1611
+ setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this;
1612
+ setImageFromBase64String(contentType: string, base64: string): this;
1613
+ setImageFromFile(file: File, contentType?: string): this;
1614
+ execute(): Promise<IAPIResponse<void>>;
1615
+ }
1616
+ declare class GetRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "GET", ArrayBuffer> {
1617
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, addressGguid: GUID);
1618
+ withMaxWidth(maxWidth: number): this;
1619
+ withMaxHeight(maxHeight: number): this;
1620
+ }
1621
+ declare class GetRecordImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "GET", Blob> {
1622
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID);
1623
+ withMaxWidth(maxWidth: number): this;
1624
+ withMaxHeight(maxHeight: number): this;
1625
+ }
1626
+ declare class DeleteRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "DELETE"> {
1627
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID);
1628
+ }
1629
+ declare class PutRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "PUT", void> {
1630
+ private eTagOfRecord;
1631
+ private fileExtension;
1632
+ private binaryLoader;
1633
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID, eTagOfRecord: string, fileExtension: string);
1634
+ setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this;
1635
+ setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this;
1636
+ setImageFromBase64String(contentType: string, base64: string): this;
1637
+ setImageFromFile(file: File, contentType?: string): this;
1638
+ execute(): Promise<IAPIResponse<void>>;
1639
+ }
1470
1640
  declare class PutObjectRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID", "PUT", T> {
1471
1641
  constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectNormalizer: DataObjectNormalizer, dao: IDataObject, transform: (response: Response) => Promise<T>);
1472
1642
  tagAsRecentlyUsed(tagAsRecentlyUsed?: boolean): this;
@@ -1549,7 +1719,7 @@ declare class QueryRequestBuilder<PLATFORM extends IInterPlatform> extends Reque
1549
1719
  withEntriesPerPage(entriesPerPage: number): this;
1550
1720
  includePrivateForeignrecords(includePrivateForeignrecords: boolean): this;
1551
1721
  }
1552
- declare class GetRecordTypeImageRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image", "GET", T> {
1722
+ declare class GetRecordTypeImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectTypeIconPart, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image", "GET", T> {
1553
1723
  constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, transform: (response: Response) => Promise<T>);
1554
1724
  forIconType(iconType: string): this;
1555
1725
  }
@@ -1864,7 +2034,6 @@ interface IEmailStoreService<PLATFORM extends IInterPlatform> {
1864
2034
  /**
1865
2035
  * Creates a builder which can be used to update the content associated
1866
2036
  * with the given the email store record
1867
- * @param dataObjectGGUID unique identifier of the email store record
1868
2037
  */
1869
2038
  archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM>;
1870
2039
  }
@@ -2155,12 +2324,12 @@ interface ISettingsService<PLATFORM extends IInterPlatform> {
2155
2324
  * that affects the current user, including the global properties and the schema defaults as fallback.
2156
2325
  *
2157
2326
  * To get the settings only for the user or global
2158
- * scope, use the {@link GetAppSettingsRequestBuilder.withScope} method on the returned builder.
2327
+ * scope, use the [[GetAppSettingsRequestBuilder.withScope]] method on the returned builder.
2159
2328
  */
2160
2329
  getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(appId: string): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE>;
2161
2330
  /**
2162
2331
  * Replaces all settings for the given app withing the scope. By default, the user settings are changed. To change the global settings,
2163
- * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings
2332
+ * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings
2164
2333
  * needs administrator privileges.
2165
2334
  *
2166
2335
  * Properties that are absent on the given settings object will removed on the scope.
@@ -2168,7 +2337,7 @@ interface ISettingsService<PLATFORM extends IInterPlatform> {
2168
2337
  setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(appId: string, settings: SETTINGSTYPE | null): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;
2169
2338
  /**
2170
2339
  * Changes the settings for the given app withing the scope partially. By default, the user settings are changed. To change the global settings,
2171
- * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings
2340
+ * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings
2172
2341
  * needs administrator privileges.
2173
2342
  *
2174
2343
  * Properties that are absent on the given settings object will be left untouched.
@@ -2268,5 +2437,5 @@ interface IServiceRegistry<PLATFORM extends IInterPlatform> {
2268
2437
  */
2269
2438
  declare function create<VERSION extends APIVersion = "6.0", SERVER extends ServerType = "common">(api: IFetchWrapper, version?: VERSION, serverType?: SERVER): IServiceRegistry<IAPIVersions[VERSION][SERVER]>;
2270
2439
 
2271
- export { ALL_PUBLIC_PERMISSION_GGUID, type APIVersion, AccessRight, type AppSettings, type AppSettingsChange, type AppSettingsEndpoint, type AppSettingsListResponse, type AppSettingsResponse, type AppSettingsSchema, type AppSettingsSchemaBooleanProperty, type AppSettingsSchemaColorProperty, type AppSettingsSchemaFloatProperty, type AppSettingsSchemaIntegerProperty, type AppSettingsSchemaProperty, type AppSettingsSchemaPropertyScope, type AppSettingsSchemaPropertyType, type AppSettingsSchemaResponse, type AppSettingsSchemaStringProperty, type AppSettingsValues, DatePrecision, FetchError, type FieldCommon, type FieldCommon7, type FieldGw, type FieldGw7, type FieldOpen, type FieldType, type FieldTypes, type FieldTypesV6, type FieldTypesV7, ForeignEditPermission, type GUID, type HasSettingsAPIVersion, HtmlFilter, type IAPIResponse, type IAPIVersions, type IAddressRelatedPermissionOwnerInfoFields, type IAddressService, type IAddressSpecificQueryParameters, type IAppSettingsSchemaProperty, type IAppointmentService, type IBooleanField, type ICommonField, type ICommonPermissionOwnerFields, type ICountInfo, type IDataObject, type IDataObjectCountQueryParameters, type IDataObjectDateChangeQueryParameters, type IDataObjectDateIntervalQueryParameters, type IDataObjectDescription, type IDataObjectLinkQueryParameters, type IDataObjectQueryParameters, type IDataObjectSchema, type IDataObjectSchemaPart, type IDataObjectService, type IDataObjectTransferable, type IDataObjectTypesQueryParameter, type IDateTimeField, type IDecimalField, type IDecimalSuggestField, type IDocumentService, type IDomainQueryParameter, type IDossierEntry, type IDossierQueryParameters, type IDoubleField, type IDoubleSuggestField, type IEmailStoreService, type IFavoriteQueryParameter, type IFetchWrapper, type IGguidField, type IGroupInfo, type IGroupService, type IGwSpecific, type IHasFormatOption, type IHasLength, type IHasMaxLength, type IHasOverflowLength, type IHasPrecision, type IHasPrecisionAndScale, type IHasSelection, type IHasSystemDefinedTranslated, type IIncludeMaxJournalIdQueryParameter, type IIncludePermissionsQueryParameter, type IIncludePrivateForeignrecordsQueryParameter, type IIntField, type IIntSuggestField, type IInterPlatform, type ILastUsedDataObjectQueryParameters, type ILinkingService, type ILoginInformation, type IMassQueryResult, type IOpenSpecific, type IOrderByQueryParameters, type IPagedQueryParameters, type IPartialObjectQueryParameters, type IParticipantInfo, type IPermission, type IPermissionInfo, type IPermissionRequirementQueryParameter, type IQueryPart, type IRecentlyUsedQueryParameter, type IResourceInfo, type IResourceQueryParameters, type IResourceService, type IRestypedBase, type IRestypedIndexedBase, type IRestypedRoute, type ISearchQueryParameters, type ISelectionValue, type ISelectionValueListField, type IServerInformationService, type IServerSpecificVersionAPIDefinition, type IServerVersion, type IServerVersionPart, type IServerVersionResponseGw, type IServiceRegistry, type ISettingsService, type ISingleDataObjectQueryParameters, type ISingleDataObjectTypesQueryParameter, type IStringField, type IStringKeyed, type IStringListSuggestField, type IStringSuggestField, type ISuggestField, type ISuggestionWithRawValue, type ITeamFilter, type ITeamFilterQueryParameters, type ITextField, type ITypedJSONResponse, type ITypedRequestInit, type IUserInfo, type IUserService, type IVersion6, type IVersion7, type IViewInfo, type IViewItemsCountQueryParameters, type IViewItemsQueryParameters, type IViewKindQueryParameters, type IViewQueryParameters, type IViewService, type IWhereStringQueryParameters, type InterPlatform6, type InterPlatform6Common, type InterPlatform6Gw, type InterPlatform6Open, type InterPlatform7, type InterPlatform7Common, type InterPlatform7Gw, type InterPlatform7Open, type InterPlatformGw, type InterPlatformOpen, type LinkDirection, type Methods, type NoPathParams, type NoQueryParams, type OmitProp, PrimaryLinkedParent, type QueryResponseLegacyGw, RestypedFetch, type ServerIndependentFieldTypes, type ServerType, type StringKeyOf, TeamFilter, TeamFilterConstant, type V7SuggestField, create };
2440
+ export { ALL_PUBLIC_PERMISSION_GGUID, type APIVersion, AccessRight, type AppSettings, type AppSettingsChange, type AppSettingsEndpoint, type AppSettingsListResponse, type AppSettingsResponse, type AppSettingsSchema, type AppSettingsSchemaBooleanProperty, type AppSettingsSchemaColorProperty, type AppSettingsSchemaFloatProperty, type AppSettingsSchemaIntegerProperty, type AppSettingsSchemaProperty, type AppSettingsSchemaPropertyScope, type AppSettingsSchemaPropertyType, type AppSettingsSchemaResponse, type AppSettingsSchemaStringProperty, type AppSettingsValues, DatePrecision, FetchError, type FieldCommon, type FieldCommon7, type FieldGw, type FieldGw7, type FieldOpen, type FieldType, type FieldTypes, type FieldTypesV6, type FieldTypesV7, ForeignEditPermission, type GUID, type HasSettingsAPIVersion, HtmlFilter, type IAPIResponse, type IAPIVersions, type IAddressRelatedPermissionOwnerInfoFields, type IAddressService, type IAddressSpecificQueryParameters, type IAppSettingsSchemaProperty, type IAppointmentService, type IBooleanField, type ICommonField, type ICommonPermissionOwnerFields, type ICountInfo, type IDataObject, type IDataObjectCountQueryParameters, type IDataObjectDateChangeQueryParameters, type IDataObjectDateIntervalQueryParameters, type IDataObjectDescription, type IDataObjectImagePart, type IDataObjectLinkQueryParameters, type IDataObjectQueryParameters, type IDataObjectSchema, type IDataObjectSchemaPart, type IDataObjectService, type IDataObjectTransferable, type IDataObjectTypeIconPart, type IDataObjectTypesQueryParameter, type IDateTimeField, type IDecimalField, type IDecimalSuggestField, type IDocumentService, type IDomainQueryParameter, type IDossierEntry, type IDossierQueryParameters, type IDoubleField, type IDoubleSuggestField, type IEmailStoreService, type IFavoriteQueryParameter, type IFetchWrapper, type IGguidField, type IGroupInfo, type IGroupService, type IGwSpecific, type IHasFormatOption, type IHasLength, type IHasMaxLength, type IHasOverflowLength, type IHasPrecision, type IHasPrecisionAndScale, type IHasSelection, type IHasSystemDefinedTranslated, type IIncludeMaxJournalIdQueryParameter, type IIncludePermissionsQueryParameter, type IIncludePrivateForeignrecordsQueryParameter, type IIntField, type IIntSuggestField, type IInterPlatform, type ILastUsedDataObjectQueryParameters, type ILinkingService, type ILoginInformation, type IMassQueryResult, type IOpenSpecific, type IOrderByQueryParameters, type IPagedQueryParameters, type IPartialObjectQueryParameters, type IParticipantInfo, type IPermission, type IPermissionInfo, type IPermissionRequirementQueryParameter, type IQueryPart, type IRecentlyUsedQueryParameter, type IResourceInfo, type IResourceQueryParameters, type IResourceService, type IRestypedBase, type IRestypedIndexedBase, type IRestypedRoute, type ISearchQueryParameters, type ISelectionValue, type ISelectionValueListField, type IServerInformationService, type IServerSpecificVersionAPIDefinition, type IServerVersion, type IServerVersionPart, type IServerVersionResponseGw, type IServiceRegistry, type ISettingsService, type ISingleDataObjectQueryParameters, type ISingleDataObjectTypesQueryParameter, type IStringField, type IStringKeyed, type IStringListSuggestField, type IStringSuggestField, type ISuggestField, type ISuggestionWithRawValue, type ITeamFilter, type ITeamFilterQueryParameters, type ITextField, type ITypedJSONResponse, type ITypedRequestInit, type IUserInfo, type IUserService, type IVersion6, type IVersion7, type IViewInfo, type IViewItemsCountQueryParameters, type IViewItemsQueryParameters, type IViewKindQueryParameters, type IViewQueryParameters, type IViewService, type IWhereStringQueryParameters, type InterPlatform6, type InterPlatform6Common, type InterPlatform6Gw, type InterPlatform6Open, type InterPlatform7, type InterPlatform7Common, type InterPlatform7Gw, type InterPlatform7Open, type InterPlatformGw, type InterPlatformOpen, type LinkDirection, type Methods, type NoPathParams, type NoQueryParams, type OmitProp, PrimaryLinkedParent, type QueryResponseLegacyGw, RestypedFetch, type ServerIndependentFieldTypes, type ServerType, type StringKeyOf, TeamFilter, TeamFilterConstant, type V7SuggestField, create };
2272
2441
  export as namespace dataaccess;
@@ -578,14 +578,79 @@ interface IQueryPart<RESPONSETYPE> {
578
578
  };
579
579
  };
580
580
  }
581
+ interface IDataObjectImagePart {
582
+ "/type/:dataObjectType/image/default": {
583
+ PUT: {
584
+ query: NoQueryParams;
585
+ params: {
586
+ dataObjectType: string;
587
+ };
588
+ body: ArrayBuffer;
589
+ };
590
+ GET: {
591
+ query: {
592
+ width?: number;
593
+ height?: number;
594
+ };
595
+ params: {
596
+ dataObjectType: string;
597
+ };
598
+ };
599
+ DELETE: {
600
+ query: NoQueryParams;
601
+ params: {
602
+ dataObjectType: string;
603
+ };
604
+ };
605
+ };
606
+ "/type/:dataObjectType/:dataObjectGGUID/image": {
607
+ PUT: {
608
+ query: NoQueryParams;
609
+ params: {
610
+ dataObjectType: string;
611
+ dataObjectGGUID: GUID;
612
+ };
613
+ body: ArrayBuffer;
614
+ };
615
+ GET: {
616
+ query: {
617
+ width?: number;
618
+ height?: number;
619
+ };
620
+ params: {
621
+ dataObjectType: string;
622
+ dataObjectGGUID: GUID;
623
+ };
624
+ };
625
+ DELETE: {
626
+ query: NoQueryParams;
627
+ params: {
628
+ dataObjectType: string;
629
+ dataObjectGGUID: GUID;
630
+ };
631
+ };
632
+ };
633
+ }
634
+ interface IDataObjectTypeIconPart {
635
+ "/type/:dataObjectType/image": {
636
+ GET: {
637
+ query: {
638
+ iconType?: string;
639
+ };
640
+ params: {
641
+ dataObjectType: string;
642
+ };
643
+ };
644
+ };
645
+ }
581
646
  interface IGwSpecific {
582
647
  gwSpecific: true;
583
648
  }
584
649
  interface IOpenSpecific {
585
650
  openSpecific: true;
586
651
  }
587
- type InterPlatformOpen = IInterPlatform & IDataObjectSchemaPart<FieldOpen> & IServerVersionPart<IServerVersion> & IQueryPart<IMassQueryResult> & IOpenSpecific;
588
- type InterPlatformGw = IInterPlatform & IServerVersionPart<IServerVersionResponseGw> & IGwSpecific;
652
+ type InterPlatformOpen = IInterPlatform & IDataObjectSchemaPart<FieldOpen> & IServerVersionPart<IServerVersion> & IQueryPart<IMassQueryResult> & IDataObjectImagePart & IOpenSpecific;
653
+ type InterPlatformGw = IInterPlatform & IServerVersionPart<IServerVersionResponseGw> & IDataObjectTypeIconPart & IGwSpecific;
589
654
  interface IInterPlatform extends IDataObjectSchemaPart<ICommonField>, IServerVersionPart<IServerVersion | IServerVersionResponseGw>, IQueryPart<IMassQueryResult | QueryResponseLegacyGw> {
590
655
  "/type/:dataObjectType/:dataObjectGGUID/dossier/:dossierentryGGUID": {
591
656
  GET: {
@@ -935,16 +1000,6 @@ interface IInterPlatform extends IDataObjectSchemaPart<ICommonField>, IServerVer
935
1000
  response: IDataObject[];
936
1001
  };
937
1002
  };
938
- "/type/:dataObjectType/image": {
939
- GET: {
940
- query: {
941
- iconType?: string;
942
- };
943
- params: {
944
- dataObjectType: string;
945
- };
946
- };
947
- };
948
1003
  "/type/:dataObjectType/list": {
949
1004
  GET: {
950
1005
  query: IDataObjectQueryParameters;
@@ -1340,7 +1395,8 @@ declare abstract class RequestBuilder<ApiDef extends IRestypedBase, Path extends
1340
1395
  /**
1341
1396
  * Provides builders for record specific REST operations
1342
1397
  */
1343
- interface IDataObjectService<PLATFORM extends IInterPlatform> {
1398
+ type IDataObjectService<PLATFORM extends IInterPlatform> = ICommonDataObjectService<PLATFORM> & (PLATFORM extends IDataObjectImagePart ? IDataObjectImageService<PLATFORM> : unknown) & (PLATFORM extends IDataObjectTypeIconPart ? IDataObjectTypeIconService<PLATFORM> : unknown);
1399
+ interface ICommonDataObjectService<PLATFORM extends IInterPlatform> {
1344
1400
  /**
1345
1401
  * Creates a builder which can be used to delete a given record
1346
1402
  * @param type type of the record to be deleted e.g. ADDRESS
@@ -1428,20 +1484,6 @@ interface IDataObjectService<PLATFORM extends IInterPlatform> {
1428
1484
  * @param type record type e.g. ADDRESS
1429
1485
  */
1430
1486
  getObjectDescription(type: string): GetObjectDescriptionRequestBuilder<PLATFORM>;
1431
- /**
1432
- * Creates a builder which can be used to retrieve the image
1433
- * for a given record type.
1434
- * @param type record type e.g. ADDRESS
1435
- */
1436
- getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;
1437
- /**
1438
- * Creates a builder which can be used to retrieve the image
1439
- * for a given record type.
1440
- * This can then be used to create a URL which can be used as e.g.
1441
- * the src attribute of an img element.
1442
- * @param type record type e.g. ADDRESS
1443
- */
1444
- getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;
1445
1487
  /**
1446
1488
  * Creates a builder which can be used to retrieve the result of the given
1447
1489
  * query.
@@ -1463,10 +1505,138 @@ interface IDataObjectService<PLATFORM extends IInterPlatform> {
1463
1505
  */
1464
1506
  maskAsRecentlyUsedDataObject(type: string, gguid: GUID): MaskAsRecentlyUsedDataObjectRequestBuilder<PLATFORM>;
1465
1507
  }
1508
+ interface IDataObjectImageService<PLATFORM extends IInterPlatform & IDataObjectImagePart> {
1509
+ /**
1510
+ * Creates a builder which can be used to retrieve the default image associated with the record type.
1511
+ * Please note that the returned image is an ArrayBuffer in this case.
1512
+ * To display the image it might be more appropriate to use
1513
+ * [[IDataObjectService.getRecordImageAsBlob]]
1514
+ *
1515
+ * @param type record e.g. ADDRESS
1516
+ */
1517
+ getDefaultRecordImage(type: string): GetDefaultRecordImageRequestBuilder<PLATFORM>;
1518
+ /**
1519
+ * Creates a builder which can be used to retrieve the image associated with the record type
1520
+ * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.
1521
+ * the src attribute of an img element.
1522
+ *
1523
+ * @param type record e.g. ADDRESS
1524
+ */
1525
+ getDefaultRecordImageAsBlob(type: string): GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM>;
1526
+ /**
1527
+ * Creates a builder which can be used to update the image associated with the record type.
1528
+ * @param type record e.g. ADDRESS
1529
+ * @param fileExtension the file extension for the uploaded content
1530
+ */
1531
+ updateDefaultRecordImage(type: string, fileExtension: string): PutDefaultRecordImageRequestBuilder<PLATFORM>;
1532
+ /**
1533
+ * Creates a builder which can be used to delete the image associated with the record type.
1534
+ * @param type record e.g. ADDRESS
1535
+ */
1536
+ deleteDefaultRecordImage(type: string): DeleteDefaultRecordImageRequestBuilder<PLATFORM>;
1537
+ /**
1538
+ * Creates a builder which can be used to retrieve the image associated with the record.
1539
+ * Please note that the returned image is an ArrayBuffer in this case.
1540
+ * To display the image it might be more appropriate to use
1541
+ * [[IDataObjectService.getRecordImageAsBlob]]
1542
+ *
1543
+ * @param type record e.g. ADDRESS
1544
+ * @param gguid gguid of the record
1545
+ */
1546
+ getRecordImage(type: string, gguid: GUID): GetRecordImageRequestBuilder<PLATFORM>;
1547
+ /**
1548
+ * Creates a builder which can be used to retrieve the image associated with the record
1549
+ * as a [[Blob]]. This can then be used to create a URL which can be used as e.g.
1550
+ * the src attribute of an img element.
1551
+ *
1552
+ * @param type record e.g. ADDRESS
1553
+ * @param gguid gguid of the record
1554
+ */
1555
+ getRecordImageAsBlob(type: string, gguid: GUID): GetRecordImageAsBlobRequestBuilder<PLATFORM>;
1556
+ /**
1557
+ * Creates a builder which can be used to update the image associated with the given record.
1558
+ * @param type record e.g. ADDRESS
1559
+ * @param gguid gguid of the record
1560
+ * @param eTagOfRecord the ETAG field of the record, please note that
1561
+ * it is used to guarantee update safety. It can be aquired from a previously
1562
+ * fetched record.
1563
+ * @param fileExtension the file extension for the uploaded content
1564
+ */
1565
+ updateRecordImage(type: string, gguid: GUID, eTagOfRecord: string, fileExtension: string): PutRecordImageRequestBuilder<PLATFORM>;
1566
+ /**
1567
+ * Creates a builder which can be used to delete the image associated with the given record.
1568
+ * @param type record e.g. ADDRESS
1569
+ * @param gguid gguid of the record
1570
+ */
1571
+ deleteRecordImage(type: string, gguid: GUID): DeleteRecordImageRequestBuilder<PLATFORM>;
1572
+ }
1573
+ interface IDataObjectTypeIconService<PLATFORM extends IInterPlatform & IDataObjectTypeIconPart> {
1574
+ /**
1575
+ * Creates a builder which can be used to retrieve the image
1576
+ * for a given record type.
1577
+ * @param type record type e.g. ADDRESS
1578
+ */
1579
+ getRecordTypeImage(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, ArrayBuffer>;
1580
+ /**
1581
+ * Creates a builder which can be used to retrieve the image
1582
+ * for a given record type.
1583
+ * This can then be used to create a URL which can be used as e.g.
1584
+ * the src attribute of an img element.
1585
+ * @param type record type e.g. ADDRESS
1586
+ */
1587
+ getRecordTypeImageBlob(type: string): GetRecordTypeImageRequestBuilder<PLATFORM, Blob>;
1588
+ }
1466
1589
  declare class DataObjectNormalizer {
1467
1590
  normalizeDataObject(dataObject: Partial<IDataObject>): Partial<IDataObject>;
1468
1591
  normalizePermissions(permissions?: IPermission[]): IPermission[];
1469
1592
  }
1593
+ declare class GetDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "GET", ArrayBuffer> {
1594
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1595
+ withMaxWidth(maxWidth: number): this;
1596
+ withMaxHeight(maxHeight: number): this;
1597
+ }
1598
+ declare class GetDefaultRecordImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "GET", Blob> {
1599
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1600
+ withMaxWidth(maxWidth: number): this;
1601
+ withMaxHeight(maxHeight: number): this;
1602
+ }
1603
+ declare class DeleteDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "DELETE"> {
1604
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string);
1605
+ }
1606
+ declare class PutDefaultRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image/default", "PUT", void> {
1607
+ private fileExtension;
1608
+ private binaryLoader;
1609
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, fileExtension: string);
1610
+ setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this;
1611
+ setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this;
1612
+ setImageFromBase64String(contentType: string, base64: string): this;
1613
+ setImageFromFile(file: File, contentType?: string): this;
1614
+ execute(): Promise<IAPIResponse<void>>;
1615
+ }
1616
+ declare class GetRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "GET", ArrayBuffer> {
1617
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, addressGguid: GUID);
1618
+ withMaxWidth(maxWidth: number): this;
1619
+ withMaxHeight(maxHeight: number): this;
1620
+ }
1621
+ declare class GetRecordImageAsBlobRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "GET", Blob> {
1622
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID);
1623
+ withMaxWidth(maxWidth: number): this;
1624
+ withMaxHeight(maxHeight: number): this;
1625
+ }
1626
+ declare class DeleteRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "DELETE"> {
1627
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID);
1628
+ }
1629
+ declare class PutRecordImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectImagePart> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID/image", "PUT", void> {
1630
+ private eTagOfRecord;
1631
+ private fileExtension;
1632
+ private binaryLoader;
1633
+ constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, gguid: GUID, eTagOfRecord: string, fileExtension: string);
1634
+ setImageFromArrayBuffer(contentType: string, buffer: ArrayBuffer): this;
1635
+ setImageFromUInt8Array(contentType: string, uInt8Array: Uint8Array): this;
1636
+ setImageFromBase64String(contentType: string, base64: string): this;
1637
+ setImageFromFile(file: File, contentType?: string): this;
1638
+ execute(): Promise<IAPIResponse<void>>;
1639
+ }
1470
1640
  declare class PutObjectRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/:dataObjectGGUID", "PUT", T> {
1471
1641
  constructor(typedFetch: RestypedFetch<PLATFORM>, dataObjectNormalizer: DataObjectNormalizer, dao: IDataObject, transform: (response: Response) => Promise<T>);
1472
1642
  tagAsRecentlyUsed(tagAsRecentlyUsed?: boolean): this;
@@ -1549,7 +1719,7 @@ declare class QueryRequestBuilder<PLATFORM extends IInterPlatform> extends Reque
1549
1719
  withEntriesPerPage(entriesPerPage: number): this;
1550
1720
  includePrivateForeignrecords(includePrivateForeignrecords: boolean): this;
1551
1721
  }
1552
- declare class GetRecordTypeImageRequestBuilder<PLATFORM extends IInterPlatform, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image", "GET", T> {
1722
+ declare class GetRecordTypeImageRequestBuilder<PLATFORM extends IInterPlatform & IDataObjectTypeIconPart, T> extends RequestBuilder<PLATFORM, "/type/:dataObjectType/image", "GET", T> {
1553
1723
  constructor(typedFetch: RestypedFetch<PLATFORM>, type: string, transform: (response: Response) => Promise<T>);
1554
1724
  forIconType(iconType: string): this;
1555
1725
  }
@@ -1864,7 +2034,6 @@ interface IEmailStoreService<PLATFORM extends IInterPlatform> {
1864
2034
  /**
1865
2035
  * Creates a builder which can be used to update the content associated
1866
2036
  * with the given the email store record
1867
- * @param dataObjectGGUID unique identifier of the email store record
1868
2037
  */
1869
2038
  archiveEmail(): PostEmailStoreRequestBuilder<PLATFORM>;
1870
2039
  }
@@ -2155,12 +2324,12 @@ interface ISettingsService<PLATFORM extends IInterPlatform> {
2155
2324
  * that affects the current user, including the global properties and the schema defaults as fallback.
2156
2325
  *
2157
2326
  * To get the settings only for the user or global
2158
- * scope, use the {@link GetAppSettingsRequestBuilder.withScope} method on the returned builder.
2327
+ * scope, use the [[GetAppSettingsRequestBuilder.withScope]] method on the returned builder.
2159
2328
  */
2160
2329
  getAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(appId: string): GetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint, SETTINGSTYPE>;
2161
2330
  /**
2162
2331
  * Replaces all settings for the given app withing the scope. By default, the user settings are changed. To change the global settings,
2163
- * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings
2332
+ * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings
2164
2333
  * needs administrator privileges.
2165
2334
  *
2166
2335
  * Properties that are absent on the given settings object will removed on the scope.
@@ -2168,7 +2337,7 @@ interface ISettingsService<PLATFORM extends IInterPlatform> {
2168
2337
  setAppSettings<SETTINGSTYPE extends AppSettingsValues = AppSettingsValues>(appId: string, settings: SETTINGSTYPE | null): SetAppSettingsRequestBuilder<PLATFORM, AppSettingsEndpoint>;
2169
2338
  /**
2170
2339
  * Changes the settings for the given app withing the scope partially. By default, the user settings are changed. To change the global settings,
2171
- * use the {@link SetAppSettingsRequestBuilder.withScope} method on the returned builder. Note that setting the global settings
2340
+ * use the [[SetAppSettingsRequestBuilder.withScope]] method on the returned builder. Note that setting the global settings
2172
2341
  * needs administrator privileges.
2173
2342
  *
2174
2343
  * Properties that are absent on the given settings object will be left untouched.
@@ -2268,5 +2437,5 @@ interface IServiceRegistry<PLATFORM extends IInterPlatform> {
2268
2437
  */
2269
2438
  declare function create<VERSION extends APIVersion = "6.0", SERVER extends ServerType = "common">(api: IFetchWrapper, version?: VERSION, serverType?: SERVER): IServiceRegistry<IAPIVersions[VERSION][SERVER]>;
2270
2439
 
2271
- export { ALL_PUBLIC_PERMISSION_GGUID, type APIVersion, AccessRight, type AppSettings, type AppSettingsChange, type AppSettingsEndpoint, type AppSettingsListResponse, type AppSettingsResponse, type AppSettingsSchema, type AppSettingsSchemaBooleanProperty, type AppSettingsSchemaColorProperty, type AppSettingsSchemaFloatProperty, type AppSettingsSchemaIntegerProperty, type AppSettingsSchemaProperty, type AppSettingsSchemaPropertyScope, type AppSettingsSchemaPropertyType, type AppSettingsSchemaResponse, type AppSettingsSchemaStringProperty, type AppSettingsValues, DatePrecision, FetchError, type FieldCommon, type FieldCommon7, type FieldGw, type FieldGw7, type FieldOpen, type FieldType, type FieldTypes, type FieldTypesV6, type FieldTypesV7, ForeignEditPermission, type GUID, type HasSettingsAPIVersion, HtmlFilter, type IAPIResponse, type IAPIVersions, type IAddressRelatedPermissionOwnerInfoFields, type IAddressService, type IAddressSpecificQueryParameters, type IAppSettingsSchemaProperty, type IAppointmentService, type IBooleanField, type ICommonField, type ICommonPermissionOwnerFields, type ICountInfo, type IDataObject, type IDataObjectCountQueryParameters, type IDataObjectDateChangeQueryParameters, type IDataObjectDateIntervalQueryParameters, type IDataObjectDescription, type IDataObjectLinkQueryParameters, type IDataObjectQueryParameters, type IDataObjectSchema, type IDataObjectSchemaPart, type IDataObjectService, type IDataObjectTransferable, type IDataObjectTypesQueryParameter, type IDateTimeField, type IDecimalField, type IDecimalSuggestField, type IDocumentService, type IDomainQueryParameter, type IDossierEntry, type IDossierQueryParameters, type IDoubleField, type IDoubleSuggestField, type IEmailStoreService, type IFavoriteQueryParameter, type IFetchWrapper, type IGguidField, type IGroupInfo, type IGroupService, type IGwSpecific, type IHasFormatOption, type IHasLength, type IHasMaxLength, type IHasOverflowLength, type IHasPrecision, type IHasPrecisionAndScale, type IHasSelection, type IHasSystemDefinedTranslated, type IIncludeMaxJournalIdQueryParameter, type IIncludePermissionsQueryParameter, type IIncludePrivateForeignrecordsQueryParameter, type IIntField, type IIntSuggestField, type IInterPlatform, type ILastUsedDataObjectQueryParameters, type ILinkingService, type ILoginInformation, type IMassQueryResult, type IOpenSpecific, type IOrderByQueryParameters, type IPagedQueryParameters, type IPartialObjectQueryParameters, type IParticipantInfo, type IPermission, type IPermissionInfo, type IPermissionRequirementQueryParameter, type IQueryPart, type IRecentlyUsedQueryParameter, type IResourceInfo, type IResourceQueryParameters, type IResourceService, type IRestypedBase, type IRestypedIndexedBase, type IRestypedRoute, type ISearchQueryParameters, type ISelectionValue, type ISelectionValueListField, type IServerInformationService, type IServerSpecificVersionAPIDefinition, type IServerVersion, type IServerVersionPart, type IServerVersionResponseGw, type IServiceRegistry, type ISettingsService, type ISingleDataObjectQueryParameters, type ISingleDataObjectTypesQueryParameter, type IStringField, type IStringKeyed, type IStringListSuggestField, type IStringSuggestField, type ISuggestField, type ISuggestionWithRawValue, type ITeamFilter, type ITeamFilterQueryParameters, type ITextField, type ITypedJSONResponse, type ITypedRequestInit, type IUserInfo, type IUserService, type IVersion6, type IVersion7, type IViewInfo, type IViewItemsCountQueryParameters, type IViewItemsQueryParameters, type IViewKindQueryParameters, type IViewQueryParameters, type IViewService, type IWhereStringQueryParameters, type InterPlatform6, type InterPlatform6Common, type InterPlatform6Gw, type InterPlatform6Open, type InterPlatform7, type InterPlatform7Common, type InterPlatform7Gw, type InterPlatform7Open, type InterPlatformGw, type InterPlatformOpen, type LinkDirection, type Methods, type NoPathParams, type NoQueryParams, type OmitProp, PrimaryLinkedParent, type QueryResponseLegacyGw, RestypedFetch, type ServerIndependentFieldTypes, type ServerType, type StringKeyOf, TeamFilter, TeamFilterConstant, type V7SuggestField, create };
2440
+ export { ALL_PUBLIC_PERMISSION_GGUID, type APIVersion, AccessRight, type AppSettings, type AppSettingsChange, type AppSettingsEndpoint, type AppSettingsListResponse, type AppSettingsResponse, type AppSettingsSchema, type AppSettingsSchemaBooleanProperty, type AppSettingsSchemaColorProperty, type AppSettingsSchemaFloatProperty, type AppSettingsSchemaIntegerProperty, type AppSettingsSchemaProperty, type AppSettingsSchemaPropertyScope, type AppSettingsSchemaPropertyType, type AppSettingsSchemaResponse, type AppSettingsSchemaStringProperty, type AppSettingsValues, DatePrecision, FetchError, type FieldCommon, type FieldCommon7, type FieldGw, type FieldGw7, type FieldOpen, type FieldType, type FieldTypes, type FieldTypesV6, type FieldTypesV7, ForeignEditPermission, type GUID, type HasSettingsAPIVersion, HtmlFilter, type IAPIResponse, type IAPIVersions, type IAddressRelatedPermissionOwnerInfoFields, type IAddressService, type IAddressSpecificQueryParameters, type IAppSettingsSchemaProperty, type IAppointmentService, type IBooleanField, type ICommonField, type ICommonPermissionOwnerFields, type ICountInfo, type IDataObject, type IDataObjectCountQueryParameters, type IDataObjectDateChangeQueryParameters, type IDataObjectDateIntervalQueryParameters, type IDataObjectDescription, type IDataObjectImagePart, type IDataObjectLinkQueryParameters, type IDataObjectQueryParameters, type IDataObjectSchema, type IDataObjectSchemaPart, type IDataObjectService, type IDataObjectTransferable, type IDataObjectTypeIconPart, type IDataObjectTypesQueryParameter, type IDateTimeField, type IDecimalField, type IDecimalSuggestField, type IDocumentService, type IDomainQueryParameter, type IDossierEntry, type IDossierQueryParameters, type IDoubleField, type IDoubleSuggestField, type IEmailStoreService, type IFavoriteQueryParameter, type IFetchWrapper, type IGguidField, type IGroupInfo, type IGroupService, type IGwSpecific, type IHasFormatOption, type IHasLength, type IHasMaxLength, type IHasOverflowLength, type IHasPrecision, type IHasPrecisionAndScale, type IHasSelection, type IHasSystemDefinedTranslated, type IIncludeMaxJournalIdQueryParameter, type IIncludePermissionsQueryParameter, type IIncludePrivateForeignrecordsQueryParameter, type IIntField, type IIntSuggestField, type IInterPlatform, type ILastUsedDataObjectQueryParameters, type ILinkingService, type ILoginInformation, type IMassQueryResult, type IOpenSpecific, type IOrderByQueryParameters, type IPagedQueryParameters, type IPartialObjectQueryParameters, type IParticipantInfo, type IPermission, type IPermissionInfo, type IPermissionRequirementQueryParameter, type IQueryPart, type IRecentlyUsedQueryParameter, type IResourceInfo, type IResourceQueryParameters, type IResourceService, type IRestypedBase, type IRestypedIndexedBase, type IRestypedRoute, type ISearchQueryParameters, type ISelectionValue, type ISelectionValueListField, type IServerInformationService, type IServerSpecificVersionAPIDefinition, type IServerVersion, type IServerVersionPart, type IServerVersionResponseGw, type IServiceRegistry, type ISettingsService, type ISingleDataObjectQueryParameters, type ISingleDataObjectTypesQueryParameter, type IStringField, type IStringKeyed, type IStringListSuggestField, type IStringSuggestField, type ISuggestField, type ISuggestionWithRawValue, type ITeamFilter, type ITeamFilterQueryParameters, type ITextField, type ITypedJSONResponse, type ITypedRequestInit, type IUserInfo, type IUserService, type IVersion6, type IVersion7, type IViewInfo, type IViewItemsCountQueryParameters, type IViewItemsQueryParameters, type IViewKindQueryParameters, type IViewQueryParameters, type IViewService, type IWhereStringQueryParameters, type InterPlatform6, type InterPlatform6Common, type InterPlatform6Gw, type InterPlatform6Open, type InterPlatform7, type InterPlatform7Common, type InterPlatform7Gw, type InterPlatform7Open, type InterPlatformGw, type InterPlatformOpen, type LinkDirection, type Methods, type NoPathParams, type NoQueryParams, type OmitProp, PrimaryLinkedParent, type QueryResponseLegacyGw, RestypedFetch, type ServerIndependentFieldTypes, type ServerType, type StringKeyOf, TeamFilter, TeamFilterConstant, type V7SuggestField, create };
2272
2441
  export as namespace dataaccess;