@atlaskit/link-client-extension 6.0.1 → 6.1.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 (83) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/entry-points/data-source-client-extension-mocks.js +53 -0
  3. package/dist/cjs/entry-points/data-source-response-types.js +1 -0
  4. package/dist/cjs/entry-points/use-data-source-client-extension.js +18 -0
  5. package/dist/cjs/entry-points/use-smart-link-client-extension.js +12 -0
  6. package/dist/cjs/index.js +11 -6
  7. package/dist/cjs/services/use-data-source-client-extension/index.js +28 -28
  8. package/dist/cjs/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +12 -0
  9. package/dist/cjs/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +76 -0
  10. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +125 -0
  11. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDataResponse.js +126 -0
  12. package/dist/cjs/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +79 -0
  13. package/dist/cjs/services/use-data-source-client-extension/mockExecuteActionResponse.js +11 -0
  14. package/dist/cjs/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +14 -0
  15. package/dist/cjs/services/use-data-source-client-extension/mocks.js +7 -405
  16. package/dist/cjs/services/use-smart-link-client-extension/index.js +17 -17
  17. package/dist/es2019/entry-points/data-source-client-extension-mocks.js +6 -0
  18. package/dist/es2019/entry-points/data-source-response-types.js +0 -0
  19. package/dist/es2019/entry-points/use-data-source-client-extension.js +1 -0
  20. package/dist/es2019/entry-points/use-smart-link-client-extension.js +1 -0
  21. package/dist/es2019/index.js +10 -1
  22. package/dist/es2019/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +6 -0
  23. package/dist/es2019/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +70 -0
  24. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +119 -0
  25. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDataResponse.js +120 -0
  26. package/dist/es2019/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +73 -0
  27. package/dist/es2019/services/use-data-source-client-extension/mockExecuteActionResponse.js +5 -0
  28. package/dist/es2019/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +8 -0
  29. package/dist/es2019/services/use-data-source-client-extension/mocks.js +2 -400
  30. package/dist/esm/entry-points/data-source-client-extension-mocks.js +6 -0
  31. package/dist/esm/entry-points/data-source-response-types.js +0 -0
  32. package/dist/esm/entry-points/use-data-source-client-extension.js +1 -0
  33. package/dist/esm/entry-points/use-smart-link-client-extension.js +1 -0
  34. package/dist/esm/index.js +10 -1
  35. package/dist/esm/services/use-data-source-client-extension/index.js +28 -28
  36. package/dist/esm/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.js +6 -0
  37. package/dist/esm/services/use-data-source-client-extension/mockActionsDiscoveryResponse.js +70 -0
  38. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.js +119 -0
  39. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDataResponse.js +120 -0
  40. package/dist/esm/services/use-data-source-client-extension/mockDatasourceDetailsResponse.js +73 -0
  41. package/dist/esm/services/use-data-source-client-extension/mockExecuteActionResponse.js +5 -0
  42. package/dist/esm/services/use-data-source-client-extension/mockExecuteActionResponseFailure.js +8 -0
  43. package/dist/esm/services/use-data-source-client-extension/mocks.js +3 -401
  44. package/dist/esm/services/use-smart-link-client-extension/index.js +17 -17
  45. package/dist/types/entry-points/data-source-client-extension-mocks.d.ts +6 -0
  46. package/dist/types/entry-points/data-source-response-types.d.ts +1 -0
  47. package/dist/types/entry-points/use-data-source-client-extension.d.ts +1 -0
  48. package/dist/types/entry-points/use-smart-link-client-extension.d.ts +1 -0
  49. package/dist/types/index.d.ts +11 -2
  50. package/dist/types/services/use-data-source-client-extension/index.d.ts +3 -3
  51. package/dist/types/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.d.ts +2 -0
  52. package/dist/types/services/use-data-source-client-extension/mockActionsDiscoveryResponse.d.ts +2 -0
  53. package/dist/types/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.d.ts +2 -0
  54. package/dist/types/services/use-data-source-client-extension/mockDatasourceDataResponse.d.ts +2 -0
  55. package/dist/types/services/use-data-source-client-extension/mockDatasourceDetailsResponse.d.ts +2 -0
  56. package/dist/types/services/use-data-source-client-extension/mockExecuteActionResponse.d.ts +2 -0
  57. package/dist/types/services/use-data-source-client-extension/mockExecuteActionResponseFailure.d.ts +2 -0
  58. package/dist/types/services/use-data-source-client-extension/mocks.d.ts +1 -8
  59. package/dist/types-ts4.5/entry-points/data-source-client-extension-mocks.d.ts +6 -0
  60. package/dist/types-ts4.5/entry-points/data-source-response-types.d.ts +1 -0
  61. package/dist/types-ts4.5/entry-points/use-data-source-client-extension.d.ts +1 -0
  62. package/dist/types-ts4.5/entry-points/use-smart-link-client-extension.d.ts +1 -0
  63. package/dist/types-ts4.5/index.d.ts +11 -2
  64. package/dist/types-ts4.5/services/use-data-source-client-extension/index.d.ts +3 -3
  65. package/dist/types-ts4.5/services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse.d.ts +2 -0
  66. package/dist/types-ts4.5/services/use-data-source-client-extension/mockActionsDiscoveryResponse.d.ts +2 -0
  67. package/dist/types-ts4.5/services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse.d.ts +2 -0
  68. package/dist/types-ts4.5/services/use-data-source-client-extension/mockDatasourceDataResponse.d.ts +2 -0
  69. package/dist/types-ts4.5/services/use-data-source-client-extension/mockDatasourceDetailsResponse.d.ts +2 -0
  70. package/dist/types-ts4.5/services/use-data-source-client-extension/mockExecuteActionResponse.d.ts +2 -0
  71. package/dist/types-ts4.5/services/use-data-source-client-extension/mockExecuteActionResponseFailure.d.ts +2 -0
  72. package/dist/types-ts4.5/services/use-data-source-client-extension/mocks.d.ts +1 -8
  73. package/link-client-extension.docs.tsx +67 -0
  74. package/package.json +9 -7
  75. package/use-data-source-client-extension/mocks/package.json +15 -0
  76. package/use-data-source-client-extension/package.json +15 -0
  77. package/use-data-source-client-extension/types/package.json +15 -0
  78. package/use-smart-link-client-extension/package.json +15 -0
  79. /package/dist/cjs/{types.js → services/use-data-source-client-extension/types.js} +0 -0
  80. /package/dist/es2019/{types.js → services/use-data-source-client-extension/types.js} +0 -0
  81. /package/dist/esm/{types.js → services/use-data-source-client-extension/types.js} +0 -0
  82. /package/dist/types/{types.d.ts → services/use-data-source-client-extension/types.d.ts} +0 -0
  83. /package/dist/types-ts4.5/{types.d.ts → services/use-data-source-client-extension/types.d.ts} +0 -0
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockDatasourceDetailsResponse = void 0;
7
+ var mockDatasourceDetailsResponse = exports.mockDatasourceDetailsResponse = {
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
+ ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
21
+ id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
22
+ name: 'JQL Datasource',
23
+ description: 'Fetches Issues using JQL',
24
+ parameters: [{
25
+ key: 'cloudId',
26
+ type: 'string',
27
+ description: 'Cloud Id'
28
+ }, {
29
+ key: 'jql',
30
+ type: 'string',
31
+ description: 'JQL query to retrieve list of issues'
32
+ }],
33
+ schema: {
34
+ properties: [{
35
+ key: 'id',
36
+ title: '',
37
+ type: 'string'
38
+ }, {
39
+ key: 'issue',
40
+ title: 'Key',
41
+ type: 'link'
42
+ }, {
43
+ key: 'type',
44
+ type: 'icon',
45
+ title: 'Type'
46
+ }, {
47
+ key: 'summary',
48
+ title: 'Summary',
49
+ type: 'link'
50
+ }, {
51
+ key: 'assignee',
52
+ title: 'Assignee',
53
+ type: 'user'
54
+ }, {
55
+ key: 'priority',
56
+ title: 'P',
57
+ type: 'icon'
58
+ }, {
59
+ key: 'labels',
60
+ title: 'Labels',
61
+ type: 'tag',
62
+ isList: true
63
+ }, {
64
+ key: 'status',
65
+ title: 'Status',
66
+ type: 'status'
67
+ }, {
68
+ key: 'created',
69
+ title: 'Created',
70
+ type: 'string'
71
+ }, {
72
+ key: 'due',
73
+ title: 'Due Date',
74
+ type: 'string'
75
+ }],
76
+ defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
77
+ }
78
+ }
79
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockExecuteActionResponse = void 0;
7
+ var _linkingTypes = require("@atlaskit/linking-types");
8
+ var mockExecuteActionResponse = exports.mockExecuteActionResponse = {
9
+ operationStatus: _linkingTypes.ActionOperationStatus.SUCCESS,
10
+ errors: []
11
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mockExecuteActionResponseFailure = void 0;
7
+ var _linkingTypes = require("@atlaskit/linking-types");
8
+ var mockExecuteActionResponseFailure = exports.mockExecuteActionResponseFailure = {
9
+ operationStatus: _linkingTypes.ActionOperationStatus.FAILURE,
10
+ errors: [{
11
+ message: 'summary: You must specify a summary of the issue.',
12
+ code: 400
13
+ }]
14
+ };
@@ -4,414 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.mockExecuteActionResponseFailure = exports.mockExecuteActionResponse = exports.mockDatasourceDetailsResponse = exports.mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponse = exports.mockDatasourceDataNoActionsResponse = exports.mockActionsDiscoveryResponse = exports.mockActionsDiscoveryEmptyResponse = void 0;
7
+ exports.mockDatasourceDataResponseWithSchema = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _linkingTypes = require("@atlaskit/linking-types");
9
+ var _mockDatasourceDataResponse = require("./mockDatasourceDataResponse");
10
+ var _mockDatasourceDetailsResponse = require("./mockDatasourceDetailsResponse");
10
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- var mockDatasourceDataResponse = exports.mockDatasourceDataResponse = {
13
- meta: {
14
- key: 'jira-object-provider',
15
- access: 'granted',
16
- auth: [],
17
- definitionId: 'object-resolver-service',
18
- product: 'jira',
19
- visibility: 'restricted',
20
- extensionKey: 'jira-object-provider',
21
- providerName: 'Jira',
22
- destinationObjectTypes: ['issue'],
23
- objectTypesEntity: 'work-item'
24
- },
25
- data: {
26
- totalCount: 1234,
27
- items: [{
28
- ari: {
29
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025'
30
- },
31
- id: {
32
- data: 'EDM-12'
33
- },
34
- description: {
35
- data: 'Design datasource feature'
36
- },
37
- createdAt: {
38
- data: '2023-01-22T01:30:00.000-05:00'
39
- },
40
- assigned: {
41
- data: {
42
- displayName: 'Sasha'
43
- }
44
- },
45
- status: {
46
- data: {
47
- text: 'In Progress',
48
- style: {
49
- appearance: 'inprogress'
50
- }
51
- }
52
- }
53
- }, {
54
- ari: {
55
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10026'
56
- },
57
- id: {
58
- data: 'EDM-14'
59
- },
60
- description: {
61
- data: 'Implement datasource feature'
62
- },
63
- createdAt: {
64
- data: '2023-03-01T01:30:00.000-05:00'
65
- },
66
- assigned: {
67
- data: {
68
- displayName: 'Hana'
69
- }
70
- },
71
- status: {
72
- data: {
73
- text: 'To Do',
74
- style: {
75
- appearance: 'new'
76
- }
77
- }
78
- }
79
- }, {
80
- ari: {
81
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10027'
82
- },
83
- id: {
84
- data: 'EDM-15'
85
- },
86
- description: {
87
- data: 'Add Jira Provider'
88
- },
89
- createdAt: {
90
- data: '2023-03-31T01:30:00.000-05:00'
91
- },
92
- assigned: {
93
- data: {
94
- displayName: 'Princey'
95
- }
96
- },
97
- status: {
98
- data: {
99
- text: 'To Do'
100
- }
101
- }
102
- }, {
103
- ari: {
104
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10028'
105
- },
106
- id: {
107
- data: 'EDM-16'
108
- },
109
- description: {
110
- data: 'Plan team party'
111
- },
112
- createdAt: {
113
- data: '2023-05-01T01:30:00.000-05:00'
114
- },
115
- assigned: {
116
- data: {
117
- displayName: 'Nidhin'
118
- }
119
- },
120
- status: {
121
- data: {
122
- text: 'Done',
123
- style: {
124
- appearance: 'success'
125
- }
126
- }
127
- }
128
- }],
129
- nextPageCursor: 'c3RhcnRBdD01'
130
- }
131
- };
132
- var mockDatasourceDataNoActionsResponse = exports.mockDatasourceDataNoActionsResponse = {
133
- meta: {
134
- key: 'jira-object-provider',
135
- access: 'granted',
136
- auth: [],
137
- definitionId: 'object-resolver-service',
138
- product: 'jira',
139
- visibility: 'restricted',
140
- extensionKey: 'jira-object-provider',
141
- providerName: 'Jira',
142
- destinationObjectTypes: ['issue']
143
- },
144
- data: {
145
- totalCount: 1234,
146
- items: [{
147
- ari: {
148
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025'
149
- },
150
- id: {
151
- data: 'EDM-12'
152
- },
153
- description: {
154
- data: 'Design datasource feature'
155
- },
156
- createdAt: {
157
- data: '2023-01-22T01:30:00.000-05:00'
158
- },
159
- assigned: {
160
- data: {
161
- displayName: 'Sasha'
162
- }
163
- },
164
- status: {
165
- data: {
166
- text: 'In Progress',
167
- style: {
168
- appearance: 'inprogress'
169
- }
170
- }
171
- }
172
- }, {
173
- ari: {
174
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10026'
175
- },
176
- id: {
177
- data: 'EDM-14'
178
- },
179
- description: {
180
- data: 'Implement datasource feature'
181
- },
182
- createdAt: {
183
- data: '2023-03-01T01:30:00.000-05:00'
184
- },
185
- assigned: {
186
- data: {
187
- displayName: 'Hana'
188
- }
189
- },
190
- status: {
191
- data: {
192
- text: 'To Do',
193
- style: {
194
- appearance: 'new'
195
- }
196
- }
197
- }
198
- }, {
199
- ari: {
200
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10027'
201
- },
202
- id: {
203
- data: 'EDM-15'
204
- },
205
- description: {
206
- data: 'Add Jira Provider'
207
- },
208
- createdAt: {
209
- data: '2023-03-31T01:30:00.000-05:00'
210
- },
211
- assigned: {
212
- data: {
213
- displayName: 'Princey'
214
- }
215
- },
216
- status: {
217
- data: {
218
- text: 'To Do'
219
- }
220
- }
221
- }, {
222
- ari: {
223
- data: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10028'
224
- },
225
- id: {
226
- data: 'EDM-16'
227
- },
228
- description: {
229
- data: 'Plan team party'
230
- },
231
- createdAt: {
232
- data: '2023-05-01T01:30:00.000-05:00'
233
- },
234
- assigned: {
235
- data: {
236
- displayName: 'Nidhin'
237
- }
238
- },
239
- status: {
240
- data: {
241
- text: 'Done',
242
- style: {
243
- appearance: 'success'
244
- }
245
- }
246
- }
247
- }],
248
- nextPageCursor: 'c3RhcnRBdD01'
249
- }
250
- };
251
- var mockDatasourceDetailsResponse = exports.mockDatasourceDetailsResponse = {
252
- meta: {
253
- key: 'jira-object-provider',
254
- access: 'granted',
255
- auth: [],
256
- definitionId: 'object-resolver-service',
257
- product: 'jira',
258
- visibility: 'restricted',
259
- extensionKey: 'jira-object-provider',
260
- providerName: 'Jira',
261
- destinationObjectTypes: ['issue']
262
- },
263
- data: {
264
- ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
265
- id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
266
- name: 'JQL Datasource',
267
- description: 'Fetches Issues using JQL',
268
- parameters: [{
269
- key: 'cloudId',
270
- type: 'string',
271
- description: 'Cloud Id'
272
- }, {
273
- key: 'jql',
274
- type: 'string',
275
- description: 'JQL query to retrieve list of issues'
276
- }],
13
+ var mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, _mockDatasourceDataResponse.mockDatasourceDataResponse), {}, {
14
+ data: _objectSpread(_objectSpread({}, _mockDatasourceDataResponse.mockDatasourceDataResponse.data), {}, {
277
15
  schema: {
278
- properties: [{
279
- key: 'id',
280
- title: '',
281
- type: 'string'
282
- }, {
283
- key: 'issue',
284
- title: 'Key',
285
- type: 'link'
286
- }, {
287
- key: 'type',
288
- type: 'icon',
289
- title: 'Type'
290
- }, {
291
- key: 'summary',
292
- title: 'Summary',
293
- type: 'link'
294
- }, {
295
- key: 'assignee',
296
- title: 'Assignee',
297
- type: 'user'
298
- }, {
299
- key: 'priority',
300
- title: 'P',
301
- type: 'icon'
302
- }, {
303
- key: 'labels',
304
- title: 'Labels',
305
- type: 'tag',
306
- isList: true
307
- }, {
308
- key: 'status',
309
- title: 'Status',
310
- type: 'status'
311
- }, {
312
- key: 'created',
313
- title: 'Created',
314
- type: 'string'
315
- }, {
316
- key: 'due',
317
- title: 'Due Date',
318
- type: 'string'
319
- }],
320
- defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
321
- }
322
- }
323
- };
324
- var mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, mockDatasourceDataResponse), {}, {
325
- data: _objectSpread(_objectSpread({}, mockDatasourceDataResponse.data), {}, {
326
- schema: {
327
- properties: mockDatasourceDetailsResponse.data.schema.properties
16
+ properties: _mockDatasourceDetailsResponse.mockDatasourceDetailsResponse.data.schema.properties
328
17
  }
329
18
  })
330
- });
331
- var mockActionsDiscoveryResponse = exports.mockActionsDiscoveryResponse = {
332
- actions: [{
333
- actionKey: 'atlassian:work-item:update:summary',
334
- description: 'Updates issue summary',
335
- fieldKey: 'summary',
336
- integrationKey: 'jira',
337
- type: 'string'
338
- }, {
339
- integrationKey: 'jira',
340
- actionKey: 'atlassian:work-item:update:priority',
341
- fieldKey: 'priority',
342
- type: 'number',
343
- inputs: {
344
- priority: {
345
- type: 'string',
346
- fetchAction: {
347
- actionKey: 'atlassian:work-item:get:priorities',
348
- integrationKey: 'jira',
349
- fieldKey: 'priority',
350
- type: 'string',
351
- inputs: {
352
- issueId: {
353
- type: 'string'
354
- }
355
- }
356
- }
357
- }
358
- }
359
- }, {
360
- integrationKey: 'jira',
361
- actionKey: 'atlassian:work-item:update:status',
362
- type: 'string',
363
- fieldKey: 'status',
364
- inputs: {
365
- status: {
366
- type: 'string',
367
- fetchAction: {
368
- actionKey: 'atlassian:work-item:get:statuses',
369
- integrationKey: 'jira',
370
- fieldKey: 'status',
371
- type: 'string',
372
- inputs: {
373
- issueId: {
374
- type: 'string'
375
- }
376
- }
377
- }
378
- }
379
- }
380
- }],
381
- permissions: {
382
- data: [{
383
- ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
384
- fieldKey: 'summary',
385
- isEditable: true
386
- }, {
387
- ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
388
- fieldKey: 'summary',
389
- isEditable: true
390
- }, {
391
- ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
392
- fieldKey: 'status',
393
- isEditable: true
394
- }, {
395
- ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
396
- fieldKey: 'status',
397
- isEditable: true
398
- }]
399
- }
400
- };
401
- var mockActionsDiscoveryEmptyResponse = exports.mockActionsDiscoveryEmptyResponse = {
402
- actions: [],
403
- permissions: {
404
- data: []
405
- }
406
- };
407
- var mockExecuteActionResponse = exports.mockExecuteActionResponse = {
408
- operationStatus: _linkingTypes.ActionOperationStatus.SUCCESS,
409
- errors: []
410
- };
411
- var mockExecuteActionResponseFailure = exports.mockExecuteActionResponseFailure = {
412
- operationStatus: _linkingTypes.ActionOperationStatus.FAILURE,
413
- errors: [{
414
- message: 'summary: You must specify a summary of the issue.',
415
- code: 400
416
- }]
417
- };
19
+ });
@@ -23,38 +23,38 @@ var useSmartLinkClientExtension = exports.useSmartLinkClientExtension = function
23
23
  var resolverUrl = (0, _useResolverUrl.useResolverUrl)(cardClient);
