@partium/js-sdk 15.17.1 → 15.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/core/integration-defaults/http/fetch-api-http-error-helper.js +1 -1
  2. package/core/models/error.d.ts +1 -0
  3. package/core/models/error.js +1 -1
  4. package/enrichment/index.d.ts +9 -0
  5. package/enrichment/index.js +1 -1
  6. package/enrichment/models/get-search-summary-response.d.ts +5 -0
  7. package/enrichment/models/get-search-summary-response.js +2 -0
  8. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-request.d.ts +4 -0
  9. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-request.js +2 -0
  10. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-response.d.ts +5 -0
  11. package/enrichment/models/post-add-all-search-session-parts-to-enrichment-job-response.js +2 -0
  12. package/enrichment/models/post-add-parts-to-enrichment-job-request.d.ts +5 -0
  13. package/enrichment/models/post-add-parts-to-enrichment-job-request.js +2 -0
  14. package/enrichment/models/post-add-parts-to-enrichment-job-response.d.ts +5 -0
  15. package/enrichment/models/post-add-parts-to-enrichment-job-response.js +2 -0
  16. package/enrichment/models/post-check-which-parts-in-enrichment-job-request.d.ts +5 -0
  17. package/enrichment/models/post-check-which-parts-in-enrichment-job-request.js +2 -0
  18. package/enrichment/models/post-check-which-parts-in-enrichment-job-response.d.ts +5 -0
  19. package/enrichment/models/post-check-which-parts-in-enrichment-job-response.js +2 -0
  20. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-request.d.ts +4 -0
  21. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-request.js +2 -0
  22. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-response.d.ts +5 -0
  23. package/enrichment/models/post-remove-all-search-session-parts-from-enrichment-job-response.js +2 -0
  24. package/enrichment/models/post-remove-parts-from-enrichment-job-request.d.ts +5 -0
  25. package/enrichment/models/post-remove-parts-from-enrichment-job-request.js +2 -0
  26. package/enrichment/models/post-remove-parts-from-enrichment-job-response.d.ts +5 -0
  27. package/enrichment/models/post-remove-parts-from-enrichment-job-response.js +2 -0
  28. package/enrichment/services/data-enrichment.service.d.ts +63 -0
  29. package/enrichment/services/data-enrichment.service.js +1 -1
  30. package/gen/sdk-version.d.ts +1 -1
  31. package/gen/sdk-version.js +1 -1
  32. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var __awaiter=this&&this.__awaiter||function(r,e,o,t){return new(o||(o=Promise))((function(n,_){function E(r){try{R(t.next(r))}catch(r){_(r)}}function s(r){try{R(t.throw(r))}catch(r){_(r)}}function R(r){var e;r.done?n(r.value):(e=r.value,e instanceof o?e:new o((function(r){r(e)}))).then(E,s)}R((t=t.apply(r,e||[])).next())}))},__generator=this&&this.__generator||function(r,e){var o,t,n,_,E={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(s){return function(R){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;_&&(_=0,s[0]&&(E=0)),E;)try{if(o=1,t&&(n=2&s[0]?t.return:s[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,s[1])).done)return n;switch(t=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return E.label++,{value:s[1],done:!1};case 5:E.label++,t=s[1],s=[0];continue;case 7:s=E.ops.pop(),E.trys.pop();continue;default:if(!(n=E.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){E=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){E.label=s[1];break}if(6===s[0]&&E.label<n[1]){E.label=n[1],n=s;break}if(n&&E.label<n[2]){E.label=n[2],E.ops.push(s);break}n[2]&&E.ops.pop(),E.trys.pop();continue}s=e.call(r,E)}catch(r){s=[6,r],t=0}finally{o=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,R])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FetchAPIHttpErrorHelper=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),error_1=require("../../models/error"),FetchAPIHttpErrorHelper=function(){function r(){}return r.processError=function(e){return e instanceof error_1.SdkError?(0,rxjs_1.throwError)(e):e instanceof Response?(0,rxjs_1.from)(r.getErrorCodeFromError(e)).pipe((0,operators_1.mergeMap)((function(r){switch(e.status){case 400:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.BAD_REQUEST,e));case 401:return-1!==[error_1.SDK_ERROR_CODES.INVALID_TOKEN,error_1.SDK_ERROR_CODES.TOKEN_EXPIRED].indexOf(r)?(0,rxjs_1.throwError)(new error_1.SdkError(r,e)):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.USER_UNAUTHORIZED,e));case 403:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.FORBIDDEN,e));case 404:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.NOT_FOUND,e));case 422:return-1!==[error_1.SDK_ERROR_CODES.INVALID_MULTIPLE_IMAGE_SEARCHES,error_1.SDK_ERROR_CODES.INVALID_SEARCH_LANGUAGE,error_1.SDK_ERROR_CODES.INVALID_SEARCH_MODALITY_CONFIG].indexOf(r)?(0,rxjs_1.throwError)(new error_1.SdkError(r,e)):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.UNPROCESSABLE_ENTITY,e));case 500:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.INTERNAL_SERVER_ERROR,e));case 501:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.NOT_IMPLEMENTED,e));case 502:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.BAD_GATEWAY,e));case 503:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.SERVICE_UNAVAILABLE,e));case 504:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.GATEWAY_TIMEOUT,e))}}))):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.UNKNOWN_ERROR,e))},r.getErrorCodeFromError=function(r){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,r.clone().json()];case 1:return e=o.sent(),console.log("res"),(null==e?void 0:e.errorCode)?[2,e.errorCode]:[3,3];case 2:return o.sent(),[2,error_1.SDK_ERROR_CODES.UNKNOWN_ERROR];case 3:return[2,error_1.SDK_ERROR_CODES.UNKNOWN_ERROR]}}))}))},r}();exports.FetchAPIHttpErrorHelper=FetchAPIHttpErrorHelper;
