@camunda8/sdk 8.4.0 → 8.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/.eslintrc.json +34 -0
  2. package/CHANGELOG.md +61 -21
  3. package/CODE_OF_CONDUCT.md +73 -0
  4. package/CONTRIBUTING.md +116 -0
  5. package/LICENSE +3 -3
  6. package/README.md +229 -33
  7. package/dist/admin/index.d.ts +2 -0
  8. package/dist/admin/index.js +30 -0
  9. package/dist/admin/index.js.map +1 -0
  10. package/dist/admin/lib/AdminApiClient.d.ts +121 -0
  11. package/dist/admin/lib/AdminApiClient.js +254 -0
  12. package/dist/admin/lib/AdminApiClient.js.map +1 -0
  13. package/dist/admin/lib/AdminDto.d.ts +98 -0
  14. package/dist/admin/lib/AdminDto.js +3 -0
  15. package/dist/admin/lib/AdminDto.js.map +1 -0
  16. package/dist/c8/index.d.ts +42 -0
  17. package/dist/c8/index.js +95 -0
  18. package/dist/c8/index.js.map +1 -0
  19. package/dist/index.d.ts +15 -14
  20. package/dist/index.js +14 -16
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/CertificateAuthority.d.ts +2 -0
  23. package/dist/lib/CertificateAuthority.js +15 -0
  24. package/dist/lib/CertificateAuthority.js.map +1 -0
  25. package/dist/lib/ClientConstructor.d.ts +6 -0
  26. package/dist/lib/ClientConstructor.js +3 -0
  27. package/dist/lib/ClientConstructor.js.map +1 -0
  28. package/dist/lib/Configuration.d.ts +113 -0
  29. package/dist/lib/Configuration.js +367 -0
  30. package/dist/lib/Configuration.js.map +1 -0
  31. package/dist/lib/ConstructOAuthProvider.d.ts +3 -0
  32. package/dist/lib/ConstructOAuthProvider.js +14 -0
  33. package/dist/lib/ConstructOAuthProvider.js.map +1 -0
  34. package/dist/lib/CreateUserAgentString.d.ts +2 -0
  35. package/dist/lib/CreateUserAgentString.js +11 -0
  36. package/dist/lib/CreateUserAgentString.js.map +1 -0
  37. package/dist/lib/Delay.d.ts +1 -0
  38. package/dist/lib/Delay.js +6 -0
  39. package/dist/lib/Delay.js.map +1 -0
  40. package/dist/lib/EnvironmentSetup.d.ts +11 -0
  41. package/dist/lib/EnvironmentSetup.js +35 -0
  42. package/dist/lib/EnvironmentSetup.js.map +1 -0
  43. package/dist/lib/GetPackageVersion.d.ts +1 -0
  44. package/dist/lib/GetPackageVersion.js +32 -0
  45. package/dist/lib/GetPackageVersion.js.map +1 -0
  46. package/dist/lib/LosslessJsonParser.d.ts +103 -0
  47. package/dist/lib/LosslessJsonParser.js +252 -0
  48. package/dist/lib/LosslessJsonParser.js.map +1 -0
  49. package/dist/lib/RequireConfiguration.d.ts +2 -0
  50. package/dist/lib/RequireConfiguration.js +11 -0
  51. package/dist/lib/RequireConfiguration.js.map +1 -0
  52. package/dist/lib/SuppressZeebeLogging.d.ts +2 -0
  53. package/dist/lib/SuppressZeebeLogging.js +14 -0
  54. package/dist/lib/SuppressZeebeLogging.js.map +1 -0
  55. package/dist/lib/ValueOrDefault.d.ts +1 -0
  56. package/dist/lib/ValueOrDefault.js +8 -0
  57. package/dist/lib/ValueOrDefault.js.map +1 -0
  58. package/dist/lib/index.d.ts +12 -0
  59. package/dist/lib/index.js +32 -0
  60. package/dist/lib/index.js.map +1 -0
  61. package/dist/modeler/index.d.ts +2 -0
  62. package/dist/modeler/index.js +30 -0
  63. package/dist/modeler/index.js.map +1 -0
  64. package/dist/modeler/lib/ModelerAPIClient.d.ts +210 -0
  65. package/dist/modeler/lib/ModelerAPIClient.js +417 -0
  66. package/dist/modeler/lib/ModelerAPIClient.js.map +1 -0
  67. package/dist/modeler/lib/ModelerDto.d.ts +187 -0
  68. package/dist/modeler/lib/ModelerDto.js +3 -0
  69. package/dist/modeler/lib/ModelerDto.js.map +1 -0
  70. package/dist/oauth/index.d.ts +15 -0
  71. package/dist/oauth/index.js +8 -0
  72. package/dist/oauth/index.js.map +1 -0
  73. package/dist/oauth/lib/IOAuthProvider.d.ts +4 -0
  74. package/dist/oauth/lib/IOAuthProvider.js +3 -0
  75. package/dist/oauth/lib/IOAuthProvider.js.map +1 -0
  76. package/dist/oauth/lib/NullAuthProvider.d.ts +5 -0
  77. package/dist/oauth/lib/NullAuthProvider.js +16 -0
  78. package/dist/oauth/lib/NullAuthProvider.js.map +1 -0
  79. package/dist/oauth/lib/OAuthProvider.d.ts +44 -0
  80. package/dist/oauth/lib/OAuthProvider.js +316 -0
  81. package/dist/oauth/lib/OAuthProvider.js.map +1 -0
  82. package/dist/operate/index.d.ts +2 -0
  83. package/dist/operate/index.js +30 -0
  84. package/dist/operate/index.js.map +1 -0
  85. package/dist/operate/lib/OperateApiClient.d.ts +204 -0
  86. package/dist/operate/lib/OperateApiClient.js +440 -0
  87. package/dist/operate/lib/OperateApiClient.js.map +1 -0
  88. package/dist/operate/lib/OperateDto.d.ts +126 -0
  89. package/dist/operate/lib/OperateDto.js +125 -0
  90. package/dist/operate/lib/OperateDto.js.map +1 -0
  91. package/dist/operate/lib/TestableOperateApiClient.d.ts +7 -0
  92. package/dist/operate/lib/TestableOperateApiClient.js +15 -0
  93. package/dist/operate/lib/TestableOperateApiClient.js.map +1 -0
  94. package/dist/operate/lib/parseSearchResults.d.ts +4 -0
  95. package/dist/operate/lib/parseSearchResults.js +26 -0
  96. package/dist/operate/lib/parseSearchResults.js.map +1 -0
  97. package/dist/optimize/index.d.ts +2 -0
  98. package/dist/optimize/index.js +30 -0
  99. package/dist/optimize/index.js.map +1 -0
  100. package/dist/optimize/lib/APIObjects.d.ts +191 -0
  101. package/dist/optimize/lib/APIObjects.js +3 -0
  102. package/dist/optimize/lib/APIObjects.js.map +1 -0
  103. package/dist/optimize/lib/OptimizeApiClient.d.ts +269 -0
  104. package/dist/optimize/lib/OptimizeApiClient.js +410 -0
  105. package/dist/optimize/lib/OptimizeApiClient.js.map +1 -0
  106. package/dist/optimize/lib/ReportResults.d.ts +23 -0
  107. package/dist/optimize/lib/ReportResults.js +28 -0
  108. package/dist/optimize/lib/ReportResults.js.map +1 -0
  109. package/dist/proto/zeebe.proto +996 -0
  110. package/dist/tasklist/index.d.ts +2 -0
  111. package/dist/tasklist/index.js +30 -0
  112. package/dist/tasklist/index.js.map +1 -0
  113. package/dist/tasklist/lib/TasklistApiClient.d.ts +104 -0
  114. package/dist/tasklist/lib/TasklistApiClient.js +233 -0
  115. package/dist/tasklist/lib/TasklistApiClient.js.map +1 -0
  116. package/dist/tasklist/lib/TasklistDto.d.ts +147 -0
  117. package/dist/tasklist/lib/TasklistDto.js +26 -0
  118. package/dist/tasklist/lib/TasklistDto.js.map +1 -0
  119. package/dist/tasklist/lib/utils.d.ts +15 -0
  120. package/dist/tasklist/lib/utils.js +25 -0
  121. package/dist/tasklist/lib/utils.js.map +1 -0
  122. package/dist/zeebe/index.d.ts +21 -0
  123. package/dist/zeebe/index.js +53 -0
  124. package/dist/zeebe/index.js.map +1 -0
  125. package/dist/zeebe/lib/BpmnParser.d.ts +38 -0
  126. package/dist/zeebe/lib/BpmnParser.js +274 -0
  127. package/dist/zeebe/lib/BpmnParser.js.map +1 -0
  128. package/dist/zeebe/lib/ConnectionFactory.d.ts +25 -0
  129. package/dist/zeebe/lib/ConnectionFactory.js +43 -0
  130. package/dist/zeebe/lib/ConnectionFactory.js.map +1 -0
  131. package/dist/zeebe/lib/ConnectionStatusEvent.d.ts +6 -0
  132. package/dist/zeebe/lib/ConnectionStatusEvent.js +10 -0
  133. package/dist/zeebe/lib/ConnectionStatusEvent.js.map +1 -0
  134. package/dist/zeebe/lib/GetPackageVersion.d.ts +1 -0
  135. package/dist/zeebe/lib/GetPackageVersion.js +32 -0
  136. package/dist/zeebe/lib/GetPackageVersion.js.map +1 -0
  137. package/dist/zeebe/lib/GrpcClient.d.ts +75 -0
  138. package/dist/zeebe/lib/GrpcClient.js +467 -0
  139. package/dist/zeebe/lib/GrpcClient.js.map +1 -0
  140. package/dist/zeebe/lib/GrpcError.d.ts +19 -0
  141. package/dist/zeebe/lib/GrpcError.js +23 -0
  142. package/dist/zeebe/lib/GrpcError.js.map +1 -0
  143. package/dist/zeebe/lib/GrpcMiddleware.d.ts +21 -0
  144. package/dist/zeebe/lib/GrpcMiddleware.js +78 -0
  145. package/dist/zeebe/lib/GrpcMiddleware.js.map +1 -0
  146. package/dist/zeebe/lib/MockStdOut.d.ts +7 -0
  147. package/dist/zeebe/lib/MockStdOut.js +19 -0
  148. package/dist/zeebe/lib/MockStdOut.js.map +1 -0
  149. package/dist/zeebe/lib/Queue.d.ts +8 -0
  150. package/dist/zeebe/lib/Queue.js +15 -0
  151. package/dist/zeebe/lib/Queue.js.map +1 -0
  152. package/dist/zeebe/lib/SimpleLogger.d.ts +8 -0
  153. package/dist/zeebe/lib/SimpleLogger.js +47 -0
  154. package/dist/zeebe/lib/SimpleLogger.js.map +1 -0
  155. package/dist/zeebe/lib/StatefulLogInterceptor.d.ts +29 -0
  156. package/dist/zeebe/lib/StatefulLogInterceptor.js +81 -0
  157. package/dist/zeebe/lib/StatefulLogInterceptor.js.map +1 -0
  158. package/dist/zeebe/lib/TypedEmitter.d.ts +16 -0
  159. package/dist/zeebe/lib/TypedEmitter.js +24 -0
  160. package/dist/zeebe/lib/TypedEmitter.js.map +1 -0
  161. package/dist/zeebe/lib/ZBJsonLogger.d.ts +5 -0
  162. package/dist/zeebe/lib/ZBJsonLogger.js +12 -0
  163. package/dist/zeebe/lib/ZBJsonLogger.js.map +1 -0
  164. package/dist/zeebe/lib/ZBLogger.d.ts +20 -0
  165. package/dist/zeebe/lib/ZBLogger.js +134 -0
  166. package/dist/zeebe/lib/ZBLogger.js.map +1 -0
  167. package/dist/zeebe/lib/ZBWorkerBase.d.ts +78 -0
  168. package/dist/zeebe/lib/ZBWorkerBase.js +417 -0
  169. package/dist/zeebe/lib/ZBWorkerBase.js.map +1 -0
  170. package/dist/zeebe/lib/cancelProcesses.d.ts +1 -0
  171. package/dist/zeebe/lib/cancelProcesses.js +40 -0
  172. package/dist/zeebe/lib/cancelProcesses.js.map +1 -0
  173. package/dist/zeebe/lib/createUniqueTaskType.d.ts +0 -0
  174. package/dist/zeebe/lib/createUniqueTaskType.js +65 -0
  175. package/dist/zeebe/lib/createUniqueTaskType.js.map +1 -0
  176. package/dist/zeebe/lib/index.d.ts +2 -0
  177. package/dist/zeebe/lib/index.js +19 -0
  178. package/dist/zeebe/lib/index.js.map +1 -0
  179. package/dist/zeebe/lib/interfaces-1.0.d.ts +303 -0
  180. package/dist/zeebe/lib/interfaces-1.0.js +5 -0
  181. package/dist/zeebe/lib/interfaces-1.0.js.map +1 -0
  182. package/dist/zeebe/lib/interfaces-grpc-1.0.d.ts +679 -0
  183. package/dist/zeebe/lib/interfaces-grpc-1.0.js +22 -0
  184. package/dist/zeebe/lib/interfaces-grpc-1.0.js.map +1 -0
  185. package/dist/zeebe/lib/interfaces-published-contract.d.ts +67 -0
  186. package/dist/zeebe/lib/interfaces-published-contract.js +3 -0
  187. package/dist/zeebe/lib/interfaces-published-contract.js.map +1 -0
  188. package/dist/zeebe/lib/stringifyVariables.d.ts +18 -0
  189. package/dist/zeebe/lib/stringifyVariables.js +28 -0
  190. package/dist/zeebe/lib/stringifyVariables.js.map +1 -0
  191. package/dist/zeebe/lib/utils.d.ts +7 -0
  192. package/dist/zeebe/lib/utils.js +48 -0
  193. package/dist/zeebe/lib/utils.js.map +1 -0
  194. package/dist/zeebe/types.d.ts +3 -0
  195. package/dist/zeebe/types.js +20 -0
  196. package/dist/zeebe/types.js.map +1 -0
  197. package/dist/zeebe/zb/ZBWorker.d.ts +7 -0
  198. package/dist/zeebe/zb/ZBWorker.js +73 -0
  199. package/dist/zeebe/zb/ZBWorker.js.map +1 -0
  200. package/dist/zeebe/zb/ZeebeGrpcClient.d.ts +587 -0
  201. package/dist/zeebe/zb/ZeebeGrpcClient.js +1021 -0
  202. package/dist/zeebe/zb/ZeebeGrpcClient.js.map +1 -0
  203. package/package.json +120 -30
  204. package/release.config.js +49 -0
  205. package/renovate.json +9 -0
  206. package/smoke-test/package-lock.json +29 -0
  207. package/smoke-test/package.json +15 -0
  208. package/smoke-test/smoke-test.js +45 -0
  209. package/test-d/index.test-d.ts +31 -0
  210. package/.github/workflows/build-docs.yml +0 -39
  211. package/.github/workflows/tag-and-publish.yml +0 -48
  212. package/.prettierignore +0 -2
  213. package/img/video.png +0 -0
  214. package/jest.config.js +0 -5
  215. package/src/__tests__/exports.spec.ts +0 -7
  216. package/src/index.ts +0 -17
  217. package/tsconfig.build.json +0 -8
  218. package/tsconfig.json +0 -10
  219. package/tsconfig.tsbuildinfo +0 -1
  220. package/typedoc.json +0 -10
