@partium/js-sdk 15.20.0 → 16.1.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 (178) hide show
  1. package/core/constants/constants.d.ts +2 -2
  2. package/core/constants/constants.js +1 -1
  3. package/core/index.d.ts +2 -2
  4. package/core/index.js +1 -1
  5. package/core/integration-defaults/http/https-client/axios-https-client.service.d.ts +5 -0
  6. package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -1
  7. package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -1
  8. package/core/integration-defaults/session/js-oauth-api-key-session.service.js +1 -1
  9. package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +1 -1
  10. package/core/integration-defaults/session/js-oauth-web-cookie-session.service.js +1 -1
  11. package/core/models/log.d.ts +3 -1
  12. package/core/models/log.js +1 -1
  13. package/core/models/user.d.ts +7 -43
  14. package/core/models/user.js +1 -1
  15. package/core/services/http/https.service.interface.d.ts +20 -20
  16. package/core/services/http/https.service.interface.js +1 -1
  17. package/core/services/http/oauth-https.service.d.ts +3 -3
  18. package/core/services/local-storage.service.interface.d.ts +1 -1
  19. package/core/services/log.service.d.ts +1 -1
  20. package/core/services/organization/index.d.ts +6 -0
  21. package/core/services/organization/index.js +2 -0
  22. package/core/services/organization/models/get-organization-by-id-request.d.ts +10 -0
  23. package/core/services/organization/models/get-organization-by-name-request.d.ts +10 -0
  24. package/core/services/organization/models/get-organizations-request.d.ts +33 -0
  25. package/core/services/organization/models/get-organizations-request.js +2 -0
  26. package/core/services/organization/models/organization.d.ts +77 -0
  27. package/core/services/organization/models/organization.js +2 -0
  28. package/core/services/organization/organization.service.d.ts +81 -0
  29. package/core/services/organization/organization.service.js +2 -0
  30. package/core/services/recent-parts.service.d.ts +1 -1
  31. package/core/services/session/session.service.interface.d.ts +17 -5
  32. package/core/services/session/session.service.interface.js +1 -1
  33. package/core/utils/general-helper.d.ts +2 -1
  34. package/core/utils/general-helper.js +1 -1
  35. package/core/utils/multipart-upload.helper.d.ts +20 -0
  36. package/core/utils/multipart-upload.helper.js +2 -0
  37. package/data/models/attribute.d.ts +5 -5
  38. package/data/models/attribute.js +1 -1
  39. package/data/models/csa-request.d.ts +2 -3
  40. package/data/models/csa-request.js +1 -1
  41. package/data/models/image.d.ts +10 -13
  42. package/data/models/image.js +1 -1
  43. package/data/models/part-data.d.ts +1 -1
  44. package/data/models/part.d.ts +13 -9
  45. package/data/models/part.js +1 -1
  46. package/data/services/customer-service-assistance.service.d.ts +3 -22
  47. package/data/services/customer-service-assistance.service.js +1 -1
  48. package/data/services/data.service.js +1 -1
  49. package/data/services/filter.service.d.ts +0 -21
  50. package/data/services/filter.service.js +1 -1
  51. package/enrichment/models/enrichment-job-part.d.ts +2 -2
  52. package/enrichment/models/enrichment-job-part.js +1 -1
  53. package/enrichment/models/enrichment-job.d.ts +2 -2
  54. package/enrichment/models/enrichment-job.js +1 -1
  55. package/find/index.d.ts +1 -28
  56. package/find/index.js +1 -1
  57. package/find/models/image-crop-area.d.ts +7 -0
  58. package/find/models/search-input.d.ts +11 -3
  59. package/find/models/search-input.js +1 -1
  60. package/find/services/asset.service.d.ts +41 -102
  61. package/find/services/asset.service.js +1 -1
  62. package/find/services/search/search.service.d.ts +5 -218
  63. package/find/services/search/search.service.js +1 -1
  64. package/gen/sdk-version.d.ts +1 -1
  65. package/gen/sdk-version.js +1 -1
  66. package/index.d.ts +16 -8
  67. package/index.js +1 -1
  68. package/ocr/index.d.ts +1 -2
  69. package/ocr/index.js +1 -1
  70. package/ocr/models/ocr-response.d.ts +5 -0
  71. package/ocr/models/ocr-response.js +2 -0
  72. package/ocr/services/ocr.service.d.ts +9 -15
  73. package/ocr/services/ocr.service.js +1 -1
  74. package/package.json +1 -1
  75. package/selection/index.d.ts +17 -0
  76. package/selection/index.js +2 -0
  77. package/selection/models/add-all-search-session-parts-to-selection-request.d.ts +4 -0
  78. package/selection/models/add-all-search-session-parts-to-selection-request.js +2 -0
  79. package/selection/models/add-all-search-session-parts-to-selection-response.d.ts +5 -0
  80. package/selection/models/add-all-search-session-parts-to-selection-response.js +2 -0
  81. package/selection/models/add-parts-from-file-to-selection-request.d.ts +10 -0
  82. package/selection/models/add-parts-from-file-to-selection-request.js +2 -0
  83. package/selection/models/add-parts-from-file-to-selection-response.d.ts +33 -0
  84. package/selection/models/add-parts-from-file-to-selection-response.js +2 -0
  85. package/selection/models/add-parts-to-selection-request.d.ts +4 -0
  86. package/selection/models/add-parts-to-selection-request.js +2 -0
  87. package/selection/models/add-parts-to-selection-response.d.ts +5 -0
  88. package/selection/models/add-parts-to-selection-response.js +2 -0
  89. package/selection/models/check-which-parts-in-selection-request.d.ts +4 -0
  90. package/selection/models/check-which-parts-in-selection-request.js +2 -0
  91. package/selection/models/check-which-parts-in-selection-response.d.ts +4 -0
  92. package/selection/models/check-which-parts-in-selection-response.js +2 -0
  93. package/selection/models/create-selection-request.d.ts +6 -0
  94. package/selection/models/create-selection-request.js +2 -0
  95. package/selection/models/create-selection-response.d.ts +10 -0
  96. package/selection/models/create-selection-response.js +2 -0
  97. package/selection/models/remove-all-search-session-parts-from-selection-request.d.ts +4 -0
  98. package/selection/models/remove-all-search-session-parts-from-selection-request.js +2 -0
  99. package/selection/models/remove-all-search-session-parts-from-selection-response.d.ts +5 -0
  100. package/selection/models/remove-all-search-session-parts-from-selection-response.js +2 -0
  101. package/selection/models/remove-parts-from-selection-request.d.ts +4 -0
  102. package/selection/models/remove-parts-from-selection-request.js +2 -0
  103. package/selection/models/remove-parts-from-selection-response.d.ts +5 -0
  104. package/selection/models/remove-parts-from-selection-response.js +2 -0
  105. package/selection/models/selection-search-summary-response.d.ts +5 -0
  106. package/selection/models/selection-search-summary-response.js +2 -0
  107. package/selection/services/selection.service.d.ts +95 -0
  108. package/selection/services/selection.service.js +2 -0
  109. package/core/models/organization.d.ts +0 -127
  110. package/core/models/organization.js +0 -2
  111. package/core/services/organization.service.d.ts +0 -48
  112. package/core/services/organization.service.js +0 -2
  113. package/data/services/csa-helper.service.d.ts +0 -32
  114. package/data/services/csa-helper.service.js +0 -2
  115. package/find/models/assets/asset.d.ts +0 -24
  116. package/find/models/assets/asset.js +0 -2
  117. package/find/models/search-filter.d.ts +0 -87
  118. package/find/models/search-filter.js +0 -2
  119. package/find/models/search-result-status.d.ts +0 -33
  120. package/find/models/search-result-status.js +0 -2
  121. package/find/models/search-session-log-object.d.ts +0 -16
  122. package/find/models/search-session-log-object.js +0 -2
  123. package/find/models/search-status/cv-search-status.d.ts +0 -20
  124. package/find/models/search-status/cv-search-status.js +0 -2
  125. package/find/models/search-status/search-filter-status.d.ts +0 -33
  126. package/find/models/search-status/search-filter-status.js +0 -2
  127. package/find/models/search-status/search-status.d.ts +0 -34
  128. package/find/models/search-status/search-status.js +0 -2
  129. package/find/models/search-status/tag-search-status.d.ts +0 -16
  130. package/find/models/search-status/tag-search-status.js +0 -2
  131. package/find/models/search-status/text-search-status.d.ts +0 -15
  132. package/find/models/search-status/text-search-status.js +0 -2
  133. package/find/models/search-tag.d.ts +0 -12
  134. package/find/models/search-tag.js +0 -2
  135. package/find/models/tagable/i18n-tagable.d.ts +0 -10
  136. package/find/models/tagable/i18n-tagable.js +0 -2
  137. package/find/models/tagable/tagable-base.d.ts +0 -11
  138. package/find/models/tagable/tagable-base.js +0 -2
  139. package/find/models/tagable/tagable.d.ts +0 -10
  140. package/find/models/tagable/tagable.js +0 -2
  141. package/find/models/text-search-config.d.ts +0 -57
  142. package/find/models/text-search-config.js +0 -2
  143. package/find/models/text-search-manipulator.d.ts +0 -46
  144. package/find/models/text-search-manipulator.js +0 -2
  145. package/find/models/text-search-result-item/text-search-error.d.ts +0 -7
  146. package/find/models/text-search-result-item/text-search-error.js +0 -2
  147. package/find/models/text-search-result-item/text-search-result-item-document.d.ts +0 -10
  148. package/find/models/text-search-result-item/text-search-result-item-document.js +0 -2
  149. package/find/models/text-search-result-item/text-search-result-item-part.d.ts +0 -12
  150. package/find/models/text-search-result-item/text-search-result-item-part.js +0 -2
  151. package/find/models/text-search-result-item/text-search-result-item-recent-query.d.ts +0 -10
  152. package/find/models/text-search-result-item/text-search-result-item-recent-query.js +0 -2
  153. package/find/models/text-search-result-item/text-search-result-item-unknown.d.ts +0 -12
  154. package/find/models/text-search-result-item/text-search-result-item-unknown.js +0 -2
  155. package/find/models/text-search-result-item/text-search-result-item.d.ts +0 -16
  156. package/find/models/text-search-result-item/text-search-result-item.js +0 -2
  157. package/find/services/filter-uploaders/filter-uploader.d.ts +0 -13
  158. package/find/services/filter-uploaders/update-filters-uploader.d.ts +0 -17
  159. package/find/services/filter-uploaders/update-filters-uploader.js +0 -2
  160. package/find/services/filter-uploaders/update-filters.model.d.ts +0 -19
  161. package/find/services/filter-uploaders/update-filters.model.js +0 -2
  162. package/find/services/search/cv-search.service.d.ts +0 -103
  163. package/find/services/search/cv-search.service.js +0 -2
  164. package/find/services/search/search-result.service.d.ts +0 -142
  165. package/find/services/search/search-result.service.js +0 -2
  166. package/find/services/search/tag-search.service.d.ts +0 -66
  167. package/find/services/search/tag-search.service.js +0 -2
  168. package/find/services/search/text-search.service.d.ts +0 -116
  169. package/find/services/search/text-search.service.js +0 -2
  170. package/find/services/search-filter.service.d.ts +0 -223
  171. package/find/services/search-filter.service.js +0 -2
  172. package/find/utils/search-helper.d.ts +0 -14
  173. package/find/utils/search-helper.js +0 -2
  174. package/ocr/models/detect-response.d.ts +0 -5
  175. package/ocr/models/detected-text-entry.d.ts +0 -5
  176. /package/{find/services/filter-uploaders/filter-uploader.js → core/services/organization/models/get-organization-by-id-request.js} +0 -0
  177. /package/{ocr/models/detect-response.js → core/services/organization/models/get-organization-by-name-request.js} +0 -0
  178. /package/{ocr/models/detected-text-entry.js → find/models/image-crop-area.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- import { i18nString, Organization, APIObject } from '../../core';
3
- import { Attribute, AttributeFromDataAPI, AttributeFromFindAPI } from './attribute';
4
- import { Image, ImageFromDataAPI, ImageFromFindAPI } from './image';
2
+ import { i18nString, APIObject, OrganizationListItem } from '../../core';
3
+ import { Attribute, AttributeFromDataAPI, AttributeFromPartiumAPI } from './attribute';
4
+ import { Image, ImageFromDataAPI, ImageFromPartiumAPI } from './image';
5
5
  import { PartMountingLocation, PartMountingLocationFromDataAPI } from './mounting-location';
6
6
  import { PART_ENRICHMENT_STATUS, PartEnrichmentData } from './part-enrichment-data';
7
7
  /** @deprecated directly use export from mounting-location instead */
@@ -32,13 +32,13 @@ export interface PartEnrichmentSummaryFromDataAPI {
32
32
  [language: string]: string;
33
33
  }[];
34
34
  }
