@itentialopensource/adapter-jira 1.7.4 → 1.7.6

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 (183) hide show
  1. package/AUTH.md +39 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +9587 -0
  4. package/CHANGELOG.md +16 -0
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +88 -74
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +225 -502
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +11 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +10821 -59
  14. package/adapterBase.js +1030 -248
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/Avatars/action.json +63 -0
  18. package/entities/Avatars/schema.json +4 -1
  19. package/entities/Dashboards/action.json +80 -0
  20. package/entities/Dashboards/mockdatafiles/copyDashboard-default.json +13 -0
  21. package/entities/Dashboards/mockdatafiles/createDashboard-default.json +13 -0
  22. package/entities/Dashboards/mockdatafiles/updateDashboard-default.json +13 -0
  23. package/entities/Dashboards/schema.json +5 -1
  24. package/entities/Groups/action.json +21 -0
  25. package/entities/Groups/mockdatafiles/bulkGetGroups-default.json +16 -0
  26. package/entities/Groups/schema.json +2 -1
  27. package/entities/InstanceInformation/action.json +25 -0
  28. package/entities/InstanceInformation/mockdatafiles/getLicense-default.json +20 -0
  29. package/entities/InstanceInformation/schema.json +19 -0
  30. package/entities/IssueCustomFieldConfigurationApps/action.json +45 -0
  31. package/entities/IssueCustomFieldConfigurationApps/mockdatafiles/getCustomFieldConfiguration-default.json +34 -0
  32. package/entities/IssueCustomFieldConfigurationApps/schema.json +20 -0
  33. package/entities/IssueCustomFieldContexts/action.json +268 -0
  34. package/entities/IssueCustomFieldContexts/mockdatafiles/createCustomFieldContext-default.json +9 -0
  35. package/entities/IssueCustomFieldContexts/mockdatafiles/getContextsForField-default.json +22 -0
  36. package/entities/IssueCustomFieldContexts/mockdatafiles/getCustomFieldContextsForProjectsAndIssueTypes-default.json +23 -0
  37. package/entities/IssueCustomFieldContexts/mockdatafiles/getDefaultValues-default.json +22 -0
  38. package/entities/IssueCustomFieldContexts/mockdatafiles/getIssueTypeMappingsForContexts-default.json +20 -0
  39. package/entities/IssueCustomFieldContexts/mockdatafiles/getProjectContextMapping-default.json +16 -0
  40. package/entities/IssueCustomFieldContexts/schema.json +31 -0
  41. package/entities/IssueCustomFieldOptions/action.json +105 -0
  42. package/entities/IssueCustomFieldOptions/mockdatafiles/createCustomFieldOption-default.json +20 -0
  43. package/entities/IssueCustomFieldOptions/mockdatafiles/getOptionsForContext-default.json +26 -0
  44. package/entities/IssueCustomFieldOptions/mockdatafiles/updateCustomFieldOption-default.json +19 -0
  45. package/entities/IssueCustomFieldOptions/schema.json +23 -0
  46. package/entities/IssueCustomFieldValuesApps/action.json +44 -0
  47. package/entities/IssueCustomFieldValuesApps/schema.json +20 -0
  48. package/entities/IssueFieldConfigurations/action.json +309 -0
  49. package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfiguration-default.json +5 -0
  50. package/entities/IssueFieldConfigurations/mockdatafiles/createFieldConfigurationScheme-default.json +5 -0
  51. package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurationSchemes-default.json +23 -0
  52. package/entities/IssueFieldConfigurations/mockdatafiles/getAllFieldConfigurations-default.json +19 -0
  53. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationItems-default.json +19 -0
  54. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeMappings-default.json +33 -0
  55. package/entities/IssueFieldConfigurations/mockdatafiles/getFieldConfigurationSchemeProjectMapping-default.json +26 -0
  56. package/entities/IssueFieldConfigurations/schema.json +33 -0
  57. package/entities/IssueTypeSchemes/action.json +207 -0
  58. package/entities/IssueTypeSchemes/mockdatafiles/createIssueTypeScheme-default.json +3 -0
  59. package/entities/IssueTypeSchemes/mockdatafiles/getAllIssueTypeSchemes-default.json +26 -0
  60. package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemeForProjects-default.json +44 -0
  61. package/entities/IssueTypeSchemes/mockdatafiles/getIssueTypeSchemesMapping-default.json +24 -0
  62. package/entities/IssueTypeSchemes/schema.json +28 -0
  63. package/entities/IssueTypeScreenSchemes/action.json +228 -0
  64. package/entities/IssueTypeScreenSchemes/mockdatafiles/createIssueTypeScreenScheme-default.json +3 -0
  65. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeMappings-default.json +28 -0
  66. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemeProjectAssociations-default.json +19 -0
  67. package/entities/IssueTypeScreenSchemes/mockdatafiles/getIssueTypeScreenSchemes-default.json +18 -0
  68. package/entities/IssueTypeScreenSchemes/mockdatafiles/getProjectsForIssueTypeScreenScheme-default.json +27 -0
  69. package/entities/IssueTypeScreenSchemes/schema.json +29 -0
  70. package/entities/Issueattachments/action.json +42 -0
  71. package/entities/Issueattachments/schema.json +3 -1
  72. package/entities/Issuefields/action.json +122 -0
  73. package/entities/Issuefields/mockdatafiles/getContextsForFieldDeprecated-default.json +12 -0
  74. package/entities/Issuefields/mockdatafiles/getFieldsPaginated-default.json +46 -0
  75. package/entities/Issuefields/schema.json +7 -1
  76. package/entities/Issueproperties/action.json +40 -0
  77. package/entities/Issueproperties/schema.json +3 -1
  78. package/entities/Issues/action.json +45 -0
  79. package/entities/Issues/mockdatafiles/getChangeLogsByIds-default.json +65 -0
  80. package/entities/Issues/mockdatafiles/getEvents-default.json +10 -0
  81. package/entities/Issues/schema.json +20 -0
  82. package/entities/Issuesearch/action.json +20 -0
  83. package/entities/Issuesearch/mockdatafiles/matchIssues-default.json +29 -0
  84. package/entities/Issuesearch/schema.json +2 -1
  85. package/entities/Issuesecuritylevel/action.json +21 -0
  86. package/entities/Issuesecuritylevel/mockdatafiles/getIssueSecurityLevelMembers-default.json +46 -0
  87. package/entities/Issuesecuritylevel/schema.json +2 -1
  88. package/entities/Issuetypes/action.json +21 -0
  89. package/entities/Issuetypes/mockdatafiles/getIssueTypesForProject-default.json +39 -0
  90. package/entities/Issuetypes/schema.json +2 -1
  91. package/entities/Issuewatchers/action.json +20 -0
  92. package/entities/Issuewatchers/mockdatafiles/getIsWatchingIssueBulk-default.json +7 -0
  93. package/entities/Issuewatchers/schema.json +2 -1
  94. package/entities/JQL/action.json +40 -0
  95. package/entities/JQL/mockdatafiles/getAutoCompletePost-default.json +89 -0
  96. package/entities/JQL/mockdatafiles/parseJqlQueries-default.json +119 -0
  97. package/entities/JQL/schema.json +3 -1
  98. package/entities/Jiraexpressions/action.json +20 -0
  99. package/entities/Jiraexpressions/mockdatafiles/analyseExpression-default.json +47 -0
  100. package/entities/Jiraexpressions/schema.json +2 -1
  101. package/entities/Labels/action.json +25 -0
  102. package/entities/Labels/mockdatafiles/getAllLabels-default.json +10 -0
  103. package/entities/Labels/schema.json +19 -0
  104. package/entities/ProjectEmail/action.json +45 -0
  105. package/entities/ProjectEmail/mockdatafiles/getProjectEmail-default.json +6 -0
  106. package/entities/ProjectEmail/schema.json +20 -0
  107. package/entities/ProjectFeatures/action.json +45 -0
  108. package/entities/ProjectFeatures/mockdatafiles/getFeaturesForProject-default.json +24 -0
  109. package/entities/ProjectFeatures/mockdatafiles/toggleFeatureForProject-default.json +24 -0
  110. package/entities/ProjectFeatures/schema.json +20 -0
  111. package/entities/Projects/action.json +102 -0
  112. package/entities/Projects/mockdatafiles/getHierarchy-default.json +50 -0
  113. package/entities/Projects/mockdatafiles/getRecent-default.json +50 -0
  114. package/entities/Projects/mockdatafiles/restore-default.json +139 -0
  115. package/entities/Projects/schema.json +6 -1
  116. package/entities/Projecttypes/action.json +21 -0
  117. package/entities/Projecttypes/mockdatafiles/getAllAccessibleProjectTypes-default.json +16 -0
  118. package/entities/Projecttypes/schema.json +2 -1
  119. package/entities/ScreenSchemes/action.json +85 -0
  120. package/entities/ScreenSchemes/mockdatafiles/createScreenScheme-default.json +3 -0
  121. package/entities/ScreenSchemes/mockdatafiles/getScreenSchemes-default.json +28 -0
  122. package/entities/ScreenSchemes/schema.json +22 -0
  123. package/entities/Screens/action.json +81 -0
  124. package/entities/Screens/mockdatafiles/createScreen-default.json +5 -0
  125. package/entities/Screens/mockdatafiles/getScreensForField-default.json +17 -0
  126. package/entities/Screens/mockdatafiles/updateScreen-default.json +5 -0
  127. package/entities/Screens/schema.json +5 -1
  128. package/entities/Users/action.json +84 -0
  129. package/entities/Users/mockdatafiles/getAllUsers-default.json +32 -0
  130. package/entities/Users/mockdatafiles/getAllUsersDefault-default.json +32 -0
  131. package/entities/Users/mockdatafiles/getUserEmail-default.json +1 -0
  132. package/entities/Users/schema.json +5 -1
  133. package/entities/Webhooks/action.json +106 -0
  134. package/entities/Webhooks/mockdatafiles/getDynamicWebhooksForApp-default.json +40 -0
  135. package/entities/Webhooks/mockdatafiles/getFailedWebhooks-default.json +17 -0
  136. package/entities/Webhooks/mockdatafiles/refreshWebhooks-default.json +3 -0
  137. package/entities/Webhooks/mockdatafiles/registerDynamicWebhooks-default.json +15 -0
  138. package/entities/Webhooks/schema.json +23 -0
  139. package/entities/WorkflowSchemeProjectAssociations/action.json +45 -0
  140. package/entities/WorkflowSchemeProjectAssociations/mockdatafiles/getWorkflowSchemeProjectAssociations-default.json +21 -0
  141. package/entities/WorkflowSchemeProjectAssociations/schema.json +20 -0
  142. package/entities/WorkflowTransitionRules/action.json +65 -0
  143. package/entities/WorkflowTransitionRules/mockdatafiles/deleteWorkflowTransitionRuleConfigurations-default.json +34 -0
  144. package/entities/WorkflowTransitionRules/mockdatafiles/getWorkflowTransitionRuleConfigurations-default.json +56 -0
  145. package/entities/WorkflowTransitionRules/mockdatafiles/updateWorkflowTransitionRuleConfigurations-default.json +34 -0
  146. package/entities/WorkflowTransitionRules/schema.json +21 -0
  147. package/entities/Workflows/action.json +61 -0
  148. package/entities/Workflows/mockdatafiles/createWorkflow-default.json +4 -0
  149. package/entities/Workflows/mockdatafiles/getWorkflowsPaginated-default.json +140 -0
  150. package/entities/Workflows/schema.json +4 -1
  151. package/entities/Workflowschemedrafts/action.json +20 -0
  152. package/entities/Workflowschemedrafts/schema.json +2 -1
  153. package/entities/Workflowschemes/action.json +21 -0
  154. package/entities/Workflowschemes/mockdatafiles/getAllWorkflowSchemes-default.json +30 -0
  155. package/entities/Workflowschemes/schema.json +2 -1
  156. package/error.json +12 -0
  157. package/package.json +21 -13
  158. package/pronghorn.json +33339 -5948
  159. package/propertiesDecorators.json +14 -0
  160. package/propertiesSchema.json +436 -0
  161. package/refs?service=git-upload-pack +0 -0
  162. package/report/adapterInfo.json +10 -0
  163. package/report/updateReport1659707107792.json +120 -0
  164. package/sampleProperties.json +95 -3
  165. package/test/integration/adapterTestBasicGet.js +2 -2
  166. package/test/integration/adapterTestIntegration.js +3633 -106
  167. package/test/unit/adapterBaseTestUnit.js +35 -27
  168. package/test/unit/adapterTestUnit.js +4767 -115
  169. package/utils/adapterInfo.js +206 -0
  170. package/utils/addAuth.js +94 -0
  171. package/utils/basicGet.js +1 -14
  172. package/utils/entitiesToDB.js +179 -0
  173. package/utils/methodDocumentor.js +225 -0
  174. package/utils/modify.js +1 -1
  175. package/utils/packModificationScript.js +1 -1
  176. package/utils/patches2bundledDeps.js +90 -0
  177. package/utils/pre-commit.sh +5 -0
  178. package/utils/removeHooks.js +20 -0
  179. package/utils/tbScript.js +43 -22
  180. package/utils/tbUtils.js +126 -29
  181. package/utils/testRunner.js +16 -16
  182. package/utils/troubleshootingAdapter.js +2 -26
  183. package/versions.json +142 -0