@@ -0,0 +1,269 @@
1
+ import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
2
+ import { IOAuthProvider } from '../../oauth';
3
+ import { DashboardCollection, DashboardDefinition, EntityImportResponse, ReportCollection, ReportDataExporter, SingleProcessReport, Variable, VariableLabels } from './APIObjects';
4
+ /**
5
+ * @description The high-level API client for Optimize.
6
+ * @example
7
+ * ```
8
+ * const optimize = new OptimizeApiClient()
9
+ *
10
+ * async function main() {
11
+ * await optimize.enableSharing()
12
+ * const id = "8a7103a7-c086-48f8-b5b7-a7f83e864688"
13
+ * const res = await optimize.exportDashboardDefinitions([id])
14
+ * fs.writeFileSync('exported-dashboard.json', JSON.stringify(res, null, 2))
15
+ * }
16
+ *
17
+ * main()
18
+ * ```
19
+ */
20
+ export declare class OptimizeApiClient {
21
+ private userAgentString;
22
+ private rest;
23
+ private oAuthProvider;
24
+ /**
25
+ *
26
+ * @example
27
+ * ```
28
+ * const optimize = new OptimizeApiClient()
29
+ * ```
30
+ */
31
+ constructor(options?: {
32
+ config?: DeepPartial<CamundaPlatform8Configuration>;
33
+ oAuthProvider?: IOAuthProvider;
34
+ });
35
+ private getHeaders;
36
+ /**
37
+ * @description This API allows users to enable the sharing functionality for all reports and dashboards in Optimize.
38
+ *
39
+ * Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
40
+ *
41
+ * If sharing had been previously enabled and then disabled, re-enabling sharing will allow users to access previously shared URLs under the same address as before. Calling this endpoint when sharing is already enabled will have no effect.
42
+ *
43
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/configuration/enable-sharing/)
44
+ * @example
45
+ * ```typescript
46
+ * const client = new OptimizeApiClient()
47
+ * client.enableSharing()
48
+ * ```
49
+ */
50
+ enableSharing(): Promise<import("got").Response<string>>;
51
+ /**
52
+ * @description This API allows users to disable the sharing functionality for all reports and dashboards in Optimize.
53
+ *
54
+ * Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
55
+ *
56
+ * When sharing is disabled, previously shared URLs will no longer be accessible. Upon re-enabling sharing, the previously shared URLs will work once again under the same address as before. Calling this endpoint when sharing is already disabled will have no effect.
57
+ *
58
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/configuration/disable-sharing/)
59
+ * @example
60
+ * ```typescript
61
+ * const client = new OptimizeApiClient()
62
+ * client.disableSharing()
63
+ * ```
64
+ */
65
+ disableSharing(): Promise<import("got").Response<string>>;
66
+ /**
67
+ *
68
+ * @description This API allows users to retrieve all dashboard IDs from a given collection.
69
+ *
70
+ * The response contains a list of IDs of the dashboards existing in the collection with the given collection ID.
71
+ *
72
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/dashboard/get-dashboard-ids/)
73
+ *
74
+ * @param collectionId The ID of the collection for which to retrieve the dashboard IDs.
75
+ * @example
76
+ * ```
77
+ * const client = new OptimizeApiClient()
78
+ * const dashboardIds = await client.getDashboardIds(1234)
79
+ * ```
80
+ */
81
+ getDashboardIds(collectionId: number): Promise<DashboardCollection>;
82
+ /**
83
+ * @description This API allows users to export dashboard definitions which can later be imported into another Optimize system.
84
+ *
85
+ * Note that exporting a dashboard also exports all reports contained within the dashboard. The dashboards to be exported may be within a Collection or private entities, the API has access to both.
86
+ *
87
+ * The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
88
+ *
89
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/dashboard/export-dashboard-definitions/)
90
+ *
91
+ * @param dashboardIds Array of dashboard ids
92
+ * @example
93
+ * ```
94
+ * const client = new OptimizeApiClient()
95
+ * const dashboardDefs = await client.exportDashboardDefinitions(["123", "456"])
96
+ * ```
97
+ */
98
+ exportDashboardDefinitions(dashboardIds: string[]): Promise<Array<DashboardDefinition | SingleProcessReport>>;
99
+ /**
100
+ * @description This API allows users to retrieve all report IDs from a given collection. The response contains a list of IDs of the reports existing in the collection with the given collection ID.
101
+ *
102
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/get-report-ids/)
103
+ *
104
+ * @param collectionId the id of the collection
105
+ * @example
106
+ * ```
107
+ * const client = new OptimizeApiClient()
108
+ * const reports = await client.getReportIds(1234)
109
+ * ```
110
+ */
111
+ getReportIds(collectionId: number): Promise<ReportCollection>;
112
+ /**
113
+ * @description The report deletion API allows you to delete reports by ID from Optimize.
114
+ *
115
+ * [Camunda 8 documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/delete-report/)
116
+ *
117
+ * @param reportId The ID of the report you wish to delete
118
+ *
119
+ * @example
120
+ * ```
121
+ * const client = new OptimizeApiClient()
122
+ * client.deleteReport("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
123
+ * ```
124
+ */
125
+ deleteReport(reportId: string): Promise<string>;
126
+ /**
127
+ * @description This API allows users to export report definitions which can later be imported into another Optimize system. The reports to be exported may be within a collection or private entities, the API has access to both.
128
+ *
129
+ * The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
130
+ *
131
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/export-report-definitions/)
132
+ *
133
+ * @param reportIds array of report IDs
134
+ * @example
135
+ * ```
136
+ * const client = new OptimizeApiClient()
137
+ * const reportDefs = await client.exportReportDefinitions(["123", "456"])
138
+ * ```
139
+ */
140
+ exportReportDefinitions(reportIds: string[]): Promise<Array<SingleProcessReport>>;
141
+ /**
142
+ * @description The data export API allows users to export large amounts of data in a machine-readable format (JSON) from Optimize.
143
+ * @param reportId
144
+ * @param limit
145
+ * @param paginationTimeoutSec
146
+ * @example
147
+ * ```
148
+ * const client = new OptimizeApiClient()
149
+ * const exporter = client.exportReportResultData("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
150
+ * const page1 = await exporter.next()
151
+ * ```
152
+ */
153
+ exportReportResultData(reportId: string, limit?: number, paginationTimeoutSec?: number): ReportDataExporter;
154
+ /**
155
+ * @description With the external variable ingestion API, variable data held in external systems can be ingested into Optimize directly, without the need for these variables to be present in your Camunda platform data. This can be useful when external business data, which is relevant for process analysis in Optimize, is to be associated with specific process instances.
156
+ *
157
+ * Especially if this data changes over time, it is advisable to use this REST API to persist external variable updates to Optimize, as otherwise Optimize may not be aware of data changes in the external system.
158
+ * @param variables
159
+ * @example
160
+ * ```
161
+ * const variables = [
162
+ * {
163
+ * "id": "7689fced-2639-4408-9de1-cf8f72769f43",
164
+ * "name": "address",
165
+ * "type": "string",
166
+ * "value": "Main Street 1",
167
+ * "processInstanceId": "c6393461-02bb-4f62-a4b7-f2f8d9bbbac1",
168
+ * "processDefinitionKey": "shippingProcess"
169
+ * },
170
+ * {
171
+ * "id": "993f4e73-7f6a-46a6-bd45-f4f8e3470ba1",
172
+ * "name": "amount",
173
+ * "type": "integer",
174
+ * "value": "500",
175
+ * "processInstanceId": "8282ed49-2243-44df-be5e-1bf893755d8f",
176
+ * "processDefinitionKey": "orderProcess"
177
+ * }
178
+ * ]
179
+ * const client = new OptimizeApiClient()
180
+ * client.ingestExternalVariable(variables)
181
+ * ```
182
+ */
183
+ ingestExternalVariable(variables: Variable[]): Promise<unknown>;
184
+ /**
185
+ * @description The purpose of Health-Readiness REST API is to return information indicating whether Optimize is ready to be used.
186
+ *
187
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/health-readiness/)
188
+ *
189
+ * @example
190
+ * ```
191
+ * const client = new OptimizeApiClient()
192
+ * try {
193
+ * await client.getReadiness()
194
+ * console.log('Ready!')
195
+ * } catch (e: any) {
196
+ * console.log('Error calling readiness point: ' + e.code)
197
+ * }
198
+ * ```
199
+ */
200
+ getReadiness(): Promise<unknown>;
201
+ /**
202
+ * @description This API allows users to import entity definitions such as reports and dashboards into existing collections. These entity definitions may be obtained either using the report or dashboard export API or via the UI.
203
+ *
204
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/import-entities/)
205
+ *
206
+ * @example
207
+ * ```
208
+ * const entities = [
209
+ * {
210
+ * "id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
211
+ * "exportEntityType": "single_process_report",
212
+ * "name": "Number: Process instance duration",
213
+ * "sourceIndexVersion": 8,
214
+ * "collectionId": null,
215
+ * "data": {...}
216
+ * },
217
+ * {
218
+ * "id": "b0eb845-e8ed-4824-bd85-8cd69038f2f5",
219
+ * "exportEntityType": "dashboard",
220
+ * "name": "Dashboard 1",
221
+ * "sourceIndexVersion": 5,
222
+ * "reports": [
223
+ * {
224
+ * "id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
225
+ * ...
226
+ * }
227
+ * ],
228
+ * "availableFilters": [...],
229
+ * "collectionId": null
230
+ * }
231
+ * ]
232
+ * const client = new OptimizeApiClient()
233
+ * await client.importEntities(123, entities)
234
+ *```
235
+ */
236
+ importEntities(collectionId: number, entities: unknown): Promise<EntityImportResponse>;
237
+ /**
238
+ * @description With the variable labeling endpoint, variable labels can be added, updated, and deleted from Optimize.
239
+ *
240
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/variable-labeling/)
241
+ *
242
+ * @example
243
+ * ```
244
+ * const variableLabels = {
245
+ * "definitionKey": "bookrequest-1-tenant",
246
+ * "labels" : [
247
+ * {
248
+ * "variableName": "bookAvailable",
249
+ * "variableType": "Boolean",
250
+ * "variableLabel": "book availability"
251
+ * },
252
+ * {
253
+ * "variableName": "person.name",
254
+ * "variableType": "String",
255
+ * "variableLabel": "first and last name"
256
+ * },
257
+ * {
258
+ * "variableName": "person.hobbies._listSize",
259
+ * "variableType": "Long",
260
+ * "variableLabel": "amount of hobbies"
261
+ * }
262
+ * ]
263
+ * }
264
+ * const client = new OptimizeApiClient()
265
+ * await client.labelVariables(variableLabels)
266
+ * ```
267
+ */
268
+ labelVariables(variableLabels: VariableLabels): Promise<unknown>;
269
+ }
@@ -0,0 +1,410 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OptimizeApiClient = void 0;
7
+ const debug_1 = require("debug");
8
+ const got_1 = __importDefault(require("got"));
9
+ const lib_1 = require("../../lib");
10
+ const ReportResults_1 = require("./ReportResults");
11
+ const debug = (0, debug_1.debug)('camunda:optimize');
12
+ /**
13
+ * @description The high-level API client for Optimize.
14
+ * @example
15
+ * ```
16
+ * const optimize = new OptimizeApiClient()
17
+ *
18
+ * async function main() {
19
+ * await optimize.enableSharing()
20
+ * const id = "8a7103a7-c086-48f8-b5b7-a7f83e864688"
21
+ * const res = await optimize.exportDashboardDefinitions([id])
22
+ * fs.writeFileSync('exported-dashboard.json', JSON.stringify(res, null, 2))
23
+ * }
24
+ *
25
+ * main()
26
+ * ```
27
+ */
28
+ class OptimizeApiClient {
29
+ /**
30
+ *
31
+ * @example
32
+ * ```
33
+ * const optimize = new OptimizeApiClient()
34
+ * ```
35
+ */
36
+ constructor(options) {
37
+ const config = lib_1.CamundaEnvironmentConfigurator.mergeConfigWithEnvironment(options?.config ?? {});
38
+ this.userAgentString = (0, lib_1.createUserAgentString)(config);
39
+ const baseUrl = (0, lib_1.RequireConfiguration)(config.CAMUNDA_OPTIMIZE_BASE_URL, 'CAMUNDA_OPTIMIZE_BASE_URL');
40
+ this.oAuthProvider =
41
+ options?.oAuthProvider ?? (0, lib_1.constructOAuthProvider)(config);
42
+ const certificateAuthority = (0, lib_1.GetCertificateAuthority)(config);
43
+ this.rest = got_1.default.extend({
44
+ prefixUrl: `${baseUrl}/api`,
45
+ https: {
46
+ certificateAuthority,
47
+ },
48
+ hooks: {
49
+ beforeError: [
50
+ (error) => {
51
+ const { request } = error;
52
+ if (request) {
53
+ debug(`Error in request to ${request.options.url.href}`);
54
+ debug(`Request headers: ${JSON.stringify(request.options.headers)}`);
55
+ debug(`Error: ${error.code} - ${error.message}`);
56
+ // Attach more contextual information to the error object
57
+ error.message += ` (request to ${request.options.url.href})`;
58
+ }
59
+ return error;
60
+ },
61
+ ],
62
+ },
63
+ });
64
+ }
65
+ async getHeaders(auth = true) {
66
+ const token = await this.oAuthProvider.getToken('OPERATE');
67
+ const authHeader = auth
68
+ ? {
69
+ authorization: `Bearer ${token}`,
70
+ }
71
+ : {};
72
+ return {
73
+ 'content-type': 'application/json',
74
+ 'user-agent': this.userAgentString,
75
+ accept: '*/*',
76
+ ...authHeader,
77
+ };
78
+ }
79
+ /**
80
+ * @description This API allows users to enable the sharing functionality for all reports and dashboards in Optimize.
81
+ *
82
+ * Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
83
+ *
84
+ * If sharing had been previously enabled and then disabled, re-enabling sharing will allow users to access previously shared URLs under the same address as before. Calling this endpoint when sharing is already enabled will have no effect.
85
+ *
86
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/configuration/enable-sharing/)
87
+ * @example
88
+ * ```typescript
89
+ * const client = new OptimizeApiClient()
90
+ * client.enableSharing()
91
+ * ```
92
+ */
93
+ async enableSharing() {
94
+ const headers = await this.getHeaders();
95
+ return this.rest.post('public/share/enable', {
96
+ body: '',
97
+ headers,
98
+ });
99
+ }
100
+ /**
101
+ * @description This API allows users to disable the sharing functionality for all reports and dashboards in Optimize.
102
+ *
103
+ * Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
104
+ *
105
+ * When sharing is disabled, previously shared URLs will no longer be accessible. Upon re-enabling sharing, the previously shared URLs will work once again under the same address as before. Calling this endpoint when sharing is already disabled will have no effect.
106
+ *
107
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/configuration/disable-sharing/)
108
+ * @example
109
+ * ```typescript
110
+ * const client = new OptimizeApiClient()
111
+ * client.disableSharing()
112
+ * ```
113
+ */
114
+ async disableSharing() {
115
+ const headers = await this.getHeaders();
116
+ return this.rest.post('public/share/disable', {
117
+ body: '',
118
+ headers,
119
+ });
120
+ }
121
+ /**
122
+ *
123
+ * @description This API allows users to retrieve all dashboard IDs from a given collection.
124
+ *
125
+ * The response contains a list of IDs of the dashboards existing in the collection with the given collection ID.
126
+ *
127
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/dashboard/get-dashboard-ids/)
128
+ *
129
+ * @param collectionId The ID of the collection for which to retrieve the dashboard IDs.
130
+ * @example
131
+ * ```
132
+ * const client = new OptimizeApiClient()
133
+ * const dashboardIds = await client.getDashboardIds(1234)
134
+ * ```
135
+ */
136
+ async getDashboardIds(collectionId) {
137
+ const headers = await this.getHeaders();
138
+ return this.rest(`public/dashboard?collectionId=${collectionId}`, {
139
+ headers,
140
+ }).json();
141
+ }
142
+ // Camunda 7-only
143
+ // async deleteDashboard(dashboardId: string) {
144
+ // const headers = await this.getHeaders()
145
+ // return this.rest.delete(`dashboard/${dashboardId}`, {
146
+ // headers,
147
+ // ...this.gotOptions
148
+ // })
149
+ // }
150
+ /**
151
+ * @description This API allows users to export dashboard definitions which can later be imported into another Optimize system.
152
+ *
153
+ * Note that exporting a dashboard also exports all reports contained within the dashboard. The dashboards to be exported may be within a Collection or private entities, the API has access to both.
154
+ *
155
+ * The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
156
+ *
157
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/dashboard/export-dashboard-definitions/)
158
+ *
159
+ * @param dashboardIds Array of dashboard ids
160
+ * @example
161
+ * ```
162
+ * const client = new OptimizeApiClient()
163
+ * const dashboardDefs = await client.exportDashboardDefinitions(["123", "456"])
164
+ * ```
165
+ */
166
+ async exportDashboardDefinitions(dashboardIds) {
167
+ const headers = await this.getHeaders();
168
+ return this.rest
169
+ .post('public/export/dashboard/definition/json', {
170
+ body: JSON.stringify(dashboardIds),
171
+ headers,
172
+ })
173
+ .json();
174
+ }
175
+ /**
176
+ * @description This API allows users to retrieve all report IDs from a given collection. The response contains a list of IDs of the reports existing in the collection with the given collection ID.
177
+ *
178
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/get-report-ids/)
179
+ *
180
+ * @param collectionId the id of the collection
181
+ * @example
182
+ * ```
183
+ * const client = new OptimizeApiClient()
184
+ * const reports = await client.getReportIds(1234)
185
+ * ```
186
+ */
187
+ async getReportIds(collectionId) {
188
+ const headers = await this.getHeaders();
189
+ return this.rest(`report?collectionId=${collectionId}`, {
190
+ headers,
191
+ }).json();
192
+ }
193
+ /**
194
+ * @description The report deletion API allows you to delete reports by ID from Optimize.
195
+ *
196
+ * [Camunda 8 documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/delete-report/)
197
+ *
198
+ * @param reportId The ID of the report you wish to delete
199
+ *
200
+ * @example
201
+ * ```
202
+ * const client = new OptimizeApiClient()
203
+ * client.deleteReport("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
204
+ * ```
205
+ */
206
+ async deleteReport(reportId) {
207
+ const headers = await this.getHeaders();
208
+ return this.rest
209
+ .delete(`public/report/${reportId}`, {
210
+ headers,
211
+ })
212
+ .text();
213
+ }
214
+ /**
215
+ * @description This API allows users to export report definitions which can later be imported into another Optimize system. The reports to be exported may be within a collection or private entities, the API has access to both.
216
+ *
217
+ * The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
218
+ *
219
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/report/export-report-definitions/)
220
+ *
221
+ * @param reportIds array of report IDs
222
+ * @example
223
+ * ```
224
+ * const client = new OptimizeApiClient()
225
+ * const reportDefs = await client.exportReportDefinitions(["123", "456"])
226
+ * ```
227
+ */
228
+ async exportReportDefinitions(reportIds) {
229
+ const headers = await this.getHeaders();
230
+ return this.rest
231
+ .post('public/export/dashboard/definition/json', {
232
+ body: JSON.stringify(reportIds),
233
+ headers,
234
+ })
235
+ .json();
236
+ }
237
+ /**
238
+ * @description The data export API allows users to export large amounts of data in a machine-readable format (JSON) from Optimize.
239
+ * @param reportId
240
+ * @param limit
241
+ * @param paginationTimeoutSec
242
+ * @example
243
+ * ```
244
+ * const client = new OptimizeApiClient()
245
+ * const exporter = client.exportReportResultData("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
246
+ * const page1 = await exporter.next()
247
+ * ```
248
+ */
249
+ exportReportResultData(reportId, limit = 2, paginationTimeoutSec = 60) {
250
+ return new ReportResults_1.ReportResults({
251
+ getHeaders: () => this.getHeaders(),
252
+ rest: this.rest,
253
+ limit,
254
+ paginationTimeout: paginationTimeoutSec,
255
+ reportId,
256
+ });
257
+ }
258
+ // Camunda 7-only
259
+ // async ingestEventBatch(events: CloudEventV1<any>[]) {
260
+ // const body = JSON.stringify(events)
261
+ // const headers = await this.getHeaders()
262
+ // return this.rest.post(`ingestion/event/batch`, {
263
+ // body,
264
+ // headers,
265
+ // ...this.gotOptions
266
+ // }).json()
267
+ // }
268
+ /**
269
+ * @description With the external variable ingestion API, variable data held in external systems can be ingested into Optimize directly, without the need for these variables to be present in your Camunda platform data. This can be useful when external business data, which is relevant for process analysis in Optimize, is to be associated with specific process instances.
270
+ *
271
+ * Especially if this data changes over time, it is advisable to use this REST API to persist external variable updates to Optimize, as otherwise Optimize may not be aware of data changes in the external system.
272
+ * @param variables
273
+ * @example
274
+ * ```
275
+ * const variables = [
276
+ * {
277
+ * "id": "7689fced-2639-4408-9de1-cf8f72769f43",
278
+ * "name": "address",
279
+ * "type": "string",
280
+ * "value": "Main Street 1",
281
+ * "processInstanceId": "c6393461-02bb-4f62-a4b7-f2f8d9bbbac1",
282
+ * "processDefinitionKey": "shippingProcess"
283
+ * },
284
+ * {
285
+ * "id": "993f4e73-7f6a-46a6-bd45-f4f8e3470ba1",
286
+ * "name": "amount",
287
+ * "type": "integer",
288
+ * "value": "500",
289
+ * "processInstanceId": "8282ed49-2243-44df-be5e-1bf893755d8f",
290
+ * "processDefinitionKey": "orderProcess"
291
+ * }
292
+ * ]
293
+ * const client = new OptimizeApiClient()
294
+ * client.ingestExternalVariable(variables)
295
+ * ```
296
+ */
297
+ async ingestExternalVariable(variables) {
298
+ const headers = await this.getHeaders();
299
+ return this.rest
300
+ .post('ingestion/variable', {
301
+ body: JSON.stringify(variables),
302
+ headers,
303
+ })
304
+ .json();
305
+ }
306
+ /**
307
+ * @description The purpose of Health-Readiness REST API is to return information indicating whether Optimize is ready to be used.
308
+ *
309
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/health-readiness/)
310
+ *
311
+ * @example
312
+ * ```
313
+ * const client = new OptimizeApiClient()
314
+ * try {
315
+ * await client.getReadiness()
316
+ * console.log('Ready!')
317
+ * } catch (e: any) {
318
+ * console.log('Error calling readiness point: ' + e.code)
319
+ * }
320
+ * ```
321
+ */
322
+ async getReadiness() {
323
+ const headers = await this.getHeaders(false);
324
+ return this.rest('readyz', {
325
+ headers,
326
+ }).json();
327
+ }
328
+ /**
329
+ * @description This API allows users to import entity definitions such as reports and dashboards into existing collections. These entity definitions may be obtained either using the report or dashboard export API or via the UI.
330
+ *
331
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/import-entities/)
332
+ *
333
+ * @example
334
+ * ```
335
+ * const entities = [
336
+ * {
337
+ * "id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
338
+ * "exportEntityType": "single_process_report",
339
+ * "name": "Number: Process instance duration",
340
+ * "sourceIndexVersion": 8,
341
+ * "collectionId": null,
342
+ * "data": {...}
343
+ * },
344
+ * {
345
+ * "id": "b0eb845-e8ed-4824-bd85-8cd69038f2f5",
346
+ * "exportEntityType": "dashboard",
347
+ * "name": "Dashboard 1",
348
+ * "sourceIndexVersion": 5,
349
+ * "reports": [
350
+ * {
351
+ * "id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
352
+ * ...
353
+ * }
354
+ * ],
355
+ * "availableFilters": [...],
356
+ * "collectionId": null
357
+ * }
358
+ * ]
359
+ * const client = new OptimizeApiClient()
360
+ * await client.importEntities(123, entities)
361
+ *```
362
+ */
363
+ async importEntities(collectionId, entities) {
364
+ const headers = await this.getHeaders();
365
+ return this.rest(`public/import?collectionId=${collectionId}`, {
366
+ headers,
367
+ body: JSON.stringify(entities),
368
+ }).json();
369
+ }
370
+ /**
371
+ * @description With the variable labeling endpoint, variable labels can be added, updated, and deleted from Optimize.
372
+ *
373
+ * [Camunda 8 Documentation](https://docs.camunda.io/optimize/apis-clients/optimize-api/variable-labeling/)
374
+ *
375
+ * @example
376
+ * ```
377
+ * const variableLabels = {
378
+ * "definitionKey": "bookrequest-1-tenant",
379
+ * "labels" : [
380
+ * {
381
+ * "variableName": "bookAvailable",
382
+ * "variableType": "Boolean",
383
+ * "variableLabel": "book availability"
384
+ * },
385
+ * {
386
+ * "variableName": "person.name",
387
+ * "variableType": "String",
388
+ * "variableLabel": "first and last name"
389
+ * },
390
+ * {
391
+ * "variableName": "person.hobbies._listSize",
392
+ * "variableType": "Long",
393
+ * "variableLabel": "amount of hobbies"
394
+ * }
395
+ * ]
396
+ * }
397
+ * const client = new OptimizeApiClient()
398
+ * await client.labelVariables(variableLabels)
399
+ * ```
400
+ */
401
+ async labelVariables(variableLabels) {
402
+ const headers = await this.getHeaders();
403
+ return this.rest('public/variables/labels', {
404
+ headers,
405
+ body: JSON.stringify(variableLabels),
406
+ }).json();
407
+ }
408
+ }
409
+ exports.OptimizeApiClient = OptimizeApiClient;
410
+ //# sourceMappingURL=OptimizeApiClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptimizeApiClient.js","sourceRoot":"","sources":["../../../src/optimize/lib/OptimizeApiClient.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAkC;AAClC,8CAAqB;AAErB,mCAQkB;AAalB,mDAA+C;AAE/C,MAAM,KAAK,GAAG,IAAA,aAAC,EAAC,kBAAkB,CAAC,CAAA;AAEnC;;;;;;;;;;;;;;;GAeG;AACH,MAAa,iBAAiB;IAK7B;;;;;;OAMG;IACH,YAAY,OAGX;QACA,MAAM,MAAM,GAAG,oCAA8B,CAAC,0BAA0B,CACvE,OAAO,EAAE,MAAM,IAAI,EAAE,CACrB,CAAA;QACD,IAAI,CAAC,eAAe,GAAG,IAAA,2BAAqB,EAAC,MAAM,CAAC,CAAA;QACpD,MAAM,OAAO,GAAG,IAAA,0BAAoB,EACnC,MAAM,CAAC,yBAAyB,EAChC,2BAA2B,CAC3B,CAAA;QACD,IAAI,CAAC,aAAa;YACjB,OAAO,EAAE,aAAa,IAAI,IAAA,4BAAsB,EAAC,MAAM,CAAC,CAAA;QAEzD,MAAM,oBAAoB,GAAG,IAAA,6BAAuB,EAAC,MAAM,CAAC,CAAA;QAE5D,IAAI,CAAC,IAAI,GAAG,aAAG,CAAC,MAAM,CAAC;YACtB,SAAS,EAAE,GAAG,OAAO,MAAM;YAC3B,KAAK,EAAE;gBACN,oBAAoB;aACpB;YACD,KAAK,EAAE;gBACN,WAAW,EAAE;oBACZ,CAAC,KAAK,EAAE,EAAE;wBACT,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;wBACzB,IAAI,OAAO,EAAE,CAAC;4BACb,KAAK,CAAC,uBAAuB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;4BACxD,KAAK,CACJ,oBAAoB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAC7D,CAAA;4BACD,K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