@alfresco/js-api 7.8.0 → 7.9.0-10005011517

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 (118) hide show
  1. package/esm2015/index.js +1 -0
  2. package/esm2015/index.js.map +1 -1
  3. package/esm2015/src/alfrescoApi.js +34 -1
  4. package/esm2015/src/alfrescoApi.js.map +1 -1
  5. package/esm2015/src/api/activiti-rest-api/model/formDefinitionRepresentation.js.map +1 -1
  6. package/esm2015/src/api/activiti-rest-api/model/processInstanceFilterRepresentation.js.map +1 -1
  7. package/esm2015/src/api/activiti-rest-api/model/processInstanceQueryRepresentation.js.map +1 -1
  8. package/esm2015/src/api/hxi-connector-api/api/base.api.js +23 -0
  9. package/esm2015/src/api/hxi-connector-api/api/base.api.js.map +1 -0
  10. package/esm2015/src/api/hxi-connector-api/api/index.js +18 -0
  11. package/esm2015/src/api/hxi-connector-api/api/index.js.map +1 -0
  12. package/esm2015/src/api/hxi-connector-api/api/predictions.api.js +46 -0
  13. package/esm2015/src/api/hxi-connector-api/api/predictions.api.js.map +1 -0
  14. package/esm2015/src/api/hxi-connector-api/index.js +19 -0
  15. package/esm2015/src/api/hxi-connector-api/index.js.map +1 -0
  16. package/esm2015/src/api/hxi-connector-api/model/index.js +21 -0
  17. package/esm2015/src/api/hxi-connector-api/model/index.js.map +1 -0
  18. package/esm2015/src/api/hxi-connector-api/model/prediction.js +32 -0
  19. package/esm2015/src/api/hxi-connector-api/model/prediction.js.map +1 -0
  20. package/esm2015/src/api/hxi-connector-api/model/predictionEntry.js +26 -0
  21. package/esm2015/src/api/hxi-connector-api/model/predictionEntry.js.map +1 -0
  22. package/esm2015/src/api/hxi-connector-api/model/predictionPaging.js +26 -0
  23. package/esm2015/src/api/hxi-connector-api/model/predictionPaging.js.map +1 -0
  24. package/esm2015/src/api/hxi-connector-api/model/predictionPagingList.js +30 -0
  25. package/esm2015/src/api/hxi-connector-api/model/predictionPagingList.js.map +1 -0
  26. package/esm2015/src/api-clients/api-client.js +3 -3
  27. package/esm2015/src/api-clients/api-client.js.map +1 -1
  28. package/esm2015/src/to-deprecate/alfresco-api-type.js.map +1 -1
  29. package/esm2015/types.js +18 -0
  30. package/esm2015/types.js.map +1 -0
  31. package/esm5/index.js +1 -0
  32. package/esm5/index.js.map +1 -1
  33. package/esm5/src/alfrescoApi.js +34 -1
  34. package/esm5/src/alfrescoApi.js.map +1 -1
  35. package/esm5/src/api/activiti-rest-api/model/formDefinitionRepresentation.js.map +1 -1
  36. package/esm5/src/api/activiti-rest-api/model/processInstanceFilterRepresentation.js.map +1 -1
  37. package/esm5/src/api/activiti-rest-api/model/processInstanceQueryRepresentation.js.map +1 -1
  38. package/esm5/src/api/hxi-connector-api/api/base.api.js +23 -0
  39. package/esm5/src/api/hxi-connector-api/api/base.api.js.map +1 -0
  40. package/esm5/src/api/hxi-connector-api/api/index.js +18 -0
  41. package/esm5/src/api/hxi-connector-api/api/index.js.map +1 -0
  42. package/esm5/src/api/hxi-connector-api/api/predictions.api.js +46 -0
  43. package/esm5/src/api/hxi-connector-api/api/predictions.api.js.map +1 -0
  44. package/esm5/src/api/hxi-connector-api/index.js +19 -0
  45. package/esm5/src/api/hxi-connector-api/index.js.map +1 -0
  46. package/esm5/src/api/hxi-connector-api/model/index.js +21 -0
  47. package/esm5/src/api/hxi-connector-api/model/index.js.map +1 -0
  48. package/esm5/src/api/hxi-connector-api/model/prediction.js +32 -0
  49. package/esm5/src/api/hxi-connector-api/model/prediction.js.map +1 -0
  50. package/esm5/src/api/hxi-connector-api/model/predictionEntry.js +26 -0
  51. package/esm5/src/api/hxi-connector-api/model/predictionEntry.js.map +1 -0
  52. package/esm5/src/api/hxi-connector-api/model/predictionPaging.js +26 -0
  53. package/esm5/src/api/hxi-connector-api/model/predictionPaging.js.map +1 -0
  54. package/esm5/src/api/hxi-connector-api/model/predictionPagingList.js +30 -0
  55. package/esm5/src/api/hxi-connector-api/model/predictionPagingList.js.map +1 -0
  56. package/esm5/src/api-clients/api-client.js +3 -3
  57. package/esm5/src/api-clients/api-client.js.map +1 -1
  58. package/esm5/src/to-deprecate/alfresco-api-type.js.map +1 -1
  59. package/esm5/types.js +18 -0
  60. package/esm5/types.js.map +1 -0
  61. package/index.js +1 -0
  62. package/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/alfrescoApi.js +34 -1
  65. package/src/alfrescoApi.js.map +1 -1
  66. package/src/api/activiti-rest-api/model/formDefinitionRepresentation.js.map +1 -1
  67. package/src/api/activiti-rest-api/model/processInstanceFilterRepresentation.js.map +1 -1
  68. package/src/api/activiti-rest-api/model/processInstanceQueryRepresentation.js.map +1 -1
  69. package/src/api/hxi-connector-api/api/base.api.js +27 -0
  70. package/src/api/hxi-connector-api/api/base.api.js.map +1 -0
  71. package/src/api/hxi-connector-api/api/index.js +21 -0
  72. package/src/api/hxi-connector-api/api/index.js.map +1 -0
  73. package/src/api/hxi-connector-api/api/predictions.api.js +50 -0
  74. package/src/api/hxi-connector-api/api/predictions.api.js.map +1 -0
  75. package/src/api/hxi-connector-api/index.js +22 -0
  76. package/src/api/hxi-connector-api/index.js.map +1 -0
  77. package/src/api/hxi-connector-api/model/index.js +24 -0
  78. package/src/api/hxi-connector-api/model/index.js.map +1 -0
  79. package/src/api/hxi-connector-api/model/prediction.js +36 -0
  80. package/src/api/hxi-connector-api/model/prediction.js.map +1 -0
  81. package/src/api/hxi-connector-api/model/predictionEntry.js +30 -0
  82. package/src/api/hxi-connector-api/model/predictionEntry.js.map +1 -0
  83. package/src/api/hxi-connector-api/model/predictionPaging.js +30 -0
  84. package/src/api/hxi-connector-api/model/predictionPaging.js.map +1 -0
  85. package/src/api/hxi-connector-api/model/predictionPagingList.js +34 -0
  86. package/src/api/hxi-connector-api/model/predictionPagingList.js.map +1 -0
  87. package/src/api-clients/api-client.js +3 -3
  88. package/src/api-clients/api-client.js.map +1 -1
  89. package/src/to-deprecate/alfresco-api-type.js.map +1 -1
  90. package/types.js +19 -0
  91. package/types.js.map +1 -0
  92. package/typings/index.d.ts +1 -0
  93. package/typings/src/alfrescoApi.d.ts +4 -1
  94. package/typings/src/alfrescoApiClient.d.ts +1 -1
  95. package/typings/src/api/activiti-rest-api/api/types.d.ts +2 -2
  96. package/typings/src/api/activiti-rest-api/api/users.api.d.ts +1 -1
  97. package/typings/src/api/activiti-rest-api/model/formDefinitionRepresentation.d.ts +2 -0
  98. package/typings/src/api/activiti-rest-api/model/processInstanceFilterRepresentation.d.ts +1 -0
  99. package/typings/src/api/activiti-rest-api/model/processInstanceQueryRepresentation.d.ts +5 -2
  100. package/typings/src/api/content-rest-api/api/categories.api.d.ts +1 -1
  101. package/typings/src/api/content-rest-api/api/groups.api.d.ts +1 -1
  102. package/typings/src/api/content-rest-api/api/nodes.api.d.ts +1 -1
  103. package/typings/src/api/content-rest-api/api/queries.api.d.ts +2 -2
  104. package/typings/src/api/content-rest-api/api/types.d.ts +3 -3
  105. package/typings/src/api/gs-classification-rest-api/api/types.d.ts +4 -4
  106. package/typings/src/api/gs-classification-rest-api/model/declassificationDate.d.ts +1 -1
  107. package/typings/src/api/gs-core-rest-api/api/types.d.ts +4 -4
  108. package/typings/src/api/hxi-connector-api/api/base.api.d.ts +21 -0
  109. package/typings/src/api/hxi-connector-api/api/index.d.ts +17 -0
  110. package/typings/src/api/hxi-connector-api/api/predictions.api.d.ts +35 -0
  111. package/typings/src/api/hxi-connector-api/index.d.ts +18 -0
  112. package/typings/src/api/hxi-connector-api/model/index.d.ts +20 -0
  113. package/typings/src/api/hxi-connector-api/model/prediction.d.ts +34 -0
  114. package/typings/src/api/hxi-connector-api/model/predictionEntry.d.ts +21 -0
  115. package/typings/src/api/hxi-connector-api/model/predictionPaging.d.ts +21 -0
  116. package/typings/src/api/hxi-connector-api/model/predictionPagingList.d.ts +23 -0
  117. package/typings/src/to-deprecate/alfresco-api-type.d.ts +1 -0
  118. package/typings/types.d.ts +17 -0
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * @license
3
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { Prediction } from './prediction';
18
+ export class PredictionEntry {
19
+ constructor(input) {
20
+ if (input) {
21
+ Object.assign(this, input);
22
+ this.entry = input.entry ? new Prediction(input.entry) : undefined;
23
+ }
24
+ }
25
+ }
26
+ //# sourceMappingURL=../../../../../../../../lib/js-api/src/api/hxi-connector-api/model/predictionEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionEntry.js","sourceRoot":"","sources":["predictionEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,OAAO,eAAe;IAGxB,YAAY,KAAgC;QACxC,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACtE;IACL,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Prediction } from './prediction';\n\nexport class PredictionEntry {\n entry: Prediction;\n\n constructor(input?: Partial<PredictionEntry>) {\n if (input) {\n Object.assign(this, input);\n this.entry = input.entry ? new Prediction(input.entry) : undefined;\n }\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * @license
3
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { PredictionPagingList } from './predictionPagingList';
18
+ export class PredictionPaging {
19
+ constructor(input) {
20
+ if (input) {
21
+ Object.assign(this, input);
22
+ this.list = input.list ? new PredictionPagingList(input.list) : undefined;
23
+ }
24
+ }
25
+ }
26
+ //# sourceMappingURL=../../../../../../../../lib/js-api/src/api/hxi-connector-api/model/predictionPaging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionPaging.js","sourceRoot":"","sources":["predictionPaging.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,OAAO,gBAAgB;IAGzB,YAAY,KAAiC;QACzC,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7E;IACL,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PredictionPagingList } from './predictionPagingList';\n\nexport class PredictionPaging {\n list?: PredictionPagingList;\n\n constructor(input?: Partial<PredictionPaging>) {\n if (input) {\n Object.assign(this, input);\n this.list = input.list ? new PredictionPagingList(input.list) : undefined;\n }\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * @license
3
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { Pagination } from '../../content-rest-api/model/pagination';
18
+ import { PredictionEntry } from './predictionEntry';
19
+ export class PredictionPagingList {
20
+ constructor(input) {
21
+ if (input) {
22
+ Object.assign(this, input);
23
+ this.pagination = input.pagination ? new Pagination(input.pagination) : undefined;
24
+ if (input.entries) {
25
+ this.entries = input.entries.map((item) => new PredictionEntry(item));
26
+ }
27
+ }
28
+ }
29
+ }
30
+ //# sourceMappingURL=../../../../../../../../lib/js-api/src/api/hxi-connector-api/model/predictionPagingList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictionPagingList.js","sourceRoot":"","sources":["predictionPagingList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,OAAO,oBAAoB;IAI7B,YAAY,KAAqC;QAC7C,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC3B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAClF,IAAI,KAAK,CAAC,OAAO,EAAE;gBACf,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;aACzE;SACJ;IACL,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Pagination } from '../../content-rest-api/model/pagination';\nimport { PredictionEntry } from './predictionEntry';\n\nexport class PredictionPagingList {\n pagination?: Pagination;\n entries?: PredictionEntry[];\n\n constructor(input?: Partial<PredictionPagingList>) {\n if (input) {\n Object.assign(this, input);\n this.pagination = input.pagination ? new Pagination(input.pagination) : undefined;\n if (input.entries) {\n this.entries = input.entries.map((item) => new PredictionEntry(item));\n }\n }\n }\n}\n"]}
@@ -15,6 +15,9 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  export class ApiClient {
18
+ get apiClient() {
19
+ return this.httpClient;
20
+ }
18
21
  constructor(httpClient) {
19
22
  if ((httpClient === null || httpClient === void 0 ? void 0 : httpClient.__type) === 'legacy-client') {
20
23
  this.alfrescoApi = httpClient;
@@ -23,9 +26,6 @@ export class ApiClient {
23
26
  this.httpClient = httpClient;
24
27
  }
25
28
  }
26
- get apiClient() {
27
- return this.httpClient;
28
- }
29
29
  post(options) {
30
30
  return this.apiClient.post(options);
31
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["api-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,OAAgB,SAAS;IAU3B,YAAY,UAA+C;QACvD,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,MAAK,eAAe,EAAE;YAExC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;SACjC;aAAM;YACH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;IACL,CAAC;IAbD,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAaD,IAAI,CAAU,OAAuB;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAI,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,GAAG,CAAU,OAAuB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAI,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,GAAG,CAAU,OAAuB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAI,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAW,OAAuB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,YAAY,CAAC,KAAa,EAAE,UAAkB;QAC1C,OAAO,iBAAiB,KAAK,OAAO,UAAU,EAAE,CAAC;IACrD,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AlfrescoApiType } from '../to-deprecate/alfresco-api-type';\nimport { LegacyHttpClient, RequestOptions } from './http-client.interface';\n\nexport abstract class ApiClient {\n protected alfrescoApi: AlfrescoApiType;\n protected httpClient: LegacyHttpClient;\n\n get apiClient(): LegacyHttpClient {\n return this.httpClient;\n }\n\n constructor(legacyApi?: AlfrescoApiType);\n constructor(httpClient: LegacyHttpClient);\n constructor(httpClient?: AlfrescoApiType & LegacyHttpClient) {\n if (httpClient?.__type === 'legacy-client') {\n // TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!\n this.alfrescoApi = httpClient;\n } else {\n this.httpClient = httpClient;\n }\n }\n\n post<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.post<T>(options);\n }\n\n put<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.put<T>(options);\n }\n\n get<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.get<T>(options);\n }\n\n delete<T = void>(options: RequestOptions): Promise<T> {\n return this.apiClient.delete(options);\n }\n\n errorMessage(param: string, methodName: string) {\n return `Missing param ${param} in ${methodName}`;\n }\n}\n"]}
1
+ {"version":3,"file":"api-client.js","sourceRoot":"","sources":["api-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,OAAgB,SAAS;IAI3B,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAID,YAAY,UAA+C;QACvD,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,MAAK,eAAe,EAAE;YAExC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;SACjC;aAAM;YACH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAChC;IACL,CAAC;IAED,IAAI,CAAU,OAAuB;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAI,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,GAAG,CAAU,OAAuB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAI,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,GAAG,CAAU,OAAuB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAI,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAW,OAAuB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,YAAY,CAAC,KAAa,EAAE,UAAkB;QAC1C,OAAO,iBAAiB,KAAK,OAAO,UAAU,EAAE,CAAC;IACrD,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AlfrescoApiType } from '../to-deprecate/alfresco-api-type';\nimport { LegacyHttpClient, RequestOptions } from './http-client.interface';\n\nexport abstract class ApiClient {\n protected alfrescoApi: AlfrescoApiType;\n protected httpClient: LegacyHttpClient;\n\n get apiClient(): LegacyHttpClient {\n return this.httpClient;\n }\n\n constructor(legacyApi?: AlfrescoApiType);\n constructor(httpClient: LegacyHttpClient);\n constructor(httpClient?: AlfrescoApiType & LegacyHttpClient) {\n if (httpClient?.__type === 'legacy-client') {\n // TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!\n this.alfrescoApi = httpClient;\n } else {\n this.httpClient = httpClient;\n }\n }\n\n post<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.post<T>(options);\n }\n\n put<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.put<T>(options);\n }\n\n get<T = any>(options: RequestOptions): Promise<T> {\n return this.apiClient.get<T>(options);\n }\n\n delete<T = void>(options: RequestOptions): Promise<T> {\n return this.apiClient.delete(options);\n }\n\n errorMessage(param: string, methodName: string) {\n return `Missing param ${param} in ${methodName}`;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"alfresco-api-type.js","sourceRoot":"","sources":["alfresco-api-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AlfrescoApiConfig } from '../alfrescoApiConfig';\nimport { LegacyHttpClient } from '../api-clients/http-client.interface';\n\nexport interface LegacyTicketApi {\n getAlfTicket(ticket: string): string;\n}\n\n// Extracted from existing AlfrescoApi:\nexport interface AlfrescoApiType {\n __type: string;\n config: AlfrescoApiConfig;\n contentClient: LegacyHttpClient & LegacyTicketApi;\n contentPrivateClient: LegacyHttpClient & LegacyTicketApi;\n processClient: LegacyHttpClient;\n searchClient: LegacyHttpClient;\n discoveryClient: LegacyHttpClient;\n gsClient: LegacyHttpClient;\n authClient: LegacyHttpClient;\n processAuth: LegacyHttpClient;\n\n setConfig(config: AlfrescoApiConfig): void;\n changeWithCredentialsConfig(withCredentials: boolean): void;\n changeCsrfConfig(disableCsrf: boolean): void;\n changeEcmHost(hostEcm: string): void;\n changeBpmHost(hostBpm: string): void;\n login(username: string, password: string): Promise<any>;\n isCredentialValid(credential: string): boolean;\n implicitLogin(): Promise<any>;\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<any>;\n logout(): Promise<any>;\n isLoggedIn(): boolean;\n isBpmLoggedIn(): boolean;\n isEcmLoggedIn(): boolean;\n getBpmUsername(): string;\n getEcmUsername(): string;\n refreshToken(): Promise<string>;\n getTicketAuth(): string;\n setTicket(ticketEcm: string, TicketBpm: string): void;\n invalidateSession(): void;\n getTicketBpm(): string;\n getTicketEcm(): string;\n getTicket(): string[];\n isBpmConfiguration(): boolean;\n isEcmConfiguration(): boolean;\n isOauthConfiguration(): boolean;\n isPublicUrl(): boolean;\n isEcmBpmConfiguration(): boolean;\n reply(event: string, callback?: any): void;\n}\n"]}
1
+ {"version":3,"file":"alfresco-api-type.js","sourceRoot":"","sources":["alfresco-api-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AlfrescoApiConfig } from '../alfrescoApiConfig';\nimport { LegacyHttpClient } from '../api-clients/http-client.interface';\n\nexport interface LegacyTicketApi {\n getAlfTicket(ticket: string): string;\n}\n\n// Extracted from existing AlfrescoApi:\nexport interface AlfrescoApiType {\n __type: string;\n config: AlfrescoApiConfig;\n contentClient: LegacyHttpClient & LegacyTicketApi;\n contentPrivateClient: LegacyHttpClient & LegacyTicketApi;\n processClient: LegacyHttpClient;\n searchClient: LegacyHttpClient;\n discoveryClient: LegacyHttpClient;\n gsClient: LegacyHttpClient;\n authClient: LegacyHttpClient;\n processAuth: LegacyHttpClient;\n hxiConnectorClient: LegacyHttpClient;\n\n setConfig(config: AlfrescoApiConfig): void;\n changeWithCredentialsConfig(withCredentials: boolean): void;\n changeCsrfConfig(disableCsrf: boolean): void;\n changeEcmHost(hostEcm: string): void;\n changeBpmHost(hostBpm: string): void;\n login(username: string, password: string): Promise<any>;\n isCredentialValid(credential: string): boolean;\n implicitLogin(): Promise<any>;\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<any>;\n logout(): Promise<any>;\n isLoggedIn(): boolean;\n isBpmLoggedIn(): boolean;\n isEcmLoggedIn(): boolean;\n getBpmUsername(): string;\n getEcmUsername(): string;\n refreshToken(): Promise<string>;\n getTicketAuth(): string;\n setTicket(ticketEcm: string, TicketBpm: string): void;\n invalidateSession(): void;\n getTicketBpm(): string;\n getTicketEcm(): string;\n getTicket(): string[];\n isBpmConfiguration(): boolean;\n isEcmConfiguration(): boolean;\n isOauthConfiguration(): boolean;\n isPublicUrl(): boolean;\n isEcmBpmConfiguration(): boolean;\n reply(event: string, callback?: any): void;\n}\n"]}
package/esm5/types.js ADDED
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * @license
3
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export {};
18
+ //# sourceMappingURL=../../../../lib/js-api/types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\nexport type Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n"]}
package/index.js CHANGED
@@ -26,6 +26,7 @@ tslib_1.__exportStar(require("./src/api/auth-rest-api/index"), exports);
26
26
  tslib_1.__exportStar(require("./src/api/activiti-rest-api/index"), exports);
27
27
  tslib_1.__exportStar(require("./src/api/search-rest-api/index"), exports);
28
28
  tslib_1.__exportStar(require("./src/api/model-rest-api/index"), exports);
29
+ tslib_1.__exportStar(require("./src/api/hxi-connector-api/index"), exports);
29
30
  tslib_1.__exportStar(require("./src/api/content-custom-api/api/content.api"), exports);
30
31
  tslib_1.__exportStar(require("./src/authentication/contentAuth"), exports);
31
32
  tslib_1.__exportStar(require("./src/authentication/processAuth"), exports);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,2EAAiD;AACjD,6EAAmD;AACnD,6EAAmD;AACnD,qFAA2D;AAC3D,2EAAiD;AACjD,wEAA8C;AAC9C,4EAAkD;AAClD,0EAAgD;AAChD,yEAA+C;AAE/C,uFAA6D;AAC7D,2EAAiD;AACjD,2EAAiD;AACjD,0EAAgD;AAChD,8DAAoC;AACpC,8DAAoC;AACpC,wDAA8B;AAC9B,4DAAkC;AAClC,kEAAwC;AACxC,kEAAwC;AAExC,+EAAqD;AAErD,uEAA6C;AAC7C,kFAAwD;AACxD,sDAA4B","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './src/api/content-rest-api/index';\nexport * from './src/api/content-custom-api/index';\nexport * from './src/api/discovery-rest-api/index';\nexport * from './src/api/gs-classification-rest-api/index';\nexport * from './src/api/gs-core-rest-api/index';\nexport * from './src/api/auth-rest-api/index';\nexport * from './src/api/activiti-rest-api/index';\nexport * from './src/api/search-rest-api/index';\nexport * from './src/api/model-rest-api/index';\n\nexport * from './src/api/content-custom-api/api/content.api';\nexport * from './src/authentication/contentAuth';\nexport * from './src/authentication/processAuth';\nexport * from './src/authentication/oauth2Auth';\nexport * from './src/contentClient';\nexport * from './src/processClient';\nexport * from './src/storage';\nexport * from './src/alfrescoApi';\nexport * from './src/alfrescoApiClient';\nexport * from './src/alfrescoApiConfig';\n\nexport * from './src/to-deprecate/alfresco-api-type';\n\nexport * from './src/api-clients/api-client';\nexport * from './src/api-clients/http-client.interface';\nexport * from './src/utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,2EAAiD;AACjD,6EAAmD;AACnD,6EAAmD;AACnD,qFAA2D;AAC3D,2EAAiD;AACjD,wEAA8C;AAC9C,4EAAkD;AAClD,0EAAgD;AAChD,yEAA+C;AAC/C,4EAAkD;AAElD,uFAA6D;AAC7D,2EAAiD;AACjD,2EAAiD;AACjD,0EAAgD;AAChD,8DAAoC;AACpC,8DAAoC;AACpC,wDAA8B;AAC9B,4DAAkC;AAClC,kEAAwC;AACxC,kEAAwC;AAExC,+EAAqD;AAErD,uEAA6C;AAC7C,kFAAwD;AACxD,sDAA4B","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './src/api/content-rest-api/index';\nexport * from './src/api/content-custom-api/index';\nexport * from './src/api/discovery-rest-api/index';\nexport * from './src/api/gs-classification-rest-api/index';\nexport * from './src/api/gs-core-rest-api/index';\nexport * from './src/api/auth-rest-api/index';\nexport * from './src/api/activiti-rest-api/index';\nexport * from './src/api/search-rest-api/index';\nexport * from './src/api/model-rest-api/index';\nexport * from './src/api/hxi-connector-api/index';\n\nexport * from './src/api/content-custom-api/api/content.api';\nexport * from './src/authentication/contentAuth';\nexport * from './src/authentication/processAuth';\nexport * from './src/authentication/oauth2Auth';\nexport * from './src/contentClient';\nexport * from './src/processClient';\nexport * from './src/storage';\nexport * from './src/alfrescoApi';\nexport * from './src/alfrescoApiClient';\nexport * from './src/alfrescoApiConfig';\n\nexport * from './src/to-deprecate/alfresco-api-type';\n\nexport * from './src/api-clients/api-client';\nexport * from './src/api-clients/http-client.interface';\nexport * from './src/utils';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfresco/js-api",
3
- "version": "7.8.0",
3
+ "version": "7.9.0-10005011517",
4
4
  "license": "Apache-2.0",
5
5
  "description": "JavaScript client library for the Alfresco REST API",
6
6
  "author": "Hyland Software, Inc. and its affiliates",
@@ -42,6 +42,10 @@ class AlfrescoApi {
42
42
  }
43
43
  this.storage = storage_1.Storage.getInstance();
44
44
  this.storage.setDomainPrefix(config.domainPrefix);
45
+ this.initConfig(config);
46
+ this.validateTicket(config);
47
+ }
48
+ initConfig(config) {
45
49
  this.config = new alfrescoApiConfig_1.AlfrescoApiConfig(config);
46
50
  this.clientsFactory();
47
51
  this.errorListeners();
@@ -51,7 +55,25 @@ class AlfrescoApi {
51
55
  this.emitBuffer('logged-in');
52
56
  }
53
57
  }
54
- return config;
58
+ }
59
+ validateTicket(config) {
60
+ if (config.ticketEcm && !this.isOauthConfiguration()) {
61
+ if (!this.contentAuth) {
62
+ this.contentAuth = new contentAuth_1.ContentAuth(this.config, this, this.httpClient);
63
+ }
64
+ this.contentAuth
65
+ .validateTicket()
66
+ .then((ticket) => {
67
+ config.ticketEcm = ticket;
68
+ })
69
+ .catch((error) => {
70
+ if (error.status === 401) {
71
+ config.ticketEcm = null;
72
+ this.initConfig(config);
73
+ this.emitBuffer('ticket_invalidated');
74
+ }
75
+ });
76
+ }
55
77
  }
56
78
  initAuth(config) {
57
79
  var _a, _b, _c;
@@ -132,6 +154,12 @@ class AlfrescoApi {
132
154
  else {
133
155
  this.processClient.setConfig(this.config);
134
156
  }
157
+ if (!this.hxiConnectorClient) {
158
+ this.hxiConnectorClient = new contentClient_1.ContentClient(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`, this.httpClient);
159
+ }
160
+ else {
161
+ this.hxiConnectorClient.setConfig(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`);
162
+ }
135
163
  }
136
164
  errorListeners() {
137
165
  this.contentClient.off('error', () => { });
@@ -141,6 +169,7 @@ class AlfrescoApi {
141
169
  this.searchClient.off('error', () => { });
142
170
  this.discoveryClient.off('error', () => { });
143
171
  this.gsClient.off('error', () => { });
172
+ this.hxiConnectorClient.off('error', () => { });
144
173
  this.contentClient.on('error', (error) => {
145
174
  this.errorHandler(error);
146
175
  });
@@ -162,6 +191,9 @@ class AlfrescoApi {
162
191
  this.gsClient.on('error', (error) => {
163
192
  this.errorHandler(error);
164
193
  });
194
+ this.hxiConnectorClient.on('error', (error) => {
195
+ this.errorHandler(error);
196
+ });
165
197
  }
166
198
  errorHandler(error) {
167
199
  if (this.config.oauthInit && error.status === 401) {
@@ -251,6 +283,7 @@ class AlfrescoApi {
251
283
  this.searchClient.setAuthentications(authECM);
252
284
  this.discoveryClient.setAuthentications(authECM);
253
285
  this.gsClient.setAuthentications(authECM);
286
+ this.hxiConnectorClient.setAuthentications(authECM);
254
287
  }
255
288
  loginTicket(ticketEcm, ticketBpm) {
256
289
  this.config.ticketEcm = ticketEcm;
@@ -1 +1 @@
1
- {"version":3,"file":"alfrescoApi.js","sourceRoot":"","sources":["alfrescoApi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;AAEH,0EAA2D;AAC3D,8DAA2D;AAC3D,8DAA2D;AAC3D,4DAAyD;AACzD,mDAAgD;AAChD,mDAAgD;AAChD,uCAAoC;AACpC,2DAAwD;AAKxD,MAAa,WAAW;IAyBpB,YAAY,MAA0B,EAAS,UAAuB;QAAvB,eAAU,GA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kBAAkB;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAChF,CAAC;IAED,oBAAoB;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;IAC5C,CAAC;IAED,WAAW;QACP,IAAI,IAAI,CAAC,oBAAoB,EAAE,EAAE;YAC7B,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;SACxC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAChF,CAAC;IAEO,UAAU,CAAC,KAAa,EAAE,QAAc;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAa,EAAE,QAAc;QAC/B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAEvC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;SAC5D;aAAM;YACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;SAC5B;IACL,CAAC;CACJ;AAliBD,kCAkiBC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ee, { EmitterMethod, Emitter } from 'event-emitter';\nimport { ContentAuth } from './authentication/contentAuth';\nimport { ProcessAuth } from './authentication/processAuth';\nimport { Oauth2Auth } from './authentication/oauth2Auth';\nimport { ContentClient } from './contentClient';\nimport { ProcessClient } from './processClient';\nimport { Storage } from './storage';\nimport { AlfrescoApiConfig } from './alfrescoApiConfig';\nimport { Authentication } from './authentication/authentication';\nimport { AlfrescoApiType } from './to-deprecate/alfresco-api-type';\nimport { HttpClient } from './api-clients/http-client.interface';\n\nexport class AlfrescoApi implements Emitter, AlfrescoApiType {\n __type = 'legacy-client';\n storage: Storage;\n config: AlfrescoApiConfig;\n contentClient: ContentClient;\n contentPrivateClient: ContentClient;\n processClient: ProcessClient;\n searchClient: ContentClient;\n discoveryClient: ContentClient;\n gsClient: ContentClient;\n authClient: ContentClient;\n oauth2Auth: Oauth2Auth;\n processAuth: ProcessAuth;\n contentAuth: ContentAuth;\n\n on: EmitterMethod;\n off: EmitterMethod;\n once: EmitterMethod;\n\n bufferEvents: string[] = [];\n\n emit: (type: string, ...args: any[]) => void;\n\n username: string;\n\n constructor(config?: AlfrescoApiConfig, public httpClient?: HttpClient) {\n ee(this);\n\n if (config) {\n this.setConfig(config);\n }\n }\n\n setConfig(config: AlfrescoApiConfig) {\n if (!config) {\n config = {};\n }\n\n this.storage = Storage.getInstance();\n this.storage.setDomainPrefix(config.domainPrefix);\n\n this.config = new AlfrescoApiConfig(config);\n\n this.clientsFactory();\n\n this.errorListeners();\n if (this.config.oauthInit) {\n this.initAuth(config);\n\n if (this.isLoggedIn()) {\n this.emitBuffer('logged-in');\n }\n }\n\n return config;\n }\n\n private initAuth(config: AlfrescoApiConfig): void {\n if (this.isOauthConfiguration()) {\n if (!this.oauth2Auth) {\n this.oauth2Auth = new Oauth2Auth(this.config, this, this.httpClient);\n } else {\n this.oauth2Auth.setConfig(this.config, this);\n }\n\n this.oauth2Auth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());\n } else {\n if (!this.processAuth) {\n this.processAuth = new ProcessAuth(this.config, this.httpClient);\n } else {\n this.processAuth.setConfig(this.config);\n }\n\n this.processAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n } else {\n this.contentAuth.setConfig(config);\n }\n\n this.contentAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());\n }\n }\n\n private clientsFactory() {\n if (!this.contentPrivateClient) {\n this.contentPrivateClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentPrivateClient.setConfig(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`);\n }\n\n if (!this.contentClient) {\n this.contentClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentClient.setConfig(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`);\n }\n\n if (!this.authClient) {\n this.authClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`, this.httpClient);\n } else {\n this.authClient.setConfig(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`);\n }\n\n if (!this.searchClient) {\n this.searchClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/search/versions/1`, this.httpClient);\n } else {\n this.searchClient.setConfig(this.config, `/api/${this.config.tenant}/public/search/versions/1`);\n }\n\n if (!this.discoveryClient) {\n this.discoveryClient = new ContentClient(this.config, `/api`, this.httpClient);\n } else {\n this.discoveryClient.setConfig(this.config, `/api`);\n }\n\n if (!this.gsClient) {\n this.gsClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/gs/versions/1`, this.httpClient);\n } else {\n this.gsClient.setConfig(this.config, `/api/${this.config.tenant}/public/gs/versions/1`);\n }\n\n if (!this.processClient) {\n this.processClient = new ProcessClient(this.config, this.httpClient);\n } else {\n this.processClient.setConfig(this.config);\n }\n }\n\n /**@private? */\n errorListeners() {\n this.contentClient.off('error', () => {});\n this.authClient.off('error', () => {});\n this.contentPrivateClient.off('error', () => {});\n this.processClient.off('error', () => {});\n this.searchClient.off('error', () => {});\n this.discoveryClient.off('error', () => {});\n this.gsClient.off('error', () => {});\n\n this.contentClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.authClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.contentPrivateClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.processClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.searchClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.discoveryClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.gsClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n }\n\n /**@private? */\n errorHandler(error: { status?: number }) {\n if (this.config.oauthInit && error.status === 401) {\n this.invalidateSession();\n }\n\n this.emitBuffer('error', error);\n }\n\n changeWithCredentialsConfig(withCredentials: boolean) {\n this.config.withCredentials = withCredentials;\n }\n\n changeCsrfConfig(disableCsrf: boolean) {\n this.config.disableCsrf = disableCsrf;\n this.processAuth.changeCsrfConfig(disableCsrf);\n }\n\n changeEcmHost(hostEcm: string) {\n this.config.hostEcm = hostEcm;\n this.contentAuth.changeHost();\n this.contentClient.changeHost();\n this.authClient.changeHost();\n }\n\n changeBpmHost(hostBpm: string) {\n this.config.hostBpm = hostBpm;\n this.processAuth.changeHost();\n this.processClient.changeHost();\n }\n\n /**\n * login Alfresco API\n *\n * @param username Username to login\n * @param password Password to login\n * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.\n */\n login(username: string, password: string): Promise<any> {\n if (!this.isCredentialValid(username) || !this.isCredentialValid(password)) {\n return Promise.reject(new Error('missing username or password'));\n }\n\n if (username) {\n username = username.trim();\n }\n\n this.username = username;\n\n if (this.isOauthConfiguration()) {\n const promise = this.oauth2Auth.login(username, password);\n promise.then((accessToken) => {\n this.config.accessToken = accessToken;\n });\n return promise;\n } else {\n if (this.isBpmConfiguration()) {\n const promise = this.processAuth.login(username, password);\n promise.then((ticketBpm) => {\n this.config.ticketBpm = ticketBpm;\n });\n return promise;\n } else if (this.isEcmConfiguration()) {\n const promise = this.contentAuth.login(username, password);\n promise.then((ticketEcm) => {\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), null);\n this.config.ticketEcm = ticketEcm;\n });\n return promise;\n } else if (this.isEcmBpmConfiguration()) {\n const contentProcessPromise = this.loginBPMECM(username, password);\n\n contentProcessPromise.then((data) => {\n this.config.ticketEcm = data[0];\n this.config.ticketBpm = data[1];\n });\n\n return contentProcessPromise;\n } else {\n return Promise.reject(new Error('Unknown configuration'));\n }\n }\n }\n\n isCredentialValid(credential: string): boolean {\n return credential !== undefined && credential !== null && credential !== '';\n }\n\n implicitLogin(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n return new Promise(() => {\n this.oauth2Auth.implicitLogin();\n });\n }\n\n setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication) {\n this.contentClient.setAuthentications(authECM);\n this.authClient.setAuthentications(authECM);\n this.searchClient.setAuthentications(authECM);\n this.contentPrivateClient.setAuthentications(authECM);\n this.processClient.setAuthentications(authBPM);\n this.searchClient.setAuthentications(authECM);\n this.discoveryClient.setAuthentications(authECM);\n this.gsClient.setAuthentications(authECM);\n }\n\n /**\n * login Tickets\n *\n * @param ticketEcm alfresco ticket\n * @param ticketBpm alfresco ticket\n */\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<string> {\n this.config.ticketEcm = ticketEcm;\n this.config.ticketBpm = ticketBpm;\n\n return this.contentAuth.validateTicket();\n }\n\n private loginBPMECM(username: string, password: string): Promise<[string, string]> {\n const contentPromise = this.contentAuth.login(username, password);\n const processPromise = this.processAuth.login(username, password);\n\n const promise: any = new Promise<[string, string]>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n (data) => {\n promise.emit('success');\n resolve(data);\n },\n (error) => {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * logout Alfresco API\n */\n logout(): Promise<void> {\n this.username = null;\n\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.logOut();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.logout();\n }\n\n if (this.isEcmConfiguration()) {\n const contentPromise = this.contentAuth.logout();\n contentPromise.then(\n () => (this.config.ticket = undefined),\n () => {}\n );\n return contentPromise;\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this._logoutBPMECM();\n }\n\n return Promise.resolve();\n }\n\n private _logoutBPMECM(): Promise<void> {\n const contentPromise = this.contentAuth.logout();\n const processPromise = this.processAuth.logout();\n\n const promise: any = new Promise<void>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n () => {\n this.config.ticket = undefined;\n promise.emit('logout');\n resolve();\n },\n (error) => {\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * If the client is logged in return true\n */\n isLoggedIn(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.isLoggedIn();\n }\n\n if (this.isEcmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn() && this.processAuth.isLoggedIn();\n }\n\n return false;\n }\n\n isBpmLoggedIn(): boolean {\n if (this.isBpmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.processAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n isEcmLoggedIn(): boolean {\n if (this.isEcmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n getBpmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.processAuth.storage.getItem('APS_USERNAME');\n }\n }\n\n getEcmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.contentAuth.storage.getItem('ACS_USERNAME');\n }\n }\n\n /**\n * refresh token\n */\n refreshToken(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n if (this.config.oauth2.implicitFlow) {\n return Promise.reject(new Error('Manual refresh token not possible in implicit flow'));\n }\n\n return this.oauth2Auth.refreshToken();\n }\n\n getTicketAuth(): string {\n return this.oauth2Auth?.getToken();\n }\n\n /**\n * Set the current Ticket\n *\n * @param ticketEcm ecm ticket\n * @param ticketBpm bpm ticket\n */\n setTicket(ticketEcm: string, ticketBpm: string) {\n if (this.contentAuth) {\n this.contentAuth.setTicket(ticketEcm);\n }\n if (this.processAuth) {\n this.processAuth.setTicket(ticketBpm);\n }\n }\n\n /**\n * invalidate the current session\n */\n invalidateSession() {\n if (this.oauth2Auth) {\n this.oauth2Auth.invalidateSession();\n } else {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n }\n }\n\n /**\n * Get the current Ticket for the Bpm\n */\n getTicketBpm(): string {\n return this.processAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm\n */\n getTicketEcm(): string {\n return this.contentAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm and BPM\n */\n getTicket(): [string, string] {\n return [this.contentAuth.getTicket(), this.processAuth.getTicket()];\n }\n\n isBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'BPM';\n }\n\n isEcmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ECM';\n }\n\n isOauthConfiguration(): boolean {\n return this.config.authType === 'OAUTH';\n }\n\n isPublicUrl(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isPublicUrl();\n }\n return false;\n }\n\n isEcmBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ALL';\n }\n\n private emitBuffer(event: string, callback?: any): void {\n this.emit(event, callback);\n this.bufferEvents.push(event);\n }\n\n reply(event: string, callback?: any): void {\n if (this.bufferEvents.indexOf(event) >= 0) {\n // eslint-disable-next-line prefer-rest-params\n Function.prototype.apply.call(callback, this, arguments);\n } else {\n this.on(event, callback);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"alfrescoApi.js","sourceRoot":"","sources":["alfrescoApi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;AAEH,0EAA2D;AAC3D,8DAA2D;AAC3D,8DAA2D;AAC3D,4DAAyD;AACzD,mDAAgD;AAChD,mDAAgD;AAChD,uCAAoC;AACpC,2DAAwD;AAKxD,MAAa,WAAW;IA0BpB,YAAY,MAA0B,EAAS,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAzBtE,WAAM,GAAG,eAAe,CAAC;QAmBzB,iBAAY,GAAa,EAAE,CAAC;QAOxB,IAAA,uBAAE,EAAC,IAAI,CAAC,CAAC;QAET,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;S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AK,KAAK,CAAC;IAChF,CAAC;IAED,kBAAkB;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAChF,CAAC;IAED,oBAAoB;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;IAC5C,CAAC;IAED,WAAW;QACP,IAAI,IAAI,CAAC,oBAAoB,EAAE,EAAE;YAC7B,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;SACxC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAChF,CAAC;IAEO,UAAU,CAAC,KAAa,EAAE,QAAc;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAa,EAAE,QAAc;QAC/B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAEvC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;SAC5D;aAAM;YACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;SAC5B;IACL,CAAC;CACJ;AAtkBD,kCAskBC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ee, { EmitterMethod, Emitter } from 'event-emitter';\nimport { ContentAuth } from './authentication/contentAuth';\nimport { ProcessAuth } from './authentication/processAuth';\nimport { Oauth2Auth } from './authentication/oauth2Auth';\nimport { ContentClient } from './contentClient';\nimport { ProcessClient } from './processClient';\nimport { Storage } from './storage';\nimport { AlfrescoApiConfig } from './alfrescoApiConfig';\nimport { Authentication } from './authentication/authentication';\nimport { AlfrescoApiType } from './to-deprecate/alfresco-api-type';\nimport { HttpClient } from './api-clients/http-client.interface';\n\nexport class AlfrescoApi implements Emitter, AlfrescoApiType {\n __type = 'legacy-client';\n storage: Storage;\n config: AlfrescoApiConfig;\n contentClient: ContentClient;\n contentPrivateClient: ContentClient;\n processClient: ProcessClient;\n searchClient: ContentClient;\n discoveryClient: ContentClient;\n gsClient: ContentClient;\n authClient: ContentClient;\n hxiConnectorClient: ContentClient;\n oauth2Auth: Oauth2Auth;\n processAuth: ProcessAuth;\n contentAuth: ContentAuth;\n\n on: EmitterMethod;\n off: EmitterMethod;\n once: EmitterMethod;\n\n bufferEvents: string[] = [];\n\n emit: (type: string, ...args: any[]) => void;\n\n username: string;\n\n constructor(config?: AlfrescoApiConfig, public httpClient?: HttpClient) {\n ee(this);\n\n if (config) {\n this.setConfig(config);\n }\n }\n\n setConfig(config: AlfrescoApiConfig) {\n if (!config) {\n config = {};\n }\n\n this.storage = Storage.getInstance();\n this.storage.setDomainPrefix(config.domainPrefix);\n\n this.initConfig(config);\n this.validateTicket(config);\n }\n\n private initConfig(config: AlfrescoApiConfig) {\n this.config = new AlfrescoApiConfig(config);\n\n this.clientsFactory();\n\n this.errorListeners();\n if (this.config.oauthInit) {\n this.initAuth(config);\n\n if (this.isLoggedIn()) {\n this.emitBuffer('logged-in');\n }\n }\n }\n\n private validateTicket(config: AlfrescoApiConfig) {\n if (config.ticketEcm && !this.isOauthConfiguration()) {\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n }\n this.contentAuth\n .validateTicket()\n .then((ticket) => {\n config.ticketEcm = ticket;\n })\n .catch((error) => {\n if (error.status === 401) {\n config.ticketEcm = null;\n this.initConfig(config);\n this.emitBuffer('ticket_invalidated');\n }\n });\n }\n }\n\n private initAuth(config: AlfrescoApiConfig): void {\n if (this.isOauthConfiguration()) {\n if (!this.oauth2Auth) {\n this.oauth2Auth = new Oauth2Auth(this.config, this, this.httpClient);\n } else {\n this.oauth2Auth.setConfig(this.config, this);\n }\n\n this.oauth2Auth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());\n } else {\n if (!this.processAuth) {\n this.processAuth = new ProcessAuth(this.config, this.httpClient);\n } else {\n this.processAuth.setConfig(this.config);\n }\n\n this.processAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n } else {\n this.contentAuth.setConfig(config);\n }\n\n this.contentAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());\n }\n }\n\n private clientsFactory() {\n if (!this.contentPrivateClient) {\n this.contentPrivateClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentPrivateClient.setConfig(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`);\n }\n\n if (!this.contentClient) {\n this.contentClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentClient.setConfig(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`);\n }\n\n if (!this.authClient) {\n this.authClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`, this.httpClient);\n } else {\n this.authClient.setConfig(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`);\n }\n\n if (!this.searchClient) {\n this.searchClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/search/versions/1`, this.httpClient);\n } else {\n this.searchClient.setConfig(this.config, `/api/${this.config.tenant}/public/search/versions/1`);\n }\n\n if (!this.discoveryClient) {\n this.discoveryClient = new ContentClient(this.config, `/api`, this.httpClient);\n } else {\n this.discoveryClient.setConfig(this.config, `/api`);\n }\n\n if (!this.gsClient) {\n this.gsClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/gs/versions/1`, this.httpClient);\n } else {\n this.gsClient.setConfig(this.config, `/api/${this.config.tenant}/public/gs/versions/1`);\n }\n\n if (!this.processClient) {\n this.processClient = new ProcessClient(this.config, this.httpClient);\n } else {\n this.processClient.setConfig(this.config);\n }\n\n if (!this.hxiConnectorClient) {\n this.hxiConnectorClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`, this.httpClient);\n } else {\n this.hxiConnectorClient.setConfig(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`);\n }\n }\n\n /**@private? */\n errorListeners() {\n this.contentClient.off('error', () => {});\n this.authClient.off('error', () => {});\n this.contentPrivateClient.off('error', () => {});\n this.processClient.off('error', () => {});\n this.searchClient.off('error', () => {});\n this.discoveryClient.off('error', () => {});\n this.gsClient.off('error', () => {});\n this.hxiConnectorClient.off('error', () => {});\n\n this.contentClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.authClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.contentPrivateClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.processClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.searchClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.discoveryClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.gsClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.hxiConnectorClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n }\n\n /**@private? */\n errorHandler(error: { status?: number }) {\n if (this.config.oauthInit && error.status === 401) {\n this.invalidateSession();\n }\n\n this.emitBuffer('error', error);\n }\n\n changeWithCredentialsConfig(withCredentials: boolean) {\n this.config.withCredentials = withCredentials;\n }\n\n changeCsrfConfig(disableCsrf: boolean) {\n this.config.disableCsrf = disableCsrf;\n this.processAuth.changeCsrfConfig(disableCsrf);\n }\n\n changeEcmHost(hostEcm: string) {\n this.config.hostEcm = hostEcm;\n this.contentAuth.changeHost();\n this.contentClient.changeHost();\n this.authClient.changeHost();\n }\n\n changeBpmHost(hostBpm: string) {\n this.config.hostBpm = hostBpm;\n this.processAuth.changeHost();\n this.processClient.changeHost();\n }\n\n /**\n * login Alfresco API\n *\n * @param username Username to login\n * @param password Password to login\n * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.\n */\n login(username: string, password: string): Promise<any> {\n if (!this.isCredentialValid(username) || !this.isCredentialValid(password)) {\n return Promise.reject(new Error('missing username or password'));\n }\n\n if (username) {\n username = username.trim();\n }\n\n this.username = username;\n\n if (this.isOauthConfiguration()) {\n const promise = this.oauth2Auth.login(username, password);\n promise.then((accessToken) => {\n this.config.accessToken = accessToken;\n });\n return promise;\n } else {\n if (this.isBpmConfiguration()) {\n const promise = this.processAuth.login(username, password);\n promise.then((ticketBpm) => {\n this.config.ticketBpm = ticketBpm;\n });\n return promise;\n } else if (this.isEcmConfiguration()) {\n const promise = this.contentAuth.login(username, password);\n promise.then((ticketEcm) => {\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), null);\n this.config.ticketEcm = ticketEcm;\n });\n return promise;\n } else if (this.isEcmBpmConfiguration()) {\n const contentProcessPromise = this.loginBPMECM(username, password);\n\n contentProcessPromise.then((data) => {\n this.config.ticketEcm = data[0];\n this.config.ticketBpm = data[1];\n });\n\n return contentProcessPromise;\n } else {\n return Promise.reject(new Error('Unknown configuration'));\n }\n }\n }\n\n isCredentialValid(credential: string): boolean {\n return credential !== undefined && credential !== null && credential !== '';\n }\n\n implicitLogin(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n return new Promise(() => {\n this.oauth2Auth.implicitLogin();\n });\n }\n\n setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication) {\n this.contentClient.setAuthentications(authECM);\n this.authClient.setAuthentications(authECM);\n this.searchClient.setAuthentications(authECM);\n this.contentPrivateClient.setAuthentications(authECM);\n this.processClient.setAuthentications(authBPM);\n this.searchClient.setAuthentications(authECM);\n this.discoveryClient.setAuthentications(authECM);\n this.gsClient.setAuthentications(authECM);\n this.hxiConnectorClient.setAuthentications(authECM);\n }\n\n /**\n * login Tickets\n *\n * @param ticketEcm alfresco ticket\n * @param ticketBpm alfresco ticket\n */\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<string> {\n this.config.ticketEcm = ticketEcm;\n this.config.ticketBpm = ticketBpm;\n\n return this.contentAuth.validateTicket();\n }\n\n private loginBPMECM(username: string, password: string): Promise<[string, string]> {\n const contentPromise = this.contentAuth.login(username, password);\n const processPromise = this.processAuth.login(username, password);\n\n const promise: any = new Promise<[string, string]>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n (data) => {\n promise.emit('success');\n resolve(data);\n },\n (error) => {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * logout Alfresco API\n */\n logout(): Promise<void> {\n this.username = null;\n\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.logOut();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.logout();\n }\n\n if (this.isEcmConfiguration()) {\n const contentPromise = this.contentAuth.logout();\n contentPromise.then(\n () => (this.config.ticket = undefined),\n () => {}\n );\n return contentPromise;\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this._logoutBPMECM();\n }\n\n return Promise.resolve();\n }\n\n private _logoutBPMECM(): Promise<void> {\n const contentPromise = this.contentAuth.logout();\n const processPromise = this.processAuth.logout();\n\n const promise: any = new Promise<void>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n () => {\n this.config.ticket = undefined;\n promise.emit('logout');\n resolve();\n },\n (error) => {\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * If the client is logged in return true\n */\n isLoggedIn(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.isLoggedIn();\n }\n\n if (this.isEcmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn() && this.processAuth.isLoggedIn();\n }\n\n return false;\n }\n\n isBpmLoggedIn(): boolean {\n if (this.isBpmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.processAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n isEcmLoggedIn(): boolean {\n if (this.isEcmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n getBpmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.processAuth.storage.getItem('APS_USERNAME');\n }\n }\n\n getEcmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.contentAuth.storage.getItem('ACS_USERNAME');\n }\n }\n\n /**\n * refresh token\n */\n refreshToken(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n if (this.config.oauth2.implicitFlow) {\n return Promise.reject(new Error('Manual refresh token not possible in implicit flow'));\n }\n\n return this.oauth2Auth.refreshToken();\n }\n\n getTicketAuth(): string {\n return this.oauth2Auth?.getToken();\n }\n\n /**\n * Set the current Ticket\n *\n * @param ticketEcm ecm ticket\n * @param ticketBpm bpm ticket\n */\n setTicket(ticketEcm: string, ticketBpm: string) {\n if (this.contentAuth) {\n this.contentAuth.setTicket(ticketEcm);\n }\n if (this.processAuth) {\n this.processAuth.setTicket(ticketBpm);\n }\n }\n\n /**\n * invalidate the current session\n */\n invalidateSession() {\n if (this.oauth2Auth) {\n this.oauth2Auth.invalidateSession();\n } else {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n }\n }\n\n /**\n * Get the current Ticket for the Bpm\n */\n getTicketBpm(): string {\n return this.processAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm\n */\n getTicketEcm(): string {\n return this.contentAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm and BPM\n */\n getTicket(): [string, string] {\n return [this.contentAuth.getTicket(), this.processAuth.getTicket()];\n }\n\n isBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'BPM';\n }\n\n isEcmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ECM';\n }\n\n isOauthConfiguration(): boolean {\n return this.config.authType === 'OAUTH';\n }\n\n isPublicUrl(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isPublicUrl();\n }\n return false;\n }\n\n isEcmBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ALL';\n }\n\n private emitBuffer(event: string, callback?: any): void {\n this.emit(event, callback);\n this.bufferEvents.push(event);\n }\n\n reply(event: string, callback?: any): void {\n if (this.bufferEvents.indexOf(event) >= 0) {\n // eslint-disable-next-line prefer-rest-params\n Function.prototype.apply.call(callback, this, arguments);\n } else {\n this.on(event, callback);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"formDefinitionRepresentation.js","sourceRoot":"","sources":["formDefinitionRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FieldValueInfo } from './fieldValueInfo';\nimport { FormFieldRepresentation } from './formFieldRepresentation';\nimport { FormJavascriptEventRepresentation } from './formJavascriptEventRepresentation';\nimport { FormOutcomeRepresentation } from './formOutcomeRepresentation';\nimport { FormTabRepresentation } from './formTabRepresentation';\nimport { FormVariableRepresentation } from './formVariableRepresentation';\n\nexport interface FormDefinitionRepresentation {\n className?: string;\n customFieldTemplates?: { [key: string]: string };\n customFieldsValueInfo?: { [key: string]: FieldValueInfo };\n fields?: FormFieldRepresentation[];\n globalDateFormat?: string;\n gridsterForm?: boolean;\n id?: number;\n javascriptEvents?: FormJavascriptEventRepresentation[];\n metadata?: { [key: string]: string };\n name?: string;\n outcomeTarget?: string;\n outcomes?: FormOutcomeRepresentation[];\n processDefinitionId?: string;\n processDefinitionKey?: string;\n processDefinitionName?: string;\n selectedOutcome?: string;\n style?: string;\n tabs?: FormTabRepresentation[];\n taskDefinitionKey?: string;\n taskId?: string;\n taskName?: string;\n variables?: FormVariableRepresentation[];\n}\n"]}
1
+ {"version":3,"file":"formDefinitionRepresentation.js","sourceRoot":"","sources":["formDefinitionRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FieldValueInfo } from './fieldValueInfo';\nimport { FormFieldRepresentation } from './formFieldRepresentation';\nimport { FormJavascriptEventRepresentation } from './formJavascriptEventRepresentation';\nimport { FormOutcomeRepresentation } from './formOutcomeRepresentation';\nimport { FormTabRepresentation } from './formTabRepresentation';\nimport { FormVariableRepresentation } from './formVariableRepresentation';\nimport { RestVariable } from './restVariable';\n\nexport interface FormDefinitionRepresentation {\n className?: string;\n customFieldTemplates?: { [key: string]: string };\n customFieldsValueInfo?: { [key: string]: FieldValueInfo };\n fields?: FormFieldRepresentation[];\n globalDateFormat?: string;\n gridsterForm?: boolean;\n id?: number;\n javascriptEvents?: FormJavascriptEventRepresentation[];\n metadata?: { [key: string]: string };\n name?: string;\n outcomeTarget?: string;\n outcomes?: FormOutcomeRepresentation[];\n processDefinitionId?: string;\n processDefinitionKey?: string;\n processDefinitionName?: string;\n selectedOutcome?: string;\n style?: string;\n tabs?: FormTabRepresentation[];\n taskDefinitionKey?: string;\n taskId?: string;\n taskName?: string;\n variables?: FormVariableRepresentation[];\n processVariables?: RestVariable[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"processInstanceFilterRepresentation.js","sourceRoot":"","sources":["processInstanceFilterRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface ProcessInstanceFilterRepresentation {\n asc?: boolean;\n name?: string;\n processDefinitionId?: string;\n processDefinitionKey?: string;\n sort?: string;\n state?: string;\n}\n"]}
1
+ {"version":3,"file":"processInstanceFilterRepresentation.js","sourceRoot":"","sources":["processInstanceFilterRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface ProcessInstanceFilterRepresentation {\n asc?: boolean;\n name?: string;\n processDefinitionId?: string;\n processDefinitionKey?: string;\n sort?: string;\n state?: string;\n assignment?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"processInstanceQueryRepresentation.js","sourceRoot":"","sources":["processInstanceQueryRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface ProcessInstanceQueryRepresentation {\n appDefinitionId?: number;\n page?: number;\n processDefinitionId?: string;\n processInstanceId?: string;\n size?: number;\n sort?: 'created-desc' | 'created-asc' | 'ended-desc' | 'ended-asc';\n start?: number;\n state?: 'running' | 'completed' | 'all';\n}\n"]}
1
+ {"version":3,"file":"processInstanceQueryRepresentation.js","sourceRoot":"","sources":["processInstanceQueryRepresentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Union } from '../../../../types';\n\nexport interface ProcessInstanceQueryRepresentation {\n appDefinitionId?: number;\n page?: number;\n processDefinitionId?: string;\n processInstanceId?: string;\n size?: number;\n sort?: ProcessInstanceQueryRepresentationSort;\n start?: number;\n state?: ProcessInstanceQueryRepresentationState;\n}\n\nexport type ProcessInstanceQueryRepresentationSort = Union<string, 'created-desc' | 'created-asc' | 'ended-desc' | 'ended-asc'>;\nexport type ProcessInstanceQueryRepresentationState = Union<string, 'running' | 'completed' | 'all' | 'open'>;\n"]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /*!
3
+ * @license
4
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.BaseApi = void 0;
20
+ const api_client_1 = require("../../../api-clients/api-client");
21
+ class BaseApi extends api_client_1.ApiClient {
22
+ get apiClient() {
23
+ return this.alfrescoApi.hxiConnectorClient;
24
+ }
25
+ }
26
+ exports.BaseApi = BaseApi;
27
+ //# sourceMappingURL=../../../../../../../lib/js-api/src/api/hxi-connector-api/api/base.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.api.js","sourceRoot":"","sources":["base.api.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,gEAA4D;AAG5D,MAAsB,OAAQ,SAAQ,sBAAS;IAC3C,IAAa,SAAS;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;IAC/C,CAAC;CACJ;AAJD,0BAIC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiClient } from '../../../api-clients/api-client';\nimport { LegacyHttpClient } from '../../../api-clients/http-client.interface';\n\nexport abstract class BaseApi extends ApiClient {\n override get apiClient(): LegacyHttpClient {\n return this.alfrescoApi.hxiConnectorClient;\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /*!
3
+ * @license
4
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const tslib_1 = require("tslib");
20
+ tslib_1.__exportStar(require("./predictions.api"), exports);
21
+ //# sourceMappingURL=../../../../../../../lib/js-api/src/api/hxi-connector-api/api/index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,4DAAkC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './predictions.api';\n"]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*!
3
+ * @license
4
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PredictionsApi = void 0;
20
+ const base_api_1 = require("./base.api");
21
+ const assert_1 = require("../../../assert");
22
+ const model_1 = require("../model");
23
+ class PredictionsApi extends base_api_1.BaseApi {
24
+ getPredictions(nodeId) {
25
+ (0, assert_1.throwIfNotDefined)(nodeId, 'nodeId');
26
+ const pathParams = {
27
+ nodeId
28
+ };
29
+ return this.get({
30
+ path: '/nodes/{nodeId}/predictions',
31
+ pathParams,
32
+ returnType: model_1.PredictionPaging
33
+ });
34
+ }
35
+ reviewPrediction(predictionId, reviewStatus) {
36
+ (0, assert_1.throwIfNotDefined)(predictionId, 'predictionId');
37
+ (0, assert_1.throwIfNotDefined)(reviewStatus, 'reviewStatus');
38
+ const pathParams = {
39
+ predictionId,
40
+ reviewStatus
41
+ };
42
+ return this.post({
43
+ path: '/predictions/{predictionId}/review',
44
+ pathParams,
45
+ returnType: (Promise)
46
+ });
47
+ }
48
+ }
49
+ exports.PredictionsApi = PredictionsApi;
50
+ //# sourceMappingURL=../../../../../../../lib/js-api/src/api/hxi-connector-api/api/predictions.api.js.map