@atlaskit/link-client-extension 6.1.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/cjs/entry-points/data-source-client-extension-mocks.js +11 -6
  3. package/dist/cjs/index.js +11 -6
  4. package/dist/cjs/services/use-data-source-client-extension/index.js +28 -28
  5. package/dist/cjs/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +12 -0
  6. package/dist/cjs/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +76 -0
  7. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +125 -0
  8. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDataResponse.js +126 -0
  9. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +79 -0
  10. package/dist/cjs/services/use-data-source-client-extension/mockExecuteActionResponse.js +11 -0
  11. package/dist/cjs/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +14 -0
  12. package/dist/cjs/services/use-data-source-client-extension/mocks.js +7 -405
  13. package/dist/cjs/services/use-smart-link-client-extension/index.js +17 -17
  14. package/dist/es2019/entry-points/data-source-client-extension-mocks.js +6 -1
  15. package/dist/es2019/index.js +6 -1
  16. package/dist/es2019/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +6 -0
  17. package/dist/es2019/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +70 -0
  18. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +119 -0
  19. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDataResponse.js +120 -0
  20. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +73 -0
  21. package/dist/es2019/services/use-data-source-client-extension/mockExecuteActionResponse.js +5 -0
  22. package/dist/es2019/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +8 -0
  23. package/dist/es2019/services/use-data-source-client-extension/mocks.js +2 -400
  24. package/dist/esm/entry-points/data-source-client-extension-mocks.js +6 -1
  25. package/dist/esm/index.js +6 -1
  26. package/dist/esm/services/use-data-source-client-extension/index.js +28 -28
  27. package/dist/esm/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +6 -0
  28. package/dist/esm/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +70 -0
  29. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +119 -0
  30. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDataResponse.js +120 -0
  31. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +73 -0
  32. package/dist/esm/services/use-data-source-client-extension/mockExecuteActionResponse.js +5 -0
  33. package/dist/esm/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +8 -0
  34. package/dist/esm/services/use-data-source-client-extension/mocks.js +3 -401
  35. package/dist/esm/services/use-smart-link-client-extension/index.js +17 -17
  36. package/dist/types/entry-points/data-source-client-extension-mocks.d.ts +6 -1
  37. package/dist/types/entry-points/data-source-response-types.d.ts +1 -1
  38. package/dist/types/index.d.ts +7 -2
  39. package/dist/types/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.d.ts +2 -0
  40. package/dist/types/services/use-data-source-client-extension/mockActionsDiscoveryResponse.d.ts +2 -0
  41. package/dist/types/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.d.ts +2 -0
  42. package/dist/types/services/use-data-source-client-extension/mockDatasourceDataResponse.d.ts +2 -0
  43. package/dist/types/services/use-data-source-client-extension/mockDatasourceDetailsResponse.d.ts +2 -0
  44. package/dist/types/services/use-data-source-client-extension/mockExecuteActionResponse.d.ts +2 -0
  45. package/dist/types/services/use-data-source-client-extension/mockExecuteActionResponseFailure.d.ts +2 -0
  46. package/dist/types/services/use-data-source-client-extension/mocks.d.ts +1 -8
  47. package/link-client-extension.docs.tsx +49 -47
  48. package/package.json +8 -15
  49. package/use-data-source-client-extension/mocks/package.json +1 -8
  50. package/use-data-source-client-extension/package.json +1 -8
  51. package/use-data-source-client-extension/types/package.json +1 -8
  52. package/use-smart-link-client-extension/package.json +1 -8
  53. package/dist/types-ts4.5/entry-points/data-source-client-extension-mocks.d.ts +0 -1
  54. package/dist/types-ts4.5/entry-points/data-source-response-types.d.ts +0 -1
  55. package/dist/types-ts4.5/entry-points/use-data-source-client-extension.d.ts +0 -1
  56. package/dist/types-ts4.5/entry-points/use-smart-link-client-extension.d.ts +0 -1
  57. package/dist/types-ts4.5/index.d.ts +0 -8
  58. package/dist/types-ts4.5/services/use-data-source-client-extension/index.d.ts +0 -13
  59. package/dist/types-ts4.5/services/use-data-source-client-extension/mocks.d.ts +0 -9
  60. package/dist/types-ts4.5/services/use-data-source-client-extension/types.d.ts +0 -13
  61. package/dist/types-ts4.5/services/use-resolver-url/index.d.ts +0 -2
  62. package/dist/types-ts4.5/services/use-smart-link-client-extension/index.d.ts +0 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 6.1.1
