@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,210 @@
1
+ import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
2
+ import { IOAuthProvider } from '../../oauth';
3
+ import * as Dto from './ModelerDto';
4
+ export declare class ModelerApiClient {
5
+ private userAgentString;
6
+ private oAuthProvider;
7
+ private rest;
8
+ constructor(options?: {
9
+ config?: DeepPartial<CamundaPlatform8Configuration>;
10
+ oAuthProvider?: IOAuthProvider;
11
+ });
12
+ private getHeaders;
13
+ private decodeResponseOrThrow;
14
+ /**
15
+ * Adds a new collaborator to a project or modifies the permission level of an existing collaborator.
16
+ * Note: Only users that are part of the authorized organization (see GET /api/v1/info) and logged in to Web Modeler at least once can be added to a project.
17
+ */
18
+ addCollaborator(req: Dto.CreateCollaboratorDto): Promise<null>;
19
+ /**
20
+ * Searches for collaborators.
21
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
22
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
23
+ * page specifies the page number to return.
24
+ * size specifies the number of items per page. The default value is 10.
25
+ */
26
+ searchCollaborators(req: Dto.PubSearchDtoProjectCollaboratorDto): Promise<Dto.PubSearchResultDtoProjectCollaboratorDto>;
27
+ deleteCollaborator({ email, projectId, }: {
28
+ projectId: string;
29
+ email: string;
30
+ }): Promise<null>;
31
+ /**
32
+ * This endpoint creates a file.
33
+ *
34
+ * To create a file, specify projectId and/or folderId:
35
+ *
36
+ * When only folderId is given, the file will be created in that folder. The folder can be in any project of the same organization.
37
+ *
38
+ * When projectId is given and folderId is either null or omitted altogether, the file will be created in the root of the project.
39
+ *
40
+ * When projectId and folderId are both given, they must be consistent - i.e. the folder is in the project.
41
+ *
42
+ * For connector templates, the following constraints apply:
43
+ *
44
+ * The value of content.$schema will be replaced with https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json and validated against it.
45
+ *
46
+ * The value of name takes precedence over content.name. In case of mismatch, the latter will be adjusted to match the former automatically.
47
+ *
48
+ * The value of content.id will be replaced with the file id generated by Web Modeler.
49
+ *
50
+ * The value of content.version is managed by Web Modeler and will be updated automatically.
51
+ *
52
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
53
+ */
54
+ createFile(req: Dto.CreateFileDto): Promise<Dto.FileMetadataDto>;
55
+ /**
56
+ * Retrieves a file.
57
+ *
58
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an
59
+ * escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping
60
+ * facilitates the processing of path-like structures within file and folder names.
61
+ *
62
+ * Does this throw if it is not found?
63
+ */
64
+ getFile(fileId: string): Promise<Dto.FileDto>;
65
+ /**
66
+ * Deletes a file.
67
+ * Note: Deleting a file will also delete other resources attached to the file (comments, call activity/business rule task links, milestones and shares) which might have side-effects. Deletion of resources is recursive and cannot be undone.
68
+ */
69
+ deleteFile(fileId: string): Promise<null>;
70
+ /**
71
+ * Updates the content, name, or location of a file, or all at the same time.
72
+ *
73
+ * To move a file, specify projectId and/or folderId:
74
+ * When only folderId is given, the file will be moved to that folder. The folder can be in another project of the same organization.
75
+ * When projectId is given and folderId is either null or omitted altogether, the file will be moved to the root of the project.
76
+ * When projectId and folderId are both given, they must be consistent - i.e. the new parent folder is in the new project.
77
+ * The field revision holds the current revision of the file. This is used for detecting and preventing concurrent modifications.
78
+ * For connector templates, the following constraints apply:
79
+ * The value of content.$schema is not updatable.
80
+ * The value of content.name can only be changed via name.
81
+ * The value of content.id is not updatable.
82
+ * The value of content.version is managed by Web Modeler and will be updated automatically.
83
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
84
+ */
85
+ updateFile(fileId: string, update: Dto.UpdateFileDto): Promise<Dto.FileMetadataDto>;
86
+ /**
87
+ * Searches for files.
88
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
89
+ *
90
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
91
+ *
92
+ * You can use suffixes to match date ranges:
93
+ *
94
+ * Modifier Description
95
+ * ||/y Within a year
96
+ * ||/M Within a month
97
+ * ||/w Within a week
98
+ * ||/d Within a day
99
+ * ||/h Within an hour
100
+ * ||/m Within a minute
101
+ * ||/s Within a second
102
+ *
103
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
104
+ *
105
+ * page specifies the page number to return.
106
+ * size specifies the number of items per page. The default value is 10.
107
+ *
108
+ * Note: The simplePath transform any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
109
+ */
110
+ searchFiles(req: Dto.PubSearchDtoFileMetadataDto): Promise<Dto.PubSearchResultDtoFileMetadataDto>;
111
+ /**
112
+ *
113
+ * Creates a new folder.
114
+ *
115
+ * When only parentId is given, the folder will be created in that folder. The folder can be in any project of the same organization.
116
+ *
117
+ * When projectId is given and parentId is either null or omitted altogether, the folder will be created in the root of the project.
118
+ *
119
+ * When projectId and parentId are both given, they must be consistent - i.e. the parent folder is in the project.
120
+ */
121
+ createFolder(req: Dto.CreateFolderDto): Promise<Dto.FolderMetadataDto>;
122
+ getFolder(folderId: string): Promise<Dto.FolderDto>;
123
+ /**
124
+ *
125
+ * Deletes an empty folder. A folder is considered empty if there are no files in it. Deletion of resources is recursive and cannot be undone.
126
+ */
127
+ deleteFolder(folderId: string): Promise<null>;
128
+ /**
129
+ * Updates the name or location of a folder, or both at the same time.
130
+ *
131
+ * To move a folder, specify projectId and/or parentId:
132
+ *
133
+ * When only parentId is given, the file will be moved to that folder. The folder must keep in the same organization.
134
+ *
135
+ * When projectId is given and parentId is either null or omitted altogether, the file will be moved to the root of the project.
136
+ *
137
+ * When projectId and parentId are both given, they must be consistent - i.e. the new parent folder is in the new project.
138
+ */
139
+ updateFolder(folderId: string, update: Dto.UpdateFolderDto): Promise<Dto.FolderMetadataDto>;
140
+ getInfo(): Promise<Dto.InfoDto>;
141
+ createMilestone(req: Dto.CreateMilestoneDto): Promise<Dto.MilestoneMetadataDto>;
142
+ getMilestone(milestoneId: string): Promise<Dto.MilestoneDto>;
143
+ /**
144
+ * Deletion of resources is recursive and cannot be undone.
145
+ */
146
+ deleteMilestone(milestoneId: string): Promise<string | null>;
147
+ /**
148
+ * Returns a link to a visual comparison between two milestones where the milestone referenced by milestone1Id acts as a baseline to compare the milestone referenced by milestone2Id against.
149
+ */
150
+ getMilestoneComparison(milestone1Id: string, milestone2Id: string): Promise<string>;
151
+ /**
152
+ * Searches for milestones.
153
+ *
154
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
155
+ *
156
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
157
+ *
158
+ * You can use suffixes to match date ranges:
159
+ *
160
+ * Modifier Description
161
+ * ||/y Within a year
162
+ * ||/M Within a month
163
+ * ||/w Within a week
164
+ * ||/d Within a day
165
+ * ||/h Within an hour
166
+ * ||/m Within a minute
167
+ * ||/s Within a second
168
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
169
+ *
170
+ * page specifies the page number to return.
171
+ *
172
+ * size specifies the number of items per page. The default value is 10.
173
+ */
174
+ searchMilestones(req: Dto.PubSearchDtoMilestoneMetadataDto): Promise<Dto.PubSearchResultDtoMilestoneMetadataDto>;
175
+ /**
176
+ * Creates a new project. This project will be created without any collaborators, so it will not be visible in the UI by default. To assign collaborators, use `addCollaborator()`.
177
+ */
178
+ createProject(name: string): Promise<Dto.ProjectMetadataDto>;
179
+ getProject(projectId: string): Promise<Dto.ProjectDto>;
180
+ /**
181
+ * This endpoint deletes an empty project. A project is considered empty if there are no files in it. Deletion of resources is recursive and cannot be undone.
182
+ */
183
+ deleteProject(projectId: string): Promise<string | null>;
184
+ renameProject(projectId: string, name: string): Promise<Dto.ProjectMetadataDto>;
185
+ /**
186
+ * Searches for projects.
187
+ *
188
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
189
+ *
190
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
191
+ *
192
+ * You can use suffixes to match date ranges:
193
+ *
194
+ * Modifier Description
195
+ * ||/y Within a year
196
+ * ||/M Within a month
197
+ * ||/w Within a week
198
+ * ||/d Within a day
199
+ * ||/h Within an hour
200
+ * ||/m Within a minute
201
+ * ||/s Within a second
202
+ *
203
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
204
+ *
205
+ * page specifies the page number to return.
206
+ *
207
+ * size specifies the number of items per page. The default value is 10.
208
+ */
209
+ searchProjects(req: Dto.PubSearchDtoProjectMetadataDto): Promise<Dto.PubSearchResultDtoProjectMetadataDto>;
210
+ }
@@ -0,0 +1,417 @@
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.ModelerApiClient = void 0;
7
+ const debug_1 = __importDefault(require("debug"));
8
+ const got_1 = __importDefault(require("got"));
9
+ const lib_1 = require("../../lib");
10
+ const debug = (0, debug_1.default)('camunda:modeler');
11
+ const API_VERSION = 'v1';
12
+ class ModelerApiClient {
13
+ constructor(options) {
14
+ const config = lib_1.CamundaEnvironmentConfigurator.mergeConfigWithEnvironment(options?.config ?? {});
15
+ const modelerApiUrl = config.CAMUNDA_MODELER_BASE_URL ?? 'https://modeler.cloud.camunda.io/api';
16
+ this.oAuthProvider =
17
+ options?.oAuthProvider ?? (0, lib_1.constructOAuthProvider)(config);
18
+ this.userAgentString = (0, lib_1.createUserAgentString)(config);
19
+ const prefixUrl = `${modelerApiUrl}/${API_VERSION}`;
20
+ const certificateAuthority = (0, lib_1.GetCertificateAuthority)(config);
21
+ this.rest = got_1.default.extend({
22
+ prefixUrl,
23
+ https: {
24
+ certificateAuthority,
25
+ },
26
+ responseType: 'json',
27
+ hooks: {
28
+ beforeError: [
29
+ (error) => {
30
+ const { request } = error;
31
+ if (request) {
32
+ debug(`Error in request to ${request.options.url.href}`);
33
+ debug(`Request headers: ${JSON.stringify(request.options.headers)}`);
34
+ debug(`Error: ${error.code} - ${error.message}`);
35
+ // Attach more contextual information to the error object
36
+ error.message += ` (request to ${request.options.url.href})`;
37
+ }
38
+ return error;
39
+ },
40
+ ],
41
+ },
42
+ });
43
+ debug(`baseUrl: ${prefixUrl}`);
44
+ }
45
+ async getHeaders() {
46
+ const token = await this.oAuthProvider.getToken('MODELER');
47
+ const auth = `Bearer ${token}`;
48
+ const headers = {
49
+ 'content-type': 'application/json',
50
+ authorization: auth,
51
+ 'user-agent': this.userAgentString,
52
+ accept: '*/*',
53
+ };
54
+ debug(auth);
55
+ return headers;
56
+ }
57
+ decodeResponseOrThrow(res) {
58
+ if (res.statusCode === 200) {
59
+ return res.body;
60
+ }
61
+ // 204: No Content
62
+ if (res.statusCode === 204) {
63
+ return null;
64
+ }
65
+ const err = new Error(res.statusMessage);
66
+ err.code = res.statusCode;
67
+ throw err;
68
+ }
69
+ /**
70
+ * Adds a new collaborator to a project or modifies the permission level of an existing collaborator.
71
+ * Note: Only users that are part of the authorized organization (see GET /api/v1/info) and logged in to Web Modeler at least once can be added to a project.
72
+ */
73
+ async addCollaborator(req) {
74
+ const headers = await this.getHeaders();
75
+ return got_1.default
76
+ .put(`collaborators`, {
77
+ headers,
78
+ body: JSON.stringify(req),
79
+ })
80
+ .then(this.decodeResponseOrThrow);
81
+ }
82
+ /**
83
+ * Searches for collaborators.
84
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
85
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
86
+ * page specifies the page number to return.
87
+ * size specifies the number of items per page. The default value is 10.
88
+ */
89
+ async searchCollaborators(req) {
90
+ const headers = await this.getHeaders();
91
+ return got_1.default
92
+ .post(`collaborators/search`, {
93
+ headers,
94
+ body: JSON.stringify(req),
95
+ })
96
+ .then(this.decodeResponseOrThrow);
97
+ }
98
+ async deleteCollaborator({ email, projectId, }) {
99
+ const headers = await this.getHeaders();
100
+ return this.rest
101
+ .delete(`project/${projectId}collaborators/${email}`, {
102
+ headers,
103
+ })
104
+ .then(this.decodeResponseOrThrow);
105
+ }
106
+ /**
107
+ * This endpoint creates a file.
108
+ *
109
+ * To create a file, specify projectId and/or folderId:
110
+ *
111
+ * When only folderId is given, the file will be created in that folder. The folder can be in any project of the same organization.
112
+ *
113
+ * When projectId is given and folderId is either null or omitted altogether, the file will be created in the root of the project.
114
+ *
115
+ * When projectId and folderId are both given, they must be consistent - i.e. the folder is in the project.
116
+ *
117
+ * For connector templates, the following constraints apply:
118
+ *
119
+ * The value of content.$schema will be replaced with https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json and validated against it.
120
+ *
121
+ * The value of name takes precedence over content.name. In case of mismatch, the latter will be adjusted to match the former automatically.
122
+ *
123
+ * The value of content.id will be replaced with the file id generated by Web Modeler.
124
+ *
125
+ * The value of content.version is managed by Web Modeler and will be updated automatically.
126
+ *
127
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
128
+ */
129
+ async createFile(req) {
130
+ const headers = await this.getHeaders();
131
+ return this.rest
132
+ .post(`files`, {
133
+ headers,
134
+ body: JSON.stringify(req),
135
+ })
136
+ .then(this.decodeResponseOrThrow);
137
+ }
138
+ /**
139
+ * Retrieves a file.
140
+ *
141
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an
142
+ * escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping
143
+ * facilitates the processing of path-like structures within file and folder names.
144
+ *
145
+ * Does this throw if it is not found?
146
+ */
147
+ async getFile(fileId) {
148
+ const headers = await this.getHeaders();
149
+ return this.rest(`files/${fileId}`, {
150
+ headers,
151
+ }).then(this.decodeResponseOrThrow);
152
+ }
153
+ /**
154
+ * Deletes a file.
155
+ * Note: Deleting a file will also delete other resources attached to the file (comments, call activity/business rule task links, milestones and shares) which might have side-effects. Deletion of resources is recursive and cannot be undone.
156
+ */
157
+ async deleteFile(fileId) {
158
+ const headers = await this.getHeaders();
159
+ return this.rest(`files/${fileId}`, {
160
+ headers,
161
+ }).then(this.decodeResponseOrThrow);
162
+ }
163
+ /**
164
+ * Updates the content, name, or location of a file, or all at the same time.
165
+ *
166
+ * To move a file, specify projectId and/or folderId:
167
+ * When only folderId is given, the file will be moved to that folder. The folder can be in another project of the same organization.
168
+ * When projectId is given and folderId is either null or omitted altogether, the file will be moved to the root of the project.
169
+ * When projectId and folderId are both given, they must be consistent - i.e. the new parent folder is in the new project.
170
+ * The field revision holds the current revision of the file. This is used for detecting and preventing concurrent modifications.
171
+ * For connector templates, the following constraints apply:
172
+ * The value of content.$schema is not updatable.
173
+ * The value of content.name can only be changed via name.
174
+ * The value of content.id is not updatable.
175
+ * The value of content.version is managed by Web Modeler and will be updated automatically.
176
+ * Note: The simplePath transforms any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
177
+ */
178
+ async updateFile(fileId, update) {
179
+ const headers = await this.getHeaders();
180
+ return this.rest(`files/${fileId}`, {
181
+ headers,
182
+ body: JSON.stringify(update),
183
+ }).then(this.decodeResponseOrThrow);
184
+ }
185
+ /**
186
+ * Searches for files.
187
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
188
+ *
189
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
190
+ *
191
+ * You can use suffixes to match date ranges:
192
+ *
193
+ * Modifier Description
194
+ * ||/y Within a year
195
+ * ||/M Within a month
196
+ * ||/w Within a week
197
+ * ||/d Within a day
198
+ * ||/h Within an hour
199
+ * ||/m Within a minute
200
+ * ||/s Within a second
201
+ *
202
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
203
+ *
204
+ * page specifies the page number to return.
205
+ * size specifies the number of items per page. The default value is 10.
206
+ *
207
+ * Note: The simplePath transform any occurrences of slashes ("/") in file and folder names into an escape sequence consisting of a backslash followed by a slash ("\/"). This form of escaping facilitates the processing of path-like structures within file and folder names.
208
+ */
209
+ async searchFiles(req) {
210
+ const headers = await this.getHeaders();
211
+ return this.rest(`files/search`, {
212
+ headers,
213
+ body: JSON.stringify(req),
214
+ }).then(this.decodeResponseOrThrow);
215
+ }
216
+ /**
217
+ *
218
+ * Creates a new folder.
219
+ *
220
+ * When only parentId is given, the folder will be created in that folder. The folder can be in any project of the same organization.
221
+ *
222
+ * When projectId is given and parentId is either null or omitted altogether, the folder will be created in the root of the project.
223
+ *
224
+ * When projectId and parentId are both given, they must be consistent - i.e. the parent folder is in the project.
225
+ */
226
+ async createFolder(req) {
227
+ const headers = await this.getHeaders();
228
+ return this.rest
229
+ .post(`folders`, {
230
+ headers,
231
+ body: JSON.stringify(req),
232
+ })
233
+ .then(this.decodeResponseOrThrow);
234
+ }
235
+ async getFolder(folderId) {
236
+ const headers = await this.getHeaders();
237
+ return this.rest(`folders/${folderId}`, {
238
+ headers,
239
+ }).then(this.decodeResponseOrThrow);
240
+ }
241
+ /**
242
+ *
243
+ * Deletes an empty folder. A folder is considered empty if there are no files in it. Deletion of resources is recursive and cannot be undone.
244
+ */
245
+ async deleteFolder(folderId) {
246
+ const headers = await this.getHeaders();
247
+ return this.rest
248
+ .delete(`folders/${folderId}`, {
249
+ headers,
250
+ })
251
+ .then(this.decodeResponseOrThrow);
252
+ }
253
+ /**
254
+ * Updates the name or location of a folder, or both at the same time.
255
+ *
256
+ * To move a folder, specify projectId and/or parentId:
257
+ *
258
+ * When only parentId is given, the file will be moved to that folder. The folder must keep in the same organization.
259
+ *
260
+ * When projectId is given and parentId is either null or omitted altogether, the file will be moved to the root of the project.
261
+ *
262
+ * When projectId and parentId are both given, they must be consistent - i.e. the new parent folder is in the new project.
263
+ */
264
+ async updateFolder(folderId, update) {
265
+ const headers = await this.getHeaders();
266
+ return this.rest
267
+ .patch(`folders/${folderId}`, {
268
+ headers,
269
+ body: JSON.stringify(update),
270
+ })
271
+ .then(this.decodeResponseOrThrow);
272
+ }
273
+ async getInfo() {
274
+ const headers = await this.getHeaders();
275
+ return this.rest(`info`, {
276
+ headers,
277
+ }).then(this.decodeResponseOrThrow);
278
+ }
279
+ async createMilestone(req) {
280
+ const headers = await this.getHeaders();
281
+ return this.rest
282
+ .post(`milestones`, {
283
+ headers,
284
+ body: JSON.stringify(req),
285
+ })
286
+ .then(this.decodeResponseOrThrow);
287
+ }
288
+ async getMilestone(milestoneId) {
289
+ const headers = await this.getHeaders();
290
+ return this.rest(`milestones/${milestoneId}`, {
291
+ headers,
292
+ }).then(this.decodeResponseOrThrow);
293
+ }
294
+ /**
295
+ * Deletion of resources is recursive and cannot be undone.
296
+ */
297
+ async deleteMilestone(milestoneId) {
298
+ const headers = await this.getHeaders();
299
+ return this.rest(`milestones/${milestoneId}`, {
300
+ headers,
301
+ }).then(this.decodeResponseOrThrow);
302
+ }
303
+ /**
304
+ * Returns a link to a visual comparison between two milestones where the milestone referenced by milestone1Id acts as a baseline to compare the milestone referenced by milestone2Id against.
305
+ */
306
+ async getMilestoneComparison(milestone1Id, milestone2Id) {
307
+ const headers = await this.getHeaders();
308
+ return this.rest(`milestones/compare/${milestone1Id}...${milestone2Id}`, {
309
+ headers,
310
+ }).then(this.decodeResponseOrThrow);
311
+ }
312
+ /**
313
+ * Searches for milestones.
314
+ *
315
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
316
+ *
317
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
318
+ *
319
+ * You can use suffixes to match date ranges:
320
+ *
321
+ * Modifier Description
322
+ * ||/y Within a year
323
+ * ||/M Within a month
324
+ * ||/w Within a week
325
+ * ||/d Within a day
326
+ * ||/h Within an hour
327
+ * ||/m Within a minute
328
+ * ||/s Within a second
329
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
330
+ *
331
+ * page specifies the page number to return.
332
+ *
333
+ * size specifies the number of items per page. The default value is 10.
334
+ */
335
+ async searchMilestones(req) {
336
+ const headers = await this.getHeaders();
337
+ return this.rest
338
+ .post(`milestones/search`, {
339
+ headers,
340
+ body: JSON.stringify(req),
341
+ })
342
+ .then(this.decodeResponseOrThrow);
343
+ }
344
+ /**
345
+ * Creates a new project. This project will be created without any collaborators, so it will not be visible in the UI by default. To assign collaborators, use `addCollaborator()`.
346
+ */
347
+ async createProject(name) {
348
+ const headers = await this.getHeaders();
349
+ return this.rest
350
+ .post(`projects`, {
351
+ headers,
352
+ body: JSON.stringify({ name }),
353
+ })
354
+ .then(this.decodeResponseOrThrow);
355
+ }
356
+ async getProject(projectId) {
357
+ const headers = await this.getHeaders();
358
+ return this.rest(`projects/${projectId}`, {
359
+ headers,
360
+ }).then(this.decodeResponseOrThrow);
361
+ }
362
+ /**
363
+ * This endpoint deletes an empty project. A project is considered empty if there are no files in it. Deletion of resources is recursive and cannot be undone.
364
+ */
365
+ async deleteProject(projectId) {
366
+ const headers = await this.getHeaders();
367
+ return this.rest
368
+ .delete(`projects/${projectId}`, {
369
+ headers,
370
+ })
371
+ .then(this.decodeResponseOrThrow);
372
+ }
373
+ async renameProject(projectId, name) {
374
+ const headers = await this.getHeaders();
375
+ return this.rest
376
+ .patch(`projects/${projectId}`, {
377
+ headers,
378
+ body: JSON.stringify({ name }),
379
+ })
380
+ .then(this.decodeResponseOrThrow);
381
+ }
382
+ /**
383
+ * Searches for projects.
384
+ *
385
+ * filter specifies which fields should match. Only items that match the given fields will be returned.
386
+ *
387
+ * Note: Date fields need to be specified in a format compatible with java.time.ZonedDateTime; for example 2023-09-20T11:31:20.206801604Z.
388
+ *
389
+ * You can use suffixes to match date ranges:
390
+ *
391
+ * Modifier Description
392
+ * ||/y Within a year
393
+ * ||/M Within a month
394
+ * ||/w Within a week
395
+ * ||/d Within a day
396
+ * ||/h Within an hour
397
+ * ||/m Within a minute
398
+ * ||/s Within a second
399
+ *
400
+ * sort specifies by which fields and direction (ASC/DESC) the result should be sorted.
401
+ *
402
+ * page specifies the page number to return.
403
+ *
404
+ * size specifies the number of items per page. The default value is 10.
405
+ */
406
+ async searchProjects(req) {
407
+ const headers = await this.getHeaders();
408
+ return this.rest
409
+ .post(`projects/search`, {
410
+ headers,
411
+ body: JSON.stringify(req),
412
+ })
413
+ .then(this.decodeResponseOrThrow);
414
+ }
415
+ }
416
+ exports.ModelerApiClient = ModelerApiClient;
417
+ //# sourceMappingURL=ModelerAPIClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelerAPIClient.js","sourceRoot":"","sources":["../../../src/modeler/lib/ModelerAPIClient.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqB;AACrB,8CAAmC;AAEnC,mCAOkB;AAKlB,MAAM,KAAK,GAAG,IAAA,eAAC,EAAC,iBAAiB,CAAC,CAAA;AAElC,MAAM,WAAW,GAAG,IAAI,CAAA;AAExB,MAAa,gBAAgB;IAK5B,YAAY,OAGX;QACA,MAAM,MAAM,GAAG,oCAA8B,CAAC,0BAA0B,CACvE,OAAO,EAAE,MAAM,IAAI,EAAE,CACrB,CAAA;QACD,MAAM,aAAa,GAClB,MAAM,CAAC,wBAAwB,IAAI,sCAAsC,CAAA;QAC1E,IAAI,CAAC,aAAa;YAC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