@partium/js-sdk 14.4.0 → 14.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/catalog/index.js +1 -21
  2. package/catalog/models/catalog-image-info.js +1 -22
  3. package/catalog/models/catalog-image.js +1 -40
  4. package/catalog/models/upsert-catalog-images-dto.js +1 -3
  5. package/catalog/models/upsert-images-result.js +1 -3
  6. package/catalog/services/images.service.js +1 -62
  7. package/core/constants/constants.d.ts +1 -0
  8. package/core/constants/constants.js +1 -16
  9. package/core/decorators/injection-identifier.js +1 -19
  10. package/core/factories/paginated-request-service.factory.js +1 -33
  11. package/core/index.js +1 -63
  12. package/core/integration-defaults/http/fetch-api-http-error-helper.js +1 -129
  13. package/core/integration-defaults/http/file-transfer/axios-file-transfer.service.js +1 -138
  14. package/core/integration-defaults/http/file-transfer/fetch-api-file-transfer.service.js +1 -210
  15. package/core/integration-defaults/http/handle-axios-error-helper.js +1 -79
  16. package/core/integration-defaults/http/https-client/axios-https-client.service.js +1 -182
  17. package/core/integration-defaults/http/https-client/fetch-api-https-client.service.js +1 -198
  18. package/core/integration-defaults/http/js-oauth-keycloak-https.service.js +1 -32
  19. package/core/integration-defaults/js-p-file.js +1 -36
  20. package/core/integration-defaults/session/js-oauth-api-key-session.service.js +1 -206
  21. package/core/integration-defaults/session/js-oauth-keycloak-auth-config.js +1 -64
  22. package/core/integration-defaults/session/js-oauth-keycloak-session.service.js +1 -257
  23. package/core/integration-defaults/web-device-status.service.js +1 -125
  24. package/core/integration-defaults/web-file.service.js +1 -135
  25. package/core/integration-defaults/web-indexeddb.service.js +1 -142
  26. package/core/integration-defaults/web-local-storage.service.js +1 -310
  27. package/core/models/api-object.js +1 -16
  28. package/core/models/auth-config.js +1 -72
  29. package/core/models/device-info.js +1 -34
  30. package/core/models/error.js +1 -107
  31. package/core/models/formatted-string.js +1 -14
  32. package/core/models/i18n-map.js +1 -61
  33. package/core/models/i18n-string.js +1 -35
  34. package/core/models/log.js +1 -137
  35. package/core/models/organization.js +1 -159
  36. package/core/models/p-file.js +1 -23
  37. package/core/models/paginated-list.js +1 -41
  38. package/core/models/partium-config.js +1 -43
  39. package/core/models/user-token.js +1 -11
  40. package/core/models/user.js +1 -89
  41. package/core/services/backend-status.service.js +1 -147
  42. package/core/services/base-login-init.service.js +1 -57
  43. package/core/services/base.service.js +1 -37
  44. package/core/services/device-status.service.interface.js +1 -117
  45. package/core/services/file.service.interface.js +1 -61
  46. package/core/services/http/file-transfer/file-transfer.service.interface.js +1 -125
  47. package/core/services/http/https-client/https-client.service.interface.js +1 -152
  48. package/core/services/http/https.service.interface.d.ts +3 -1
  49. package/core/services/http/https.service.interface.js +1 -294
  50. package/core/services/http/oauth-https.service.js +1 -218
  51. package/core/services/local-storage.service.interface.js +1 -378
  52. package/core/services/log.service.js +1 -139
  53. package/core/services/organization.service.js +1 -202
  54. package/core/services/paginated-request.service.js +1 -164
  55. package/core/services/recent-parts.service.js +1 -194
  56. package/core/services/service-provider.js +1 -114
  57. package/core/services/session/oauth-session.service.js +1 -104
  58. package/core/services/session/session.service.interface.js +1 -367
  59. package/core/utils/general-helper.js +1 -110
  60. package/data/index.js +1 -44
  61. package/data/models/announcement.js +1 -70
  62. package/data/models/assembly-hierarchy-node-breadcrumb.js +1 -51
  63. package/data/models/assembly-hierarchy-node.js +1 -46
  64. package/data/models/attribute.js +1 -106
  65. package/data/models/csa-request-search.js +1 -46
  66. package/data/models/csa-request-status.js +1 -51
  67. package/data/models/csa-request.js +1 -112
  68. package/data/models/document.js +1 -17
  69. package/data/models/filter-key.js +1 -36
  70. package/data/models/filter-option-value.js +1 -41
  71. package/data/models/image.js +1 -77
  72. package/data/models/inquiry.js +1 -71
  73. package/data/models/mounting-location.js +1 -58
  74. package/data/models/multiple-expert-searches.js +1 -40
  75. package/data/models/part-enrichment-data.js +1 -50
  76. package/data/models/part.d.ts +1 -1
  77. package/data/models/part.js +1 -168
  78. package/data/models/shopping-cart.js +1 -60
  79. package/data/services/announcement.service.js +1 -89
  80. package/data/services/assembly-hierarchy-nodes.service.js +1 -193
  81. package/data/services/csa-helper.service.js +1 -158
  82. package/data/services/customer-service-assistance.service.js +1 -276
  83. package/data/services/filter.service.js +1 -97
  84. package/data/services/inquiry.service.js +1 -68
  85. package/data/services/part-attribute.service.js +1 -118
  86. package/data/services/part-enrichment.service.js +1 -56
  87. package/data/services/part.service.js +1 -182
  88. package/data/services/related-parts.service.js +1 -83
  89. package/data/services/shopping-cart.service.js +1 -152
  90. package/datacuration/index.d.ts +2 -0
  91. package/datacuration/index.js +2 -0
  92. package/datacuration/models/image-submission-request.d.ts +55 -0
  93. package/datacuration/models/image-submission-request.js +2 -0
  94. package/datacuration/models/submitted-image-response.d.ts +27 -0
  95. package/datacuration/models/submitted-image-response.js +2 -0
  96. package/datacuration/services/image-submission.service.d.ts +26 -0
  97. package/datacuration/services/image-submission.service.js +2 -0
  98. package/find/index.js +1 -51
  99. package/find/models/assets/asset.js +1 -32
  100. package/find/models/search-filter.js +1 -205
  101. package/find/models/search-input.js +1 -3
  102. package/find/models/search-output.js +1 -3
  103. package/find/models/search-result-status.js +1 -40
  104. package/find/models/search-session-log-object.js +1 -22
  105. package/find/models/search-status/cv-search-status.js +1 -22
  106. package/find/models/search-status/search-filter-status.js +1 -36
  107. package/find/models/search-status/search-status.js +1 -56
  108. package/find/models/search-status/tag-search-status.js +1 -23
  109. package/find/models/search-status/text-search-status.js +1 -18
  110. package/find/models/search-tag.js +1 -16
  111. package/find/models/smart-filter.js +1 -49
  112. package/find/models/tagable/i18n-tagable.js +1 -37
  113. package/find/models/tagable/tagable-base.js +1 -22
  114. package/find/models/tagable/tagable.js +1 -37
  115. package/find/models/text-search-config.js +1 -70
  116. package/find/models/text-search-manipulator.js +1 -90
  117. package/find/models/text-search-result-item/text-search-error.js +1 -12
  118. package/find/models/text-search-result-item/text-search-result-item-document.js +1 -34
  119. package/find/models/text-search-result-item/text-search-result-item-part.js +1 -36
  120. package/find/models/text-search-result-item/text-search-result-item-recent-query.js +1 -35
  121. package/find/models/text-search-result-item/text-search-result-item-unknown.js +1 -38
  122. package/find/models/text-search-result-item/text-search-result-item.js +1 -22
  123. package/find/services/asset.service.js +1 -348
  124. package/find/services/filter-uploaders/filter-uploader.js +1 -3
  125. package/find/services/filter-uploaders/update-filters-uploader.js +1 -77
  126. package/find/services/filter-uploaders/update-filters.model.js +1 -7
  127. package/find/services/search/cv-search.service.js +1 -214
  128. package/find/services/search/recent-text-search-queries.service.js +1 -260
  129. package/find/services/search/search-result.service.js +1 -539
  130. package/find/services/search/search.service.js +1 -514
  131. package/find/services/search/tag-search.service.js +1 -124
  132. package/find/services/search/text-search.service.js +1 -316
  133. package/find/services/search-filter.service.js +1 -292
  134. package/find/utils/search-helper.js +1 -75
  135. package/gen/sdk-version.d.ts +1 -1
  136. package/gen/sdk-version.js +1 -5
  137. package/index.d.ts +2 -0
  138. package/index.js +1 -392
  139. package/management/index.js +1 -21
  140. package/management/models/api-key-list-response.js +1 -3
  141. package/management/models/api-key-type.js +1 -9
  142. package/management/models/api-key.js +1 -3
  143. package/management/services/api-key.service.js +1 -53
  144. package/ocr/index.js +1 -20
  145. package/ocr/models/detect-response.js +1 -3
  146. package/ocr/models/detected-text-entry.js +1 -3
  147. package/ocr/services/ocr.service.js +1 -59
  148. package/package.json +1 -1
  149. package/user-data/index.js +1 -21
  150. package/user-data/models/part-with-nullable.js +1 -3
  151. package/user-data/models/request-list/request-list.js +1 -63
  152. package/user-data/services/favorite/favorite.service.js +1 -108
  153. package/user-data/services/request-list/request-list.service.js +1 -133