@@ -188,6 +188,90 @@
188
188
  "mockFile": ""
189
189
  }
190
190
  ]
191
+ },
192
+ {
193
+ "name": "getUserEmail",
194
+ "protocol": "REST",
195
+ "method": "GET",
196
+ "entitypath": "{base_path}/{version}/user/email?{query}",
197
+ "requestSchema": "schema.json",
198
+ "responseSchema": "schema.json",
199
+ "timeout": 0,
200
+ "sendEmpty": false,
201
+ "sendGetBody": false,
202
+ "requestDatatype": "JSON",
203
+ "responseDatatype": "JSON",
204
+ "headers": {},
205
+ "responseObjects": [
206
+ {
207
+ "type": "default",
208
+ "key": "",
209
+ "mockFile": "mockdatafiles/getUserEmail-default.json"
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "name": "getUserEmailBulk",
215
+ "protocol": "REST",
216
+ "method": "GET",
217
+ "entitypath": "{base_path}/{version}/user/email/bulk?{query}",
218
+ "requestSchema": "schema.json",
219
+ "responseSchema": "schema.json",
220
+ "timeout": 0,
221
+ "sendEmpty": false,
222
+ "sendGetBody": false,
223
+ "requestDatatype": "JSON",
224
+ "responseDatatype": "JSON",
225
+ "headers": {},
226
+ "responseObjects": [
227
+ {
228
+ "type": "default",
229
+ "key": "",
230
+ "mockFile": ""
231
+ }
232
+ ]
233
+ },
234
+ {
235
+ "name": "getAllUsersDefault",
236
+ "protocol": "REST",
237
+ "method": "GET",
238
+ "entitypath": "{base_path}/{version}/users?{query}",
239
+ "requestSchema": "schema.json",
240
+ "responseSchema": "schema.json",
241
+ "timeout": 0,
242
+ "sendEmpty": false,
243
+ "sendGetBody": false,
244
+ "requestDatatype": "JSON",
245
+ "responseDatatype": "JSON",
246
+ "headers": {},
247
+ "responseObjects": [
248
+ {
249
+ "type": "default",
250
+ "key": "",
251
+ "mockFile": "mockdatafiles/getAllUsersDefault-default.json"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "name": "getAllUsers",
257
+ "protocol": "REST",
258
+ "method": "GET",
259
+ "entitypath": "{base_path}/{version}/users/search?{query}",
260
+ "requestSchema": "schema.json",
261
+ "responseSchema": "schema.json",
262
+ "timeout": 0,
263
+ "sendEmpty": false,
264
+ "sendGetBody": false,
265
+ "requestDatatype": "JSON",
266
+ "responseDatatype": "JSON",
267
+ "headers": {},
268
+ "responseObjects": [
269
+ {
270
+ "type": "default",
271
+ "key": "",
272
+ "mockFile": "mockdatafiles/getAllUsers-default.json"
273
+ }
274
+ ]
191
275
  }
192
276
  ]
193
277
  }
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
4
+ "key": "",
5
+ "accountId": "5b10a2844c20165700ede21g",
6
+ "accountType": "atlassian",
7
+ "name": "",
8
+ "avatarUrls": {
9
+ "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48",
10
+ "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
11
+ "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
12
+ "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"
13
+ },
14
+ "displayName": "Mia Krystof",
15
+ "active": false
16
+ },
17
+ {
18
+ "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5",
19
+ "key": "",
20
+ "accountId": "5b10ac8d82e05b22cc7d4ef5",
21
+ "accountType": "atlassian",
22
+ "name": "",
23
+ "avatarUrls": {
24
+ "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48",
25
+ "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
26
+ "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
27
+ "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32"
28
+ },
29
+ "displayName": "Emma Richards",
30
+ "active": false
31
+ }
32
+ ]
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
4
+ "key": "",
5
+ "accountId": "5b10a2844c20165700ede21g",
6
+ "accountType": "atlassian",
7
+ "name": "",
8
+ "avatarUrls": {
9
+ "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48",
10
+ "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
11
+ "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
12
+ "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"
13
+ },
14
+ "displayName": "Mia Krystof",
15
+ "active": false
16
+ },
17
+ {
18
+ "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5",
19
+ "key": "",
20
+ "accountId": "5b10ac8d82e05b22cc7d4ef5",
21
+ "accountType": "atlassian",
22
+ "name": "",
23
+ "avatarUrls": {
24
+ "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48",
25
+ "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
26
+ "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
27
+ "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32"
28
+ },
29
+ "displayName": "Emma Richards",
30
+ "active": false
31
+ }
32
+ ]
@@ -0,0 +1 @@
1
+ "name@example.com"
@@ -18,7 +18,11 @@
18
18
  "getRestapi2usercolumns",