24
24
  var invoke = (0, _react.useCallback)( /*#__PURE__*/function () {
25
25
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
26
- var errorBody;
27
- return _regenerator.default.wrap(function _callee$(_context) {
26
+ var errorBody, _t;
27
+ return _regenerator.default.wrap(function (_context) {
28
28
  while (1) switch (_context.prev = _context.next) {
29
29
  case 0:
30
30
  _context.prev = 0;
31
- _context.next = 3;
31
+ _context.next = 1;
32
32
  return (0, _linkingCommon.request)('post', "".concat(resolverUrl, "/invoke"), data, undefined, [200, 201, 202, 203, 204]);
33
- case 3:
33
+ case 1:
34
34
  return _context.abrupt("return", _context.sent);
35
- case 6:
36
- _context.prev = 6;
37
- _context.t0 = _context["catch"](0);
38
- if (!(_context.t0 && _context.t0.json && typeof _context.t0.json === 'function')) {
39
- _context.next = 14;
35
+ case 2:
36
+ _context.prev = 2;
37
+ _t = _context["catch"](0);
38
+ if (!(_t && _t.json && typeof _t.json === 'function')) {
39
+ _context.next = 4;
40
40
  break;
41
41
  }
42
- _context.next = 11;
43
- return _context.t0.json();
44
- case 11:
42
+ _context.next = 3;
43
+ return _t.json();
44
+ case 3:
45
45
  errorBody = _context.sent;
46
46
  if (!errorBody) {
47
- _context.next = 14;
47
+ _context.next = 4;
48
48
  break;
49
49
  }
50
50
  throw new _smartLinkActions.InvokeError(errorBody === null || errorBody === void 0 ? void 0 : errorBody.error.message, errorBody === null || errorBody === void 0 ? void 0 : errorBody.error.status);
51
- case 14:
52
- throw _context.t0;
53
- case 15:
51
+ case 4:
52
+ throw _t;
53
+ case 5:
54
54
  case "end":
55
55
  return _context.stop();
56
56
  }
57
- }, _callee, null, [[0, 6]]);
57
+ }, _callee, null, [[0, 2]]);
58
58
  }));