35
- export interface PartFromFindAPI {
35
+ export interface PartFromPartiumAPI {
36
36
  partiumId: string;
37
37
  id: string;
38
38
  name?: string;
39
39
  nameLanguage?: string;
40
- images: ImageFromFindAPI[];
41
- attributes?: AttributeFromFindAPI[];
40
+ images: ImageFromPartiumAPI[];
41
+ attributes?: AttributeFromPartiumAPI[];
42
42
  mountingLocationsCount: number;
43
43
  duplicateType: DuplicateTypeFromDataApi;
44
44
  highlights: {
@@ -110,7 +110,11 @@ export declare enum DATA_ORIGIN {
110
110
  */
111
111
  SERVER = 2,// part-data freshly loaded from server (=data)
112
112
  DATA_API = 2,// part-data comes from the data-service and can be considered complete
113
- FIND_API = 3
113
+ /**
114
+ * @deprecated use PARTIUM_API instead
115
+ */
116
+ FIND_API = 3,// part-data comes from the find-service and will contain all information that was requested
117
+ PARTIUM_API = 3
114
118
  }
115
119
  export interface PartEnrichmentSummary {
116
120
  key: i18nString;
@@ -137,7 +141,7 @@ export declare class Part extends APIObject {
137
141
  /** @deprecated */
138
142
  description: i18nString;
139
143
  dataOrigin: DATA_ORIGIN;
140
- organization?: Organization;
144
+ organization?: OrganizationListItem;
141
145
  attributes?: Attribute[];
142
146
  mountingLocationsCount: number | null;
143
147
  mountingLocations: PartMountingLocation[] | null;
@@ -162,7 +166,7 @@ export declare class Part extends APIObject {
162
166
  updateName(name: i18nString): void;
163
167
  /** @deprecated description is deprecated */
164
168
  updateDescription(descriptionValue: i18nString): void;
165
- static fromAPIResponse(partData: PartFromFindAPI | PartFromDataAPI, dataOrigin?: DATA_ORIGIN, language?: string): Part;
169
+ static fromAPIResponse(partData: PartFromPartiumAPI | PartFromDataAPI, dataOrigin?: DATA_ORIGIN, language?: string): Part;
166
170
  static fromRelatedPartsAPIResponse(data: RelatedPartFromDataAPI): Part;
167
171
  private static getDuplicateType;
168
172
  }
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Part=exports.DATA_ORIGIN=exports.DUPLICATE_DATA_AREA=exports.SUBSTITUTE_ROLE=exports.RELATION_TYPE=exports.PartMountingLocation=void 0;var RELATION_TYPE,SUBSTITUTE_ROLE,DUPLICATE_DATA_AREA,DATA_ORIGIN,core_1=require("../../core"),attribute_1=require("./attribute"),image_1=require("./image"),mounting_location_1=require("./mounting-location"),part_enrichment_data_1=require("./part-enrichment-data"),mounting_location_2=require("./mounting-location");Object.defineProperty(exports,"PartMountingLocation",{enumerable:!0,get:function(){return mounting_location_2.PartMountingLocation}}),function(t){t.DUPLICATE="duplicate",t.SUBSTITUTE="substitute",t.EQUIVALENT="equivalent",t.NOT_RELATED="not_related"}(RELATION_TYPE||(exports.RELATION_TYPE=RELATION_TYPE={})),function(t){t.SUCCESSOR="successor",t.PREDECESSOR="predecessor"}(SUBSTITUTE_ROLE||(exports.SUBSTITUTE_ROLE=SUBSTITUTE_ROLE={})),function(t){t.IMAGE="IMAGE",t.NAME="NAME",t.DATA="DATA"}(DUPLICATE_DATA_AREA||(exports.DUPLICATE_DATA_AREA=DUPLICATE_DATA_AREA={})),function(t){t[t.SEARCH_RESULT=0]="SEARCH_RESULT",t[t.PARTIAL=0]="PARTIAL",t[t.SERVER=2]="SERVER",t[t.DATA_API=2]="DATA_API",t[t.FIND_API=3]="FIND_API"}(DATA_ORIGIN||(exports.DATA_ORIGIN=DATA_ORIGIN={}));var Part=function(t){function e(e){var n=t.call(this)||this;return Object.assign(n,e),n}return __extends(e,t),e.prototype.updatePart=function(t){Object.assign(this,t)},e.prototype.updateName=function(t){this.name=t},e.prototype.updateDescription=function(t){this.description=t},e.fromAPIResponse=function(t,n,r){var a;if(void 0===n&&(n=DATA_ORIGIN.DATA_API),n===DATA_ORIGIN.FIND_API){var i=(u=t).mountingLocationsCount,o=u.nameLanguage||r,A=u.attributes;return new e(__assign(__assign(__assign(__assign({partiumId:u.partiumId,externalId:u.id,name:new core_1.i18nString((a={},a[o]=u.name,a)),images:u.images?u.images.map((function(t){return image_1.Image.fromFindAPIResponse(t,core_1.BACKEND_SERVICE.DATA)})):[],dataOrigin:DATA_ORIGIN.FIND_API},A&&{attributes:u.attributes.map((function(t){return attribute_1.Attribute.fromAPIResponse(t,n)}))}),{mountingLocationsCount:i||null,mountingLocations:null}),u.duplicateType&&{duplicateType:this.getDuplicateType(u.duplicateType)}),{highlights:u.highlights?u.highlights:null,relatedPartsSummary:u.relatedPartsSummary?u.relatedPartsSummary:null}))}var u,_=(u=t).organization,s=(A=u.attributes,u.mounting_locations);return new e(__assign(__assign(__assign({partiumId:u.uuid,externalId:u.external_id,externalPayload:u.metadata,name:new core_1.i18nString(u.name),images:u.images?u.images.filter((function(t){return"display"===t.type})).map((function(t){return image_1.Image.fromDataAPIResponse(t,core_1.BACKEND_SERVICE.DATA)})):[],dataOrigin:DATA_ORIGIN.DATA_API},_&&{organization:new core_1.Organization({partiumId:_.uuid,name:_.name,displayName:_.name})}),A&&{attributes:u.attributes.map((function(t){return attribute_1.Attribute.fromAPIResponse(t,n)}))}),{mountingLocationsCount:u.total_mounting_locations_count||0,mountingLocations:(null==s?void 0:s.map((function(t){return mounting_location_1.PartMountingLocation.fromAPIResponse(t)})))||[],summary:u.summary?{summaryId:u.summary.summary_id,summary:u.summary.summary.map((function(t){return{key:new core_1.i18nString(t.key),values:t.values.map((function(t){return new core_1.i18nString(t)}))}}))}:null,enrichment:u.enrichment?part_enrichment_data_1.PartEnrichmentData.fromAPIResponse(u.enrichment):null,highlights:null}))},e.fromRelatedPartsAPIResponse=function(t){var n=e.fromAPIResponse(null==t?void 0:t.part,DATA_ORIGIN.DATA_API);return n.relationType=t.type,t.created&&(n.relationCreatedAt=new Date(t.created)),"anchor_part"===t.part_role?n.partRole=SUBSTITUTE_ROLE.PREDECESSOR:"related_part"===t.part_role&&(n.partRole=SUBSTITUTE_ROLE.SUCCESSOR),n},e.getDuplicateType=function(t){switch(t){case"IMAGE_NAME_AND_DATA":return[DUPLICATE_DATA_AREA.IMAGE,DUPLICATE_DATA_AREA.NAME,DUPLICATE_DATA_AREA.DATA];case"NAME_AND_DATA":return[DUPLICATE_DATA_AREA.NAME,DUPLICATE_DATA_AREA.DATA];case"IMAGE":return[DUPLICATE_DATA_AREA.IMAGE]}},e}(core_1.APIObject);exports.Part=Part;
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Part=exports.DATA_ORIGIN=exports.DUPLICATE_DATA_AREA=exports.SUBSTITUTE_ROLE=exports.RELATION_TYPE=exports.PartMountingLocation=void 0;var RELATION_TYPE,SUBSTITUTE_ROLE,DUPLICATE_DATA_AREA,DATA_ORIGIN,core_1=require("../../core"),attribute_1=require("./attribute"),image_1=require("./image"),mounting_location_1=require("./mounting-location"),part_enrichment_data_1=require("./part-enrichment-data"),mounting_location_2=require("./mounting-location");Object.defineProperty(exports,"PartMountingLocation",{enumerable:!0,get:function(){return mounting_location_2.PartMountingLocation}}),function(t){t.DUPLICATE="duplicate",t.SUBSTITUTE="substitute",t.EQUIVALENT="equivalent",t.NOT_RELATED="not_related"}(RELATION_TYPE||(exports.RELATION_TYPE=RELATION_TYPE={})),function(t){t.SUCCESSOR="successor",t.PREDECESSOR="predecessor"}(SUBSTITUTE_ROLE||(exports.SUBSTITUTE_ROLE=SUBSTITUTE_ROLE={})),function(t){t.IMAGE="IMAGE",t.NAME="NAME",t.DATA="DATA"}(DUPLICATE_DATA_AREA||(exports.DUPLICATE_DATA_AREA=DUPLICATE_DATA_AREA={})),function(t){t[t.SEARCH_RESULT=0]="SEARCH_RESULT",t[t.PARTIAL=0]="PARTIAL",t[t.SERVER=2]="SERVER",t[t.DATA_API=2]="DATA_API",t[t.FIND_API=3]="FIND_API",t[t.PARTIUM_API=3]="PARTIUM_API"}(DATA_ORIGIN||(exports.DATA_ORIGIN=DATA_ORIGIN={}));var Part=function(t){function e(e){var n=t.call(this)||this;return Object.assign(n,e),n}return __extends(e,t),e.prototype.updatePart=function(t){Object.assign(this,t)},e.prototype.updateName=function(t){this.name=t},e.prototype.updateDescription=function(t){this.description=t},e.fromAPIResponse=function(t,n,r){var a;if(void 0===n&&(n=DATA_ORIGIN.DATA_API),n===DATA_ORIGIN.PARTIUM_API){var i=(u=t).mountingLocationsCount,o=u.nameLanguage||r,A=u.attributes;return new e(__assign(__assign(__assign(__assign({partiumId:u.partiumId,externalId:u.id,name:new core_1.i18nString((a={},a[o]=u.name,a)),images:u.images?u.images.map((function(t){return(0,image_1.fromPartiumAPIResponse)(t,core_1.BACKEND_SERVICE.DATA)})):[],dataOrigin:DATA_ORIGIN.PARTIUM_API},A&&{attributes:u.attributes.map((function(t){return attribute_1.Attribute.fromAPIResponse(t,n)}))}),{mountingLocationsCount:i||null,mountingLocations:null}),u.duplicateType&&{duplicateType:this.getDuplicateType(u.duplicateType)}),{highlights:u.highlights?u.highlights:null,relatedPartsSummary:u.relatedPartsSummary?u.relatedPartsSummary:null}))}var u,_=(u=t).organization,s=(A=u.attributes,u.mounting_locations);return new e(__assign(__assign(__assign({partiumId:u.uuid,externalId:u.external_id,externalPayload:u.metadata,name:new core_1.i18nString(u.name),images:u.images?u.images.filter((function(t){return"display"===t.type})).map((function(t){return(0,image_1.fromDataAPIResponse)(t,core_1.BACKEND_SERVICE.DATA)})):[],dataOrigin:DATA_ORIGIN.DATA_API},_&&{organization:{partiumId:_.uuid,name:_.name,displayName:_.name}}),A&&{attributes:u.attributes.map((function(t){return attribute_1.Attribute.fromAPIResponse(t,n)}))}),{mountingLocationsCount:u.total_mounting_locations_count||0,mountingLocations:(null==s?void 0:s.map((function(t){return mounting_location_1.PartMountingLocation.fromAPIResponse(t)})))||[],summary:u.summary?{summaryId:u.summary.summary_id,summary:u.summary.summary.map((function(t){return{key:new core_1.i18nString(t.key),values:t.values.map((function(t){return new core_1.i18nString(t)}))}}))}:null,enrichment:u.enrichment?part_enrichment_data_1.PartEnrichmentData.fromAPIResponse(u.enrichment):null,highlights:null}))},e.fromRelatedPartsAPIResponse=function(t){var n=e.fromAPIResponse(null==t?void 0:t.part,DATA_ORIGIN.DATA_API);return n.relationType=t.type,t.created&&(n.relationCreatedAt=new Date(t.created)),"anchor_part"===t.part_role?n.partRole=SUBSTITUTE_ROLE.PREDECESSOR:"related_part"===t.part_role&&(n.partRole=SUBSTITUTE_ROLE.SUCCESSOR),n},e.getDuplicateType=function(t){switch(t){case"IMAGE_NAME_AND_DATA":return[DUPLICATE_DATA_AREA.IMAGE,DUPLICATE_DATA_AREA.NAME,DUPLICATE_DATA_AREA.DATA];case"NAME_AND_DATA":return[DUPLICATE_DATA_AREA.NAME,DUPLICATE_DATA_AREA.DATA];case"IMAGE":return[DUPLICATE_DATA_AREA.IMAGE]}},e}(core_1.APIObject);exports.Part=Part;
@@ -1,10 +1,8 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
2
  import { Observable } from 'rxjs';
3
3
  import { PaginatedRequestService, EventContext, BaseLoginInitService, PartiumConfig } from '../../core';
4
- import { Organization } from '../../core/models/organization';
4
+ import { Organization } from '../../core/services/organization/models/organization';
5
5
  import { ServiceProvider } from '../../core/services/service-provider';
6
- import { Asset } from '../../find/models/assets/asset';
7
- import { AssemblyHierarchyNode } from '../models/assembly-hierarchy-node';
8
6
  import { CSARequest } from '../models/csa-request';
9
7
  import { CSARequestStatus } from '../models/csa-request-status';
10
8
  import { Part } from '../models/part';
@@ -35,20 +33,7 @@ export interface CustomerServiceAssistanceService {
35
33
  * @returns an Observables that resolves with the result of the http-request
36
34
  * to the Partium backend
37
35
  */
38
- sendCSARequest(message: string, language: string, searchOutput?: SearchOutput, part?: Part, additionalAssets?: Asset[], ecrEventContext?: ECREventContext): Observable<CSARequest>;
39
- /**
40
- * Fetch an array of Hierarchy-Filter-Nodes, that can be displayed to the
41
- * user, representing the currently applied Hierarchy-Search-Filters.
42
- * This might defer from the applied Hierarchy-Filters, because we want
43
- * to hide the principle of exclusion from the user, to make the filters
44
- * more understandable.
45
- *
46
- * @returns Array of AssemblyHierarchyNodes that represent the currently
47
- * applied Hierarchy-Filters-Nodes in user a way that is
48
- * understandable by the user.
49
- * @deprecated not needed anymore as HierarchyPartiumIdFilter is deprecated
50
- */
51
- getHierarchyFilterNodesForUI(): Observable<AssemblyHierarchyNode[]>;
36
+ sendCSARequest(message: string, language: string, searchOutput?: SearchOutput, part?: Part, additionalAssets?: string[], ecrEventContext?: ECREventContext): Observable<CSARequest>;
52
37
  /**
53
38
  * Will trigger loading the information of all CSA-requests from the backend.
54
39
  *
@@ -130,7 +115,6 @@ export interface CustomerServiceAssistanceService {
130
115
  export declare class CustomerServiceAssistanceServiceImpl extends BaseLoginInitService implements CustomerServiceAssistanceService {
131
116
  private MAX_RESULT_LIST_LENGTH;
132
117
  private httpsService;
133
- private csaHelperService;
134
118
  private assemblyHierarchyNodeService;
135
119
  private logService;
136
120
  constructor(serviceProvider: ServiceProvider);
@@ -141,14 +125,11 @@ export declare class CustomerServiceAssistanceServiceImpl extends BaseLoginInitS
141
125
  * Note: Should be called at the start of a session
142
126
  */
143
127
  init(config: PartiumConfig, userEmail: string, currentOrganization$: Observable<Organization>): Observable<void>;
144
- sendCSARequest(message: string, language: string, searchOutput?: SearchOutput, part?: Part, additionalAssets?: Asset[], ecrEventContext?: ECREventContext): Observable<CSARequest>;
128
+ sendCSARequest(message: string, language: string, searchOutput?: SearchOutput, part?: Part, additionalAssets?: string[], ecrEventContext?: ECREventContext): Observable<CSARequest>;
145
129
  resolveCSARequest(csaRequestId: string, partId: string): Observable<CSARequestStatus>;
146
130
  private sendRequestInternal;
147
- private createLogEventRequestContent;
148
131
  private sendBackendRequest;
149
132
  private createRequestData;
150
- /** @deprecated not needed anymore as HierarchyPartiumIdFilter is already deprecated */
151
- getHierarchyFilterNodesForUI(): Observable<AssemblyHierarchyNode[]>;
152
133
  getCSARequests(paginationSize?: number, urlParams?: any[]): PaginatedRequestService<CSARequest>;
153
134
  getMultipleExpertSearches(csaRequestId: string): Observable<MultipleExpertSearches>;
154
135
  setExpertSearchAbandoned(csaRequestId: string, searchSessionId: string, abandoned?: boolean): Observable<CSARequestSearch>;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,s){var i,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n<3?i(o):n>3?i(t,r,o):i(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomerServiceAssistanceServiceImpl=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),core_1=require("../../core"),injection_identifier_1=require("../../core/decorators/injection-identifier"),https_service_interface_1=require("../../core/services/http/https.service.interface"),text_search_service_1=require("../../find/services/search/text-search.service"),csa_request_1=require("../models/csa-request"),csa_request_status_1=require("../models/csa-request-status"),multiple_expert_searches_1=require("../models/multiple-expert-searches"),general_helper_1=require("../../core/utils/general-helper"),assembly_hierarchy_nodes_service_1=require("./assembly-hierarchy-nodes.service"),csa_helper_service_1=require("./csa-helper.service"),CustomerServiceAssistanceServiceImpl=function(e){function t(t){var r=e.call(this,t)||this;return r.MAX_RESULT_LIST_LENGTH=10,r}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(https_service_interface_1.HttpsService),this.csaHelperService=this.serviceProvider.getService(csa_helper_service_1.CSAHelperService),this.assemblyHierarchyNodeService=this.serviceProvider.getService(assembly_hierarchy_nodes_service_1.AssemblyHierarchyNodesServiceImpl),this.logService=this.serviceProvider.getService(core_1.LogServiceImpl)},t.prototype.init=function(t,r,s){return e.prototype.init.call(this,t,r,s),(0,rxjs_1.of)(void 0)},t.prototype.sendCSARequest=function(e,t,r,s,i,n){return void 0===i&&(i=[]),this.sendRequestInternal(t,s,e,i,r,n)},t.prototype.resolveCSARequest=function(e,t){return this.httpsService.post("requests/".concat(e,"/actions/resolve/"),{confirmed_part:t},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return new csa_request_status_1.CSARequestStatus(__assign({confirmedPart:e.confirmed_part},e))})))},t.prototype.sendRequestInternal=function(e,t,r,s,i,n){var o,a,c=this,u=!!i,_=u&&(null===(o=i.searchInput)||void 0===o?void 0:o.hierarchyFilters)?this.assemblyHierarchyNodeService.getAssemblyHierarchyNodes(null===(a=i.searchInput)||void 0===a?void 0:a.hierarchyFilters):(0,rxjs_1.of)([]);return(0,rxjs_1.forkJoin)([this.currentOrganization$.pipe((0,operators_1.take)(1)),_]).pipe((0,operators_1.mergeMap)((function(o){var a,_,p,l,d=o[0],v=o[1];if(!(null===(a=d.featureFlags)||void 0===a?void 0:a.ecrEnabled))return(0,rxjs_1.throwError)(new core_1.SdkError(core_1.SDK_ERROR_CODES.USER_UNAUTHORIZED,null,"Customer Service Assistance is disabled for this organization."));var h=u?c.prepareSearchQueriesObj(i.searchInput.searchQueries):null,S=u?d.featureFlags.hybridTextSearchEnabled:null,f=u?__assign(__assign(__assign({searchSessionId:null===(_=null==i?void 0:i.searchInput)||void 0===_?void 0:_.searchSessionId},S&&{textQuery:null==h?void 0:h.semanticText}),!S&&{textQueries:h}),{queryImageAssetId:null===(p=null==i?void 0:i.searchInput)||void 0===p?void 0:p.searchImageAssetId,attributeFilters:null===(l=null==i?void 0:i.searchInput)||void 0===l?void 0:l.attributeFilters,resultList:null==i?void 0:i.searchResults}):{};return c.sendBackendRequest(__assign({language:e,part:t,additionalAssets:s,nodes:v,organizationId:d.partiumId,userInput:r},f)).pipe((0,operators_1.tap)((function(o){var a,u=s&&s.length>0?s.map((function(e){return e.referenceId})):s;c.logService.logEvent(new core_1.EventLog({version:core_1.EVENTLOG_VERSIONS.V_2_0_0,organizationId:d.partiumId,interface:(null==n?void 0:n.eventInterface)||core_1.INTERFACE.API_ACCESS,event:core_1.EVENT.ECR_FORM_SUBMIT,data:{partiumId:null==t?void 0:t.partiumId,searchSessionId:null===(a=null==i?void 0:i.searchInput)||void 0===a?void 0:a.searchSessionId,ecrType:t?core_1.ECR_TYPE.ASK_FOR_CONFIRMATION:core_1.ECR_TYPE.ASK_FOR_HELP,expertRequestId:o.request_id,userInput:r,languageUi:null==n?void 0:n.languageUi,languageSearch:e,mediaAssets:u}})).subscribe((function(){}),(function(e){console.log("Error while sending log event: ",e)}))})))})))},t.prototype.createLogEventRequestContent=function(e,t,r,s,i){return void 0===s&&(s=[]),{requestId:e,language:t,mediaAssets:s.map((function(e){return e.referenceId})),userInput:r,partPartiumId:i?i.partiumId:void 0}},t.prototype.sendBackendRequest=function(e){var t=e.organizationId,r=e.language,s=e.part,i=e.userInput,n=e.additionalAssets,o=void 0===n?[]:n,a=e.searchSessionId,c=void 0===a?null:a,u=e.nodes,_=void 0===u?[]:u,p=e.attributeFilters,l=void 0===p?{}:p,d=e.textQuery,v=void 0===d?null:d,h=e.textQueries,S=void 0===h?null:h,f=e.queryImageAssetId,E=void 0===f?null:f,g=e.resultList,m=void 0===g?[]:g;return this.httpsService.post("requests/",{session_id:c||null,organization_id:t,language:r,request_data:this.createRequestData(s,r,_,l,v,S,E,m,o,i)},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.createRequestData=function(e,t,r,s,i,n,o,a,c,u){var _,p=((_={})[text_search_service_1.TEXT_SEARCH_TYPE.SEMANTIC]="semantic_text",_[text_search_service_1.TEXT_SEARCH_TYPE.EXACT]="exact_text",_);return __assign(__assign(__assign(__assign(__assign(__assign({},e?{part:{part_id:e.partiumId,part_external_id:e.externalId,part_name:e.name.getText(t)||""}}:{}),{assemblies:r.map((function(e){return{assembly_id:e.partiumId,assembly_external_id:e.externalId,assembly_name:e.name.getText(t),breadcrumbs:e.breadcrumbs.map((function(e){return e.name.getText(t)}))}})),hard_filters:Object.keys(s).map((function(e){return{label:e,values:s[e]}}))}),i||""===i?{text_query:i}:{}),n?{text_search:Object.keys(text_search_service_1.TEXT_SEARCH_TYPE).reduce((function(e,t){var r;return __assign(__assign({},e),((r={})[p[text_search_service_1.TEXT_SEARCH_TYPE[t]]]=n[text_search_service_1.TEXT_SEARCH_TYPE[t]]||"",r))}),{})}:{}),o?{query_image_asset:o}:{}),{result_list:(a||[]).map((function(e){return{part_id:e.partiumId,part_external_id:e.externalId,part_name:e.name.getText(t)||""}})).slice(0,this.MAX_RESULT_LIST_LENGTH),media_assets:c.map((function(e){return e.referenceId})),user_input:u})},t.prototype.getHierarchyFilterNodesForUI=function(){return this.csaHelperService.getHierarchyFilterNodesForUI()},t.prototype.getCSARequests=function(e,t){return void 0===e&&(e=25),void 0===t&&(t=[]),core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(csa_request_1.CSARequest.fromAPIResponse,this.httpsService,"requests",https_service_interface_1.BACKEND_SERVICE.CSA,t,e)},t.prototype.getMultipleExpertSearches=function(e){return this.httpsService.get("requests/".concat(e,"/expert-searches"),[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return multiple_expert_searches_1.MultipleExpertSearches.fromAPIResponse(e)})))},t.prototype.setExpertSearchAbandoned=function(e,t,r){return void 0===r&&(r=!0),this.httpsService.put("requests/".concat(e,"/expert-searches/").concat(t,"/abandoned"),{abandoned:r},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return(0,general_helper_1.snakeToCamelCase)(e)})))},t.prototype.associateExpertSearchToCsaRequest=function(e,t){return this.httpsService.post("requests/".concat(e,"/expert-searches"),{search_session_id:t},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return(0,general_helper_1.snakeToCamelCase)(e)})))},t.prototype.getCSARequest=function(e){return this.loadCSARequestFromServer(e).pipe((0,operators_1.catchError)((function(e){return console.log("Error while loading csa-request-information from server.",e),(0,rxjs_1.throwError)(e)})))},t.prototype.openCSARequest=function(e){return this.httpsService.post("requests/".concat(e,"/actions/open"),{},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.markNotResolvedCSARequest=function(e){return this.httpsService.post("requests/".concat(e,"/actions/not-resolve"),{},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.updateCSARequestQuantity=function(e,t){return this.httpsService.put("requests/".concat(e,"/quantity/"),{quantity:t},[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return csa_request_1.CSARequest.fromAPIResponse(e)})))},t.prototype.loadCSARequestFromServer=function(e){return this.httpsService.get("requests/".concat(e),[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return csa_request_1.CSARequest.fromAPIResponse(e)})))},t.prototype.prepareSearchQueriesObj=function(e){return e=e||{},Object.keys(text_search_service_1.TEXT_SEARCH_TYPE).reduce((function(t,r){var s;return __assign(__assign({},t),((s={})[text_search_service_1.TEXT_SEARCH_TYPE[r]]=e[text_search_service_1.TEXT_SEARCH_TYPE[r]]||"",s))}),{})},t=__decorate([(0,injection_identifier_1.InjectionIdentifier)("CustomerServiceAssistanceService")],t)}(core_1.BaseLoginInitService);exports.CustomerServiceAssistanceServiceImpl=CustomerServiceAssistanceServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,s){var i,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n<3?i(o):n>3?i(t,r,o):i(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomerServiceAssistanceServiceImpl=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),core_1=require("../../core"),injection_identifier_1=require("../../core/decorators/injection-identifier"),organization_1=require("../../core/services/organization/models/organization"),https_service_interface_1=require("../../core/services/http/https.service.interface"),csa_request_1=require("../models/csa-request"),csa_request_status_1=require("../models/csa-request-status"),multiple_expert_searches_1=require("../models/multiple-expert-searches"),general_helper_1=require("../../core/utils/general-helper"),find_1=require("../../find"),assembly_hierarchy_nodes_service_1=require("./assembly-hierarchy-nodes.service"),CustomerServiceAssistanceServiceImpl=function(e){function t(t){var r=e.call(this,t)||this;return r.MAX_RESULT_LIST_LENGTH=10,r}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(https_service_interface_1.HttpsService),this.assemblyHierarchyNodeService=this.serviceProvider.getService(assembly_hierarchy_nodes_service_1.AssemblyHierarchyNodesServiceImpl),this.logService=this.serviceProvider.getService(core_1.LogServiceImpl)},t.prototype.init=function(t,r,s){return e.prototype.init.call(this,t,r,s),(0,rxjs_1.of)(void 0)},t.prototype.sendCSARequest=function(e,t,r,s,i,n){return void 0===i&&(i=[]),this.sendRequestInternal(t,s,e,i,r,n)},t.prototype.resolveCSARequest=function(e,t){return this.httpsService.post("requests/".concat(e,"/actions/resolve/"),{confirmed_part:t},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return new csa_request_status_1.CSARequestStatus(__assign({confirmedPart:e.confirmed_part},e))})))},t.prototype.sendRequestInternal=function(e,t,r,s,i,n){var o,a,c=this;void 0===s&&(s=[]);var u=!!i,_=u&&(null===(o=i.searchInput)||void 0===o?void 0:o.hierarchyFilters)?this.assemblyHierarchyNodeService.getAssemblyHierarchyNodes(null===(a=i.searchInput)||void 0===a?void 0:a.hierarchyFilters):(0,rxjs_1.of)([]);return(0,rxjs_1.forkJoin)([this.currentOrganization$.pipe((0,operators_1.take)(1)),_]).pipe((0,operators_1.mergeMap)((function(o){var a,_,p,l=o[0],d=o[1];if(!(0,organization_1.organizationHasPermission)(l,"ecr.helpRequests.create"))return(0,rxjs_1.throwError)(new core_1.SdkError(core_1.SDK_ERROR_CODES.USER_UNAUTHORIZED,null,"Customer Service Assistance is disabled for this organization."));var v=u?c.prepareSearchQueriesObj(i.searchInput.searchQueries):null,h=u?(0,organization_1.organizationHasPermission)(l,"find.hybridSearch.use"):null,S=u?__assign(__assign(__assign({searchSessionId:null===(a=null==i?void 0:i.searchInput)||void 0===a?void 0:a.searchSessionId},h&&{textQuery:null==v?void 0:v.semanticText}),!h&&{textQueries:v}),{queryImageAssetId:null===(_=null==i?void 0:i.searchInput)||void 0===_?void 0:_.searchImageAssetId,attributeFilters:null===(p=null==i?void 0:i.searchInput)||void 0===p?void 0:p.attributeFilters,resultList:null==i?void 0:i.searchResults}):{};return c.sendBackendRequest(__assign({language:e,part:t,additionalAssets:s,nodes:d,organizationId:l.partiumId,userInput:r},S)).pipe((0,operators_1.tap)((function(o){var a;c.logService.logEvent(new core_1.EventLog({version:core_1.EVENTLOG_VERSIONS.V_2_0_0,organizationId:l.partiumId,interface:(null==n?void 0:n.eventInterface)||core_1.INTERFACE.API_ACCESS,event:core_1.EVENT.ECR_FORM_SUBMIT,data:{partiumId:null==t?void 0:t.partiumId,searchSessionId:null===(a=null==i?void 0:i.searchInput)||void 0===a?void 0:a.searchSessionId,ecrType:t?core_1.ECR_TYPE.ASK_FOR_CONFIRMATION:core_1.ECR_TYPE.ASK_FOR_HELP,expertRequestId:o.request_id,userInput:r,languageUi:null==n?void 0:n.languageUi,languageSearch:e,mediaAssets:s}})).subscribe((function(){}),(function(e){console.log("Error while sending log event: ",e)}))})))})))},t.prototype.sendBackendRequest=function(e){var t=e.organizationId,r=e.language,s=e.part,i=e.userInput,n=e.additionalAssets,o=void 0===n?[]:n,a=e.searchSessionId,c=void 0===a?null:a,u=e.nodes,_=void 0===u?[]:u,p=e.attributeFilters,l=void 0===p?{}:p,d=e.textQuery,v=void 0===d?null:d,h=e.textQueries,S=void 0===h?null:h,f=e.queryImageAssetId,E=void 0===f?null:f,g=e.resultList,m=void 0===g?[]:g;return this.httpsService.post("requests/",{session_id:c||null,organization_id:t,language:r,request_data:this.createRequestData(s,r,_,l,v,S,E,m,o,i)},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.createRequestData=function(e,t,r,s,i,n,o,a,c,u){var _,p=((_={})[find_1.TEXT_SEARCH_TYPE.SEMANTIC]="semantic_text",_[find_1.TEXT_SEARCH_TYPE.EXACT]="exact_text",_);return __assign(__assign(__assign(__assign(__assign(__assign({},e?{part:{part_id:e.partiumId,part_external_id:e.externalId,part_name:e.name.getText(t)||""}}:{}),{assemblies:r.map((function(e){return{assembly_id:e.partiumId,assembly_external_id:e.externalId,assembly_name:e.name.getText(t),breadcrumbs:e.breadcrumbs.map((function(e){return e.name.getText(t)}))}})),hard_filters:Object.keys(s).map((function(e){return{label:e,values:s[e]}}))}),i||""===i?{text_query:i}:{}),n?{text_search:Object.keys(find_1.TEXT_SEARCH_TYPE).reduce((function(e,t){var r;return __assign(__assign({},e),((r={})[p[find_1.TEXT_SEARCH_TYPE[t]]]=n[find_1.TEXT_SEARCH_TYPE[t]]||"",r))}),{})}:{}),o?{query_image_asset:o}:{}),{result_list:(a||[]).map((function(e){return{part_id:e.partiumId,part_external_id:e.externalId,part_name:e.name.getText(t)||""}})).slice(0,this.MAX_RESULT_LIST_LENGTH),media_assets:c,user_input:u})},t.prototype.getCSARequests=function(e,t){return void 0===e&&(e=25),void 0===t&&(t=[]),core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(csa_request_1.CSARequest.fromAPIResponse,this.httpsService,"requests",https_service_interface_1.BACKEND_SERVICE.CSA,t,e)},t.prototype.getMultipleExpertSearches=function(e){return this.httpsService.get("requests/".concat(e,"/expert-searches"),[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return multiple_expert_searches_1.MultipleExpertSearches.fromAPIResponse(e)})))},t.prototype.setExpertSearchAbandoned=function(e,t,r){return void 0===r&&(r=!0),this.httpsService.put("requests/".concat(e,"/expert-searches/").concat(t,"/abandoned"),{abandoned:r},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return(0,general_helper_1.snakeToCamelCase)(e)})))},t.prototype.associateExpertSearchToCsaRequest=function(e,t){return this.httpsService.post("requests/".concat(e,"/expert-searches"),{search_session_id:t},null,https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return(0,general_helper_1.snakeToCamelCase)(e)})))},t.prototype.getCSARequest=function(e){return this.loadCSARequestFromServer(e).pipe((0,operators_1.catchError)((function(e){return console.log("Error while loading csa-request-information from server.",e),(0,rxjs_1.throwError)(e)})))},t.prototype.openCSARequest=function(e){return this.httpsService.post("requests/".concat(e,"/actions/open"),{},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.markNotResolvedCSARequest=function(e){return this.httpsService.post("requests/".concat(e,"/actions/not-resolve"),{},null,https_service_interface_1.BACKEND_SERVICE.CSA)},t.prototype.updateCSARequestQuantity=function(e,t){return this.httpsService.put("requests/".concat(e,"/quantity/"),{quantity:t},[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return csa_request_1.CSARequest.fromAPIResponse(e)})))},t.prototype.loadCSARequestFromServer=function(e){return this.httpsService.get("requests/".concat(e),[],https_service_interface_1.BACKEND_SERVICE.CSA).pipe((0,operators_1.map)((function(e){return csa_request_1.CSARequest.fromAPIResponse(e)})))},t.prototype.prepareSearchQueriesObj=function(e){return e=e||{},Object.keys(find_1.TEXT_SEARCH_TYPE).reduce((function(t,r){var s;return __assign(__assign({},t),((s={})[find_1.TEXT_SEARCH_TYPE[r]]=e[find_1.TEXT_SEARCH_TYPE[r]]||"",s))}),{})},t=__decorate([(0,injection_identifier_1.InjectionIdentifier)("CustomerServiceAssistanceService")],t)}(core_1.BaseLoginInitService);exports.CustomerServiceAssistanceServiceImpl=CustomerServiceAssistanceServiceImpl;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,r,s):n(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},__rest=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),DataServiceImpl=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.getPart=function(e){void 0===e&&(e={projection:["partiumId"]});var t=e.projection,r=e.fallbackLanguages,o=__rest(e,["projection","fallbackLanguages"]),n=Array.from(new Set(t)).join(","),i=(null==r?void 0:r.length)?Array.from(new Set(r)).join(","):void 0,s=Object.entries(__assign(__assign({},o),{projection:n,fallbackLanguages:i})).filter((function(e){return null!=e[1]})).map((function(e){var t,r=e[0],o=e[1];return(t={})[r]=o,t}));return this.httpsService.get("part",s,core_1.BACKEND_SERVICE.DATA_V2)},t.prototype.loadSelectableAttributes=function(e){return void 0===e&&(e={}),this.fetchSelectableAttributesPage(e).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:{initialRequest:__assign({},e),nextCursor:(0,core_1.extractNextCursor)(t)}}})))},t.prototype.loadMoreSelectableAttributes=function(e){if(!e.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},e.initialRequest),{cursor:e.nextCursor});return this.fetchSelectableAttributesPage(t).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:__assign(__assign({},e),{nextCursor:(0,core_1.extractNextCursor)(t)})}})))},t.prototype.hasMoreSelectableAttributesAvailable=function(e){return!!e.nextCursor},t.prototype.fetchSelectableAttributesPage=function(e){return this.httpsService.get("attributes",(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_V2)},t=__decorate([(0,core_1.InjectionIdentifier)("DataService")],t)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(e,t,r,o){var n,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(s=(i<3?n(s):i>3?n(t,r,s):n(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),DataServiceImpl=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.getPart=function(e){return void 0===e&&(e={projection:["partiumId"]}),this.httpsService.get("part",(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_V2)},t.prototype.loadSelectableAttributes=function(e){return void 0===e&&(e={}),this.fetchSelectableAttributesPage(e).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:{initialRequest:__assign({},e),nextCursor:(0,core_1.extractNextCursor)(t)}}})))},t.prototype.loadMoreSelectableAttributes=function(e){if(!e.nextCursor)return(0,rxjs_1.throwError)((function(){return new core_1.SdkError(core_1.SDK_ERROR_CODES.NO_PAGINATION_CURSOR_AVAILABLE,null,"No cursor available")}));var t=__assign(__assign({},e.initialRequest),{cursor:e.nextCursor});return this.fetchSelectableAttributesPage(t).pipe((0,rxjs_1.map)((function(t){return{response:t,paginationContext:__assign(__assign({},e),{nextCursor:(0,core_1.extractNextCursor)(t)})}})))},t.prototype.hasMoreSelectableAttributesAvailable=function(e){return!!e.nextCursor},t.prototype.fetchSelectableAttributesPage=function(e){return this.httpsService.get("attributes",(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_V2)},t=__decorate([(0,core_1.InjectionIdentifier)("DataService")],t)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
@@ -3,7 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { BaseService, PaginatedRequestService, ServiceProvider } from '../../core';
4
4
  import { FilterKey } from '../models/filter-key';
5
5
  import { FilterOptionValue } from '../models/filter-option-value';
6
- import { HierarchyPartiumIdFilter, KvpHardFilter } from '../../find/models/search-filter';
7
6
  export interface FilterService {
8
7
  /**
9
8
  * Retrieves a filter key for a certain filter-id.
@@ -52,23 +51,6 @@ export interface FilterService {
52
51
  * requested filter keys.
53
52
  */
54
53
  searchFilterKeys(query: string, language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService<FilterKey>;
55
- /**
56
- * Search for multiple filter keys by the given text query.
57
- *
58
- * @param filters filters that contain the search queries and values
59
- * @param language (optional) language field the query should be searched in
60
- * (if not provided default organization language will be used)
61
- * Language is expected to be a two-letter string, according to
62
- * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
63
- *
64
- * @param pageSize the amount of items per page
65
- * @returns observable that emits with a Service of type PaginatedRequestService.
66
- * This service can be used to retrieve a paginated list of the
67
- * requested filter keys.
68
- */
69
- searchMultipleFilterKeys(filters: {
70
- [filterKey: string]: KvpHardFilter[] | HierarchyPartiumIdFilter[];
71
- }, language?: string, pageSize?: number): Observable<FilterKey[]>;
72
54
  /**
73
55
  * Search for filter options by the given filter-key's partiumId and text query.
74
56
  *
@@ -90,8 +72,5 @@ export declare class FilterServiceImpl extends BaseService implements FilterServ
90
72
  getFilterKeys(language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService<FilterKey>;
91
73
  getFilterOptions(filterKeyPartiumId: string, cursorPaginationEnabled?: boolean): PaginatedRequestService<FilterOptionValue>;
92
74
  searchFilterKeys(query: string, language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService<FilterKey>;
93
- searchMultipleFilterKeys(filters: {
94
- [filterKey: string]: KvpHardFilter[] | HierarchyPartiumIdFilter[];
95
- }, language?: string, pageSize?: number): Observable<FilterKey[]>;
96
75
  searchFilterOptions(filterKeyPartiumId: string, query: string, cursorPaginationEnabled?: boolean): PaginatedRequestService<FilterOptionValue>;
97
76
  }
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,c=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(c=(n<3?i(c):n>3?i(t,r,c):i(t,r))||c);return n>3&&c&&Object.defineProperty(t,r,c),c},__spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var o,i=0,n=t.length;i<n;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilterServiceImpl=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),core_1=require("../../core"),filter_key_1=require("../models/filter-key"),filter_option_value_1=require("../models/filter-option-value"),FilterServiceImpl=function(e){function t(t){var r=e.call(this,t)||this;return r.PAGINATION_PAGE_SIZE=25,r}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.getFilterKey=function(e){return this.httpsService.get("filters/".concat(e),[],core_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.map)((function(e){return filter_key_1.FilterKey.fromAPIResponse(e)})))},t.prototype.getFilterKeys=function(e,t,r){return void 0===t&&(t=this.PAGINATION_PAGE_SIZE),core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_key_1.FilterKey.fromAPIResponse,this.httpsService,"filters",core_1.BACKEND_SERVICE.DATA,__spreadArray([],e?[{lang:e}]:[],!0),t,r)},t.prototype.getFilterOptions=function(e,t){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_option_value_1.FilterOptionValue.fromAPIResponse,this.httpsService,"filters/".concat(e,"/options"),core_1.BACKEND_SERVICE.DATA,[],this.PAGINATION_PAGE_SIZE,t)},t.prototype.searchFilterKeys=function(e,t,r,o){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_key_1.FilterKey.fromAPIResponse,this.httpsService,"filters",core_1.BACKEND_SERVICE.DATA,__spreadArray([{search:e}],t?[{lang:t}]:[],!0),r||this.PAGINATION_PAGE_SIZE,o)},t.prototype.searchMultipleFilterKeys=function(e,t,r){var o=this;void 0===r&&(r=25);var i=[];for(var n in e)"hardFilters"===n&&i.push.apply(i,e[n].map((function(e){return e.label})));return 0===i.length?(0,rxjs_1.of)([]):(0,rxjs_1.from)(i).pipe((0,operators_1.mergeMap)((function(e){return o.searchFilterKeys(e,t,r,!0).loadInitialPage(!0).pipe((0,operators_1.map)((function(t){return t.items.find((function(t){return t.name===e}))})))})),(0,operators_1.scan)((function(e,t){return e.concat(t)}),[]))},t.prototype.searchFilterOptions=function(e,t,r){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_option_value_1.FilterOptionValue.fromAPIResponse,this.httpsService,"filters/".concat(e,"/options"),core_1.BACKEND_SERVICE.DATA,[{search:t}],this.PAGINATION_PAGE_SIZE,r)},t=__decorate([(0,core_1.InjectionIdentifier)("FilterService")],t)}(core_1.BaseService);exports.FilterServiceImpl=FilterServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(e,t,r,o){var i,n=arguments.length,c=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(c=(n<3?i(c):n>3?i(t,r,c):i(t,r))||c);return n>3&&c&&Object.defineProperty(t,r,c),c},__spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var o,i=0,n=t.length;i<n;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilterServiceImpl=void 0;var operators_1=require("rxjs/operators"),core_1=require("../../core"),filter_key_1=require("../models/filter-key"),filter_option_value_1=require("../models/filter-option-value"),FilterServiceImpl=function(e){function t(t){var r=e.call(this,t)||this;return r.PAGINATION_PAGE_SIZE=25,r}return __extends(t,e),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.getFilterKey=function(e){return this.httpsService.get("filters/".concat(e),[],core_1.BACKEND_SERVICE.DATA).pipe((0,operators_1.map)((function(e){return filter_key_1.FilterKey.fromAPIResponse(e)})))},t.prototype.getFilterKeys=function(e,t,r){return void 0===t&&(t=this.PAGINATION_PAGE_SIZE),core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_key_1.FilterKey.fromAPIResponse,this.httpsService,"filters",core_1.BACKEND_SERVICE.DATA,__spreadArray([],e?[{lang:e}]:[],!0),t,r)},t.prototype.getFilterOptions=function(e,t){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_option_value_1.FilterOptionValue.fromAPIResponse,this.httpsService,"filters/".concat(e,"/options"),core_1.BACKEND_SERVICE.DATA,[],this.PAGINATION_PAGE_SIZE,t)},t.prototype.searchFilterKeys=function(e,t,r,o){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_key_1.FilterKey.fromAPIResponse,this.httpsService,"filters",core_1.BACKEND_SERVICE.DATA,__spreadArray([{search:e}],t?[{lang:t}]:[],!0),r||this.PAGINATION_PAGE_SIZE,o)},t.prototype.searchFilterOptions=function(e,t,r){return core_1.PaginatedRequestServiceFactory.generatePaginatedRequestService(filter_option_value_1.FilterOptionValue.fromAPIResponse,this.httpsService,"filters/".concat(e,"/options"),core_1.BACKEND_SERVICE.DATA,[{search:t}],this.PAGINATION_PAGE_SIZE,r)},t=__decorate([(0,core_1.InjectionIdentifier)("FilterService")],t)}(core_1.BaseService);exports.FilterServiceImpl=FilterServiceImpl;
@@ -1,11 +1,11 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- import { ImageFromFindAPI, Image } from '../../data';
2
+ import { Image, ImageFromDataAPI } from '../../data';
3
3
  export interface EnrichmentJobPartFromAPI {
4
4
  partiumId: string | null;
5
5
  id: string;
6
6
  name: string | null;
7
7
  nameLanguage?: string | null;
8
- image: ImageFromFindAPI | null;
8
+ image: ImageFromDataAPI | null;
9
9
  status: ENRICHMENT_JOB_PART_STATUS;
10
10
  }
11
11
  export interface EnrichmentJobPartsSummary {
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobPartFromAPIResponse=exports.ENRICHMENT_JOB_PART_STATUS=void 0;var ENRICHMENT_JOB_PART_STATUS,core_1=require("../../core"),data_1=require("../../data");!function(e){e.VALID="valid",e.INVALID="invalid"}(ENRICHMENT_JOB_PART_STATUS||(exports.ENRICHMENT_JOB_PART_STATUS=ENRICHMENT_JOB_PART_STATUS={}));var enrichmentJobPartFromAPIResponse=function(e){return{partiumId:e.partiumId,externalId:e.id,name:e.name,nameLanguage:e.nameLanguage,image:e.image?data_1.Image.fromFindAPIResponse(e.image,core_1.BACKEND_SERVICE.DATA):null,status:e.status}};exports.enrichmentJobPartFromAPIResponse=enrichmentJobPartFromAPIResponse;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobPartFromAPIResponse=exports.ENRICHMENT_JOB_PART_STATUS=void 0;var ENRICHMENT_JOB_PART_STATUS,core_1=require("../../core"),data_1=require("../../data");!function(e){e.VALID="valid",e.INVALID="invalid"}(ENRICHMENT_JOB_PART_STATUS||(exports.ENRICHMENT_JOB_PART_STATUS=ENRICHMENT_JOB_PART_STATUS={}));var enrichmentJobPartFromAPIResponse=function(e){return{partiumId:e.partiumId,externalId:e.id,name:e.name,nameLanguage:e.nameLanguage,image:e.image?(0,data_1.fromDataAPIResponse)(e.image,core_1.BACKEND_SERVICE.DATA):null,status:e.status}};exports.enrichmentJobPartFromAPIResponse=enrichmentJobPartFromAPIResponse;
@@ -1,5 +1,5 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- import { Image, ImageFromFindAPI } from '../../data/models/image';
2
+ import { Image, ImageFromDataAPI } from '../../data/models/image';
3
3
  export declare enum EnrichmentJobStatus {
4
4
  SUBMITTED = "submitted",
5
5
  IN_PROGRESS = "in_progress",
@@ -17,7 +17,7 @@ export interface EnrichmentJobFromAPI {
17
17
  title: string;
18
18
  jobType: EnrichmentJobType;
19
19
  description?: string;
20
- thumbnails?: Array<ImageFromFindAPI | null>;
20
+ thumbnails?: Array<ImageFromDataAPI | null>;
21
21
  status: EnrichmentJobStatus;
22
22
  requestDate?: string;
23
23
  partCount?: number;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobDetailFromAPIResponse=exports.enrichmentJobFromAPIResponse=exports.EnrichmentJobType=exports.EnrichmentJobStatus=void 0;var EnrichmentJobStatus,EnrichmentJobType,core_1=require("../../core"),image_1=require("../../data/models/image");!function(e){e.SUBMITTED="submitted",e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.ERROR="error",e.CANCELED="canceled"}(EnrichmentJobStatus||(exports.EnrichmentJobStatus=EnrichmentJobStatus={})),function(e){e.GENERAL_PART_ATTRIBUTES="general_part_attributes",e.SUPPLIER_DISCOVERY="supplier_discovery",e.CUSTOM_ENRICHMENT="custom_enrichment"}(EnrichmentJobType||(exports.EnrichmentJobType=EnrichmentJobType={}));var enrichmentJobFromAPIResponse=function(e){return{id:e.jobId,title:e.title,jobType:e.jobType,description:e.description,partImages:e.thumbnails?e.thumbnails.map((function(e){return e?image_1.Image.fromFindAPIResponse(e,core_1.BACKEND_SERVICE.DATA):null})):[],status:e.status,requestDate:e.requestDate,partCount:e.partCount}};exports.enrichmentJobFromAPIResponse=enrichmentJobFromAPIResponse;var enrichmentJobDetailFromAPIResponse=function(e){return __assign(__assign({},(0,exports.enrichmentJobFromAPIResponse)(e)),{description:e.description,requestDate:e.requestDate,partCount:e.partCount})};exports.enrichmentJobDetailFromAPIResponse=enrichmentJobDetailFromAPIResponse;
2
+ "use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.enrichmentJobDetailFromAPIResponse=exports.enrichmentJobFromAPIResponse=exports.EnrichmentJobType=exports.EnrichmentJobStatus=void 0;var EnrichmentJobStatus,EnrichmentJobType,core_1=require("../../core"),image_1=require("../../data/models/image");!function(e){e.SUBMITTED="submitted",e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.ERROR="error",e.CANCELED="canceled"}(EnrichmentJobStatus||(exports.EnrichmentJobStatus=EnrichmentJobStatus={})),function(e){e.GENERAL_PART_ATTRIBUTES="general_part_attributes",e.SUPPLIER_DISCOVERY="supplier_discovery",e.CUSTOM_ENRICHMENT="custom_enrichment"}(EnrichmentJobType||(exports.EnrichmentJobType=EnrichmentJobType={}));var enrichmentJobFromAPIResponse=function(e){return{id:e.jobId,title:e.title,jobType:e.jobType,description:e.description,partImages:e.thumbnails?e.thumbnails.map((function(e){return e?(0,image_1.fromDataAPIResponse)(e,core_1.BACKEND_SERVICE.DATA):null})):[],status:e.status,requestDate:e.requestDate,partCount:e.partCount}};exports.enrichmentJobFromAPIResponse=enrichmentJobFromAPIResponse;var enrichmentJobDetailFromAPIResponse=function(e){return __assign(__assign({},(0,exports.enrichmentJobFromAPIResponse)(e)),{description:e.description,requestDate:e.requestDate,partCount:e.partCount})};exports.enrichmentJobDetailFromAPIResponse=enrichmentJobDetailFromAPIResponse;
package/find/index.d.ts CHANGED
@@ -1,35 +1,8 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export * from './models/tagable/i18n-tagable';
3
- export * from './models/tagable/tagable-base';
4
- export * from './models/tagable/tagable';
5
- export * from './models/text-search-result-item/text-search-result-item-unknown';
6
- export * from './models/text-search-result-item/text-search-result-item-part';
7
- export * from './models/text-search-result-item/text-search-result-item-document';
8
- export * from './models/text-search-result-item/text-search-result-item-recent-query';
9
- export * from './models/text-search-result-item/text-search-error';
10
- export * from './models/text-search-result-item/text-search-result-item';
11
2
  export * from './models/smart-filter';
12
- export * from './models/search-status/text-search-status';
13
- export * from './models/search-status/cv-search-status';
14
- export * from './models/search-status/search-filter-status';
15
- export * from './models/search-status/search-status';
16
- export * from './models/search-status/tag-search-status';
17
- export * from './models/search-filter';
18
- export * from './models/text-search-manipulator';
19
- export * from './models/assets/asset';
20
- export * from './models/text-search-config';
21
- export * from './models/search-session-log-object';
22
- export * from './models/search-tag';
23
- export * from './models/search-result-status';
24
3
  export * from './models/search-input';
25
4
  export * from './models/search-output';
26
- export * from './services/search-filter.service';
5
+ export * from './models/image-crop-area';
27
6
  export * from './services/search/search.service';
28
- export * from './services/search/search-result.service';
29
- export * from './services/search/text-search.service';
30
- export * from './services/search/cv-search.service';
31
- export * from './services/filter-uploaders/filter-uploader';
32
- export * from './services/filter-uploaders/update-filters-uploader';
33
7
  export * from './services/asset.service';
34
- export * from './services/search/tag-search.service';
35
8
  export * from './services/search/recent-text-search-queries.service';
package/find/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var a=Object.getOwnPropertyDescriptor(r,t);a&&!("get"in a?!r.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,a)}:function(e,r,t,s){void 0===s&&(s=t),e[s]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./models/tagable/i18n-tagable"),exports),__exportStar(require("./models/tagable/tagable-base"),exports),__exportStar(require("./models/tagable/tagable"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-unknown"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-part"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-document"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item-recent-query"),exports),__exportStar(require("./models/text-search-result-item/text-search-error"),exports),__exportStar(require("./models/text-search-result-item/text-search-result-item"),exports),__exportStar(require("./models/smart-filter"),exports),__exportStar(require("./models/search-status/text-search-status"),exports),__exportStar(require("./models/search-status/cv-search-status"),exports),__exportStar(require("./models/search-status/search-filter-status"),exports),__exportStar(require("./models/search-status/search-status"),exports),__exportStar(require("./models/search-status/tag-search-status"),exports),__exportStar(require("./models/search-filter"),exports),__exportStar(require("./models/text-search-manipulator"),exports),__exportStar(require("./models/assets/asset"),exports),__exportStar(require("./models/text-search-config"),exports),__exportStar(require("./models/search-session-log-object"),exports),__exportStar(require("./models/search-tag"),exports),__exportStar(require("./models/search-result-status"),exports),__exportStar(require("./models/search-input"),exports),__exportStar(require("./models/search-output"),exports),__exportStar(require("./services/search-filter.service"),exports),__exportStar(require("./services/search/search.service"),exports),__exportStar(require("./services/search/search-result.service"),exports),__exportStar(require("./services/search/text-search.service"),exports),__exportStar(require("./services/search/cv-search.service"),exports),__exportStar(require("./services/filter-uploaders/filter-uploader"),exports),__exportStar(require("./services/filter-uploaders/update-filters-uploader"),exports),__exportStar(require("./services/asset.service"),exports),__exportStar(require("./services/search/tag-search.service"),exports),__exportStar(require("./services/search/recent-text-search-queries.service"),exports);
2
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t);var s=Object.getOwnPropertyDescriptor(r,t);s&&!("get"in s?!r.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,i,s)}:function(e,r,t,i){void 0===i&&(i=t),e[i]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./models/smart-filter"),exports),__exportStar(require("./models/search-input"),exports),__exportStar(require("./models/search-output"),exports),__exportStar(require("./models/image-crop-area"),exports),__exportStar(require("./services/search/search.service"),exports),__exportStar(require("./services/asset.service"),exports),__exportStar(require("./services/search/recent-text-search-queries.service"),exports);
@@ -0,0 +1,7 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export type ImageCropArea = {
3
+ x1: number;
4
+ y1: number;
5
+ x2: number;
6
+ y2: number;
7
+ };
@@ -1,7 +1,15 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
2
  import { PFile } from '../../core';
3
- import { TextSearchQueries } from '../services/search/text-search.service';
4
- import { ImageCropArea } from './search-status/cv-search-status';
3
+ import { ImageCropArea } from './image-crop-area';
4
+ /** @deprecated use the text attribute instead */
5
+ export declare enum TEXT_SEARCH_TYPE {
6
+ SEMANTIC = "semanticText",
7
+ EXACT = "exactText"
8
+ }
9
+ /** @deprecated use the text attribute instead */
10
+ export type TextSearchQueries = {
11
+ [key in TEXT_SEARCH_TYPE]?: string;
12
+ };
5
13
  /**
6
14
  * Search-Input for searches
7
15
  */
@@ -17,7 +25,7 @@ export interface SearchInput {
17
25
  text?: string;
18
26
  /**
19
27
  * either searchImageAssetId or searchImage can be set to perform image-search.
20
- * An imageId obtained via SearchService.uploadSearchImage (or from a previous search-response)
28
+ * An imageId obtained via AssetService.uploadImage (or from a previous search-response)
21
29
  * can be passed here to reuse an already uploaded image without uploading it again.
22
30
  */
23
31
  searchImageAssetId?: string;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";var TEXT_SEARCH_TYPE;Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEXT_SEARCH_TYPE=void 0,function(T){T.SEMANTIC="semanticText",T.EXACT="exactText"}(TEXT_SEARCH_TYPE||(exports.TEXT_SEARCH_TYPE=TEXT_SEARCH_TYPE={}));