@partium/js-sdk 16.0.0 → 16.2.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 (79) hide show
  1. package/core/constants/constants.d.ts +1 -0
  2. package/core/constants/constants.js +1 -1
  3. package/core/index.d.ts +1 -0
  4. package/core/index.js +1 -1
  5. package/core/integration-defaults/http/handle-axios-error-helper.d.ts +39 -3
  6. package/core/integration-defaults/http/handle-axios-error-helper.js +1 -1
  7. package/core/integration-defaults/http/https-client/axios-https-client.service.d.ts +1 -0
  8. package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -1
  9. package/core/integration-defaults/http/https-client/fetch-api-https-client.service.d.ts +1 -0
  10. package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -1
  11. package/core/models/blob-download-response.d.ts +5 -0
  12. package/core/models/blob-download-response.js +2 -0
  13. package/core/models/log.d.ts +3 -1
  14. package/core/models/log.js +1 -1
  15. package/core/services/http/https-client/https-client.service.interface.d.ts +2 -1
  16. package/core/services/http/https.service.interface.d.ts +5 -2
  17. package/core/services/http/https.service.interface.js +1 -1
  18. package/core/services/http/oauth-https.service.d.ts +2 -1
  19. package/core/services/http/oauth-https.service.js +1 -1
  20. package/core/utils/multipart-upload.helper.d.ts +6 -4
  21. package/core/utils/multipart-upload.helper.js +1 -1
  22. package/core/utils/parse-content-disposition-filename.d.ts +5 -0
  23. package/core/utils/parse-content-disposition-filename.js +2 -0
  24. package/enrichment/index.d.ts +2 -0
  25. package/enrichment/index.js +1 -1
  26. package/enrichment/models/download-enrichment-job-results-request.d.ts +18 -0
  27. package/enrichment/models/download-enrichment-job-results-request.js +2 -0
  28. package/enrichment/models/download-enrichment-job-results-response.d.ts +3 -0
  29. package/enrichment/models/download-enrichment-job-results-response.js +2 -0
  30. package/enrichment/services/data-enrichment.service.d.ts +10 -0
  31. package/enrichment/services/data-enrichment.service.js +1 -1
  32. package/find/models/search-input.d.ts +4 -0
  33. package/find/services/asset.service.js +1 -1
  34. package/find/services/search/search.service.d.ts +1 -0
  35. package/find/services/search/search.service.js +1 -1
  36. package/gen/sdk-version.d.ts +1 -1
  37. package/gen/sdk-version.js +1 -1
  38. package/index.d.ts +2 -0
  39. package/index.js +1 -1
  40. package/ocr/services/ocr.service.js +1 -1
  41. package/package.json +1 -1
  42. package/part-list/index.d.ts +17 -0
  43. package/part-list/index.js +2 -0
  44. package/part-list/models/add-all-search-session-parts-to-part-list-request.d.ts +7 -0
  45. package/part-list/models/add-all-search-session-parts-to-part-list-request.js +2 -0
  46. package/part-list/models/add-all-search-session-parts-to-part-list-response.d.ts +11 -0
  47. package/part-list/models/add-all-search-session-parts-to-part-list-response.js +2 -0
  48. package/part-list/models/add-parts-to-part-list-request.d.ts +7 -0
  49. package/part-list/models/add-parts-to-part-list-request.js +2 -0
  50. package/part-list/models/add-parts-to-part-list-response.d.ts +15 -0
  51. package/part-list/models/add-parts-to-part-list-response.js +2 -0
  52. package/part-list/models/check-which-parts-in-part-list-request.d.ts +4 -0
  53. package/part-list/models/check-which-parts-in-part-list-request.js +2 -0
  54. package/part-list/models/check-which-parts-in-part-list-response.d.ts +4 -0
  55. package/part-list/models/check-which-parts-in-part-list-response.js +2 -0
  56. package/part-list/models/create-collection-from-file-request.d.ts +10 -0
  57. package/part-list/models/create-collection-from-file-request.js +2 -0
  58. package/part-list/models/create-collection-from-file-response.d.ts +28 -0
  59. package/part-list/models/create-collection-from-file-response.js +2 -0
  60. package/part-list/models/create-selection-request.d.ts +14 -0
  61. package/part-list/models/create-selection-request.js +2 -0
  62. package/part-list/models/create-selection-response.d.ts +22 -0
  63. package/part-list/models/create-selection-response.js +2 -0
  64. package/part-list/models/empty-part-list-request.d.ts +7 -0
  65. package/part-list/models/empty-part-list-request.js +2 -0
  66. package/part-list/models/empty-part-list.response.d.ts +7 -0
  67. package/part-list/models/empty-part-list.response.js +2 -0
  68. package/part-list/models/part-list-search-summary-response.d.ts +5 -0
  69. package/part-list/models/part-list-search-summary-response.js +2 -0
  70. package/part-list/models/remove-all-search-session-parts-from-part-list-request.d.ts +4 -0
  71. package/part-list/models/remove-all-search-session-parts-from-part-list-request.js +2 -0
  72. package/part-list/models/remove-all-search-session-parts-from-part-list-response.d.ts +5 -0
  73. package/part-list/models/remove-all-search-session-parts-from-part-list-response.js +2 -0
  74. package/part-list/models/remove-parts-from-part-list-request.d.ts +7 -0
  75. package/part-list/models/remove-parts-from-part-list-request.js +2 -0
  76. package/part-list/models/remove-parts-from-part-list-response.d.ts +15 -0
  77. package/part-list/models/remove-parts-from-part-list-response.js +2 -0
  78. package/part-list/services/part-list.service.d.ts +107 -0
  79. package/part-list/services/part-list.service.js +2 -0