30
+
31
+ ### Patch Changes
32
+
33
+ - [`5ee16292ec890`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5ee16292ec890) -
34
+ Volt OEPF migration: split multi-export files into one export per file using the volt-codemods
35
+ crate (volt-no-multi-exports-super-safe + volt-flatten-barrel-files + volt-remove-unused-imports).
36
+ Mechanical refactor with no intended runtime change.
37
+
3
38
  ## 6.1.0
4
39
 
5
40
  ### Minor Changes
@@ -6,25 +6,25 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "mockActionsDiscoveryEmptyResponse", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _mocks.mockActionsDiscoveryEmptyResponse;
9
+ return _mockActionsDiscoveryEmptyResponse.mockActionsDiscoveryEmptyResponse;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "mockActionsDiscoveryResponse", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _mocks.mockActionsDiscoveryResponse;
15
+ return _mockActionsDiscoveryResponse.mockActionsDiscoveryResponse;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "mockDatasourceDataNoActionsResponse", {
19
19
  enumerable: true,
20
20
  get: function get() {
21
- return _mocks.mockDatasourceDataNoActionsResponse;
21
+ return _mockDatasourceDataNoActionsResponse.mockDatasourceDataNoActionsResponse;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "mockDatasourceDataResponse", {
25
25
  enumerable: true,
26
26
  get: function get() {
27
- return _mocks.mockDatasourceDataResponse;
27
+ return _mockDatasourceDataResponse.mockDatasourceDataResponse;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "mockDatasourceDataResponseWithSchema", {
@@ -36,13 +36,18 @@ Object.defineProperty(exports, "mockDatasourceDataResponseWithSchema", {
36
36
  Object.defineProperty(exports, "mockDatasourceDetailsResponse", {
37
37
  enumerable: true,
38
38
  get: function get() {
39
- return _mocks.mockDatasourceDetailsResponse;
39
+ return _mockDatasourceDetailsResponse.mockDatasourceDetailsResponse;
40
40
  }
41
41
  });
42
42
  Object.defineProperty(exports, "mockDatasourceResponse", {
43
43
  enumerable: true,
44
44
  get: function get() {
45
- return _mocks.mockDatasourceDetailsResponse;
45
+ return _mockDatasourceDetailsResponse.mockDatasourceDetailsResponse;
46
46
  }
47
47
  });
48
+ var _mockActionsDiscoveryEmptyResponse = require("../services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse");
49
+ var _mockActionsDiscoveryResponse = require("../services/use-data-source-client-extension/mockActionsDiscoveryResponse");
50
+ var _mockDatasourceDataNoActionsResponse = require("../services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse");
51
+ var _mockDatasourceDataResponse = require("../services/use-data-source-client-extension/mockDatasourceDataResponse");
52
+ var _mockDatasourceDetailsResponse = require("../services/use-data-source-client-extension/mockDatasourceDetailsResponse");
48
53
  var _mocks = require("../services/use-data-source-client-extension/mocks");
package/dist/cjs/index.js CHANGED
@@ -12,25 +12,25 @@ Object.defineProperty(exports, "DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE", {
12
12
  Object.defineProperty(exports, "mockActionsDiscoveryEmptyResponse", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _mocks.mockActionsDiscoveryEmptyResponse;
15
+ return _mockActionsDiscoveryEmptyResponse.mockActionsDiscoveryEmptyResponse;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "mockActionsDiscoveryResponse", {
19
19
  enumerable: true,
20
20
  get: function get() {
21
- return _mocks.mockActionsDiscoveryResponse;
21
+ return _mockActionsDiscoveryResponse.mockActionsDiscoveryResponse;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "mockDatasourceDataNoActionsResponse", {
25
25
  enumerable: true,
26
26
  get: function get() {
27
- return _mocks.mockDatasourceDataNoActionsResponse;
27
+ return _mockDatasourceDataNoActionsResponse.mockDatasourceDataNoActionsResponse;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "mockDatasourceDataResponse", {
31
31
  enumerable: true,
32
32
  get: function get() {
33
- return _mocks.mockDatasourceDataResponse;
33
+ return _mockDatasourceDataResponse.mockDatasourceDataResponse;
34
34
  }
35
35
  });
36
36
  Object.defineProperty(exports, "mockDatasourceDataResponseWithSchema", {
@@ -42,13 +42,13 @@ Object.defineProperty(exports, "mockDatasourceDataResponseWithSchema", {
42
42
  Object.defineProperty(exports, "mockDatasourceDetailsResponse", {
43
43
  enumerable: true,
44
44
  get: function get() {
45
- return _mocks.mockDatasourceDetailsResponse;
45
+ return _mockDatasourceDetailsResponse.mockDatasourceDetailsResponse;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "mockDatasourceResponse", {
49
49
  enumerable: true,
50
50
  get: function get() {
51
- return _mocks.mockDatasourceDetailsResponse;
51
+ return _mockDatasourceDetailsResponse.mockDatasourceDetailsResponse;
52
52
  }
53
53
  });
54
54
  Object.defineProperty(exports, "useDatasourceClientExtension", {
@@ -65,4 +65,9 @@ Object.defineProperty(exports, "useSmartLinkClientExtension", {
65
65
  });
66
66
  var _useSmartLinkClientExtension = require("./services/use-smart-link-client-extension");
67
67
  var _useDataSourceClientExtension = require("./services/use-data-source-client-extension");
68
+ var _mockActionsDiscoveryEmptyResponse = require("./services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse");
69
+ var _mockActionsDiscoveryResponse = require("./services/use-data-source-client-extension/mockActionsDiscoveryResponse");
70
+ var _mockDatasourceDataNoActionsResponse = require("./services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse");
71
+ var _mockDatasourceDataResponse = require("./services/use-data-source-client-extension/mockDatasourceDataResponse");
72
+ var _mockDatasourceDetailsResponse = require("./services/use-data-source-client-extension/mockDatasourceDetailsResponse");
68
73
  var _mocks = require("./services/use-data-source-client-extension/mocks");
@@ -27,8 +27,8 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
27
27
  var resolverUrl = (0, _useResolverUrl.useResolverUrl)(client);
28
28
  var cachedRequest = /*#__PURE__*/function () {
29
29
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(cacheKeyId, data, url, lruMap, force) {
30
- var cacheKeyData, cacheKey, responsePromise, headers;
31
- return _regenerator.default.wrap(function _callee$(_context) {
30
+ var cacheKeyData, cacheKey, responsePromise, headers, _t;
31
+ return _regenerator.default.wrap(function (_context) {
32
32
  while (1) switch (_context.prev = _context.next) {
33
33
  case 0:
34
34
  cacheKeyData = _objectSpread(_objectSpread(_objectSpread({}, data), 'fields' in data ? {
@@ -45,11 +45,11 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
45
45
  }
46
46
  responsePromise = lruMap.get(cacheKey);
47
47
  if (!responsePromise) {
48
- _context.next = 6;
48
+ _context.next = 1;
49
49
  break;
50
50
  }
51
51
  return _context.abrupt("return", responsePromise);
52
- case 6:
52
+ case 1:
53
53
  headers = {
54
54
  /**
55
55
  * This header exists to enable the backend to process relative time, eg: "today", with respect to user timezone.
@@ -57,23 +57,23 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
57
57
  */
58
58
  'origin-timezone': Intl === null || Intl === void 0 ? void 0 : Intl.DateTimeFormat().resolvedOptions().timeZone
59
59
  };
60
- _context.prev = 7;
60
+ _context.prev = 2;
61
61
  responsePromise = (0, _linkingCommon.request)('post', url, data, headers, [200, 201, 202, 203, 204]);
62
62
  lruMap.set(cacheKey, responsePromise);
63
- _context.next = 12;
63
+ _context.next = 3;
64
64
  return responsePromise;
65
- case 12:
65
+ case 3:
66
66
  return _context.abrupt("return", _context.sent);
67
- case 15:
68
- _context.prev = 15;
69
- _context.t0 = _context["catch"](7);
67
+ case 4:
68
+ _context.prev = 4;
69
+ _t = _context["catch"](2);
70
70
  lruMap.delete(cacheKey);
71
- throw _context.t0;
72
- case 19:
71
+ throw _t;
72
+ case 5:
73
73
  case "end":
74
74
  return _context.stop();
75
75
  }
76
- }, _callee, null, [[7, 15]]);
76
+ }, _callee, null, [[2, 4]]);
77
77
  }));
78
78
  return function cachedRequest(_x, _x2, _x3, _x4, _x5) {
79
79
  return _ref.apply(this, arguments);
@@ -82,12 +82,12 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
82
82
  var uncachedRequest = /*#__PURE__*/function () {
83
83
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data, url) {
84
84
  var responsePromise;
85
- return _regenerator.default.wrap(function _callee2$(_context2) {
85
+ return _regenerator.default.wrap(function (_context2) {
86
86
  while (1) switch (_context2.prev = _context2.next) {
87
87
  case 0:
88
88
  responsePromise = (0, _linkingCommon.request)('post', url, data, undefined, [200, 201, 202, 203, 204]);
89
89
  return _context2.abrupt("return", responsePromise);
90
- case 2:
90
+ case 1:
91
91
  case "end":
92
92
  return _context2.stop();
93
93
  }
@@ -101,12 +101,12 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
101
101
  var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(datasourceId, data) {
102
102
  var force,
103
103
  _args3 = arguments;
104
- return _regenerator.default.wrap(function _callee3$(_context3) {
104
+ return _regenerator.default.wrap(function (_context3) {
105
105
  while (1) switch (_context3.prev = _context3.next) {
106
106
  case 0:
107
107
  force = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : false;
108
108
  return _context3.abrupt("return", cachedRequest(datasourceId, data, "".concat(resolverUrl, "/datasource/").concat(datasourceId, "/fetch/details"), datasourceDetailsResponsePromiseCache, force));
109
- case 2:
109
+ case 1:
110
110
  case "end":
111
111
  return _context3.stop();
112
112
  }
@@ -120,12 +120,12 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
120
120
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(datasourceId, data) {
121
121
  var force,
122
122
  _args4 = arguments;
123
- return _regenerator.default.wrap(function _callee4$(_context4) {
123
+ return _regenerator.default.wrap(function (_context4) {
124
124
  while (1) switch (_context4.prev = _context4.next) {
125
125
  case 0:
126
126
  force = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : false;
127
127
  return _context4.abrupt("return", cachedRequest(datasourceId, data, "".concat(resolverUrl, "/datasource/").concat(datasourceId, "/fetch/data"), datasourceDataResponsePromiseCache, force));
128
- case 2:
128
+ case 1:
129
129
  case "end":
130
130
  return _context4.stop();
131
131
  }
@@ -140,19 +140,19 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
140
140
  var force,
141
141
  resolvedCacheIdKey,
142
142
  _args5 = arguments;
143
- return _regenerator.default.wrap(function _callee5$(_context5) {
143
+ return _regenerator.default.wrap(function (_context5) {
144
144
  while (1) switch (_context5.prev = _context5.next) {
145
145
  case 0:
146
146
  force = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : false;
147
147
  resolvedCacheIdKey = 'datasourceId' in data ? data.datasourceId : data.integrationKey; // This is just to prevent empty string being passed up to ORS and causing issues.
148
148
  if (resolvedCacheIdKey) {
149
- _context5.next = 4;
149
+ _context5.next = 1;
150
150
  break;
151
151
  }
152
152
  throw new Error('No target was supplied to retrieve actions for');
153
- case 4:
153
+ case 1:
154
154
  return _context5.abrupt("return", cachedRequest(resolvedCacheIdKey, data, "".concat(resolverUrl, "/actions"), datasourceActionsPermissionsPromiseCache, force));
155
- case 5:
155
+ case 2:
156
156
  case "end":
157
157
  return _context5.stop();
158
158
  }
@@ -164,7 +164,7 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
164
164
  }(), [resolverUrl]);
165
165
  var executeAtomicAction = (0, _react.useCallback)( /*#__PURE__*/function () {
166
166
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data) {
167
- return _regenerator.default.wrap(function _callee6$(_context6) {
167
+ return _regenerator.default.wrap(function (_context6) {
168
168
  while (1) switch (_context6.prev = _context6.next) {
169
169
  case 0:
170
170
  return _context6.abrupt("return", uncachedRequest(data, "".concat(resolverUrl, "/actions/execute")));
@@ -182,12 +182,12 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
182
182
  datasourceDataResponsePromiseCache.forEach( /*#__PURE__*/function () {
183
183
  var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(value, key) {
184
184
  var response, targetFound;
185
- return _regenerator.default.wrap(function _callee7$(_context7) {
185
+ return _regenerator.default.wrap(function (_context7) {
186
186
  while (1) switch (_context7.prev = _context7.next) {
187
187
  case 0:
188
- _context7.next = 2;
188
+ _context7.next = 1;
189
189
  return value;
190
- case 2:
190
+ case 1:
191
191
  response = _context7.sent;
192
192
  targetFound = response.data.items.some(function (item) {
193
193
  var _item$ari;
@@ -196,7 +196,7 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
196
196
  if (targetFound) {
197
197
  datasourceDataResponsePromiseCache.delete(key);
198
198
  }
199
- case 5:
199
+ case 2:
200
200
  case "end":
201
201
  return _context7.stop();
202
202
  }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockActionsDiscoveryEmptyResponse = void 0;
7
+ var mockActionsDiscoveryEmptyResponse = exports.mockActionsDiscoveryEmptyResponse = {
8
+ actions: [],
9
+ permissions: {
10
+ data: []
11
+ }
12
+ };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockActionsDiscoveryResponse = void 0;
7
+ var mockActionsDiscoveryResponse = exports.mockActionsDiscoveryResponse = {
8
+ actions: [{
9
+ actionKey: 'atlassian:work-item:update:summary',
10
+ description: 'Updates issue summary',
11
+ fieldKey: 'summary',
12
+ integrationKey: 'jira',
13
+ type: 'string'
14
+ }, {
15
+ integrationKey: 'jira',
16
+ actionKey: 'atlassian:work-item:update:priority',
17
+ fieldKey: 'priority',
18
+ type: 'number',
19
+ inputs: {
20
+ priority: {
21
+ type: 'string',
22
+ fetchAction: {
23
+ actionKey: 'atlassian:work-item:get:priorities',
24
+ integrationKey: 'jira',
25
+ fieldKey: 'priority',
26
+ type: 'string',
27
+ inputs: {
28
+ issueId: {
29
+ type: 'string'
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }, {
36
+ integrationKey: 'jira',
37
+ actionKey: 'atlassian:work-item:update:status',
38
+ type: 'string',
39
+ fieldKey: 'status',
40
+ inputs: {
41
+ status: {
42
+ type: 'string',
43
+ fetchAction: {
44
+ actionKey: 'atlassian:work-item:get:statuses',
45
+ integrationKey: 'jira',
46
+ fieldKey: 'status',
47
+ type: 'string',
48
+ inputs: {
49
+ issueId: {
50
+ type: 'string'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }],
57
+ permissions: {
58
+ data: [{
59
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
60
+ fieldKey: 'summary',
61
+ isEditable: true
62
+ }, {
63
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
64
+ fieldKey: 'summary',
65
+ isEditable: true
66
+ }, {
67
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
68
+ fieldKey: 'status',
69
+ isEditable: true
70
+ }, {
71
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
72
+ fieldKey: 'status',
73
+ isEditable: true
74
+ }]
75
+ }
76
+ };
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockDatasourceDataNoActionsResponse = void 0;
7
+ var mockDatasourceDataNoActionsResponse = exports.mockDatasourceDataNoActionsResponse = {
8
+ meta: {
9
+ key: 'jira-object-provider',
10
+ access: 'granted',
11
+ auth: [],
12
+ definitionId: 'object-resolver-service',
13
+ product: 'jira',
14
+ visibility: 'restricted',
15
+ extensionKey: 'jira-object-provider',
16
+ providerName: 'Jira',
17
+ destinationObjectTypes: ['issue']
18
+ },
19
+ data: {
20
+ totalCount: 1234,
21
+ items: [{
22
+ ari: {
23
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025'
24
+ },
25
+ id: {
26
+ data: 'EDM-12'
27
+ },
28
+ description: {
29
+ data: 'Design datasource feature'
30
+ },
31
+ createdAt: {
32
+ data: '2023-01-22T01:30:00.000-05:00'
33
+ },
34
+ assigned: {
35
+ data: {
36
+ displayName: 'Sasha'
37
+ }
38
+ },
39
+ status: {
40
+ data: {
41
+ text: 'In Progress',
42
+ style: {
43
+ appearance: 'inprogress'
44
+ }
45
+ }
46
+ }
47
+ }, {
48
+ ari: {
49
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10026'
50
+ },
51
+ id: {
52
+ data: 'EDM-14'
53
+ },
54
+ description: {
55
+ data: 'Implement datasource feature'
56
+ },
57
+ createdAt: {
58
+ data: '2023-03-01T01:30:00.000-05:00'
59
+ },
60
+ assigned: {
61
+ data: {
62
+ displayName: 'Hana'
63
+ }
64
+ },
65
+ status: {
66
+ data: {
67
+ text: 'To Do',
68
+ style: {
69
+ appearance: 'new'
70
+ }
71
+ }
72
+ }
73
+ }, {
74
+ ari: {
75
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10027'
76
+ },
77
+ id: {
78
+ data: 'EDM-15'
79
+ },
80
+ description: {
81
+ data: 'Add Jira Provider'
82
+ },
83
+ createdAt: {
84
+ data: '2023-03-31T01:30:00.000-05:00'
85
+ },
86
+ assigned: {
87
+ data: {
88
+ displayName: 'Princey'
89
+ }
90
+ },
91
+ status: {
92
+ data: {
93
+ text: 'To Do'
94
+ }
95
+ }
96
+ }, {
97
+ ari: {
98
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10028'
99
+ },
100
+ id: {
101
+ data: 'EDM-16'
102
+ },
103
+ description: {
104
+ data: 'Plan team party'
105
+ },
106
+ createdAt: {
107
+ data: '2023-05-01T01:30:00.000-05:00'
108
+ },
109
+ assigned: {
110
+ data: {
111
+ displayName: 'Nidhin'
112
+ }
113
+ },
114
+ status: {
115
+ data: {
116
+ text: 'Done',
117
+ style: {
118
+ appearance: 'success'
119
+ }
120
+ }
121
+ }
122
+ }],
123
+ nextPageCursor: 'c3RhcnRBdD01'
124
+ }
125
+ };
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockDatasourceDataResponse = void 0;
7
+ var mockDatasourceDataResponse = exports.mockDatasourceDataResponse = {
8
+ meta: {
9
+ key: 'jira-object-provider',
10
+ access: 'granted',
11
+ auth: [],
12
+ definitionId: 'object-resolver-service',
13
+ product: 'jira',
14
+ visibility: 'restricted',
15
+ extensionKey: 'jira-object-provider',
16
+ providerName: 'Jira',
17
+ destinationObjectTypes: ['issue'],
18
+ objectTypesEntity: 'work-item'
19
+ },
20
+ data: {
21
+ totalCount: 1234,
22
+ items: [{
23
+ ari: {
24
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025'
25
+ },
26
+ id: {
27
+ data: 'EDM-12'
28
+ },
29
+ description: {
30
+ data: 'Design datasource feature'
31
+ },
32
+ createdAt: {
33
+ data: '2023-01-22T01:30:00.000-05:00'
34
+ },
35
+ assigned: {
36
+ data: {
37
+ displayName: 'Sasha'
38
+ }
39
+ },
40
+ status: {
41
+ data: {
42
+ text: 'In Progress',
43
+ style: {
44
+ appearance: 'inprogress'
45
+ }
46
+ }
47
+ }
48
+ }, {
49
+ ari: {
50
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10026'
51
+ },
52
+ id: {
53
+ data: 'EDM-14'
54
+ },
55
+ description: {
56
+ data: 'Implement datasource feature'
57
+ },
58
+ createdAt: {
59
+ data: '2023-03-01T01:30:00.000-05:00'
60
+ },
61
+ assigned: {
62
+ data: {
63
+ displayName: 'Hana'
64
+ }
65
+ },
66
+ status: {
67
+ data: {
68
+ text: 'To Do',
69
+ style: {
70
+ appearance: 'new'
71
+ }
72
+ }
73
+ }
74
+ }, {
75
+ ari: {
76
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10027'
77
+ },
78
+ id: {
79
+ data: 'EDM-15'
80
+ },
81
+ description: {
82
+ data: 'Add Jira Provider'
83
+ },
84
+ createdAt: {
85
+ data: '2023-03-31T01:30:00.000-05:00'
86
+ },
87
+ assigned: {
88
+ data: {
89
+ displayName: 'Princey'
90
+ }
91
+ },
92
+ status: {
93
+ data: {
94
+ text: 'To Do'
95
+ }
96
+ }
97
+ }, {
98
+ ari: {
99
+ data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10028'
100
+ },
101
+ id: {
102
+ data: 'EDM-16'
103
+ },
104
+ description: {
105
+ data: 'Plan team party'
106
+ },
107
+ createdAt: {
108
+ data: '2023-05-01T01:30:00.000-05:00'
109
+ },
110
+ assigned: {
111
+ data: {
112
+ displayName: 'Nidhin'
113
+ }
114
+ },
115
+ status: {
116
+ data: {
117
+ text: 'Done',
118
+ style: {
119
+ appearance: 'success'
120
+ }
121
+ }
122
+ }
123
+ }],
124
+ nextPageCursor: 'c3RhcnRBdD01'
125
+ }
126
+ };