@atlaskit/link-client-extension 1.2.2 → 1.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`04295e9d5bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04295e9d5bc) - [ux] Updating ORS response to include datasources and facilitating pasting JQL links turning into datasource tables
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 1.3.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`f427908df3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f427908df3d) - change the datasource response type to include the meta data section and the data response will wrap in the data section
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 1.2.2
4
24
 
5
25
  ### Patch Changes
@@ -9,164 +9,187 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
11
  var mockDatasourceDataResponse = {
12
- totalCount: 1234,
13
- data: [{
14
- id: {
15
- data: 'EDM-12'
16
- },
17
- description: {
18
- data: 'Design datasource feature'
19
- },
20
- createdAt: {
21
- data: '2023-01-22T01:30:00.000-05:00'
22
- },
23
- assigned: {
24
- data: {
25
- displayName: 'Sasha'
26
- }
27
- },
28
- status: {
29
- data: {
30
- text: 'In Progress',
31
- style: {
32
- appearance: 'inprogress'
12
+ meta: {
13
+ key: 'jira-object-provider',
14
+ access: 'granted',
15
+ auth: [],
16
+ definitionId: 'object-resolver-service',
17
+ product: 'jira',
18
+ visibility: 'restricted'
19
+ },
20
+ data: {
21
+ totalCount: 1234,
22
+ items: [{
23
+ id: {
24
+ data: 'EDM-12'
25
+ },
26
+ description: {
27
+ data: 'Design datasource feature'
28
+ },
29
+ createdAt: {
30
+ data: '2023-01-22T01:30:00.000-05:00'
31
+ },
32
+ assigned: {
33
+ data: {
34
+ displayName: 'Sasha'
33
35
  }
34
- }
35
- }
36
- }, {
37
- id: {
38
- data: 'EDM-14'
39
- },
40
- description: {
41
- data: 'Implement datasource feature'
42
- },
43
- createdAt: {
44
- data: '2023-03-01T01:30:00.000-05:00'
45
- },
46
- assigned: {
47
- data: {
48
- displayName: 'Hana'
49
- }
50
- },
51
- status: {
52
- data: {
53
- text: 'To Do',
54
- style: {
55
- appearance: 'new'
36
+ },
37
+ status: {
38
+ data: {
39
+ text: 'In Progress',
40
+ style: {
41
+ appearance: 'inprogress'
42
+ }
56
43
  }
57
44
  }
58
- }
59
- }, {
60
- id: {
61
- data: 'EDM-15'
62
- },
63
- description: {
64
- data: 'Add Jira Provider'
65
- },
66
- createdAt: {
67
- data: '2023-03-31T01:30:00.000-05:00'
68
- },
69
- assigned: {
70
- data: {
71
- displayName: 'Princey'
72
- }
73
- },
74
- status: {
75
- data: {
76
- text: 'To Do'
45
+ }, {
46
+ id: {
47
+ data: 'EDM-14'
48
+ },
49
+ description: {
50
+ data: 'Implement datasource feature'
51
+ },
52
+ createdAt: {
53
+ data: '2023-03-01T01:30:00.000-05:00'
54
+ },
55
+ assigned: {
56
+ data: {
57
+ displayName: 'Hana'
58
+ }
59
+ },
60
+ status: {
61
+ data: {
62
+ text: 'To Do',
63
+ style: {
64
+ appearance: 'new'
65
+ }
66
+ }
77
67
  }
78
- }
79
- }, {
80
- id: {
81
- data: 'EDM-16'
82
- },
83
- description: {
84
- data: 'Plan team party'
85
- },
86
- createdAt: {
87
- data: '2023-05-01T01:30:00.000-05:00'
88
- },
89
- assigned: {
90
- data: {
91
- displayName: 'Nidhin'
68
+ }, {
69
+ id: {
70
+ data: 'EDM-15'
71
+ },
72
+ description: {
73
+ data: 'Add Jira Provider'
74
+ },
75
+ createdAt: {
76
+ data: '2023-03-31T01:30:00.000-05:00'
77
+ },
78
+ assigned: {
79
+ data: {
80
+ displayName: 'Princey'
81
+ }
82
+ },
83
+ status: {
84
+ data: {
85
+ text: 'To Do'
86
+ }
92
87
  }
93
- },
94
- status: {
95
- data: {
96
- text: 'Done',
97
- style: {
98
- appearance: 'success'
88
+ }, {
89
+ id: {
90
+ data: 'EDM-16'
91
+ },
92
+ description: {
93
+ data: 'Plan team party'
94
+ },
95
+ createdAt: {
96
+ data: '2023-05-01T01:30:00.000-05:00'
97
+ },
98
+ assigned: {
99
+ data: {
100
+ displayName: 'Nidhin'
101
+ }
102
+ },
103
+ status: {
104
+ data: {
105
+ text: 'Done',
106
+ style: {
107
+ appearance: 'success'
108
+ }
99
109
  }
100
110
  }
101
- }
102
- }],
103
- nextPageCursor: 'c3RhcnRBdD01'
111
+ }],
112
+ nextPageCursor: 'c3RhcnRBdD01'
113
+ }
104
114
  };
105
115
  exports.mockDatasourceDataResponse = mockDatasourceDataResponse;
106
116
  var mockDatasourceResponse = {
107
- ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
108
- id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
109
- name: 'JQL Datasource',
110
- description: 'Fetches Issues using JQL',
111
- parameters: [{
112
- key: 'cloudId',
113
- type: 'string',
114
- description: 'Cloud Id'
115
- }, {
116
- key: 'jql',
117
- type: 'string',
118
- description: 'JQL query to retrieve list of issues'
119
- }],
120
- schema: {
121
- properties: [{
122
- key: 'id',
123
- title: '',
124
- type: 'string'
125
- }, {
126
- key: 'issue',
127
- title: 'Key',
128
- type: 'link'
129
- }, {
130
- key: 'type',
131
- type: 'icon',
132
- title: 'Type'
133
- }, {
134
- key: 'summary',
135
- title: 'Summary',
136
- type: 'link'
137
- }, {
138
- key: 'assignee',
139
- title: 'Assignee',
140
- type: 'user'
117
+ meta: {
118
+ key: 'jira-object-provider',
119
+ access: 'granted',
120
+ auth: [],
121
+ definitionId: 'object-resolver-service',
122
+ product: 'jira',
123
+ visibility: 'restricted'
124
+ },
125
+ data: {
126
+ ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
127
+ id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
128
+ name: 'JQL Datasource',
129
+ description: 'Fetches Issues using JQL',
130
+ parameters: [{
131
+ key: 'cloudId',
132
+ type: 'string',
133
+ description: 'Cloud Id'
141
134
  }, {
142
- key: 'priority',
143
- title: 'P',
144
- type: 'icon'
145
- }, {
146
- key: 'labels',
147
- title: 'Labels',
148
- type: 'tag',
149
- isList: true
150
- }, {
151
- key: 'status',
152
- title: 'Status',
153
- type: 'status'
154
- }, {
155
- key: 'created',
156
- title: 'Created',
157
- type: 'string'
158
- }, {
159
- key: 'due',
160
- title: 'Due Date',
161
- type: 'string'
135
+ key: 'jql',
136
+ type: 'string',
137
+ description: 'JQL query to retrieve list of issues'
162
138
  }],
163
- defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
139
+ schema: {
140
+ properties: [{
141
+ key: 'id',
142
+ title: '',
143
+ type: 'string'
144
+ }, {
145
+ key: 'issue',
146
+ title: 'Key',
147
+ type: 'link'
148
+ }, {
149
+ key: 'type',
150
+ type: 'icon',
151
+ title: 'Type'
152
+ }, {
153
+ key: 'summary',
154
+ title: 'Summary',
155
+ type: 'link'
156
+ }, {
157
+ key: 'assignee',
158
+ title: 'Assignee',
159
+ type: 'user'
160
+ }, {
161
+ key: 'priority',
162
+ title: 'P',
163
+ type: 'icon'
164
+ }, {
165
+ key: 'labels',
166
+ title: 'Labels',
167
+ type: 'tag',
168
+ isList: true
169
+ }, {
170
+ key: 'status',
171
+ title: 'Status',
172
+ type: 'status'
173
+ }, {
174
+ key: 'created',
175
+ title: 'Created',
176
+ type: 'string'
177
+ }, {
178
+ key: 'due',
179
+ title: 'Due Date',
180
+ type: 'string'
181
+ }],
182
+ defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
183
+ }
164
184
  }
165
185
  };
166
186
  exports.mockDatasourceResponse = mockDatasourceResponse;
167
187
  var mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, mockDatasourceDataResponse), {}, {
168
- schema: {
169
- properties: mockDatasourceResponse.schema.properties
170
- }
188
+ data: _objectSpread(_objectSpread({}, mockDatasourceDataResponse.data), {}, {
189
+ schema: {
190
+ properties: mockDatasourceResponse.data.schema.properties,
191
+ defaultProperties: mockDatasourceResponse.data.schema.defaultProperties
192
+ }
193
+ })
171
194
  });
172
195
  exports.mockDatasourceDataResponseWithSchema = mockDatasourceDataResponseWithSchema;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,160 +1,184 @@
1
1
  export const mockDatasourceDataResponse = {
2
- totalCount: 1234,
3
- data: [{
4
- id: {
5
- data: 'EDM-12'
6
- },
7
- description: {
8
- data: 'Design datasource feature'
9
- },
10
- createdAt: {
11
- data: '2023-01-22T01:30:00.000-05:00'
12
- },
13
- assigned: {
14
- data: {
15
- displayName: 'Sasha'
16
- }
17
- },
18
- status: {
19
- data: {
20
- text: 'In Progress',
21
- style: {
22
- appearance: 'inprogress'
2
+ meta: {
3
+ key: 'jira-object-provider',
4
+ access: 'granted',
5
+ auth: [],
6
+ definitionId: 'object-resolver-service',
7
+ product: 'jira',
8
+ visibility: 'restricted'
9
+ },
10
+ data: {
11
+ totalCount: 1234,
12
+ items: [{
13
+ id: {
14
+ data: 'EDM-12'
15
+ },
16
+ description: {
17
+ data: 'Design datasource feature'
18
+ },
19
+ createdAt: {
20
+ data: '2023-01-22T01:30:00.000-05:00'
21
+ },
22
+ assigned: {
23
+ data: {
24
+ displayName: 'Sasha'
23
25
  }
24
- }
25
- }
26
- }, {
27
- id: {
28
- data: 'EDM-14'
29
- },
30
- description: {
31
- data: 'Implement datasource feature'
32
- },
33
- createdAt: {
34
- data: '2023-03-01T01:30:00.000-05:00'
35
- },
36
- assigned: {
37
- data: {
38
- displayName: 'Hana'
39
- }
40
- },
41
- status: {
42
- data: {
43
- text: 'To Do',
44
- style: {
45
- appearance: 'new'
26
+ },
27
+ status: {
28
+ data: {
29
+ text: 'In Progress',
30
+ style: {
31
+ appearance: 'inprogress'
32
+ }
46
33
  }
47
34
  }
48
- }
49
- }, {
50
- id: {
51
- data: 'EDM-15'
52
- },
53
- description: {
54
- data: 'Add Jira Provider'
55
- },
56
- createdAt: {
57
- data: '2023-03-31T01:30:00.000-05:00'
58
- },
59
- assigned: {
60
- data: {
61
- displayName: 'Princey'
62
- }
63
- },
64
- status: {
65
- data: {
66
- text: 'To Do'
35
+ }, {
36
+ id: {
37
+ data: 'EDM-14'
38
+ },
39
+ description: {
40
+ data: 'Implement datasource feature'
41
+ },
42
+ createdAt: {
43
+ data: '2023-03-01T01:30:00.000-05:00'
44
+ },
45
+ assigned: {
46
+ data: {
47
+ displayName: 'Hana'
48
+ }
49
+ },
50
+ status: {
51
+ data: {
52
+ text: 'To Do',
53
+ style: {
54
+ appearance: 'new'
55
+ }
56
+ }
67
57
  }
68
- }
69
- }, {
70
- id: {
71
- data: 'EDM-16'
72
- },
73
- description: {
74
- data: 'Plan team party'
75
- },
76
- createdAt: {
77
- data: '2023-05-01T01:30:00.000-05:00'
78
- },
79
- assigned: {
80
- data: {
81
- displayName: 'Nidhin'
58
+ }, {
59
+ id: {
60
+ data: 'EDM-15'
61
+ },
62
+ description: {
63
+ data: 'Add Jira Provider'
64
+ },
65
+ createdAt: {
66
+ data: '2023-03-31T01:30:00.000-05:00'
67
+ },
68
+ assigned: {
69
+ data: {
70
+ displayName: 'Princey'
71
+ }
72
+ },
73
+ status: {
74
+ data: {
75
+ text: 'To Do'
76
+ }
82
77
  }
83
- },
84
- status: {
85
- data: {
86
- text: 'Done',
87
- style: {
88
- appearance: 'success'
78
+ }, {
79
+ id: {
80
+ data: 'EDM-16'
81
+ },
82
+ description: {
83
+ data: 'Plan team party'
84
+ },
85
+ createdAt: {
86
+ data: '2023-05-01T01:30:00.000-05:00'
87
+ },
88
+ assigned: {
89
+ data: {
90
+ displayName: 'Nidhin'
91
+ }
92
+ },
93
+ status: {
94
+ data: {
95
+ text: 'Done',
96
+ style: {
97
+ appearance: 'success'
98
+ }
89
99
  }
90
100
  }
91
- }
92
- }],
93
- nextPageCursor: 'c3RhcnRBdD01'
101
+ }],
102
+ nextPageCursor: 'c3RhcnRBdD01'
103
+ }
94
104
  };
95
105
  export const mockDatasourceResponse = {
96
- ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
97
- id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
98
- name: 'JQL Datasource',
99
- description: 'Fetches Issues using JQL',
100
- parameters: [{
101
- key: 'cloudId',
102
- type: 'string',
103
- description: 'Cloud Id'
104
- }, {
105
- key: 'jql',
106
- type: 'string',
107
- description: 'JQL query to retrieve list of issues'
108
- }],
109
- schema: {
110
- properties: [{
111
- key: 'id',
112
- title: '',
113
- type: 'string'
114
- }, {
115
- key: 'issue',
116
- title: 'Key',
117
- type: 'link'
118
- }, {
119
- key: 'type',
120
- type: 'icon',
121
- title: 'Type'
122
- }, {
123
- key: 'summary',
124
- title: 'Summary',
125
- type: 'link'
106
+ meta: {
107
+ key: 'jira-object-provider',
108
+ access: 'granted',
109
+ auth: [],
110
+ definitionId: 'object-resolver-service',
111
+ product: 'jira',
112
+ visibility: 'restricted'
113
+ },
114
+ data: {
115
+ ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
116
+ id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
117
+ name: 'JQL Datasource',
118
+ description: 'Fetches Issues using JQL',
119
+ parameters: [{
120
+ key: 'cloudId',
121
+ type: 'string',
122
+ description: 'Cloud Id'
126
123
  }, {
127
- key: 'assignee',
128
- title: 'Assignee',
129
- type: 'user'
130
- }, {
131
- key: 'priority',
132
- title: 'P',
133
- type: 'icon'
134
- }, {
135
- key: 'labels',
136
- title: 'Labels',
137
- type: 'tag',
138
- isList: true
139
- }, {
140
- key: 'status',
141
- title: 'Status',
142
- type: 'status'
143
- }, {
144
- key: 'created',
145
- title: 'Created',
146
- type: 'string'
147
- }, {
148
- key: 'due',
149
- title: 'Due Date',
150
- type: 'string'
124
+ key: 'jql',
125
+ type: 'string',
126
+ description: 'JQL query to retrieve list of issues'
151
127
  }],
152
- defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
128
+ schema: {
129
+ properties: [{
130
+ key: 'id',
131
+ title: '',
132
+ type: 'string'
133
+ }, {
134
+ key: 'issue',
135
+ title: 'Key',
136
+ type: 'link'
137
+ }, {
138
+ key: 'type',
139
+ type: 'icon',
140
+ title: 'Type'
141
+ }, {
142
+ key: 'summary',
143
+ title: 'Summary',
144
+ type: 'link'
145
+ }, {
146
+ key: 'assignee',
147
+ title: 'Assignee',
148
+ type: 'user'
149
+ }, {
150
+ key: 'priority',
151
+ title: 'P',
152
+ type: 'icon'
153
+ }, {
154
+ key: 'labels',
155
+ title: 'Labels',
156
+ type: 'tag',
157
+ isList: true
158
+ }, {
159
+ key: 'status',
160
+ title: 'Status',
161
+ type: 'status'
162
+ }, {
163
+ key: 'created',
164
+ title: 'Created',
165
+ type: 'string'
166
+ }, {
167
+ key: 'due',
168
+ title: 'Due Date',
169
+ type: 'string'
170
+ }],
171
+ defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
172
+ }
153
173
  }
154
174
  };
155
175
  export const mockDatasourceDataResponseWithSchema = {
156
176
  ...mockDatasourceDataResponse,
157
- schema: {
158
- properties: mockDatasourceResponse.schema.properties
177
+ data: {
178
+ ...mockDatasourceDataResponse.data,
179
+ schema: {
180
+ properties: mockDatasourceResponse.data.schema.properties,
181
+ defaultProperties: mockDatasourceResponse.data.schema.defaultProperties
182
+ }
159
183
  }
160
184
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,161 +2,184 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
4
  export var mockDatasourceDataResponse = {
5
- totalCount: 1234,
6
- data: [{
7
- id: {
8
- data: 'EDM-12'
9
- },
10
- description: {
11
- data: 'Design datasource feature'
12
- },
13
- createdAt: {
14
- data: '2023-01-22T01:30:00.000-05:00'
15
- },
16
- assigned: {
17
- data: {
18
- displayName: 'Sasha'
19
- }
20
- },
21
- status: {
22
- data: {
23
- text: 'In Progress',
24
- style: {
25
- appearance: 'inprogress'
5
+ meta: {
6
+ key: 'jira-object-provider',
7
+ access: 'granted',
8
+ auth: [],
9
+ definitionId: 'object-resolver-service',
10
+ product: 'jira',
11
+ visibility: 'restricted'
12
+ },
13
+ data: {
14
+ totalCount: 1234,
15
+ items: [{
16
+ id: {
17
+ data: 'EDM-12'
18
+ },
19
+ description: {
20
+ data: 'Design datasource feature'
21
+ },
22
+ createdAt: {
23
+ data: '2023-01-22T01:30:00.000-05:00'
24
+ },
25
+ assigned: {
26
+ data: {
27
+ displayName: 'Sasha'
26
28
  }
27
- }
28
- }
29
- }, {
30
- id: {
31
- data: 'EDM-14'
32
- },
33
- description: {
34
- data: 'Implement datasource feature'
35
- },
36
- createdAt: {
37
- data: '2023-03-01T01:30:00.000-05:00'
38
- },
39
- assigned: {
40
- data: {
41
- displayName: 'Hana'
42
- }
43
- },
44
- status: {
45
- data: {
46
- text: 'To Do',
47
- style: {
48
- appearance: 'new'
29
+ },
30
+ status: {
31
+ data: {
32
+ text: 'In Progress',
33
+ style: {
34
+ appearance: 'inprogress'
35
+ }
49
36
  }
50
37
  }
51
- }
52
- }, {
53
- id: {
54
- data: 'EDM-15'
55
- },
56
- description: {
57
- data: 'Add Jira Provider'
58
- },
59
- createdAt: {
60
- data: '2023-03-31T01:30:00.000-05:00'
61
- },
62
- assigned: {
63
- data: {
64
- displayName: 'Princey'
65
- }
66
- },
67
- status: {
68
- data: {
69
- text: 'To Do'
38
+ }, {
39
+ id: {
40
+ data: 'EDM-14'
41
+ },
42
+ description: {
43
+ data: 'Implement datasource feature'
44
+ },
45
+ createdAt: {
46
+ data: '2023-03-01T01:30:00.000-05:00'
47
+ },
48
+ assigned: {
49
+ data: {
50
+ displayName: 'Hana'
51
+ }
52
+ },
53
+ status: {
54
+ data: {
55
+ text: 'To Do',
56
+ style: {
57
+ appearance: 'new'
58
+ }
59
+ }
70
60
  }
71
- }
72
- }, {
73
- id: {
74
- data: 'EDM-16'
75
- },
76
- description: {
77
- data: 'Plan team party'
78
- },
79
- createdAt: {
80
- data: '2023-05-01T01:30:00.000-05:00'
81
- },
82
- assigned: {
83
- data: {
84
- displayName: 'Nidhin'
61
+ }, {
62
+ id: {
63
+ data: 'EDM-15'
64
+ },
65
+ description: {
66
+ data: 'Add Jira Provider'
67
+ },
68
+ createdAt: {
69
+ data: '2023-03-31T01:30:00.000-05:00'
70
+ },
71
+ assigned: {
72
+ data: {
73
+ displayName: 'Princey'
74
+ }
75
+ },
76
+ status: {
77
+ data: {
78
+ text: 'To Do'
79
+ }
85
80
  }
86
- },
87
- status: {
88
- data: {
89
- text: 'Done',
90
- style: {
91
- appearance: 'success'
81
+ }, {
82
+ id: {
83
+ data: 'EDM-16'
84
+ },
85
+ description: {
86
+ data: 'Plan team party'
87
+ },
88
+ createdAt: {
89
+ data: '2023-05-01T01:30:00.000-05:00'
90
+ },
91
+ assigned: {
92
+ data: {
93
+ displayName: 'Nidhin'
94
+ }
95
+ },
96
+ status: {
97
+ data: {
98
+ text: 'Done',
99
+ style: {
100
+ appearance: 'success'
101
+ }
92
102
  }
93
103
  }
94
- }
95
- }],
96
- nextPageCursor: 'c3RhcnRBdD01'
104
+ }],
105
+ nextPageCursor: 'c3RhcnRBdD01'
106
+ }
97
107
  };
98
108
  export var mockDatasourceResponse = {
99
- ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
100
- id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
101
- name: 'JQL Datasource',
102
- description: 'Fetches Issues using JQL',
103
- parameters: [{
104
- key: 'cloudId',
105
- type: 'string',
106
- description: 'Cloud Id'
107
- }, {
108
- key: 'jql',
109
- type: 'string',
110
- description: 'JQL query to retrieve list of issues'
111
- }],
112
- schema: {
113
- properties: [{
114
- key: 'id',
115
- title: '',
116
- type: 'string'
117
- }, {
118
- key: 'issue',
119
- title: 'Key',
120
- type: 'link'
121
- }, {
122
- key: 'type',
123
- type: 'icon',
124
- title: 'Type'
125
- }, {
126
- key: 'summary',
127
- title: 'Summary',
128
- type: 'link'
129
- }, {
130
- key: 'assignee',
131
- title: 'Assignee',
132
- type: 'user'
109
+ meta: {
110
+ key: 'jira-object-provider',
111
+ access: 'granted',
112
+ auth: [],
113
+ definitionId: 'object-resolver-service',
114
+ product: 'jira',
115
+ visibility: 'restricted'
116
+ },
117
+ data: {
118
+ ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
119
+ id: '12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
120
+ name: 'JQL Datasource',
121
+ description: 'Fetches Issues using JQL',
122
+ parameters: [{
123
+ key: 'cloudId',
124
+ type: 'string',
125
+ description: 'Cloud Id'
133
126
  }, {
134
- key: 'priority',
135
- title: 'P',
136
- type: 'icon'
137
- }, {
138
- key: 'labels',
139
- title: 'Labels',
140
- type: 'tag',
141
- isList: true
142
- }, {
143
- key: 'status',
144
- title: 'Status',
145
- type: 'status'
146
- }, {
147
- key: 'created',
148
- title: 'Created',
149
- type: 'string'
150
- }, {
151
- key: 'due',
152
- title: 'Due Date',
153
- type: 'string'
127
+ key: 'jql',
128
+ type: 'string',
129
+ description: 'JQL query to retrieve list of issues'
154
130
  }],
155
- defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
131
+ schema: {
132
+ properties: [{
133
+ key: 'id',
134
+ title: '',
135
+ type: 'string'
136
+ }, {
137
+ key: 'issue',
138
+ title: 'Key',
139
+ type: 'link'
140
+ }, {
141
+ key: 'type',
142
+ type: 'icon',
143
+ title: 'Type'
144
+ }, {
145
+ key: 'summary',
146
+ title: 'Summary',
147
+ type: 'link'
148
+ }, {
149
+ key: 'assignee',
150
+ title: 'Assignee',
151
+ type: 'user'
152
+ }, {
153
+ key: 'priority',
154
+ title: 'P',
155
+ type: 'icon'
156
+ }, {
157
+ key: 'labels',
158
+ title: 'Labels',
159
+ type: 'tag',
160
+ isList: true
161
+ }, {
162
+ key: 'status',
163
+ title: 'Status',
164
+ type: 'status'
165
+ }, {
166
+ key: 'created',
167
+ title: 'Created',
168
+ type: 'string'
169
+ }, {
170
+ key: 'due',
171
+ title: 'Due Date',
172
+ type: 'string'
173
+ }],
174
+ defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
175
+ }
156
176
  }
157
177
  };
158
178
  export var mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, mockDatasourceDataResponse), {}, {
159
- schema: {
160
- properties: mockDatasourceResponse.schema.properties
161
- }
179
+ data: _objectSpread(_objectSpread({}, mockDatasourceDataResponse.data), {}, {
180
+ schema: {
181
+ properties: mockDatasourceResponse.data.schema.properties,
182
+ defaultProperties: mockDatasourceResponse.data.schema.defaultProperties
183
+ }
184
+ })
162
185
  });
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
3
  export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
4
+ export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
@@ -1,5 +1,5 @@
1
- import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceDetailsResponse } from '@atlaskit/linking-types';
2
2
  export declare const useDatasourceClientExtension: () => {
3
- getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
3
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceDetailsResponse>;
4
4
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
5
5
  };
@@ -1,4 +1,4 @@
1
- import type { DatasourceDataResponse, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataResponse, DatasourceDetailsResponse } from '@atlaskit/linking-types';
2
2
  export declare const mockDatasourceDataResponse: DatasourceDataResponse;
3
- export declare const mockDatasourceResponse: DatasourceResponse;
3
+ export declare const mockDatasourceResponse: DatasourceDetailsResponse;
4
4
  export declare const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
@@ -0,0 +1,13 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
3
+ export interface JsonLdDatasourceResponse extends JsonLd.Response {
4
+ datasources?: DatasourceResolveResponse[];
5
+ }
6
+ export type DatasourceResolveResponse = {
7
+ id: string;
8
+ ari?: string;
9
+ key?: string;
10
+ name?: string;
11
+ description?: string;
12
+ parameters: DatasourceParameters;
13
+ };
@@ -1,3 +1,4 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
3
  export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
4
+ export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
@@ -1,5 +1,5 @@
1
- import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceDetailsResponse } from '@atlaskit/linking-types';
2
2
  export declare const useDatasourceClientExtension: () => {
3
- getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
3
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceDetailsResponse>;
4
4
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
5
5
  };
@@ -1,4 +1,4 @@
1
- import type { DatasourceDataResponse, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataResponse, DatasourceDetailsResponse } from '@atlaskit/linking-types';
2
2
  export declare const mockDatasourceDataResponse: DatasourceDataResponse;
3
- export declare const mockDatasourceResponse: DatasourceResponse;
3
+ export declare const mockDatasourceResponse: DatasourceDetailsResponse;
4
4
  export declare const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
@@ -0,0 +1,13 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
3
+ export interface JsonLdDatasourceResponse extends JsonLd.Response {
4
+ datasources?: DatasourceResolveResponse[];
5
+ }
6
+ export type DatasourceResolveResponse = {
7
+ id: string;
8
+ ari?: string;
9
+ key?: string;
10
+ name?: string;
11
+ description?: string;
12
+ parameters: DatasourceParameters;
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "description": "Extension methods for linking platform client",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,9 +34,10 @@
34
34
  ".": "./src/index.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/linking-common": "^3.0.0",
38
- "@atlaskit/linking-types": "^6.0.0",
39
- "@babel/runtime": "^7.0.0"
37
+ "@atlaskit/linking-common": "^3.1.0",
38
+ "@atlaskit/linking-types": "^7.0.0",
39
+ "@babel/runtime": "^7.0.0",
40
+ "json-ld-types": "3.7.0"
40
41
  },
41
42
  "peerDependencies": {
42
43
  "@atlaskit/link-provider": "^1.6.4",
package/report.api.md CHANGED
@@ -19,9 +19,27 @@ import type { CardClient } from '@atlaskit/link-provider';
19
19
  import type { DatasourceDataRequest } from '@atlaskit/linking-types';
20
20
  import type { DatasourceDataResponse } from '@atlaskit/linking-types';
21
21
  import type { DatasourceDetailsRequest } from '@atlaskit/linking-types';
22
- import type { DatasourceResponse } from '@atlaskit/linking-types';
22
+ import type { DatasourceDetailsResponse } from '@atlaskit/linking-types';
23
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
23
24
  import { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
24
25
  import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
26
+ import { JsonLd } from 'json-ld-types';
27
+
28
+ // @public (undocumented)
29
+ export type DatasourceResolveResponse = {
30
+ id: string;
31
+ ari?: string;
32
+ key?: string;
33
+ name?: string;
34
+ description?: string;
35
+ parameters: DatasourceParameters;
36
+ };
37
+
38
+ // @public (undocumented)
39
+ export interface JsonLdDatasourceResponse extends JsonLd.Response {
40
+ // (undocumented)
41
+ datasources?: DatasourceResolveResponse[];
42
+ }
25
43
 
26
44
  // @public (undocumented)
27
45
  export const mockDatasourceDataResponse: DatasourceDataResponse;
@@ -30,14 +48,14 @@ export const mockDatasourceDataResponse: DatasourceDataResponse;
30
48
  export const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
31
49
 
32
50
  // @public (undocumented)
33
- export const mockDatasourceResponse: DatasourceResponse;
51
+ export const mockDatasourceResponse: DatasourceDetailsResponse;
34
52
 
35
53
  // @public (undocumented)
36
54
  export const useDatasourceClientExtension: () => {
37
55
  getDatasourceDetails: (
38
56
  datasourceId: string,
39
57
  data: DatasourceDetailsRequest,
40
- ) => Promise<DatasourceResponse>;
58
+ ) => Promise<DatasourceDetailsResponse>;
41
59
  getDatasourceData: (
42
60
  datasourceId: string,
43
61
  data: DatasourceDataRequest,
@@ -8,9 +8,27 @@ import type { CardClient } from '@atlaskit/link-provider';
8
8
  import type { DatasourceDataRequest } from '@atlaskit/linking-types';
9
9
  import type { DatasourceDataResponse } from '@atlaskit/linking-types';
10
10
  import type { DatasourceDetailsRequest } from '@atlaskit/linking-types';
11
- import type { DatasourceResponse } from '@atlaskit/linking-types';
11
+ import type { DatasourceDetailsResponse } from '@atlaskit/linking-types';
12
+ import type { DatasourceParameters } from '@atlaskit/linking-types';
12
13
  import { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
13
14
  import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
15
+ import { JsonLd } from 'json-ld-types';
16
+
17
+ // @public (undocumented)
18
+ export type DatasourceResolveResponse = {
19
+ id: string;
20
+ ari?: string;
21
+ key?: string;
22
+ name?: string;
23
+ description?: string;
24
+ parameters: DatasourceParameters;
25
+ };
26
+
27
+ // @public (undocumented)
28
+ export interface JsonLdDatasourceResponse extends JsonLd.Response {
29
+ // (undocumented)
30
+ datasources?: DatasourceResolveResponse[];
31
+ }
14
32
 
15
33
  // @public (undocumented)
16
34
  export const mockDatasourceDataResponse: DatasourceDataResponse;
@@ -19,11 +37,11 @@ export const mockDatasourceDataResponse: DatasourceDataResponse;
19
37
  export const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
20
38
 
21
39
  // @public (undocumented)
22
- export const mockDatasourceResponse: DatasourceResponse;
40
+ export const mockDatasourceResponse: DatasourceDetailsResponse;
23
41
 
24
42
  // @public (undocumented)
25
43
  export const useDatasourceClientExtension: () => {
26
- getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
44
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceDetailsResponse>;
27
45
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
28
46
  };
29
47