@partium/js-sdk 15.17.1 → 15.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/enrichment/index.d.ts +9 -0
  2. package/enrichment/index.js +1 -1
  3. package/enrichment/models/get-search-summary-response.d.ts +5 -0
  4. package/enrichment/models/get-search-summary-response.js +2 -0
  5. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-request.d.ts +4 -0
  6. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-request.js +2 -0
  7. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-response.d.ts +5 -0
  8. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-response.js +2 -0
  9. package/enrichment/models/post-add-parts-to-enrichment-job-request.d.ts +5 -0
  10. package/enrichment/models/post-add-parts-to-enrichment-job-request.js +2 -0
  11. package/enrichment/models/post-add-parts-to-enrichment-job-response.d.ts +5 -0
  12. package/enrichment/models/post-add-parts-to-enrichment-job-response.js +2 -0
  13. package/enrichment/models/post-check-which-parts-in-enrichment-job-request.d.ts +5 -0
  14. package/enrichment/models/post-check-which-parts-in-enrichment-job-request.js +2 -0
  15. package/enrichment/models/post-check-which-parts-in-enrichment-job-response.d.ts +5 -0
  16. package/enrichment/models/post-check-which-parts-in-enrichment-job-response.js +2 -0
  17. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-request.d.ts +4 -0
  18. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-request.js +2 -0
  19. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-response.d.ts +5 -0
  20. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-response.js +2 -0
  21. package/enrichment/models/post-remove-parts-from-enrichment-job-request.d.ts +5 -0
  22. package/enrichment/models/post-remove-parts-from-enrichment-job-request.js +2 -0
  23. package/enrichment/models/post-remove-parts-from-enrichment-job-response.d.ts +5 -0
  24. package/enrichment/models/post-remove-parts-from-enrichment-job-response.js +2 -0
  25. package/enrichment/services/data-enrichment.service.d.ts +63 -0
  26. package/enrichment/services/data-enrichment.service.js +1 -1
  27. package/gen/sdk-version.d.ts +1 -1
  28. package/gen/sdk-version.js +1 -1
  29. package/package.json +1 -1
@@ -12,3 +12,12 @@ export * from './models/trigger-enrichment-job-request';
12
12
  export * from './models/trigger-enrichment-job-response';
13
13
  export * from './models/create-enrichment-job-with-search-session-request';
14
14
  export * from './models/create-enrichment-job-with-search-session-response';