2
+ "use strict";var __awaiter=this&&this.__awaiter||function(r,e,o,t){return new(o||(o=Promise))((function(n,_){function E(r){try{R(t.next(r))}catch(r){_(r)}}function s(r){try{R(t.throw(r))}catch(r){_(r)}}function R(r){var e;r.done?n(r.value):(e=r.value,e instanceof o?e:new o((function(r){r(e)}))).then(E,s)}R((t=t.apply(r,e||[])).next())}))},__generator=this&&this.__generator||function(r,e){var o,t,n,_,E={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return _={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function s(s){return function(R){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;_&&(_=0,s[0]&&(E=0)),E;)try{if(o=1,t&&(n=2&s[0]?t.return:s[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,s[1])).done)return n;switch(t=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return E.label++,{value:s[1],done:!1};case 5:E.label++,t=s[1],s=[0];continue;case 7:s=E.ops.pop(),E.trys.pop();continue;default:if(!(n=E.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){E=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){E.label=s[1];break}if(6===s[0]&&E.label<n[1]){E.label=n[1],n=s;break}if(n&&E.label<n[2]){E.label=n[2],E.ops.push(s);break}n[2]&&E.ops.pop(),E.trys.pop();continue}s=e.call(r,E)}catch(r){s=[6,r],t=0}finally{o=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,R])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FetchAPIHttpErrorHelper=void 0;var rxjs_1=require("rxjs"),operators_1=require("rxjs/operators"),error_1=require("../../models/error"),FetchAPIHttpErrorHelper=function(){function r(){}return r.processError=function(e){return e instanceof error_1.SdkError?(0,rxjs_1.throwError)(e):e instanceof Response?(0,rxjs_1.from)(r.getErrorCodeFromError(e)).pipe((0,operators_1.mergeMap)((function(r){switch(e.status){case 400:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.BAD_REQUEST,e));case 401:return-1!==[error_1.SDK_ERROR_CODES.INVALID_TOKEN,error_1.SDK_ERROR_CODES.TOKEN_EXPIRED].indexOf(r)?(0,rxjs_1.throwError)(new error_1.SdkError(r,e)):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.USER_UNAUTHORIZED,e));case 403:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.FORBIDDEN,e));case 404:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.NOT_FOUND,e));case 409:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.CONFLICT,e));case 422:return-1!==[error_1.SDK_ERROR_CODES.INVALID_MULTIPLE_IMAGE_SEARCHES,error_1.SDK_ERROR_CODES.INVALID_SEARCH_LANGUAGE,error_1.SDK_ERROR_CODES.INVALID_SEARCH_MODALITY_CONFIG].indexOf(r)?(0,rxjs_1.throwError)(new error_1.SdkError(r,e)):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.UNPROCESSABLE_ENTITY,e));case 500:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.INTERNAL_SERVER_ERROR,e));case 501:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.NOT_IMPLEMENTED,e));case 502:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.BAD_GATEWAY,e));case 503:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.SERVICE_UNAVAILABLE,e));case 504:return(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.GATEWAY_TIMEOUT,e))}}))):(0,rxjs_1.throwError)(new error_1.SdkError(error_1.SDK_ERROR_CODES.UNKNOWN_ERROR,e))},r.getErrorCodeFromError=function(r){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,r.clone().json()];case 1:return e=o.sent(),console.log("res"),(null==e?void 0:e.errorCode)?[2,e.errorCode]:[3,3];case 2:return o.sent(),[2,error_1.SDK_ERROR_CODES.UNKNOWN_ERROR];case 3:return[2,error_1.SDK_ERROR_CODES.UNKNOWN_ERROR]}}))}))},r}();exports.FetchAPIHttpErrorHelper=FetchAPIHttpErrorHelper;
@@ -6,6 +6,7 @@ export declare enum SDK_ERROR_CODES {
6
6
  BAD_REQUEST = "BAD_REQUEST",// http 400
7
7
  FORBIDDEN = "FORBIDDEN",// http 403
8
8
  NOT_FOUND = "NOT_FOUND",// http 404
9
+ CONFLICT = "CONFLICT",// http 409
9
10
  UNPROCESSABLE_ENTITY = "UNPROCESSABLE_ENTITY",// http 422
10
11
  INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",// http 500
11
12
  NOT_IMPLEMENTED = "NOT_IMPLEMENTED",// http 501
@@ -1,2 +1,2 @@
1
1
  // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
- "use strict";var SDK_ERROR_CODES;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SdkError=exports.SDK_ERROR_CODES=void 0,function(E){E.NO_INTERNET="NO_INTERNET",E.COULD_NOT_REACH_SERVER="COULD_NOT_REACH_SERVER",E.UNKNOWN_HOST_ERROR="UNKNOWN_HOST_ERROR",E.BAD_REQUEST="BAD_REQUEST",E.FORBIDDEN="FORBIDDEN",E.NOT_FOUND="NOT_FOUND",E.UNPROCESSABLE_ENTITY="UNPROCESSABLE_ENTITY",E.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",E.NOT_IMPLEMENTED="NOT_IMPLEMENTED",E.BAD_GATEWAY="BAD_GATEWAY",E.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",E.GATEWAY_TIMEOUT="GATEWAY_TIMEOUT",E.INVALID_AUTH_CONFIG="INVALID_AUTH_CONFIG",E.USER_UNAUTHORIZED="USER_UNAUTHORIZED",E.INVALID_API_KEY_FORMAT="INVALID_API_KEY_FORMAT",E.API_KEY_MISSING="API_KEY_MISSING",E.WRONG_AUTH_TYPE="wrongAuthType",E.NO_AUTHENTICATION_CONFIG_FOUND="NO_AUTHENTICATION_CONFIG_FOUND",E.INVALID_AUTHENTICATION="INVALID_AUTHENTICATION",E.VALIDATION_ERROR="VALIDATION_ERROR",E.INVALID_LOGIN_CONFIG="INVALID_LOGIN_CONFIG",E.UNKNOWN_ERROR="UNKNOWN_ERROR",E.NO_SEARCH_SESSION_ACTIVE="NO_SEARCH_SESSION_ACTIVE",E.RESULT_UNDEFINED="RESULT_UNDEFINED",E.INVALID_SEARCH_MODALITY_CONFIG="INVALID_SEARCH_MODALITY_CONFIG",E.INVALID_MULTIPLE_IMAGE_SEARCHES="INVALID_MULTIPLE_IMAGE_SEARCHES",E.INVALID_SEARCH_LANGUAGE="INVALID_SEARCH_LANGUAGE",E.GENERAL_SEARCH_ERROR="GENERAL_SEARCH_ERROR",E.INVALID_ASSET_STATUS="INVALID_ASSET_STATUS",E.FILE_NOT_FOUND="FILE_NOT_FOUND",E.CAPTURE_IMAGE_FAILED="CAPTURE_IMAGE_FAILED",E.LOADING_FROM_GALLERY_FAILED="LOADING_FROM_GALLERY_FAILED",E.IMAGE_SEARCH_ERROR="IMAGE_SEARCH_ERROR",E.PICK_IMAGE_ABORTED_BY_USER="PICK_IMAGE_ABORTED_BY_USER",E.SEARCH_RESULT_TIMEOUT="SEARCH_RESULT_TIMEOUT",E.TIMEOUT_ERROR="TIMEOUT_ERROR",E.INTEGRATION_ERROR="INTEGRATION_ERROR",E.INITIAL_ITEMS_NOT_YET_LOADED="INITIAL_ITEMS_NOT_YET_LOADED",E.NO_MORE_ITEMS_AVAILABLE="NO_MORE_ITEMS_AVAILABLE",E.NO_PAGINATION_CURSOR_AVAILABLE="NO_PAGINATION_CURSOR_AVAILABLE",E.INVALID_PAGINATION_CURSOR_URL="INVALID_PAGINATION_CURSOR_URL",E.UNEXPECTED_API_VERSION="UNEXPECTED_API_VERSION",E.UNEXPECTED_SEARCH_VERSION="UNEXPECTED_SEARCH_VERSION",E.SSO_USER_CERT="SSO_USER_CERT",E.SSO_TOKEN_REFRESH="SSO_TOKEN_REFRESH",E.TOKEN_EXPIRED="TOKEN_EXPIRED",E.INVALID_TOKEN="INVALID_TOKEN",E.REFRESH_TOKEN_EXPIRED="REFRESH_TOKEN_EXPIRED",E.OAUTH_ERROR="OAUTH_ERROR",E.LOGIN_CANCELLED="LOGIN_CANCELLED",E.LOGIN_ALREADY_IN_PROGRESS="LOGIN_ALREADY_IN_PROGRESS",E.MISSING_STORAGE_ACCESS_PERMISSION="MISSING_STORAGE_ACCESS_PERMISSION",E.SDK_OUTDATED="SDK_OUTDATED",E.BACKEND_DOWN="BACKEND_DOWN",E.STATUS_BACKEND_DOWN="STATUS_BACKEND_DOWN",E.INVALID_FILE_TYPE="INVALID_FILE_TYPE",E.INVALID_CROP_AREA="INVALID_CROP_AREA",E.ORGANIZATION_NOT_FOUND="ORGANIZATION_NOT_FOUND",E.NO_UPIS_FOUND="NO_UPIS_FOUND"}(SDK_ERROR_CODES||(exports.SDK_ERROR_CODES=SDK_ERROR_CODES={}));var SdkError=function(){function E(E,_,I){this.errorString="".concat(E," - ");try{this.errorString+=I||JSON.stringify(_)}catch(E){_.toString&&(this.errorString+=_.toString())}this.code=E,this.detail=_}return E.prototype.toString=function(){return this.errorString},E}();exports.SdkError=SdkError;
2
+ "use strict";var SDK_ERROR_CODES;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SdkError=exports.SDK_ERROR_CODES=void 0,function(E){E.NO_INTERNET="NO_INTERNET",E.COULD_NOT_REACH_SERVER="COULD_NOT_REACH_SERVER",E.UNKNOWN_HOST_ERROR="UNKNOWN_HOST_ERROR",E.BAD_REQUEST="BAD_REQUEST",E.FORBIDDEN="FORBIDDEN",E.NOT_FOUND="NOT_FOUND",E.CONFLICT="CONFLICT",E.UNPROCESSABLE_ENTITY="UNPROCESSABLE_ENTITY",E.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",E.NOT_IMPLEMENTED="NOT_IMPLEMENTED",E.BAD_GATEWAY="BAD_GATEWAY",E.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",E.GATEWAY_TIMEOUT="GATEWAY_TIMEOUT",E.INVALID_AUTH_CONFIG="INVALID_AUTH_CONFIG",E.USER_UNAUTHORIZED="USER_UNAUTHORIZED",E.INVALID_API_KEY_FORMAT="INVALID_API_KEY_FORMAT",E.API_KEY_MISSING="API_KEY_MISSING",E.WRONG_AUTH_TYPE="wrongAuthType",E.NO_AUTHENTICATION_CONFIG_FOUND="NO_AUTHENTICATION_CONFIG_FOUND",E.INVALID_AUTHENTICATION="INVALID_AUTHENTICATION",E.VALIDATION_ERROR="VALIDATION_ERROR",E.INVALID_LOGIN_CONFIG="INVALID_LOGIN_CONFIG",E.UNKNOWN_ERROR="UNKNOWN_ERROR",E.NO_SEARCH_SESSION_ACTIVE="NO_SEARCH_SESSION_ACTIVE",E.RESULT_UNDEFINED="RESULT_UNDEFINED",E.INVALID_SEARCH_MODALITY_CONFIG="INVALID_SEARCH_MODALITY_CONFIG",E.INVALID_MULTIPLE_IMAGE_SEARCHES="INVALID_MULTIPLE_IMAGE_SEARCHES",E.INVALID_SEARCH_LANGUAGE="INVALID_SEARCH_LANGUAGE",E.GENERAL_SEARCH_ERROR="GENERAL_SEARCH_ERROR",E.INVALID_ASSET_STATUS="INVALID_ASSET_STATUS",E.FILE_NOT_FOUND="FILE_NOT_FOUND",E.CAPTURE_IMAGE_FAILED="CAPTURE_IMAGE_FAILED",E.LOADING_FROM_GALLERY_FAILED="LOADING_FROM_GALLERY_FAILED",E.IMAGE_SEARCH_ERROR="IMAGE_SEARCH_ERROR",E.PICK_IMAGE_ABORTED_BY_USER="PICK_IMAGE_ABORTED_BY_USER",E.SEARCH_RESULT_TIMEOUT="SEARCH_RESULT_TIMEOUT",E.TIMEOUT_ERROR="TIMEOUT_ERROR",E.INTEGRATION_ERROR="INTEGRATION_ERROR",E.INITIAL_ITEMS_NOT_YET_LOADED="INITIAL_ITEMS_NOT_YET_LOADED",E.NO_MORE_ITEMS_AVAILABLE="NO_MORE_ITEMS_AVAILABLE",E.NO_PAGINATION_CURSOR_AVAILABLE="NO_PAGINATION_CURSOR_AVAILABLE",E.INVALID_PAGINATION_CURSOR_URL="INVALID_PAGINATION_CURSOR_URL",E.UNEXPECTED_API_VERSION="UNEXPECTED_API_VERSION",E.UNEXPECTED_SEARCH_VERSION="UNEXPECTED_SEARCH_VERSION",E.SSO_USER_CERT="SSO_USER_CERT",E.SSO_TOKEN_REFRESH="SSO_TOKEN_REFRESH",E.TOKEN_EXPIRED="TOKEN_EXPIRED",E.INVALID_TOKEN="INVALID_TOKEN",E.REFRESH_TOKEN_EXPIRED="REFRESH_TOKEN_EXPIRED",E.OAUTH_ERROR="OAUTH_ERROR",E.LOGIN_CANCELLED="LOGIN_CANCELLED",E.LOGIN_ALREADY_IN_PROGRESS="LOGIN_ALREADY_IN_PROGRESS",E.MISSING_STORAGE_ACCESS_PERMISSION="MISSING_STORAGE_ACCESS_PERMISSION",E.SDK_OUTDATED="SDK_OUTDATED",E.BACKEND_DOWN="BACKEND_DOWN",E.STATUS_BACKEND_DOWN="STATUS_BACKEND_DOWN",E.INVALID_FILE_TYPE="INVALID_FILE_TYPE",E.INVALID_CROP_AREA="INVALID_CROP_AREA",E.ORGANIZATION_NOT_FOUND="ORGANIZATION_NOT_FOUND",E.NO_UPIS_FOUND="NO_UPIS_FOUND"}(SDK_ERROR_CODES||(exports.SDK_ERROR_CODES=SDK_ERROR_CODES={}));var SdkError=function(){function E(E,_,I){this.errorString="".concat(E," - ");try{this.errorString+=I||JSON.stringify(_)}catch(E){_.toString&&(this.errorString+=_.toString())}this.code=E,this.detail=_}return E.prototype.toString=function(){return this.errorString},E}();exports.SdkError=SdkError;
@@ -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.1";
@@ -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.1";
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.1",
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.",