@@ -0,0 +1,107 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ import { Observable } from 'rxjs';
3
+ import { BaseService } from '../../core';
4
+ import { PartListSearchSummaryResponse } from '../models/part-list-search-summary-response';
5
+ import { AddPartsToPartListRequest } from '../models/add-parts-to-part-list-request';
6
+ import { AddPartsToPartListResponse } from '../models/add-parts-to-part-list-response';
7
+ import { RemovePartsFromPartListRequest } from '../models/remove-parts-from-part-list-request';
8
+ import { RemovePartsFromPartListResponse } from '../models/remove-parts-from-part-list-response';
9
+ import { AddAllSearchSessionPartsToPartListRequest } from '../models/add-all-search-session-parts-to-part-list-request';
10
+ import { AddAllSearchSessionPartsToPartListResponse } from '../models/add-all-search-session-parts-to-part-list-response';
11
+ import { RemoveAllSearchSessionPartsFromPartListRequest } from '../models/remove-all-search-session-parts-from-part-list-request';
12
+ import { RemoveAllSearchSessionPartsFromPartListResponse } from '../models/remove-all-search-session-parts-from-part-list-response';
13
+ import { CreateSelectionRequest } from '../models/create-selection-request';
14
+ import { CreateSelectionResponse } from '../models/create-selection-response';
15
+ import { CreateCollectionFromFileRequest } from '../models/create-collection-from-file-request';
16
+ import { CreateCollectionFromFileResponse } from '../models/create-collection-from-file-response';
17
+ import { CheckWhichPartsInPartListRequest } from '../models/check-which-parts-in-part-list-request';
18
+ import { CheckWhichPartsInPartListResponse } from '../models/check-which-parts-in-part-list-response';
19
+ import { EmptyPartListRequest } from '../models/empty-part-list-request';
20
+ import { EmptyPartListResponse } from '../models/empty-part-list.response';
21
+ /**
22
+ * Service for creating and managing part-lists. A part-list can be created either as a
23
+ * selection (`createSelection`) or as a collection from an uploaded file
24
+ * (`createCollectionFromFile`); every other operation applies to a part-list regardless
25
+ * of how it was created.
26
+ */
27
+ export interface PartListService {
28
+ /**
29
+ * Create a new selection (a part-list).
30
+ *
31
+ * @returns An Observable that emits the response
32
+ */
33
+ createSelection(request: CreateSelectionRequest): Observable<CreateSelectionResponse>;
34
+ /**
35
+ * Create a new collection (a part-list) from a file of part-ids.
36
+ *
37
+ * @param request - The request containing the file to upload.
38
+ * @returns An Observable that emits the response
39
+ */
40
+ createCollectionFromFile(request: CreateCollectionFromFileRequest): Observable<CreateCollectionFromFileResponse>;
41
+ /**
42
+ * Add parts to the given part-list.
43
+ *
44
+ * @param partListId - The part-list id.
45
+ * @param request - The request containing the part ids to add.
46
+ * @returns An Observable that emits the response
47
+ */
48
+ addPartsToPartList(partListId: string, request: AddPartsToPartListRequest): Observable<AddPartsToPartListResponse>;
49
+ /**
50
+ * Remove parts from the given part-list.
51
+ *
52
+ * @param partListId - The part-list id.
53
+ * @param request - The request containing the part ids to remove.
54
+ * @returns An Observable that emits the response
55
+ */
56
+ removePartsFromPartList(partListId: string, request: RemovePartsFromPartListRequest): Observable<RemovePartsFromPartListResponse>;
57
+ /**
58
+ * Add all parts from the connected search session to the given part-list.
59
+ *
60
+ * @param partListId - The part-list id.
61
+ * @param request - The request containing the search session id to add the parts to.
62
+ * @returns An Observable that emits the response
63
+ */
64
+ addAllSearchSessionPartsToPartList(partListId: string, request: AddAllSearchSessionPartsToPartListRequest): Observable<AddAllSearchSessionPartsToPartListResponse>;
65
+ /**
66
+ * Remove all parts from the connected search session from the given part-list.
67
+ *
68
+ * @param partListId - The part-list id.
69
+ * @param request - The request containing the search session id to remove the parts from.
70
+ * @returns An Observable that emits the response
71
+ */
72
+ removeAllSearchSessionPartsFromPartList(partListId: string, request: RemoveAllSearchSessionPartsFromPartListRequest): Observable<RemoveAllSearchSessionPartsFromPartListResponse>;
73
+ /**
74
+ * Empty the given part-list.
75
+ *
76
+ * @param partListId - The part-list id.
77
+ * @returns An Observable that emits the response
78
+ */
79
+ emptyPartList(partListId: string, request: EmptyPartListRequest): Observable<EmptyPartListResponse>;
80
+ /**
81
+ * Get the add and remove parts count for the given part-list.
82
+ *
83
+ * @param partListId - The part-list id.
84
+ * @returns An Observable that emits the add and remove parts count.
85
+ */
86
+ getSearchSummary(partListId: string): Observable<PartListSearchSummaryResponse>;
87
+ /**
88
+ * Given part ids (e.g. from search), returns which of them are already in the part-list.
89
+ *
90
+ * @param partListId - The part-list id.
91
+ * @param request - Part ids to check.
92
+ */
93
+ checkWhichPartsInPartList(partListId: string, request: CheckWhichPartsInPartListRequest): Observable<CheckWhichPartsInPartListResponse>;
94
+ }
95
+ export declare class PartListServiceImpl extends BaseService implements PartListService {
96
+ private httpsService;
97
+ onCreate(): void;
98
+ createSelection(request: CreateSelectionRequest): Observable<CreateSelectionResponse>;
99
+ createCollectionFromFile(request: CreateCollectionFromFileRequest): Observable<CreateCollectionFromFileResponse>;
100
+ addPartsToPartList(partListId: string, request: AddPartsToPartListRequest): Observable<AddPartsToPartListResponse>;
101
+ removePartsFromPartList(partListId: string, request: RemovePartsFromPartListRequest): Observable<RemovePartsFromPartListResponse>;
102
+ addAllSearchSessionPartsToPartList(partListId: string, request: AddAllSearchSessionPartsToPartListRequest): Observable<AddAllSearchSessionPartsToPartListResponse>;
103
+ removeAllSearchSessionPartsFromPartList(partListId: string, request: RemoveAllSearchSessionPartsFromPartListRequest): Observable<RemoveAllSearchSessionPartsFromPartListResponse>;
104
+ emptyPartList(partListId: string, request: EmptyPartListRequest): Observable<EmptyPartListResponse>;
105
+ getSearchSummary(partListId: string): Observable<PartListSearchSummaryResponse>;
106
+ checkWhichPartsInPartList(partListId: string, request: CheckWhichPartsInPartListRequest): Observable<CheckWhichPartsInPartListResponse>;
107
+ }
@@ -0,0 +1,2 @@
1
+ // Copyright © 2022-2026 Partium, Inc. DBA Partium
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=this&&this.__decorate||function(t,e,r,o){var c,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(n=(i<3?c(n):i>3?c(e,r,n):c(e,r))||n);return i>3&&n&&Object.defineProperty(e,r,n),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartListServiceImpl=void 0;var core_1=require("../../core"),PartListServiceImpl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.onCreate=function(){this.httpsService=this.serviceProvider.getService(core_1.HttpsService)},e.prototype.createSelection=function(t){return this.httpsService.post("selections",t,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.createCollectionFromFile=function(t){var e=this;return(0,core_1.guardMultipartUpload)(t.file,(function(){return(0,core_1.postPFileMultipartRequest)(e.httpsService,{url:"collections",file:t.file,fieldName:"file",backend:core_1.BACKEND_SERVICE.PART_LIST})}))},e.prototype.addPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removePartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.addAllSearchSessionPartsToPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/add"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.removeAllSearchSessionPartsFromPartList=function(t,e){return this.httpsService.post("".concat(t,"/search/remove"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.emptyPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/empty"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.getSearchSummary=function(t){return this.httpsService.get("".concat(t,"/search/summary"),[],core_1.BACKEND_SERVICE.PART_LIST)},e.prototype.checkWhichPartsInPartList=function(t,e){return this.httpsService.post("".concat(t,"/parts/check"),e,[],core_1.BACKEND_SERVICE.PART_LIST)},e=__decorate([(0,core_1.InjectionIdentifier)("PartListService")],e)}(core_1.BaseService);exports.PartListServiceImpl=PartListServiceImpl;