19
19
  "putRestapi2usercolumns",
20
20
  "deleteRestapi2usercolumns",
21
- "getRestapi2usergroups"
21
+ "getRestapi2usergroups",
22
+ "getUserEmail",
23
+ "getUserEmailBulk",
24
+ "getAllUsersDefault",
25
+ "getAllUsers"
22
26
  ],
23
27
  "external_name": "ph_request_type"
24
28
  }
@@ -0,0 +1,106 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getDynamicWebhooksForApp",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/webhook?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getDynamicWebhooksForApp-default.json"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "registerDynamicWebhooks",
26
+ "protocol": "REST",
27
+ "method": "POST",
28
+ "entitypath": "{base_path}/{version}/webhook?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": "mockdatafiles/registerDynamicWebhooks-default.json"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "deleteWebhookById",
46
+ "protocol": "REST",
47
+ "method": "DELETE",
48
+ "entitypath": "{base_path}/{version}/webhook?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "requestDatatype": "JSON",
54
+ "responseDatatype": "JSON",
55
+ "headers": {},
56
+ "responseObjects": [
57
+ {
58
+ "type": "default",
59
+ "key": "",
60
+ "mockFile": ""
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "getFailedWebhooks",
66
+ "protocol": "REST",
67
+ "method": "GET",
68
+ "entitypath": "{base_path}/{version}/webhook/failed?{query}",
69
+ "requestSchema": "schema.json",
70
+ "responseSchema": "schema.json",
71
+ "timeout": 0,
72
+ "sendEmpty": false,
73
+ "sendGetBody": false,
74
+ "requestDatatype": "JSON",
75
+ "responseDatatype": "JSON",
76
+ "headers": {},
77
+ "responseObjects": [
78
+ {
79
+ "type": "default",
80
+ "key": "",
81
+ "mockFile": "mockdatafiles/getFailedWebhooks-default.json"
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "refreshWebhooks",
87
+ "protocol": "REST",
88
+ "method": "PUT",
89
+ "entitypath": "{base_path}/{version}/webhook/refresh?{query}",
90
+ "requestSchema": "schema.json",
91
+ "responseSchema": "schema.json",
92
+ "timeout": 0,
93
+ "sendEmpty": false,
94
+ "requestDatatype": "JSON",
95
+ "responseDatatype": "JSON",
96
+ "headers": {},
97
+ "responseObjects": [
98
+ {
99
+ "type": "default",
100
+ "key": "",
101
+ "mockFile": "mockdatafiles/refreshWebhooks-default.json"
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "maxResults": 3,
3
+ "startAt": 0,
4
+ "total": 3,
5
+ "isLast": true,
6
+ "values": [
7
+ {
8
+ "id": 10000,
9
+ "jqlFilter": "project = PRJ",
10
+ "fieldIdsFilter": [
11
+ "summary",
12
+ "customfield_10029"
13
+ ],
14
+ "events": [
15
+ "jira:issue_updated",
16
+ "jira:issue_created"
17
+ ],
18
+ "expirationDate": "2019-06-01T12:42:30.000+0000"
19
+ },
20
+ {
21
+ "id": 10001,
22
+ "jqlFilter": "issuetype = Bug",
23
+ "events": [
24
+ "jira:issue_created"
25
+ ],
26
+ "expirationDate": "2019-06-01T12:42:30.000+0000"
27
+ },
28
+ {
29
+ "id": 10002,
30
+ "jqlFilter": "project = PRJ",
31
+ "issuePropertyKeysFilter": [
32
+ "my-issue-property-key"
33
+ ],
34
+ "events": [
35
+ "issue_property_set"
36
+ ],
37
+ "expirationDate": "2019-06-01T12:42:30.000+0000"
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "values": [
3
+ {
4
+ "id": "1",
5
+ "body": "{\"data\":\"webhook data\"}",
6
+ "url": "https://example.com",
7
+ "failureTime": 1573118132000
8
+ },
9
+ {
10
+ "id": "2",
11
+ "url": "https://example.com",
12
+ "failureTime": 1573540473480
13
+ }
14
+ ],
15
+ "maxResults": 100,
16
+ "next": "https://your-domain.atlassian.net/rest/api/3/webhook/failed?failedAfter=1573540473480&maxResults=100"
17
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "expirationDate": "2019-06-01T12:42:30.000+0000"
3
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "webhookRegistrationResult": [
3
+ {
4
+ "createdWebhookId": 1000
5
+ },
6
+ {
7
+ "errors": [
8
+ "The clause watchCount is unsupported"
9
+ ]
10
+ },
11
+ {
12
+ "createdWebhookId": 1001
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "",
12
+ "enum": [
13
+ "getDynamicWebhooksForApp",
14
+ "registerDynamicWebhooks",
15
+ "deleteWebhookById",
16
+ "getFailedWebhooks",
17
+ "refreshWebhooks"
18
+ ],
19
+ "external_name": "ph_request_type"
20
+ }
21
+ },
22
+ "definitions": {}
23
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getWorkflowSchemeProjectAssociations",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/workflowscheme/project?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getWorkflowSchemeProjectAssociations-default.json"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "assignSchemeToProject",
26
+ "protocol": "REST",
27
+ "method": "PUT",
28
+ "entitypath": "{base_path}/{version}/workflowscheme/project?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": ""
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "values": [
3
+ {
4
+ "projectIds": [
5
+ "10010",
6
+ "10020"
7
+ ],
8
+ "workflowScheme": {
9
+ "id": 101010,
10
+ "name": "Example workflow scheme",
11
+ "description": "The description of the example workflow scheme.",
12
+ "defaultWorkflow": "jira",
13
+ "issueTypeMappings": {
14
+ "10000": "scrum workflow",
15
+ "10001": "builds workflow"
16
+ },
17
+ "self": "https://your-domain.atlassian.net/rest/api/3/workflowscheme/101010"
18
+ }
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": false,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "",
12
+ "enum": [
13
+ "getWorkflowSchemeProjectAssociations",
14
+ "assignSchemeToProject"
15
+ ],
16
+ "external_name": "ph_request_type"
17
+ }
18
+ },
19
+ "definitions": {}
20
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "getWorkflowTransitionRuleConfigurations",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/workflow/rule/config?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": "mockdatafiles/getWorkflowTransitionRuleConfigurations-default.json"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "updateWorkflowTransitionRuleConfigurations",
26
+ "protocol": "REST",
27
+ "method": "PUT",
28
+ "entitypath": "{base_path}/{version}/workflow/rule/config?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": "mockdatafiles/updateWorkflowTransitionRuleConfigurations-default.json"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "deleteWorkflowTransitionRuleConfigurations",
46
+ "protocol": "REST",
47
+ "method": "PUT",
48
+ "entitypath": "{base_path}/{version}/workflow/rule/config/delete?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "requestDatatype": "JSON",
54
+ "responseDatatype": "JSON",
55
+ "headers": {},
56
+ "responseObjects": [
57
+ {
58
+ "type": "default",
59
+ "key": "",
60
+ "mockFile": "mockdatafiles/deleteWorkflowTransitionRuleConfigurations-default.json"
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "updateResults": [
3
+ {
4
+ "workflowId": {
5
+ "name": "Workflow with one rule not updated",
6
+ "draft": false
7
+ },
8
+ "ruleUpdateErrors": {
9
+ "example-rule-id": [
10
+ "The rule with this id does not exist: example-rule-id"
11
+ ]
12
+ },
13
+ "updateErrors": []
14
+ },
15
+ {
16
+ "workflowId": {
17
+ "name": "Workflow with all rules successfully updated",
18
+ "draft": true
19
+ },
20
+ "ruleUpdateErrors": {},
21
+ "updateErrors": []
22
+ },
23
+ {
24
+ "workflowId": {
25
+ "name": "Non-existing workflow",
26
+ "draft": false
27
+ },
28
+ "ruleUpdateErrors": {},
29
+ "updateErrors": [
30
+ "Workflow not found: WorkflowIdBean{name=Non-existing workflow, draft=false}"
31
+ ]
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "maxResults": 10,
3
+ "startAt": 0,
4
+ "total": 1,
5
+ "isLast": true,
6
+ "values": [
7
+ {
8
+ "workflowId": {
9
+ "name": "My Workflow name",
10
+ "draft": false
11
+ },
12
+ "postFunctions": [
13
+ {
14
+ "id": "b4d6cbdc-59f5-11e9-8647-d663bd873d93",
15
+ "key": "postfunction-key",
16
+ "configuration": {
17
+ "value": "{ \"color\": \"red\" }",
18
+ "disabled": false
19
+ },
20
+ "transition": {
21
+ "id": 1,
22
+ "name": "Open"
23
+ }
24
+ }
25
+ ],
26
+ "conditions": [
27
+ {
28
+ "id": "d663bd873d93-59f5-11e9-8647-b4d6cbdc",
29
+ "key": "condition-key",
30
+ "configuration": {
31
+ "value": "{ \"size\": \"medium\" }",
32
+ "disabled": false
33
+ },
34
+ "transition": {
35
+ "id": 1,
36
+ "name": "Open"
37
+ }
38
+ }
39
+ ],
40
+ "validators": [
41
+ {
42
+ "id": "11e9-59f5-b4d6cbdc-8647-d663bd873d93",
43
+ "key": "validator-key",
44
+ "configuration": {
45
+ "value": "\"{ \\\"shape\\\": \\\"square\\\" }\"",
46
+ "disabled": false
47
+ },
48
+ "transition": {
49
+ "id": 1,
50
+ "name": "Open"
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "updateResults": [
3
+ {
4
+ "workflowId": {
5
+ "name": "Workflow with one rule not updated",
6
+ "draft": false
7
+ },
8
+ "ruleUpdateErrors": {
9
+ "example-rule-id": [
10
+ "The rule with this id does not exist: example-rule-id"
11
+ ]
12
+ },
13
+ "updateErrors": []
14
+ },
15
+ {
16
+ "workflowId": {
17
+ "name": "Workflow with all rules successfully updated",
18
+ "draft": true
19
+ },
20
+ "ruleUpdateErrors": {},
21
+ "updateErrors": []
22
+ },
23
+ {
24
+ "workflowId": {
25
+ "name": "Non-existing workflow",
26
+ "draft": false
27
+ },
28
+ "ruleUpdateErrors": {},
29
+ "updateErrors": [
30
+ "Workflow not found: WorkflowIdBean{name=Non-existing workflow, draft=false}"
31
+ ]
32
+ }
33
+ ]
34
+ }