@@ -1,143 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- var __extends = (this && this.__extends) || (function () {
4
- var extendStatics = function (d, b) {
5
- extendStatics = Object.setPrototypeOf ||
6
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
8
- return extendStatics(d, b);
9
- };
10
- return function (d, b) {
11
- if (typeof b !== "function" && b !== null)
12
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
13
- extendStatics(d, b);
14
- function __() { this.constructor = d; }
15
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16
- };
17
- })();
18
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
19
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20
- return new (P || (P = Promise))(function (resolve, reject) {
21
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
24
- step((generator = generator.apply(thisArg, _arguments || [])).next());
25
- });
26
- };
27
- var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
- function verb(n) { return function (v) { return step([n, v]); }; }
31
- function step(op) {
32
- if (f) throw new TypeError("Generator is already executing.");
33
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
34
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
35
- if (y = 0, t) op = [op[0] & 2, t.value];
36
- switch (op[0]) {
37
- case 0: case 1: t = op; break;
38
- case 4: _.label++; return { value: op[1], done: false };
39
- case 5: _.label++; y = op[1]; op = [0]; continue;
40
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
41
- default:
42
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
43
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
44
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
45
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
46
- if (t[2]) _.ops.pop();
47
- _.trys.pop(); continue;
48
- }
49
- op = body.call(thisArg, _);
50
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
51
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52
- }
53
- };
54
- Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.WebIndexedDBService = void 0;
56
- var local_storage_service_interface_1 = require("../services/local-storage.service.interface");
57
- var idb_keyval_1 = require("idb-keyval");
58
- /**
59
- * Implementation of the LocalStorageService for Web-based applications with IndexedDB API.
60
- *
61
- * @deprecated The operations of this service are not supported anymore and will be removed in the future, use 'web-local-storage.service.ts' instead.
62
- */
63
- var WebIndexedDBService = /** @class */ (function (_super) {
64
- __extends(WebIndexedDBService, _super);
65
- function WebIndexedDBService(serviceProvider) {
66
- return _super.call(this, serviceProvider) || this;
67
- }
68
- WebIndexedDBService.prototype.setItem = function (key_1, value_1) {
69
- return __awaiter(this, arguments, void 0, function (key, value, keyPrefixParams) {
70
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
71
- return __generator(this, function (_a) {
72
- return [2 /*return*/, (0, idb_keyval_1.set)(this.getPrefixedKey(key, keyPrefixParams), value)];
73
- });
74
- });
75
- };
76
- WebIndexedDBService.prototype.setItems = function (keyValuePairs_1) {
77
- return __awaiter(this, arguments, void 0, function (keyValuePairs, keyPrefixParams) {
78
- var _this = this;
79
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
80
- return __generator(this, function (_a) {
81
- return [2 /*return*/, (0, idb_keyval_1.setMany)(keyValuePairs.map(function (pair) { return [_this.getPrefixedKey(pair[0], keyPrefixParams), pair[1]]; }))];
82
- });
83
- });
84
- };
85
- WebIndexedDBService.prototype.getItem = function (key_1) {
86
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
87
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
88
- return __generator(this, function (_a) {
89
- return [2 /*return*/, (0, idb_keyval_1.get)(this.getPrefixedKey(key, keyPrefixParams))];
90
- });
91
- });
92
- };
93
- WebIndexedDBService.prototype.getItems = function (keys_1) {
94
- return __awaiter(this, arguments, void 0, function (keys, keyPrefixParams) {
95
- var _this = this;
96
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
97
- return __generator(this, function (_a) {
98
- return [2 /*return*/, (0, idb_keyval_1.getMany)(keys.map(function (key) { return _this.getPrefixedKey(key, keyPrefixParams); }))];
99
- });
100
- });
101
- };
102
- WebIndexedDBService.prototype.getAll = function () {
103
- return __awaiter(this, void 0, void 0, function () {
104
- return __generator(this, function (_a) {
105
- return [2 /*return*/, (0, idb_keyval_1.entries)()];
106
- });
107
- });
108
- };
109
- WebIndexedDBService.prototype.deleteItem = function (key_1) {
110
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
111
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
112
- return __generator(this, function (_a) {
113
- return [2 /*return*/, (0, idb_keyval_1.del)(this.getPrefixedKey(key, keyPrefixParams))];
114
- });
115
- });
116
- };
117
- WebIndexedDBService.prototype.deleteItems = function (keys_1) {
118
- return __awaiter(this, arguments, void 0, function (keys, keyPrefixParams) {
119
- var _this = this;
120
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
121
- return __generator(this, function (_a) {
122
- return [2 /*return*/, (0, idb_keyval_1.delMany)(keys.map(function (key) { return _this.getPrefixedKey(key, keyPrefixParams); }))];
123
- });
124
- });
125
- };
126
- WebIndexedDBService.prototype.hasItem = function (key_1) {
127
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
128
- var item;
129
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
130
- return __generator(this, function (_a) {
131
- switch (_a.label) {
132
- case 0: return [4 /*yield*/, this.getItem(key, keyPrefixParams)];
133
- case 1:
134
- item = _a.sent();
135
- return [2 /*return*/, item !== null];
136
- }
137
- });
138
- });
139
- };
140
- return WebIndexedDBService;
141
- }(local_storage_service_interface_1.LocalStorageService));
142
- exports.WebIndexedDBService = WebIndexedDBService;
143
- //# sourceMappingURL=web-indexeddb.service.js.map
2
+ "use strict";var __extends=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function u(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebIndexedDBService=void 0;var local_storage_service_interface_1=require("../services/local-storage.service.interface"),idb_keyval_1=require("idb-keyval"),WebIndexedDBService=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.setItem=function(e,t){return __awaiter(this,arguments,void 0,(function(e,t,r){return void 0===r&&(r={userEmail:!0,organizationName:!0}),__generator(this,(function(n){return[2,(0,idb_keyval_1.set)(this.getPrefixedKey(e,r),t)]}))}))},t.prototype.setItems=function(e){return __awaiter(this,arguments,void 0,(function(e,t){var r=this;return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(n){return[2,(0,idb_keyval_1.setMany)(e.map((function(e){return[r.getPrefixedKey(e[0],t),e[1]]})))]}))}))},t.prototype.getItem=function(e){return __awaiter(this,arguments,void 0,(function(e,t){return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,(0,idb_keyval_1.get)(this.getPrefixedKey(e,t))]}))}))},t.prototype.getItems=function(e){return __awaiter(this,arguments,void 0,(function(e,t){var r=this;return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(n){return[2,(0,idb_keyval_1.getMany)(e.map((function(e){return r.getPrefixedKey(e,t)})))]}))}))},t.prototype.getAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,(0,idb_keyval_1.entries)()]}))}))},t.prototype.deleteItem=function(e){return __awaiter(this,arguments,void 0,(function(e,t){return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,(0,idb_keyval_1.del)(this.getPrefixedKey(e,t))]}))}))},t.prototype.deleteItems=function(e){return __awaiter(this,arguments,void 0,(function(e,t){var r=this;return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(n){return[2,(0,idb_keyval_1.delMany)(e.map((function(e){return r.getPrefixedKey(e,t)})))]}))}))},t.prototype.hasItem=function(e){return __awaiter(this,arguments,void 0,(function(e,t){return void 0===t&&(t={userEmail:!0,organizationName:!0}),__generator(this,(function(r){switch(r.label){case 0:return[4,this.getItem(e,t)];case 1:return[2,null!==r.sent()]}}))}))},t}(local_storage_service_interface_1.LocalStorageService);exports.WebIndexedDBService=WebIndexedDBService;
@@ -1,311 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- var __extends = (this && this.__extends) || (function () {
4
- var extendStatics = function (d, b) {
5
- extendStatics = Object.setPrototypeOf ||
6
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
8
- return extendStatics(d, b);
9
- };
10
- return function (d, b) {
11
- if (typeof b !== "function" && b !== null)
12
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
13
- extendStatics(d, b);
14
- function __() { this.constructor = d; }
15
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16
- };
17
- })();
18
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
19
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20
- return new (P || (P = Promise))(function (resolve, reject) {
21
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
24
- step((generator = generator.apply(thisArg, _arguments || [])).next());
25
- });
26
- };
27
- var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
- function verb(n) { return function (v) { return step([n, v]); }; }
31
- function step(op) {
32
- if (f) throw new TypeError("Generator is already executing.");
33
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
34
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
35
- if (y = 0, t) op = [op[0] & 2, t.value];
36
- switch (op[0]) {
37
- case 0: case 1: t = op; break;
38
- case 4: _.label++; return { value: op[1], done: false };
39
- case 5: _.label++; y = op[1]; op = [0]; continue;
40
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
41
- default:
42
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
43
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
44
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
45
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
46
- if (t[2]) _.ops.pop();
47
- _.trys.pop(); continue;
48
- }
49
- op = body.call(thisArg, _);
50
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
51
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52
- }
53
- };
54
- Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.WebLocalStorageService = void 0;
56
- var local_storage_service_interface_1 = require("../services/local-storage.service.interface");
57
- /**
58
- * Implementation of the LocalStorageService for Web-based applications with LocalStorage API.
59
- */
60
- var WebLocalStorageService = /** @class */ (function (_super) {
61
- __extends(WebLocalStorageService, _super);
62
- function WebLocalStorageService(serviceProvider) {
63
- return _super.call(this, serviceProvider) || this;
64
- }
65
- /**
66
- * Sets the value of the pair identified by key to value, creating a new
67
- * key/value pair if none existed for key previously.
68
- *
69
- * @param key the key to identify the pair
70
- * @param value the value as string
71
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
72
- * @returns promise that resolves as soon as the value is stored
73
- */
74
- WebLocalStorageService.prototype.setItem = function (key_1, value_1) {
75
- return __awaiter(this, arguments, void 0, function (key, value, keyPrefixParams) {
76
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
77
- return __generator(this, function (_a) {
78
- this.setItemSync(key, value, keyPrefixParams);
79
- return [2 /*return*/];
80
- });
81
- });
82
- };
83
- /**
84
- * Sets the value of the pair identified by key to value, creating a new
85
- * key/value pair if none existed for key previously.
86
- *
87
- * @param key the key to identify the pair
88
- * @param value the value as string
89
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
90
- */
91
- WebLocalStorageService.prototype.setItemSync = function (key, value, keyPrefixParams) {
92
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
93
- localStorage.setItem(this.getPrefixedKey(key, keyPrefixParams), value);
94
- };
95
- /**
96
- * Sets a series of key-value pairs
97
- *
98
- * @param keyValuePairs the array of key-value-pairs [['k1', 'val1'], ['k2', 'val2']]
99
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
100
- * @returns promise that resolves as soon as all pairs are stored
101
- */
102
- WebLocalStorageService.prototype.setItems = function (keyValuePairs_1) {
103
- return __awaiter(this, arguments, void 0, function (keyValuePairs, keyPrefixParams) {
104
- var promises;
105
- var _this = this;
106
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
109
- case 0:
110
- promises = keyValuePairs.map(function (pair) { return _this.setItem(pair[0], pair[1], keyPrefixParams); });
111
- return [4 /*yield*/, Promise.all(promises)];
112
- case 1:
113
- _a.sent();
114
- return [2 /*return*/];
115
- }
116
- });
117
- });
118
- };
119
- /**
120
- * Sets a series of key-value pairs
121
- *
122
- * @param keyValuePairs the array of key-value-pairs [['k1', 'val1'], ['k2', 'val2']]
123
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
124
- */
125
- WebLocalStorageService.prototype.setItemsSync = function (keyValuePairs, keyPrefixParams) {
126
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
127
- for (var _i = 0, keyValuePairs_1 = keyValuePairs; _i < keyValuePairs_1.length; _i++) {
128
- var pair = keyValuePairs_1[_i];
129
- this.setItemSync(pair[0], pair[1], keyPrefixParams);
130
- }
131
- };
132
- /**
133
- * Returns the current value associated with the given key, or null if the given
134
- * key does not exist in the list associated with the object.
135
- *
136
- * @param key the key to identify the pair
137
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
138
- * @returns string-value of the item stored by the given key, or null if not found
139
- */
140
- WebLocalStorageService.prototype.getItem = function (key_1) {
141
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
142
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
143
- return __generator(this, function (_a) {
144
- return [2 /*return*/, this.getItemSync(key, keyPrefixParams)];
145
- });
146
- });
147
- };
148
- /**
149
- * Returns the current value associated with the given key, or null if the given
150
- * key does not exist in the list associated with the object.
151
- *
152
- * @param key the key to identify the pair
153
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
154
- * @returns string-value of the item stored by the given key, or null if not found
155
- */
156
- WebLocalStorageService.prototype.getItemSync = function (key, keyPrefixParams) {
157
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
158
- return localStorage.getItem(this.getPrefixedKey(key, keyPrefixParams));
159
- };
160
- /**
161
- * Returns the current value for each of the given keys, or null if the given
162
- * keys does not exist in the list associated with the object.
163
- *
164
- * @param keys array of keys to retrieve
165
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
166
- * @returns array of string-values of the items stored by the given keys, or null if not found
167
- */
168
- WebLocalStorageService.prototype.getItems = function (keys_1) {
169
- return __awaiter(this, arguments, void 0, function (keys, keyPrefixParams) {
170
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
171
- return __generator(this, function (_a) {
172
- return [2 /*return*/, this.getItemsSync(keys, keyPrefixParams)];
173
- });
174
- });
175
- };
176
- /**
177
- * Returns the current value for each of the given keys, or null if the given
178
- * keys does not exist in the list associated with the object.
179
- *
180
- * This method should not be used inside the SDK. It's purpose is only for integrators from outside.
181
- * The reason is, that using it internally would restrict the use of the SDK for some platforms, as some platforms don't provide support for synchronous
182
- * interaction with the local storage.
183
- *
184
- * @param keys array of keys to retrieve
185
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
186
- * @returns array of string-values of the items stored by the given keys, or null if not found
187
- */
188
- WebLocalStorageService.prototype.getItemsSync = function (keys, keyPrefixParams) {
189
- var _this = this;
190
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
191
- return keys.map(function (key) { return _this.getItemSync(key, keyPrefixParams); });
192
- };
193
- /**
194
- * Returns all key-value pairs
195
- *
196
- * @returns array of string-value of all the stored items
197
- */
198
- WebLocalStorageService.prototype.getAll = function () {
199
- return __awaiter(this, void 0, void 0, function () {
200
- return __generator(this, function (_a) {
201
- return [2 /*return*/, this.getAllSync()];
202
- });
203
- });
204
- };
205
- /**
206
- * Returns all key-value pairs
207
- *
208
- * This method should not be used inside the SDK. It's purpose is only for integrators from outside.
209
- * The reason is, that using it internally would restrict the use of the SDK for some platforms, as some platforms don't provide support for synchronous
210
- * interaction with the local storage.
211
- *
212
- * @returns array of string-value of all the stored items
213
- */
214
- WebLocalStorageService.prototype.getAllSync = function () {
215
- return Object.entries(localStorage);
216
- };
217
- /**
218
- * Delete a key-value pair
219
- *
220
- * @param key the key to identify the pair
221
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
222
- */
223
- WebLocalStorageService.prototype.deleteItem = function (key_1) {
224
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
225
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
226
- return __generator(this, function (_a) {
227
- return [2 /*return*/, this.deleteItemSync(key, keyPrefixParams)];
228
- });
229
- });
230
- };
231
- /**
232
- * Delete a key-value pair
233
- *
234
- * This method should not be used inside the SDK. It's purpose is only for integrators from outside.
235
- * The reason is, that using it internally would restrict the use of the SDK for some platforms, as some platforms don't provide support for synchronous
236
- * interaction with the local storage.
237
- *
238
- * @param key the key to identify the pair
239
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
240
- */
241
- WebLocalStorageService.prototype.deleteItemSync = function (key, keyPrefixParams) {
242
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
243
- return localStorage.removeItem(this.getPrefixedKey(key, keyPrefixParams));
244
- };
245
- /**
246
- * Delete a series of key-value pairs
247
- *
248
- * @param keys the keys to identify the pairs
249
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
250
- */
251
- WebLocalStorageService.prototype.deleteItems = function (keys_1) {
252
- return __awaiter(this, arguments, void 0, function (keys, keyPrefixParams) {
253
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
254
- return __generator(this, function (_a) {
255
- return [2 /*return*/, this.deleteItemsSync(keys, keyPrefixParams)];
256
- });
257
- });
258
- };
259
- /**
260
- * Delete a series of key-value pairs
261
- *
262
- * This method should not be used inside the SDK. It's purpose is only for integrators from outside.
263
- * The reason is, that using it internally would restrict the use of the SDK for some platforms, as some platforms don't provide support for synchronous
264
- * interaction with the local storage.
265
- *
266
- * @param keys the keys to identify the pairs
267
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
268
- */
269
- WebLocalStorageService.prototype.deleteItemsSync = function (keys, keyPrefixParams) {
270
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
271
- for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
272
- var key = keys_1[_i];
273
- this.deleteItemSync(key, keyPrefixParams);
274
- }
275
- };
276
- /**
277
- * Returns true if an item with the given key exists.
278
- * Returns false, otherwise.
279
- *
280
- * @param key the key to identify the item
281
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
282
- * @returns true if the item exists, false otherwise
283
- */
284
- WebLocalStorageService.prototype.hasItem = function (key_1) {
285
- return __awaiter(this, arguments, void 0, function (key, keyPrefixParams) {
286
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
287
- return __generator(this, function (_a) {
288
- return [2 /*return*/, this.hasItemSync(key, keyPrefixParams)];
289
- });
290
- });
291
- };
292
- /**
293
- * Returns true if an item with the given key exists.
294
- * Returns false, otherwise.
295
- *
296
- * This method should not be used inside the SDK. It's purpose is only for integrators from outside.
297
- * The reason is, that using it internally would restrict the use of the SDK for some platforms, as some platforms don't provide support for synchronous
298
- * interaction with the local storage.
299
- *
300
- * @param key the key to identify the item
301
- * @param keyPrefixParams optional parameters to prefix the key with different prefix-options
302
- * @returns true if the item exists, false otherwise
303
- */
304
- WebLocalStorageService.prototype.hasItemSync = function (key, keyPrefixParams) {
305
- if (keyPrefixParams === void 0) { keyPrefixParams = { userEmail: true, organizationName: true }; }
306
- return !!this.getItemSync(key, keyPrefixParams);
307
- };
308
- return WebLocalStorageService;
309
- }(local_storage_service_interface_1.LocalStorageService));
310
- exports.WebLocalStorageService = WebLocalStorageService;
311
- //# sourceMappingURL=web-local-storage.service.js.map
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 n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),__awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},__generator=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebLocalStorageService=void 0;var local_storage_service_interface_1=require("../services/local-storage.service.interface"),WebLocalStorageService=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.setItem=function(t,e){return __awaiter(this,arguments,void 0,(function(t,e,r){return void 0===r&&(r={userEmail:!0,organizationName:!0}),__generator(this,(function(n){return this.setItemSync(t,e,r),[2]}))}))},e.prototype.setItemSync=function(t,e,r){void 0===r&&(r={userEmail:!0,organizationName:!0}),localStorage.setItem(this.getPrefixedKey(t,r),e)},e.prototype.setItems=function(t){return __awaiter(this,arguments,void 0,(function(t,e){var r,n=this;return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(o){switch(o.label){case 0:return r=t.map((function(t){return n.setItem(t[0],t[1],e)})),[4,Promise.all(r)];case 1:return o.sent(),[2]}}))}))},e.prototype.setItemsSync=function(t,e){void 0===e&&(e={userEmail:!0,organizationName:!0});for(var r=0,n=t;r<n.length;r++){var o=n[r];this.setItemSync(o[0],o[1],e)}},e.prototype.getItem=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,this.getItemSync(t,e)]}))}))},e.prototype.getItemSync=function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),localStorage.getItem(this.getPrefixedKey(t,e))},e.prototype.getItems=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,this.getItemsSync(t,e)]}))}))},e.prototype.getItemsSync=function(t,e){var r=this;return void 0===e&&(e={userEmail:!0,organizationName:!0}),t.map((function(t){return r.getItemSync(t,e)}))},e.prototype.getAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.getAllSync()]}))}))},e.prototype.getAllSync=function(){return Object.entries(localStorage)},e.prototype.deleteItem=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,this.deleteItemSync(t,e)]}))}))},e.prototype.deleteItemSync=function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),localStorage.removeItem(this.getPrefixedKey(t,e))},e.prototype.deleteItems=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,this.deleteItemsSync(t,e)]}))}))},e.prototype.deleteItemsSync=function(t,e){void 0===e&&(e={userEmail:!0,organizationName:!0});for(var r=0,n=t;r<n.length;r++){var o=n[r];this.deleteItemSync(o,e)}},e.prototype.hasItem=function(t){return __awaiter(this,arguments,void 0,(function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),__generator(this,(function(r){return[2,this.hasItemSync(t,e)]}))}))},e.prototype.hasItemSync=function(t,e){return void 0===e&&(e={userEmail:!0,organizationName:!0}),!!this.getItemSync(t,e)},e}(local_storage_service_interface_1.LocalStorageService);exports.WebLocalStorageService=WebLocalStorageService;
@@ -1,17 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.APIObject = void 0;
5
- /**
6
- * Objects that can be retrieved from a backend and transformed from API-response
7
- */
8
- var APIObject = /** @class */ (function () {
9
- function APIObject() {
10
- }
11
- APIObject.fromAPIResponse = function (objectData) {
12
- throw new Error("from-api-response-function not implemented for deriving class.");
13
- };
14
- return APIObject;
15
- }());
16
- exports.APIObject = APIObject;
17
- //# sourceMappingURL=api-object.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.APIObject=void 0;var APIObject=function(){function e(){}return e.fromAPIResponse=function(e){throw new Error("from-api-response-function not implemented for deriving class.")},e}();exports.APIObject=APIObject;
@@ -1,73 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- var __extends = (this && this.__extends) || (function () {
4
- var extendStatics = function (d, b) {
5
- extendStatics = Object.setPrototypeOf ||
6
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
8
- return extendStatics(d, b);
9
- };
10
- return function (d, b) {
11
- if (typeof b !== "function" && b !== null)
12
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
13
- extendStatics(d, b);
14
- function __() { this.constructor = d; }
15
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16
- };
17
- })();
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.OauthApiKeyAuthenticationConfig = exports.OauthAuthenticationConfig = exports.AuthenticationConfig = void 0;
20
- var js_oauth_keycloak_https_service_1 = require("../integration-defaults/http/js-oauth-keycloak-https.service");
21
- var js_oauth_api_key_session_service_1 = require("../integration-defaults/session/js-oauth-api-key-session.service");
22
- var js_oauth_keycloak_session_service_1 = require("../integration-defaults/session/js-oauth-keycloak-session.service");
23
- /**
24
- * Abstract Authentication Configuration
25
- */
26
- var AuthenticationConfig = /** @class */ (function () {
27
- function AuthenticationConfig() {
28
- }
29
- return AuthenticationConfig;
30
- }());
31
- exports.AuthenticationConfig = AuthenticationConfig;
32
- /**
33
- * Authentication configuration for OAuth Authentication.
34
- *
35
- * Contains the Configuration of the OAuth-Server as well as the necessary Platform-Adapters
36
- */
37
- var OauthAuthenticationConfig = /** @class */ (function (_super) {
38
- __extends(OauthAuthenticationConfig, _super);
39
- function OauthAuthenticationConfig(init) {
40
- var _this = _super.call(this) || this;
41
- // Platform-Adapters
42
- _this.oauthHttpsService = js_oauth_keycloak_https_service_1.JSOauthKeycloakHttpsService;
43
- _this.oauthSessionService = js_oauth_keycloak_session_service_1.JSOauthKeycloakSessionService;
44
- _this.clientId = 'partium-customer-integration';
45
- _this.redirectUrl = '';
46
- _this.baseUrl = 'https://login.partium.io';
47
- _this.realm = 'partium';
48
- Object.assign(_this, init);
49
- return _this;
50
- }
51
- return OauthAuthenticationConfig;
52
- }(AuthenticationConfig));
53
- exports.OauthAuthenticationConfig = OauthAuthenticationConfig;
54
- /**
55
- * Authentication configuration for OAuth Authentication with API-key.
56
- *
57
- * Contains the Configuration of the OAuth-Server as well as the necessary Platform-Adapters
58
- */
59
- var OauthApiKeyAuthenticationConfig = /** @class */ (function (_super) {
60
- __extends(OauthApiKeyAuthenticationConfig, _super);
61
- function OauthApiKeyAuthenticationConfig(init) {
62
- var _this = _super.call(this) || this;
63
- // Platform-Adapters
64
- _this.oauthHttpsService = js_oauth_keycloak_https_service_1.JSOauthKeycloakHttpsService;
65
- _this.oauthSessionService = js_oauth_api_key_session_service_1.JSOauthPublicApiSessionService;
66
- _this.partiumApiBaseUrl = 'https://api.partium.io';
67
- Object.assign(_this, init);
68
- return _this;
69
- }
70
- return OauthApiKeyAuthenticationConfig;
71
- }(AuthenticationConfig));
72
- exports.OauthApiKeyAuthenticationConfig = OauthApiKeyAuthenticationConfig;
73
- //# sourceMappingURL=auth-config.js.map
2
+ "use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.OauthApiKeyAuthenticationConfig=exports.OauthAuthenticationConfig=exports.AuthenticationConfig=void 0;var js_oauth_keycloak_https_service_1=require("../integration-defaults/http/js-oauth-keycloak-https.service"),js_oauth_api_key_session_service_1=require("../integration-defaults/session/js-oauth-api-key-session.service"),js_oauth_keycloak_session_service_1=require("../integration-defaults/session/js-oauth-keycloak-session.service"),AuthenticationConfig=function(){};exports.AuthenticationConfig=AuthenticationConfig;var OauthAuthenticationConfig=function(t){function e(e){var i=t.call(this)||this;return i.oauthHttpsService=js_oauth_keycloak_https_service_1.JSOauthKeycloakHttpsService,i.oauthSessionService=js_oauth_keycloak_session_service_1.JSOauthKeycloakSessionService,i.clientId="partium-customer-integration",i.redirectUrl="",i.baseUrl="https://login.partium.io",i.realm="partium",Object.assign(i,e),i}return __extends(e,t),e}(AuthenticationConfig);exports.OauthAuthenticationConfig=OauthAuthenticationConfig;var OauthApiKeyAuthenticationConfig=function(t){function e(e){var i=t.call(this)||this;return i.oauthHttpsService=js_oauth_keycloak_https_service_1.JSOauthKeycloakHttpsService,i.oauthSessionService=js_oauth_api_key_session_service_1.JSOauthPublicApiSessionService,i.partiumApiBaseUrl="https://api.partium.io",Object.assign(i,e),i}return __extends(e,t),e}(AuthenticationConfig);exports.OauthApiKeyAuthenticationConfig=OauthApiKeyAuthenticationConfig;
@@ -1,35 +1,2 @@
1
1
  // Copyright © 2022-2025 Partium, Inc. DBA Partium
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DeviceInfo = void 0;
5
- /**
6
- * Info about device and app installation.
7
- * Used to emit an event log when a new search session is started and the user logs in.
8
- */
9
- var DeviceInfo = /** @class */ (function () {
10
- function DeviceInfo(init) {
11
- var _this = this;
12
- if (init) {
13
- // assign only sanitized strings to the DeviceInfo object
14
- Object.entries(init).forEach(function (_a) {
15
- var key = _a[0], value = _a[1];
16
- var sanitized = getSanitizedValue(value);
17
- if (key === 'deviceType') {
18
- _this[key] = sanitized || 'unknown';
19
- }
20
- else {
21
- _this[key] = sanitized;
22
- }
23
- });
24
- }
25
- }
26
- return DeviceInfo;
27
- }());
28
- exports.DeviceInfo = DeviceInfo;
29
- var getSanitizedValue = function (value) {
30
- if (typeof value === 'string') {
31
- return value;
32
- }
33
- return undefined;
34
- };
35
- //# sourceMappingURL=device-info.js.map
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DeviceInfo=void 0;var DeviceInfo=function(e){var t=this;e&&Object.entries(e).forEach((function(e){var i=e[0],n=e[1],o=getSanitizedValue(n);t[i]="deviceType"===i?o||"unknown":o}))};exports.DeviceInfo=DeviceInfo;var getSanitizedValue=function(e){if("string"==typeof e)return e};