59
59
  return function (_x) {
60
60
  return _ref.apply(this, arguments);
@@ -0,0 +1,6 @@
1
+ export { mockActionsDiscoveryEmptyResponse } from '../services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse';
2
+ export { mockActionsDiscoveryResponse } from '../services/use-data-source-client-extension/mockActionsDiscoveryResponse';
3
+ export { mockDatasourceDataNoActionsResponse } from '../services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse';
4
+ export { mockDatasourceDataResponse } from '../services/use-data-source-client-extension/mockDatasourceDataResponse';
5
+ export { mockDatasourceDetailsResponse as mockDatasourceResponse, mockDatasourceDetailsResponse } from '../services/use-data-source-client-extension/mockDatasourceDetailsResponse';
6
+ export { mockDatasourceDataResponseWithSchema } from '../services/use-data-source-client-extension/mocks';
@@ -0,0 +1 @@
1
+ export { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '../services/use-data-source-client-extension';
@@ -0,0 +1 @@
1
+ export { useSmartLinkClientExtension } from '../services/use-smart-link-client-extension';
@@ -1,3 +1,12 @@
1
+ /** @deprecated use @atlaskit/link-client-extension/use-smart-link-client-extension */
1
2
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
3
+ /** @deprecated use @atlaskit/link-client-extension/use-data-source-client-extension */
2
4
  export { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
- export { mockDatasourceDetailsResponse as mockDatasourceResponse, mockDatasourceDetailsResponse, mockDatasourceDataResponse, mockDatasourceDataNoActionsResponse, mockDatasourceDataResponseWithSchema, mockActionsDiscoveryResponse, mockActionsDiscoveryEmptyResponse } from './services/use-data-source-client-extension/mocks';
5
+ /** @deprecated use @atlaskit/link-client-extension/data-source-client-extension/mocks */
6
+ export { mockActionsDiscoveryEmptyResponse } from './services/use-data-source-client-extension/mockActionsDiscoveryEmptyResponse';
7
+ export { mockActionsDiscoveryResponse } from './services/use-data-source-client-extension/mockActionsDiscoveryResponse';
8
+ export { mockDatasourceDataNoActionsResponse } from './services/use-data-source-client-extension/mockDatasourceDataNoActionsResponse';
9
+ export { mockDatasourceDataResponse } from './services/use-data-source-client-extension/mockDatasourceDataResponse';
10
+ export { mockDatasourceDetailsResponse as mockDatasourceResponse, mockDatasourceDetailsResponse } from './services/use-data-source-client-extension/mockDatasourceDetailsResponse';
11
+ export { mockDatasourceDataResponseWithSchema } from './services/use-data-source-client-extension/mocks';
12
+ /** @deprecated use @atlaskit/link-client-extension/use-data-source-client-extension/types */
@@ -0,0 +1,6 @@
1
+ export const mockActionsDiscoveryEmptyResponse = {
2
+ actions: [],
3
+ permissions: {
4
+ data: []
5
+ }
6
+ };
@@ -0,0 +1,70 @@
1
+ export const mockActionsDiscoveryResponse = {
2
+ actions: [{
3
+ actionKey: 'atlassian:work-item:update:summary',
4
+ description: 'Updates issue summary',
5
+ fieldKey: 'summary',
6
+ integrationKey: 'jira',
7
+ type: 'string'
8
+ }, {
9
+ integrationKey: 'jira',
10
+ actionKey: 'atlassian:work-item:update:priority',
11
+ fieldKey: 'priority',
12
+ type: 'number',
13
+ inputs: {
14
+ priority: {
15
+ type: 'string',
16
+ fetchAction: {
17
+ actionKey: 'atlassian:work-item:get:priorities',
18
+ integrationKey: 'jira',
19
+ fieldKey: 'priority',
20
+ type: 'string',
21
+ inputs: {
22
+ issueId: {
23
+ type: 'string'
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }, {
30
+ integrationKey: 'jira',
31
+ actionKey: 'atlassian:work-item:update:status',
32
+ type: 'string',
33
+ fieldKey: 'status',
34
+ inputs: {
35
+ status: {
36
+ type: 'string',
37
+ fetchAction: {
38
+ actionKey: 'atlassian:work-item:get:statuses',
39
+ integrationKey: 'jira',
40
+ fieldKey: 'status',
41
+ type: 'string',
42
+ inputs: {
43
+ issueId: {
44
+ type: 'string'
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }],
51
+ permissions: {
52
+ data: [{
53
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
54
+ fieldKey: 'summary',
55
+ isEditable: true
56
+ }, {
57
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
58
+ fieldKey: 'summary',
59
+ isEditable: true
60
+ }, {
61
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10025',
62
+ fieldKey: 'status',
63
+ isEditable: true
64
+ }, {
65
+ ari: 'ari:cloud:jira:3ac63b37-9bca-435e-9840-eff6f8739dba:issue/10030',
66
+ fieldKey: 'status',
67
+ isEditable: true
68
+ }]
69
+ }
70
+ };