15
+ export * from './models/post-check-which-parts-in-enrichment-job-request';
16
+ export * from './models/post-check-which-parts-in-enrichment-job-response';
17
+ export * from './models/post-add-parts-to-enrichment-job-response';
18
+ export * from './models/post-remove-parts-from-enrichment-job-response';
19
+ export * from './models/post-add-all-search-session-parts-to-enrichment-job-response';
20
+ export * from './models/post-remove-all-search-session-parts-from-enrichment-job-response';
21
+ export * from './models/post-add-all-search-session-parts-to-enrichment-job-request';
22
+ export * from './models/post-remove-all-search-session-parts-from-enrichment-job-request';
23
+ export * from './models/get-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,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);
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);
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface GetSearchSummaryResponse {
3
+ wouldAdd: number;
4
+ wouldRemove: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,4 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostAddAllSearchSessionPartsToEnrichmentJobRequest {
3
+ organization?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostAddAllSearchSessionPartsToEnrichmentJobResponse {
3
+ added: number;
4
+ totalInJob: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostAddPartsToEnrichmentJobRequest {
3
+ partIds: string[];
4
+ organization?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostAddPartsToEnrichmentJobResponse {
3
+ added: number;
4
+ totalInJob: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostCheckWhichPartsInEnrichmentJobRequest {
3
+ /** External part ids to check against the job's part list. */
4
+ partIds: string[];
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostCheckWhichPartsInEnrichmentJobResponse {
3
+ /** Subset of requested part ids that are already present on the enrichment job. */
4
+ existingParts: string[];
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,4 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostRemoveAllSearchSessionPartsFromEnrichmentJobRequest {
3
+ organization?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostRemoveAllSearchSessionPartsFromEnrichmentJobResponse {
3
+ removed: number;
4
+ totalInJob: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostRemovePartsFromEnrichmentJobRequest {
3
+ partIds: string[];
4
+ organization?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -0,0 +1,5 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ export interface PostRemovePartsFromEnrichmentJobResponse {
3
+ removed: number;
4
+ totalInJob: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -14,6 +14,17 @@ import { TriggerEnrichmentJobRequest } from '../models/trigger-enrichment-job-re
14
14
  import { TriggerEnrichmentJobResponse } from '../models/trigger-enrichment-job-response';
15
15
  import { CreateEnrichmentJobWithSearchSessionRequest } from '../models/create-enrichment-job-with-search-session-request';
16
16
  import { CreateEnrichmentJobWithSearchSessionResponse } from '../models/create-enrichment-job-with-search-session-response';
17
+ import { PostAddPartsToEnrichmentJobRequest } from '../models/post-add-parts-to-enrichment-job-request';
18
+ import { PostRemovePartsFromEnrichmentJobRequest } from '../models/post-remove-parts-from-enrichment-job-request';
19
+ import { PostAddAllSearchSessionPartsToEnrichmentJobResponse } from '../models/post-add-all-search-session-parts-to-enrichment-job-response';
20
+ import { PostRemoveAllSearchSessionPartsFromEnrichmentJobResponse } from '../models/post-remove-all-search-session-parts-from-enrichment-job-response';
21
+ import { PostCheckWhichPartsInEnrichmentJobRequest } from '../models/post-check-which-parts-in-enrichment-job-request';
22
+ import { PostCheckWhichPartsInEnrichmentJobResponse } from '../models/post-check-which-parts-in-enrichment-job-response';
23
+ import { PostAddPartsToEnrichmentJobResponse } from '../models/post-add-parts-to-enrichment-job-response';
24
+ import { PostRemovePartsFromEnrichmentJobResponse } from '../models/post-remove-parts-from-enrichment-job-response';
25
+ import { PostAddAllSearchSessionPartsToEnrichmentJobRequest } from '../models/post-add-all-search-session-parts-to-enrichment-job-request';
26
+ import { PostRemoveAllSearchSessionPartsFromEnrichmentJobRequest } from '../models/post-remove-all-search-session-parts-from-enrichment-job-request';
27
+ import { GetSearchSummaryResponse } from '../models/get-search-summary-response';
17
28
  /**
18
29
  * Service for managing data enrichment jobs.
19
30
  */
@@ -69,6 +80,52 @@ export interface DataEnrichmentService {
69
80
  paginationContext: DefaultGetPaginatedRequestPaginationContext;
70
81
  }>;
71
82
  hasMoreEnrichmentJobPartsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
83
+ /**
84
+ * Add parts to the Given enrichment job.
85
+ *
86
+ * @param jobId - The enrichment job id.
87
+ * @param request - The request containing the enrichment job id and the part ids to add.
88
+ * @returns An Observable that emits the response
89
+ */
90
+ addPartsToEnrichmentJob(jobId: string, request: PostAddPartsToEnrichmentJobRequest): Observable<PostAddPartsToEnrichmentJobResponse>;
91
+ /**
92
+ * Remove parts from the Given enrichment job.
93
+ *
94
+ * @param jobId - The enrichment job id.
95
+ * @param request - The request containing the enrichment job id and the part ids to remove.
96
+ * @returns An Observable that emits the response
97
+ */
98
+ removePartsFromEnrichmentJob(jobId: string, request: PostRemovePartsFromEnrichmentJobRequest): Observable<PostRemovePartsFromEnrichmentJobResponse>;
99
+ /**
100
+ * Add all parts from the connected search session to the Given enrichment job.
101
+ *
102
+ * @param jobId - The enrichment job id.
103
+ * @param request - The request containing the organization to add the parts to. (optional)
104
+ * @returns An Observable that emits the response
105
+ */
106
+ addAllSearchSessionPartsToEnrichmentJob(jobId: string, request?: PostAddAllSearchSessionPartsToEnrichmentJobRequest): Observable<PostAddAllSearchSessionPartsToEnrichmentJobResponse>;
107
+ /**
108
+ * Remove all parts from the connected search session from the Given enrichment job.
109
+ *
110
+ * @param jobId - The enrichment job id.
111
+ * @param request - The request containing the organization to remove the parts from. (optional)
112
+ * @returns An Observable that emits the response
113
+ */
114
+ removeAllSearchSessionPartsFromEnrichmentJob(jobId: string, request?: PostRemoveAllSearchSessionPartsFromEnrichmentJobRequest): Observable<PostRemoveAllSearchSessionPartsFromEnrichmentJobResponse>;
115
+ /**
116
+ * Given part ids (e.g. from search), returns which of them are already on the enrichment job.
117
+ *
118
+ * @param jobId - The enrichment job id.
119
+ * @param request - Part ids to check.
120
+ */
121
+ checkWhichPartsInEnrichmentJob(jobId: string, request: PostCheckWhichPartsInEnrichmentJobRequest): Observable<PostCheckWhichPartsInEnrichmentJobResponse>;
122
+ /**
123
+ * Get the add and remove parts count for the Given enrichment job.
124
+ *
125
+ * @param jobId - The enrichment job id.
126
+ * @returns An Observable that emits the add and remove parts count.
127
+ */
128
+ getSearchSummary(jobId: string): Observable<GetSearchSummaryResponse>;
72
129
  /**
73
130
  * Create a new data enrichment job based on a CSV file containing the part-ids to enrich.
74
131
  *
@@ -123,6 +180,12 @@ export declare class DataEnrichmentServiceImpl extends BaseService implements Da
123
180
  partsSummary: EnrichmentJobPartsSummary;
124
181
  paginationContext: DefaultGetPaginatedRequestPaginationContext;
125
182
  }>;
183
+ addPartsToEnrichmentJob(jobId: string, request: PostAddPartsToEnrichmentJobRequest): Observable<PostAddPartsToEnrichmentJobResponse>;
184
+ removePartsFromEnrichmentJob(jobId: string, request: PostRemovePartsFromEnrichmentJobRequest): Observable<PostRemovePartsFromEnrichmentJobResponse>;
185
+ addAllSearchSessionPartsToEnrichmentJob(jobId: string, request?: PostAddAllSearchSessionPartsToEnrichmentJobRequest): Observable<PostAddAllSearchSessionPartsToEnrichmentJobResponse>;
186
+ removeAllSearchSessionPartsFromEnrichmentJob(jobId: string, request?: PostRemoveAllSearchSessionPartsFromEnrichmentJobRequest): Observable<PostRemoveAllSearchSessionPartsFromEnrichmentJobResponse>;
187
+ checkWhichPartsInEnrichmentJob(jobId: string, request: PostCheckWhichPartsInEnrichmentJobRequest): Observable<PostCheckWhichPartsInEnrichmentJobResponse>;
188
+ getSearchSummary(jobId: string): Observable<GetSearchSummaryResponse>;
126
189
  hasMoreEnrichmentJobPartsAvailable(paginationContext: DefaultGetPaginatedRequestPaginationContext): boolean;
127
190
  createEnrichmentJob(request: CreateEnrichmentJobRequest): Observable<CreateEnrichmentJobResponse>;
128
191
  createEnrichmentJobWithSearchSession(request: CreateEnrichmentJobWithSearchSessionRequest): Observable<CreateEnrichmentJobWithSearchSessionResponse>;
@@ -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 n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},__assign.apply(this,arguments)},__decorate=this&&this.__decorate||function(r,t,e,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(i<3?o(s):i>3?o(t,e,s):o(t,e))||s);return i>3&&s&&Object.defineProperty(t,e,s),s},__rest=this&&this.__rest||function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e},__spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return r.concat(n||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,n=t.nextCursor;return{jobs:e,paginationContext:{initialRequest:r,nextCursor:n}}})))},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,n=t.nextCursor;return{jobs:e,paginationContext:__assign(__assign({},r),{nextCursor:n})}})))},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,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:{initialRequest:r,nextCursor:o}}})))},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,n=t.partsSummary,o=t.nextCursor;return{parts:e,partsSummary:n,paginationContext:__assign(__assign({},r),{nextCursor:o})}})))},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.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"]),n=(0,core_1.toQueryParams)(e);return this.httpsService.get("jobs/".concat(t,"/parts"),n,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 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.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;
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- export declare const SDK_VERSION_NUMBER = "15.17.1";
2
+ export declare const SDK_VERSION_NUMBER = "15.18.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="15.17.1";
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SDK_VERSION_NUMBER=void 0,exports.SDK_VERSION_NUMBER="15.18.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@partium/js-sdk",
3
- "version": "15.17.1",
3
+ "version": "15.18.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.",