@partium/js-sdk 16.3.0 → 16.5.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.
package/data/index.d.ts CHANGED
@@ -22,6 +22,8 @@ export * from './models/get-selectable-attributes-request';
22
22
  export * from './models/get-selectable-attributes-response';
23
23
  export * from './models/part-data';
24
24
  export * from './models/selectable-attribute';
25
+ export * from './models/parts-summary-request';
26
+ export * from './models/parts-summary-response';
25
27
  export * from './services/part.service';
26
28
  export * from './services/part-enrichment.service';
27
29
  export * from './services/related-parts.service';
package/data/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 o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,o)}: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/part"),exports),__exportStar(require("./models/document"),exports),__exportStar(require("./models/assembly-hierarchy-node"),exports),__exportStar(require("./models/assembly-hierarchy-node-breadcrumb"),exports),__exportStar(require("./models/image"),exports),__exportStar(require("./models/attribute"),exports),__exportStar(require("./models/csa-request"),exports),__exportStar(require("./models/csa-request-status"),exports),__exportStar(require("./models/filter-key"),exports),__exportStar(require("./models/filter-option-value"),exports),__exportStar(require("./models/shopping-cart"),exports),__exportStar(require("./models/multiple-expert-searches"),exports),__exportStar(require("./models/csa-request-search"),exports),__exportStar(require("./models/announcement"),exports),__exportStar(require("./models/inquiry"),exports),__exportStar(require("./models/mounting-location"),exports),__exportStar(require("./models/part-enrichment-data"),exports),__exportStar(require("./models/get-part-data-request"),exports),__exportStar(require("./models/get-part-data-response"),exports),__exportStar(require("./models/get-selectable-attributes-request"),exports),__exportStar(require("./models/get-selectable-attributes-response"),exports),__exportStar(require("./models/part-data"),exports),__exportStar(require("./models/selectable-attribute"),exports),__exportStar(require("./services/part.service"),exports),__exportStar(require("./services/part-enrichment.service"),exports),__exportStar(require("./services/related-parts.service"),exports),__exportStar(require("./services/assembly-hierarchy-nodes.service"),exports),__exportStar(require("./services/part-attribute.service"),exports),__exportStar(require("./services/customer-service-assistance.service"),exports),__exportStar(require("./services/filter.service"),exports),__exportStar(require("./services/shopping-cart.service"),exports),__exportStar(require("./services/inquiry.service"),exports),__exportStar(require("./services/announcement.service"),exports),__exportStar(require("./services/data.service"),exports);
2
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,o)}: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/part"),exports),__exportStar(require("./models/document"),exports),__exportStar(require("./models/assembly-hierarchy-node"),exports),__exportStar(require("./models/assembly-hierarchy-node-breadcrumb"),exports),__exportStar(require("./models/image"),exports),__exportStar(require("./models/attribute"),exports),__exportStar(require("./models/csa-request"),exports),__exportStar(require("./models/csa-request-status"),exports),__exportStar(require("./models/filter-key"),exports),__exportStar(require("./models/filter-option-value"),exports),__exportStar(require("./models/shopping-cart"),exports),__exportStar(require("./models/multiple-expert-searches"),exports),__exportStar(require("./models/csa-request-search"),exports),__exportStar(require("./models/announcement"),exports),__exportStar(require("./models/inquiry"),exports),__exportStar(require("./models/mounting-location"),exports),__exportStar(require("./models/part-enrichment-data"),exports),__exportStar(require("./models/get-part-data-request"),exports),__exportStar(require("./models/get-part-data-response"),exports),__exportStar(require("./models/get-selectable-attributes-request"),exports),__exportStar(require("./models/get-selectable-attributes-response"),exports),__exportStar(require("./models/part-data"),exports),__exportStar(require("./models/selectable-attribute"),exports),__exportStar(require("./models/parts-summary-request"),exports),__exportStar(require("./models/parts-summary-response"),exports),__exportStar(require("./services/part.service"),exports),__exportStar(require("./services/part-enrichment.service"),exports),__exportStar(require("./services/related-parts.service"),exports),__exportStar(require("./services/assembly-hierarchy-nodes.service"),exports),__exportStar(require("./services/part-attribute.service"),exports),__exportStar(require("./services/customer-service-assistance.service"),exports),__exportStar(require("./services/filter.service"),exports),__exportStar(require("./services/shopping-cart.service"),exports),__exportStar(require("./services/inquiry.service"),exports),__exportStar(require("./services/announcement.service"),exports),__exportStar(require("./services/data.service"),exports);
@@ -0,0 +1,35 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ /**
3
+ * The projection of the parts summary.
4
+ */
5
+ export type PartsSummaryProjection = 'selected' | 'investigation' | 'attributes' | 'identifiers' | 'supplierDiscovery';
6
+ export interface PartsSummaryRequest {
7
+ /**
8
+ * Specify the part IDs to fetch the summary for.
9
+ */
10
+ partIds: string[];
11
+ /**
12
+ * Specify which data should be fetched via projection.
13
+ */
14
+ projection: PartsSummaryProjection[];
15
+ /**
16
+ * Specify the attribute IDs to fetch the summary for. (only if projection includes "attributes")
17
+ */
18
+ attributeIds?: string[];
19
+ /**
20
+ * Specify the organization to fetch the summary for.
21
+ */
22
+ organization?: string | null;
23
+ /**
24
+ * Specify the part list ID to check selection-status of part-ids. (only if projection includes "selected")
25
+ */
26
+ partListId?: string | null;
27
+ /**
28
+ * Specify the language.
29
+ */
30
+ language?: string | null;
31
+ /**
32
+ * Specify the fallback languages if the main language is not available.
33
+ */
34
+ fallbackLanguages?: string[];
35
+ }
@@ -0,0 +1,125 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ import { BaseResponse } from "../../core";
3
+ /**
4
+ * Aggregated investigation status across SD and TAE enrichment jobs.
5
+ */
6
+ export declare enum PartInvestigationStatus {
7
+ NONE = "none",
8
+ QUEUED = "queued",
9
+ ONGOING = "ongoing"
10
+ }
11
+ /**
12
+ * Response from the parts summary (`POST /parts`) endpoint.
13
+ */
14
+ export interface PartsSummaryResponse extends BaseResponse {
15
+ /**
16
+ * Per-part data, in the same order as the requested `partIds`.
17
+ */
18
+ results: PartSummaryItem[];
19
+ }
20
+ /**
21
+ * Summary data for a single part. Which fields are populated depends on the requested `projection`.
22
+ */
23
+ export interface PartSummaryItem {
24
+ /**
25
+ * Unique identification for the part.
26
+ */
27
+ id: string;
28
+ /**
29
+ * Whether the part is part of the referenced `partListId` selection.
30
+ *
31
+ * Add `selected` to `projection` for enabling it.
32
+ */
33
+ selected?: boolean | null;
34
+ /**
35
+ * Aggregated investigation status across SD and TAE enrichment jobs.
36
+ *
37
+ * Add `investigation` to `projection` for enabling it.
38
+ */
39
+ investigation?: PartInvestigationStatus | null;
40
+ /**
41
+ * Requested catalog attributes with their catalog and enriched values, ordered by `displayOrder`.
42
+ *
43
+ * Add `attributes` to `projection` (and provide `attributeIds`) for enabling it.
44
+ */
45
+ attributes?: AttributeItems[] | null;
46
+ /**
47
+ * Ingested and from-investigation identifier counts and the last investigation date for the part.
48
+ *
49
+ * Add `identifiers` to `projection` for enabling it.
50
+ */
51
+ identifiers?: PartIdentifierCounts | null;
52
+ /**
53
+ * Count of discovered suppliers and the last supplier discovery investigation date for the part.
54
+ *
55
+ * Add `supplierDiscovery` to `projection` for enabling it.
56
+ */
57
+ supplierDiscovery?: SupplierDiscoveryCounts | null;
58
+ }
59
+ /**
60
+ * Catalog attribute with catalog and enriched values for a part.
61
+ */
62
+ export interface AttributeItems {
63
+ /**
64
+ * Catalog (standard ontology) attribute key.
65
+ */
66
+ attributeId: string;
67
+ /**
68
+ * Ordering hint from the catalog attribute definition; results are already sorted by it.
69
+ */
70
+ displayOrder?: number;
71
+ /**
72
+ * Catalog attribute values from the standard ontology. Empty when the part has no catalog value.
73
+ */
74
+ catalogValues?: string[];
75
+ /**
76
+ * Enriched (TAE) attribute values from the enriched ontology.
77
+ * `null` when the part has no enriched attribute (enrichment never produced this attribute);
78
+ * an empty list when enrichment produced the attribute but with no value;
79
+ * otherwise the enriched values.
80
+ */
81
+ enrichedValues?: string[];
82
+ }
83
+ /**
84
+ * Identifier counts and last investigation date for a part.
85
+ */
86
+ export interface PartIdentifierCounts {
87
+ /**
88
+ * Number of ingested identifiers for the part.
89
+ * `null` when the part has no identifiers at all (no data), which is distinct from a count of `0`
90
+ * (the part has identifiers, but none of them are ingested).
91
+ */
92
+ ingestedCount?: number;
93
+ /**
94
+ * Number of identifiers from investigations (extracted from part data or enrichment) for the part.
95
+ * `null` when the part has no identifiers at all (no data), which is distinct from a count of `0`.
96
+ */
97
+ fromInvestigationCount?: number;
98
+ /**
99
+ * Timestamp of the last investigation (supplier discovery or general part attributes enrichment job)
100
+ * that took place for the part. `null` when the part was never investigated.
101
+ */
102
+ lastInvestigatedAt?: string;
103
+ }
104
+ /**
105
+ * Supplier discovery counts and last investigation date for a part.
106
+ */
107
+ export interface SupplierDiscoveryCounts {
108
+ /**
109
+ * Lifecycle status of the part reported by the supplier discovery (SD) results
110
+ * (e.g. `active`, `discontinued`).
111
+ * `null` when the part has no SD results at all (no data) or the results carry no lifecycle status.
112
+ */
113
+ lifecycleStatus?: string;
114
+ /**
115
+ * Number of suppliers/vendors discovered for the part, counted from the supplier discovery (SD) results.
116
+ * `null` when the part has no SD results at all (no data), which is distinct from a count of `0`
117
+ * (the part has SD results, but no supplier was discovered).
118
+ */
119
+ supplierCount?: number;
120
+ /**
121
+ * Timestamp of the last supplier discovery investigation that took place for the part.
122
+ * `null` when the part was never investigated for suppliers.
123
+ */
124
+ lastInvestigatedAt?: string;
125
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";var PartInvestigationStatus;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartInvestigationStatus=void 0,function(t){t.NONE="none",t.QUEUED="queued",t.ONGOING="ongoing"}(PartInvestigationStatus||(exports.PartInvestigationStatus=PartInvestigationStatus={}));
@@ -5,6 +5,8 @@ import { GetPartDataRequest } from '../models/get-part-data-request';
5
5
  import { GetPartDataResponse } from '../models/get-part-data-response';
6
6
  import { GetSelectableAttributesRequest } from '../models/get-selectable-attributes-request';
7
7
  import { GetSelectableAttributesResponse } from '../models/get-selectable-attributes-response';
8
+ import { PartsSummaryRequest } from '../models/parts-summary-request';
9
+ import { PartsSummaryResponse } from '../models/parts-summary-response';
8
10
  export interface DataService {
9
11
  /**
10
12
  * Get the data of a part.
@@ -13,6 +15,14 @@ export interface DataService {
13
15
  * @returns The data of the part.
14
16
  */
15
17
  getPart(request: GetPartDataRequest): Observable<GetPartDataResponse>;
18
+ /**
19
+ * Get the summary of multiple parts.
20
+ * Specify which data should be fetched via projection.
21
+ *
22
+ * @param request - The request object.
23
+ * @returns The summary of the parts.
24
+ */
25
+ getPartsSummary(request: PartsSummaryRequest): Observable<PartsSummaryResponse>;
16
26
  /**
17
27
  * Loads the first page of selectable attribute definitions with pagination context.
18
28
  *
@@ -43,6 +53,7 @@ export declare class DataServiceImpl extends BaseService implements DataService
43
53
  constructor(serviceProvider: ServiceProvider);
44
54
  onCreate(): void;
45
55
  getPart(request?: GetPartDataRequest): Observable<GetPartDataResponse>;
56
+ getPartsSummary(request: PartsSummaryRequest): Observable<PartsSummaryResponse>;
46
57
  loadSelectableAttributes(request?: GetSelectableAttributesRequest): Observable<{
47
58
  response: GetSelectableAttributesResponse;
48
59
  paginationContext: DefaultGetPaginatedRequestPaginationContext;
@@ -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 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;
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,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=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),DataServiceImpl=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.getPart=function(t){return void 0===t&&(t={projection:["partiumId"]}),this.httpsService.get("part",(0,core_1.toQueryParams)(t),core_1.BACKEND_SERVICE.DATA_V2)},e.prototype.getPartsSummary=function(t){return this.httpsService.post("parts",t,[],core_1.BACKEND_SERVICE.DATA_V2)},e.prototype.loadSelectableAttributes=function(t){return void 0===t&&(t={}),this.fetchSelectableAttributesPage(t).pipe((0,rxjs_1.map)((function(e){return{response:e,paginationContext:{initialRequest:__assign({},t),nextCursor:(0,core_1.extractNextCursor)(e)}}})))},e.prototype.loadMoreSelectableAttributes=function(t){if(!t.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 e=__assign(__assign({},t.initialRequest),{cursor:t.nextCursor});return this.fetchSelectableAttributesPage(e).pipe((0,rxjs_1.map)((function(e){return{response:e,paginationContext:__assign(__assign({},t),{nextCursor:(0,core_1.extractNextCursor)(e)})}})))},e.prototype.hasMoreSelectableAttributesAvailable=function(t){return!!t.nextCursor},e.prototype.fetchSelectableAttributesPage=function(t){return this.httpsService.get("attributes",(0,core_1.toQueryParams)(t),core_1.BACKEND_SERVICE.DATA_V2)},e=__decorate([(0,core_1.InjectionIdentifier)("DataService")],e)}(core_1.BaseService);exports.DataServiceImpl=DataServiceImpl;
@@ -23,3 +23,4 @@ export * from './models/post-remove-all-search-session-parts-from-enrichment-job
23
23
  export * from './models/get-search-summary-response';
24
24
  export * from './models/download-enrichment-job-results-request';
25
25
  export * from './models/download-enrichment-job-results-response';
26
+ export * from './models/trigger-investigation-for-partlist-request';
@@ -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,o){void 0===o&&(o=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,o,s)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=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/enrichment-job"),exports),__exportStar(require("./models/get-enrichment-jobs-request"),exports),__exportStar(require("./models/get-enrichment-job-request"),exports),__exportStar(require("./models/get-enrichment-job-parts-request"),exports),__exportStar(require("./models/enrichment-job-part"),exports),__exportStar(require("./services/data-enrichment.service"),exports),__exportStar(require("./models/create-enrichment-job-request"),exports),__exportStar(require("./models/create-enrichment-job-response"),exports),__exportStar(require("./models/submit-enrichment-job-request"),exports),__exportStar(require("./models/trigger-enrichment-job-request"),exports),__exportStar(require("./models/trigger-enrichment-job-response"),exports),__exportStar(require("./models/create-enrichment-job-with-search-session-request"),exports),__exportStar(require("./models/create-enrichment-job-with-search-session-response"),exports),__exportStar(require("./models/post-check-which-parts-in-enrichment-job-request"),exports),__exportStar(require("./models/post-check-which-parts-in-enrichment-job-response"),exports),__exportStar(require("./models/post-add-parts-to-enrichment-job-response"),exports),__exportStar(require("./models/post-remove-parts-from-enrichment-job-response"),exports),__exportStar(require("./models/post-add-all-search-session-parts-to-enrichment-job-response"),exports),__exportStar(require("./models/post-remove-all-search-session-parts-from-enrichment-job-response"),exports),__exportStar(require("./models/post-add-all-search-session-parts-to-enrichment-job-request"),exports),__exportStar(require("./models/post-remove-all-search-session-parts-from-enrichment-job-request"),exports),__exportStar(require("./models/get-search-summary-response"),exports),__exportStar(require("./models/download-enrichment-job-results-request"),exports),__exportStar(require("./models/download-enrichment-job-results-response"),exports);
2
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=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,o,s)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=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/enrichment-job"),exports),__exportStar(require("./models/get-enrichment-jobs-request"),exports),__exportStar(require("./models/get-enrichment-job-request"),exports),__exportStar(require("./models/get-enrichment-job-parts-request"),exports),__exportStar(require("./models/enrichment-job-part"),exports),__exportStar(require("./services/data-enrichment.service"),exports),__exportStar(require("./models/create-enrichment-job-request"),exports),__exportStar(require("./models/create-enrichment-job-response"),exports),__exportStar(require("./models/submit-enrichment-job-request"),exports),__exportStar(require("./models/trigger-enrichment-job-request"),exports),__exportStar(require("./models/trigger-enrichment-job-response"),exports),__exportStar(require("./models/create-enrichment-job-with-search-session-request"),exports),__exportStar(require("./models/create-enrichment-job-with-search-session-response"),exports),__exportStar(require("./models/post-check-which-parts-in-enrichment-job-request"),exports),__exportStar(require("./models/post-check-which-parts-in-enrichment-job-response"),exports),__exportStar(require("./models/post-add-parts-to-enrichment-job-response"),exports),__exportStar(require("./models/post-remove-parts-from-enrichment-job-response"),exports),__exportStar(require("./models/post-add-all-search-session-parts-to-enrichment-job-response"),exports),__exportStar(require("./models/post-remove-all-search-session-parts-from-enrichment-job-response"),exports),__exportStar(require("./models/post-add-all-search-session-parts-to-enrichment-job-request"),exports),__exportStar(require("./models/post-remove-all-search-session-parts-from-enrichment-job-request"),exports),__exportStar(require("./models/get-search-summary-response"),exports),__exportStar(require("./models/download-enrichment-job-results-request"),exports),__exportStar(require("./models/download-enrichment-job-results-response"),exports),__exportStar(require("./models/trigger-investigation-for-partlist-request"),exports);
@@ -12,6 +12,10 @@ export declare enum EnrichmentJobType {
12
12
  SUPPLIER_DISCOVERY = "supplier_discovery",
13
13
  CUSTOM_ENRICHMENT = "custom_enrichment"
14
14
  }
15
+ export declare enum InvestigationType {
16
+ GENERAL_PART_ATTRIBUTES = "general_part_attributes",
17
+ SUPPLIER_DISCOVERY = "supplier_discovery"
18
+ }
15
19
  export interface EnrichmentJobFromAPI {
16
20
  jobId: string;
17
21
  title: string;
@@ -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?(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;
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.InvestigationType=exports.EnrichmentJobType=exports.EnrichmentJobStatus=void 0;var EnrichmentJobStatus,EnrichmentJobType,InvestigationType,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={})),function(e){e.GENERAL_PART_ATTRIBUTES="general_part_attributes",e.SUPPLIER_DISCOVERY="supplier_discovery"}(InvestigationType||(exports.InvestigationType=InvestigationType={}));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;
@@ -0,0 +1,23 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ import { InvestigationType } from './enrichment-job';
3
+ /**
4
+ * Request to trigger a investigation for a part list.
5
+ */
6
+ export interface TriggerInvestigationForPartListRequest {
7
+ /**
8
+ * Types of the investigations to trigger.
9
+ */
10
+ types: InvestigationType[];
11
+ /**
12
+ * Id of the part list to investigate.
13
+ */
14
+ partListId: string;
15
+ /**
16
+ * Optional list of attribute identifiers used for attribute investigations.
17
+ */
18
+ attributeIds?: string[];
19
+ /**
20
+ * Organization identifier when explicitly selecting an organization.
21
+ */
22
+ organization?: string;
23
+ }
@@ -27,6 +27,7 @@ import { PostRemoveAllSearchSessionPartsFromEnrichmentJobRequest } from '../mode
27
27
  import { GetSearchSummaryResponse } from '../models/get-search-summary-response';
28
28
  import { DownloadEnrichmentJobResultsRequest } from '../models/download-enrichment-job-results-request';
29
29
  import { DownloadEnrichmentJobResultsResponse } from '../models/download-enrichment-job-results-response';
30
+ import { TriggerInvestigationForPartListRequest } from '../models/trigger-investigation-for-partlist-request';
30
31
  /**
31
32
  * Service for managing data enrichment jobs.
32
33
  */
@@ -158,6 +159,13 @@ export interface DataEnrichmentService {
158
159
  * @returns An Observable that emits the created job id.
159
160
  */
160
161
  triggerEnrichmentJob(request: TriggerEnrichmentJobRequest): Observable<TriggerEnrichmentJobResponse>;
162
+ /**
163
+ * Trigger a investigation of one or more types for all parts in a part list.
164
+ *
165
+ * @param request - The request containing all data for the request.
166
+ * @returns An Observable that emits when the request is completed.
167
+ */
168
+ triggerInvestigationForPartList(request: TriggerInvestigationForPartListRequest): Observable<void>;
161
169
  /**
162
170
  * Download the Excel export for a completed enrichment job.
163
171
  *
@@ -200,6 +208,7 @@ export declare class DataEnrichmentServiceImpl extends BaseService implements Da
200
208
  createEnrichmentJobWithSearchSession(request: CreateEnrichmentJobWithSearchSessionRequest): Observable<CreateEnrichmentJobWithSearchSessionResponse>;
201
209
  submitEnrichmentJob(request: SubmitEnrichmentJobRequest): Observable<void>;
202
210
  triggerEnrichmentJob(request: TriggerEnrichmentJobRequest): Observable<TriggerEnrichmentJobResponse>;
211
+ triggerInvestigationForPartList(request: TriggerInvestigationForPartListRequest): Observable<void>;
203
212
  downloadEnrichmentJobResults(request: DownloadEnrichmentJobResultsRequest): Observable<DownloadEnrichmentJobResultsResponse>;
204
213
  private fetchEnrichmentJobsPage;
205
214
  private fetchEnrichmentJobPartsPage;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __extends=this&&this.__extends||function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])},r(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var n in t=arguments[e])Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,t,e,o){var n,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,t,e,o);else for(var a=r.length-1;a>=0;a--)(n=r[a])&&(s=(i<3?n(s):i>3?n(t,e,s):n(t,e))||s);return i>3&&s&&Object.defineProperty(t,e,s),s},__rest=this&&this.__rest||function(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(e[o[n]]=r[o[n]])}return e},__spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return r.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataEnrichmentServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),enrichment_job_1=require("../models/enrichment-job"),enrichment_job_part_1=require("../models/enrichment-job-part"),DataEnrichmentServiceImpl=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return __extends(t,r),t.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},t.prototype.loadEnrichmentJobs=function(r){return this.fetchEnrichmentJobsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,o=t.nextCursor;return{jobs:e,paginationContext:{initialRequest:r,nextCursor:o}}})))},t.prototype.loadMoreEnrichmentJobs=function(r){if(!r.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({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.jobs,o=t.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},r),{nextCursor:o})}})))},t.prototype.hasMoreEnrichmentJobsAvailable=function(r){return!!r.nextCursor},t.prototype.getEnrichmentJob=function(r){var t=r.jobId,e=__rest(r,["jobId"]);return this.httpsService.get("jobs/".concat(t),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){return(0,enrichment_job_1.enrichmentJobDetailFromAPIResponse)(r)})))},t.prototype.loadEnrichmentJobParts=function(r){return this.fetchEnrichmentJobPartsPage(r).pipe((0,rxjs_1.map)((function(t){var e=t.parts,o=t.partsSummary,n=t.nextCursor;return{parts:e,partsSummary:o,paginationContext:{initialRequest:r,nextCursor:n}}})))},t.prototype.loadMoreEnrichmentJobParts=function(r){if(!r.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({},r.initialRequest),{cursor:r.nextCursor});return this.fetchEnrichmentJobPartsPage(t).pipe((0,rxjs_1.map)((function(t){var e=t.parts,o=t.partsSummary,n=t.nextCursor;return{parts:e,partsSummary:o,paginationContext:__assign(__assign({},r),{nextCursor:n})}})))},t.prototype.addPartsToEnrichmentJob=function(r,t){return this.httpsService.post("jobs/".concat(r,"/parts/add"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.removePartsFromEnrichmentJob=function(r,t){return this.httpsService.post("jobs/".concat(r,"/parts/remove"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.addAllSearchSessionPartsToEnrichmentJob=function(r,t){return this.httpsService.post("jobs/".concat(r,"/search/add"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.removeAllSearchSessionPartsFromEnrichmentJob=function(r,t){return this.httpsService.post("jobs/".concat(r,"/search/remove"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.checkWhichPartsInEnrichmentJob=function(r,t){return this.httpsService.post("jobs/".concat(r,"/parts/check"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.getSearchSummary=function(r){return this.httpsService.get("jobs/".concat(r,"/search/summary"),[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.hasMoreEnrichmentJobPartsAvailable=function(r){return!!r.nextCursor},t.prototype.createEnrichmentJob=function(r){var t=new FormData;t.append("file",r.csvFile);var e=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs/upload",t,e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{"Content-Type":"multipart/form-data"})},t.prototype.createEnrichmentJobWithSearchSession=function(r){var t=__spreadArray(__spreadArray([],r.jobType?[{jobType:r.jobType}]:[],!0),void 0!==r.organization?[{organization:r.organization}]:[],!0);return this.httpsService.post("jobs",r,t,core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.submitEnrichmentJob=function(r){return this.httpsService.post("jobs/".concat(r.jobId,"/submit"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.triggerEnrichmentJob=function(r){var t,e=__assign(__assign({type:r.type,partIds:r.partIds,visible:null!==(t=r.visible)&&void 0!==t&&t},void 0!==r.attributeIds?{attributeIds:r.attributeIds}:{}),void 0!==r.organization?{organization:r.organization}:{});return this.httpsService.post("jobs/trigger",e,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},t.prototype.downloadEnrichmentJobResults=function(r){var t=r.jobId,e=__rest(r,["jobId"]);return this.httpsService.get("jobs/".concat(t,"/export"),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{responseType:"blob"})},t.prototype.fetchEnrichmentJobsPage=function(r){var t=(0,core_1.toQueryParams)(r);return this.httpsService.get("jobs",t,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){var t,e;return{jobs:null!==(e=null===(t=r.results)||void 0===t?void 0:t.map((function(r){return(0,enrichment_job_1.enrichmentJobFromAPIResponse)(r)})))&&void 0!==e?e:[],nextCursor:(0,core_1.extractNextCursor)(r)}})))},t.prototype.fetchEnrichmentJobPartsPage=function(r){var t=r.jobId,e=__rest(r,["jobId"]),o=(0,core_1.toQueryParams)(e);return this.httpsService.get("jobs/".concat(t,"/parts"),o,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(r){var t,e;return{parts:null!==(e=null===(t=r.results)||void 0===t?void 0:t.map((function(r){return(0,enrichment_job_part_1.enrichmentJobPartFromAPIResponse)(r)})))&&void 0!==e?e:[],partsSummary:r.partsSummary,nextCursor:(0,core_1.extractNextCursor)(r)}})))},t=__decorate([(0,core_1.InjectionIdentifier)("DataEnrichmentService")],t)}(core_1.BaseService);exports.DataEnrichmentServiceImpl=DataEnrichmentServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},t(r,e)};return function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var r,e=1,o=arguments.length;e<o;e++)for(var n in r=arguments[e])Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(t,r,e,o){var n,i=arguments.length,s=i<3?r:null===o?o=Object.getOwnPropertyDescriptor(r,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,e,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(r,e,s):n(r,e))||s);return i>3&&s&&Object.defineProperty(r,e,s),s},__rest=this&&this.__rest||function(t,r){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(e[o[n]]=t[o[n]])}return e},__spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||2===arguments.length)for(var o,n=0,i=r.length;n<i;n++)!o&&n in r||(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return t.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataEnrichmentServiceImpl=void 0;var rxjs_1=require("rxjs"),core_1=require("../../core"),enrichment_job_1=require("../models/enrichment-job"),enrichment_job_part_1=require("../models/enrichment-job-part"),DataEnrichmentServiceImpl=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return __extends(r,t),r.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},r.prototype.loadEnrichmentJobs=function(t){return this.fetchEnrichmentJobsPage(t).pipe((0,rxjs_1.map)((function(r){var e=r.jobs,o=r.nextCursor;return{jobs:e,paginationContext:{initialRequest:t,nextCursor:o}}})))},r.prototype.loadMoreEnrichmentJobs=function(t){if(!t.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 r=__assign(__assign({},t.initialRequest),{cursor:t.nextCursor});return this.fetchEnrichmentJobsPage(r).pipe((0,rxjs_1.map)((function(r){var e=r.jobs,o=r.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},t),{nextCursor:o})}})))},r.prototype.hasMoreEnrichmentJobsAvailable=function(t){return!!t.nextCursor},r.prototype.getEnrichmentJob=function(t){var r=t.jobId,e=__rest(t,["jobId"]);return this.httpsService.get("jobs/".concat(r),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){return(0,enrichment_job_1.enrichmentJobDetailFromAPIResponse)(t)})))},r.prototype.loadEnrichmentJobParts=function(t){return this.fetchEnrichmentJobPartsPage(t).pipe((0,rxjs_1.map)((function(r){var e=r.parts,o=r.partsSummary,n=r.nextCursor;return{parts:e,partsSummary:o,paginationContext:{initialRequest:t,nextCursor:n}}})))},r.prototype.loadMoreEnrichmentJobParts=function(t){if(!t.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 r=__assign(__assign({},t.initialRequest),{cursor:t.nextCursor});return this.fetchEnrichmentJobPartsPage(r).pipe((0,rxjs_1.map)((function(r){var e=r.parts,o=r.partsSummary,n=r.nextCursor;return{parts:e,partsSummary:o,paginationContext:__assign(__assign({},t),{nextCursor:n})}})))},r.prototype.addPartsToEnrichmentJob=function(t,r){return this.httpsService.post("jobs/".concat(t,"/parts/add"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.removePartsFromEnrichmentJob=function(t,r){return this.httpsService.post("jobs/".concat(t,"/parts/remove"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.addAllSearchSessionPartsToEnrichmentJob=function(t,r){return this.httpsService.post("jobs/".concat(t,"/search/add"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.removeAllSearchSessionPartsFromEnrichmentJob=function(t,r){return this.httpsService.post("jobs/".concat(t,"/search/remove"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.checkWhichPartsInEnrichmentJob=function(t,r){return this.httpsService.post("jobs/".concat(t,"/parts/check"),r,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.getSearchSummary=function(t){return this.httpsService.get("jobs/".concat(t,"/search/summary"),[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.hasMoreEnrichmentJobPartsAvailable=function(t){return!!t.nextCursor},r.prototype.createEnrichmentJob=function(t){var r=new FormData;r.append("file",t.csvFile);var e=__spreadArray(__spreadArray([],t.jobType?[{jobType:t.jobType}]:[],!0),void 0!==t.organization?[{organization:t.organization}]:[],!0);return this.httpsService.post("jobs/upload",r,e,core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{"Content-Type":"multipart/form-data"})},r.prototype.createEnrichmentJobWithSearchSession=function(t){var r=__spreadArray(__spreadArray([],t.jobType?[{jobType:t.jobType}]:[],!0),void 0!==t.organization?[{organization:t.organization}]:[],!0);return this.httpsService.post("jobs",t,r,core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.submitEnrichmentJob=function(t){return this.httpsService.post("jobs/".concat(t.jobId,"/submit"),t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.triggerEnrichmentJob=function(t){var r,e=__assign(__assign({type:t.type,partIds:t.partIds,visible:null!==(r=t.visible)&&void 0!==r&&r},void 0!==t.attributeIds?{attributeIds:t.attributeIds}:{}),void 0!==t.organization?{organization:t.organization}:{});return this.httpsService.post("jobs/trigger",e,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.triggerInvestigationForPartList=function(t){return this.httpsService.post("jobs/from-part-list",t,[],core_1.BACKEND_SERVICE.DATA_ENRICHMENT)},r.prototype.downloadEnrichmentJobResults=function(t){var r=t.jobId,e=__rest(t,["jobId"]);return this.httpsService.get("jobs/".concat(r,"/export"),(0,core_1.toQueryParams)(e),core_1.BACKEND_SERVICE.DATA_ENRICHMENT,{responseType:"blob"})},r.prototype.fetchEnrichmentJobsPage=function(t){var r=(0,core_1.toQueryParams)(t);return this.httpsService.get("jobs",r,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){var r,e;return{jobs:null!==(e=null===(r=t.results)||void 0===r?void 0:r.map((function(t){return(0,enrichment_job_1.enrichmentJobFromAPIResponse)(t)})))&&void 0!==e?e:[],nextCursor:(0,core_1.extractNextCursor)(t)}})))},r.prototype.fetchEnrichmentJobPartsPage=function(t){var r=t.jobId,e=__rest(t,["jobId"]),o=(0,core_1.toQueryParams)(e);return this.httpsService.get("jobs/".concat(r,"/parts"),o,core_1.BACKEND_SERVICE.DATA_ENRICHMENT).pipe((0,rxjs_1.map)((function(t){var r,e;return{parts:null!==(e=null===(r=t.results)||void 0===r?void 0:r.map((function(t){return(0,enrichment_job_part_1.enrichmentJobPartFromAPIResponse)(t)})))&&void 0!==e?e:[],partsSummary:t.partsSummary,nextCursor:(0,core_1.extractNextCursor)(t)}})))},r=__decorate([(0,core_1.InjectionIdentifier)("DataEnrichmentService")],r)}(core_1.BaseService);exports.DataEnrichmentServiceImpl=DataEnrichmentServiceImpl;
@@ -51,6 +51,10 @@ interface FilterFromAPIResponse {
51
51
  values: string[];
52
52
  }
53
53
  type SearchResultOptions = Record<string, string | number | boolean>;
54
+ /**
55
+ * The projection of the parts summary.
56
+ */
57
+ export type SearchProjection = 'smartFilters' | 'status' | 'results.id' | 'results.partiumId' | 'results.name' | 'results.metadata' | 'results.previewData' | 'results.images' | 'results.createdAt' | 'results.modifiedAt' | 'results.attributes' | 'results.mountingLocationsCount' | 'results.nameLanguage' | 'results.duplicateType' | 'results.highlights' | 'results.relatedPartsSummary' | 'request';
54
58
  /**
55
59
  * This service is the central service for managing all search-related interaction.
56
60
  * It allows to perform searches or load search-results from a previous search.
@@ -68,7 +72,7 @@ export interface SearchService {
68
72
  * @param skipDeviceInfoEventLog (optional) if true, no device-info-log will be sent
69
73
  * @returns object of type SearchOutput that contains all search-input + result-list, smart-filters, ... (depending on projection)
70
74
  */
71
- performSearch(searchInput: SearchInput, searchEventContext?: SearchEventContext, projection?: string[], resultOptions?: SearchResultOptions, skipDeviceInfoEventLog?: boolean): Observable<SearchOutput>;
75
+ performSearch(searchInput: SearchInput, searchEventContext?: SearchEventContext, projection?: SearchProjection[], resultOptions?: SearchResultOptions, skipDeviceInfoEventLog?: boolean): Observable<SearchOutput>;
72
76
  /**
73
77
  * Fetch all the details of an existing search-session. Use the projection-attribute to specify exactly which information should be retrieved.
74
78
  * Input and output of this function work analogue to performSearch.
@@ -92,7 +96,7 @@ export declare class SearchServiceImpl extends BaseLoginInitService implements S
92
96
  */
93
97
  init(config: PartiumConfig, userEmail: string, currentOrganization$: Observable<Organization>): Observable<void>;
94
98
  get recentTextSearchQueries(): RecentTextSearchQueriesService;
95
- performSearch(searchInput: SearchInput, searchEventContext?: SearchEventContext, projection?: string[], resultOptions?: SearchResultOptions, skipDeviceInfoEventLog?: boolean): Observable<SearchOutput>;
99
+ performSearch(searchInput: SearchInput, searchEventContext?: SearchEventContext, projection?: SearchProjection[], resultOptions?: SearchResultOptions, skipDeviceInfoEventLog?: boolean): Observable<SearchOutput>;
96
100
  getSearchOutput(searchSessionId: string, projection?: string[], resultOptions?: SearchResultOptions, organizationName?: string): Observable<SearchOutput>;
97
101
  private logDeviceInfo;
98
102
  private getOrganizationId;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export declare const SDK_VERSION_NUMBER = "16.3.0";
2
+ export declare const SDK_VERSION_NUMBER = "16.5.0";
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="16.3.0";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="16.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@partium/js-sdk",
3
- "version": "16.3.0",
3
+ "version": "16.5.0",
4
4
  "author": "Partium Inc.",
5
5
  "license": "See LICENSE.txt",
6
6
  "description": "The Partium Find SDK enables integration of Partium’s parts and materials search capabilities into JavaScript-based applications.",
@@ -14,6 +14,4 @@ export * from './models/remove-all-search-session-parts-from-part-list-request';
14
14
  export * from './models/remove-all-search-session-parts-from-part-list-response';
15
15
  export * from './models/empty-part-list-request';
16
16
  export * from './models/empty-part-list.response';
17
- export * from './models/check-which-parts-in-part-list-request';
18
- export * from './models/check-which-parts-in-part-list-response';
19
17
  export * from './models/part-list-search-summary-response';
@@ -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 o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,o)}: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("./services/part-list.service"),exports),__exportStar(require("./models/create-selection-request"),exports),__exportStar(require("./models/create-selection-response"),exports),__exportStar(require("./models/create-collection-from-file-request"),exports),__exportStar(require("./models/create-collection-from-file-response"),exports),__exportStar(require("./models/add-parts-to-part-list-request"),exports),__exportStar(require("./models/add-parts-to-part-list-response"),exports),__exportStar(require("./models/remove-parts-from-part-list-request"),exports),__exportStar(require("./models/remove-parts-from-part-list-response"),exports),__exportStar(require("./models/add-all-search-session-parts-to-part-list-request"),exports),__exportStar(require("./models/add-all-search-session-parts-to-part-list-response"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-part-list-request"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-part-list-response"),exports),__exportStar(require("./models/empty-part-list-request"),exports),__exportStar(require("./models/empty-part-list.response"),exports),__exportStar(require("./models/check-which-parts-in-part-list-request"),exports),__exportStar(require("./models/check-which-parts-in-part-list-response"),exports),__exportStar(require("./models/part-list-search-summary-response"),exports);
2
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,s){void 0===s&&(s=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,s,o)}: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("./services/part-list.service"),exports),__exportStar(require("./models/create-selection-request"),exports),__exportStar(require("./models/create-selection-response"),exports),__exportStar(require("./models/create-collection-from-file-request"),exports),__exportStar(require("./models/create-collection-from-file-response"),exports),__exportStar(require("./models/add-parts-to-part-list-request"),exports),__exportStar(require("./models/add-parts-to-part-list-response"),exports),__exportStar(require("./models/remove-parts-from-part-list-request"),exports),__exportStar(require("./models/remove-parts-from-part-list-response"),exports),__exportStar(require("./models/add-all-search-session-parts-to-part-list-request"),exports),__exportStar(require("./models/add-all-search-session-parts-to-part-list-response"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-part-list-request"),exports),__exportStar(require("./models/remove-all-search-session-parts-from-part-list-response"),exports),__exportStar(require("./models/empty-part-list-request"),exports),__exportStar(require("./models/empty-part-list.response"),exports),__exportStar(require("./models/part-list-search-summary-response"),exports);
@@ -14,8 +14,6 @@ import { CreateSelectionRequest } from '../models/create-selection-request';
14
14
  import { CreateSelectionResponse } from '../models/create-selection-response';
15
15
  import { CreateCollectionFromFileRequest } from '../models/create-collection-from-file-request';
16
16
  import { CreateCollectionFromFileResponse } from '../models/create-collection-from-file-response';
17
- import { CheckWhichPartsInPartListRequest } from '../models/check-which-parts-in-part-list-request';
18
- import { CheckWhichPartsInPartListResponse } from '../models/check-which-parts-in-part-list-response';
19
17
  import { EmptyPartListRequest } from '../models/empty-part-list-request';
20
18
  import { EmptyPartListResponse } from '../models/empty-part-list.response';
21
19
  /**
@@ -85,13 +83,6 @@ export interface PartListService {
85
83
  * @returns An Observable that emits the add and remove parts count.
86
84
  */
87
85
  getSearchSummary(partListId: string, searchSessionId: string): Observable<PartListSearchSummaryResponse>;
88
- /**
89
- * Given part ids (e.g. from search), returns which of them are already in the part-list.
90
- *
91
- * @param partListId - The part-list id.
92
- * @param request - Part ids to check.
93
- */
94
- checkWhichPartsInPartList(partListId: string, request: CheckWhichPartsInPartListRequest): Observable<CheckWhichPartsInPartListResponse>;
95
86
  }
96
87
  export declare class PartListServiceImpl extends BaseService implements PartListService {
97
88
  private httpsService;
@@ -104,5 +95,4 @@ export declare class PartListServiceImpl extends BaseService implements PartList
104
95
  removeAllSearchSessionPartsFromPartList(partListId: string, request: RemoveAllSearchSessionPartsFromPartListRequest): Observable<RemoveAllSearchSessionPartsFromPartListResponse>;
105
96
  emptyPartList(partListId: string, request: EmptyPartListRequest): Observable<EmptyPartListResponse>;
106
97
  getSearchSummary(partListId: string, searchSessionId: string): Observable<PartListSearchSummaryResponse>;
107
- checkWhichPartsInPartList(partListId: string, request: CheckWhichPartsInPartListRequest): Observable<CheckWhichPartsInPartListResponse>;
108
98
  }
@@ -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,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,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=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(t,e,r,o){var c,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(n=(i<3?c(n):i>3?c(e,r,n):c(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartListServiceImpl=void 0;var core_1=require("../../core"),PartListServiceImpl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.createSelection=function(t){return this.httpsService.post("selections",t,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.createCollectionFromFile=function(t){var e=this;return(0,core_1.guardMultipartUpload)(t.file,(function(){return(0,core_1.postPFileMultipartRequest)(e.httpsService,{url:"collections/upload",file:t.file,fieldName:"file",backend:core_1.BACKEND_SERVICE.PART_LIST})}))},e.prototype.addPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removePartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.addAllSearchSessionPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removeAllSearchSessionPartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.emptyPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/empty"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.getSearchSummary=function(t,e){return this.httpsService.get("".concat(t,"/search/summary"),[{searchSessionId:e}],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.checkWhichPartsInPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/check"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e=__decorate([(0,core_1.InjectionIdentifier)("PartListService")],e)}(core_1.BaseService);exports.PartListServiceImpl=PartListServiceImpl;
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,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=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(t,e,r,o){var c,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(n=(i<3?c(n):i>3?c(e,r,n):c(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartListServiceImpl=void 0;var core_1=require("../../core"),PartListServiceImpl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.createSelection=function(t){return this.httpsService.post("selections",t,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.createCollectionFromFile=function(t){var e=this;return(0,core_1.guardMultipartUpload)(t.file,(function(){return(0,core_1.postPFileMultipartRequest)(e.httpsService,{url:"collections/upload",file:t.file,fieldName:"file",backend:core_1.BACKEND_SERVICE.PART_LIST})}))},e.prototype.addPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removePartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.addAllSearchSessionPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removeAllSearchSessionPartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.emptyPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/empty"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.getSearchSummary=function(t,e){return this.httpsService.get("".concat(t,"/search/summary"),[{searchSessionId:e}],core_1.BACKEND_SERVICE.PART_LIST)},e=__decorate([(0,core_1.InjectionIdentifier)("PartListService")],e)}(core_1.BaseService);exports.PartListServiceImpl=PartListServiceImpl;
@@ -1,4 +0,0 @@
1
- // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export interface CheckWhichPartsInPartListRequest {
3
- partIds: string[];
4
- }
@@ -1,4 +0,0 @@
1
- // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export interface CheckWhichPartsInPartListResponse {
3
- partIds: string[];
4
- }