@partium/js-sdk 16.3.0 → 16.4.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.
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -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;
@@ -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.4.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.4.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.4.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.",