@atlaskit/link-client-extension 1.8.4 → 1.9.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.
package/CHANGELOG.md CHANGED
@@ -1,22 +1,42 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 1.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.9.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#109647](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109647)
14
+ [`17d330a232539`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/17d330a232539) -
15
+ The changes here adds a "origin-timezone" header to datasource /data and /details requests.
16
+
3
17
  ## 1.8.4
4
18
 
5
19
  ### Patch Changes
6
20
 
7
- - [#86596](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86596) [`37621cb1f1b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/37621cb1f1b9) - Update dependency json-ld-types
21
+ - [#86596](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86596)
22
+ [`37621cb1f1b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/37621cb1f1b9) -
23
+ Update dependency json-ld-types
8
24
 
9
25
  ## 1.8.3
10
26
 
11
27
  ### Patch Changes
12
28
 
13
- - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
29
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
30
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
31
+ Upgrade Typescript from `4.9.5` to `5.4.2`
14
32
 
15
33
  ## 1.8.2
16
34
 
17
35
  ### Patch Changes
18
36
 
19
- - [#68194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68194) [`c1d4a8fecc4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1d4a8fecc4e) - bump json-ld-types to version 3.11.0
37
+ - [#68194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68194)
38
+ [`c1d4a8fecc4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1d4a8fecc4e) -
39
+ bump json-ld-types to version 3.11.0
20
40
 
21
41
  ## 1.8.1
22
42
 
@@ -28,31 +48,41 @@
28
48
 
29
49
  ### Minor Changes
30
50
 
31
- - [#42199](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42199) [`896e6300360`](https://bitbucket.org/atlassian/atlassian-frontend/commits/896e6300360) - Add api to make GET request to related-urls endpoint
51
+ - [#42199](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42199)
52
+ [`896e6300360`](https://bitbucket.org/atlassian/atlassian-frontend/commits/896e6300360) - Add api
53
+ to make GET request to related-urls endpoint
32
54
 
33
55
  ## 1.7.3
34
56
 
35
57
  ### Patch Changes
36
58
 
37
- - [#41377](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41377) [`6191c789222`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6191c789222) - Fix bug where on next page load sorts the column in alphabetical order.
59
+ - [#41377](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41377)
60
+ [`6191c789222`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6191c789222) - Fix bug
61
+ where on next page load sorts the column in alphabetical order.
38
62
 
39
63
  ## 1.7.2
40
64
 
41
65
  ### Patch Changes
42
66
 
43
- - [#40491](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40491) [`1fedffbd64b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fedffbd64b) - Update json-ld-types dependencies to be compatible with version
67
+ - [#40491](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40491)
68
+ [`1fedffbd64b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fedffbd64b) - Update
69
+ json-ld-types dependencies to be compatible with version
44
70
 
45
71
  ## 1.7.1
46
72
 
47
73
  ### Patch Changes
48
74
 
49
- - [#40127](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40127) [`2cd7af71b63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2cd7af71b63) - Bump json-ld-types 3.8.0 -> 3.9.1
75
+ - [#40127](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40127)
76
+ [`2cd7af71b63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2cd7af71b63) - Bump
77
+ json-ld-types 3.8.0 -> 3.9.1
50
78
 
51
79
  ## 1.7.0
52
80
 
53
81
  ### Minor Changes
54
82
 
55
- - [#39265](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39265) [`8b8a309cb62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b8a309cb62) - Added a `DEFAULT_GET_DATA_PAGE_SIZE` constant for default page size on data calls.
83
+ - [#39265](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39265)
84
+ [`8b8a309cb62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b8a309cb62) - Added a
85
+ `DEFAULT_GET_DATA_PAGE_SIZE` constant for default page size on data calls.
56
86
 
57
87
  ### Patch Changes
58
88
 
@@ -62,26 +92,41 @@
62
92
 
63
93
  ### Patch Changes
64
94
 
65
- - [#39465](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39465) [`a21cffb7b23`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a21cffb7b23) - Extended mock response returned for datasources
95
+ - [#39465](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39465)
96
+ [`a21cffb7b23`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a21cffb7b23) - Extended
97
+ mock response returned for datasources
66
98
 
67
99
  ## 1.6.0
68
100
 
69
101
  ### Minor Changes
70
102
 
71
- - [#38189](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38189) [`5bc0af1de85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5bc0af1de85) - Introduce caching layer for both `getDatasourceDetails` and `getDatasourceData` calls. Export new member - `mockDatasourceDetailsResponse` that has same value as previously exported `mockDatasourceResponse`
72
- - [`b3b6782c3a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b3b6782c3a0) - Add new member `mockDatasourceDetailsResponse` that has same value as existing `mockDatasourceResponse`; Add third optional boolean argument to `getDatasourceDetails` and `getDatasourceData` from `useDatasourceClientExtension` hook called `force` — when it is false (Default) cached version of response promise will be returned (in case request with same parameters has been made), when true new request will be made regardless of cache state.
103
+ - [#38189](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38189)
104
+ [`5bc0af1de85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5bc0af1de85) -
105
+ Introduce caching layer for both `getDatasourceDetails` and `getDatasourceData` calls. Export new
106
+ member - `mockDatasourceDetailsResponse` that has same value as previously exported
107
+ `mockDatasourceResponse`
108
+ - [`b3b6782c3a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b3b6782c3a0) - Add new
109
+ member `mockDatasourceDetailsResponse` that has same value as existing `mockDatasourceResponse`;
110
+ Add third optional boolean argument to `getDatasourceDetails` and `getDatasourceData` from
111
+ `useDatasourceClientExtension` hook called `force` — when it is false (Default) cached version of
112
+ response promise will be returned (in case request with same parameters has been made), when true
113
+ new request will be made regardless of cache state.
73
114
 
74
115
  ## 1.5.4
75
116
 
76
117
  ### Patch Changes
77
118
 
78
- - [#37720](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37720) [`e74ae7f06d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e74ae7f06d4) - Update dependency json-ld-types@3.8.0
119
+ - [#37720](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37720)
120
+ [`e74ae7f06d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e74ae7f06d4) - Update
121
+ dependency json-ld-types@3.8.0
79
122
 
80
123
  ## 1.5.3
81
124
 
82
125
  ### Patch Changes
83
126
 
84
- - [#37340](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37340) [`b9355830504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9355830504) - Opt out of peer dependency enforcement
127
+ - [#37340](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37340)
128
+ [`b9355830504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9355830504) - Opt out
129
+ of peer dependency enforcement
85
130
 
86
131
  ## 1.5.2
87
132
 
@@ -93,13 +138,18 @@
93
138
 
94
139
  ### Patch Changes
95
140
 
96
- - [#36757](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36757) [`3fb20c4aeba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fb20c4aeba) - Add postinstall check to enforce internal peer dependencies
141
+ - [#36757](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36757)
142
+ [`3fb20c4aeba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fb20c4aeba) - Add
143
+ postinstall check to enforce internal peer dependencies
97
144
 
98
145
  ## 1.5.0
99
146
 
100
147
  ### Minor Changes
101
148
 
102
- - [#36138](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36138) [`12411d70076`](https://bitbucket.org/atlassian/atlassian-frontend/commits/12411d70076) - export more datasource types in the linking-type index and remove the defaultProperties in the datasourceDataResponse
149
+ - [#36138](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36138)
150
+ [`12411d70076`](https://bitbucket.org/atlassian/atlassian-frontend/commits/12411d70076) - export
151
+ more datasource types in the linking-type index and remove the defaultProperties in the
152
+ datasourceDataResponse
103
153
 
104
154
  ### Patch Changes
105
155
 
@@ -109,7 +159,10 @@
109
159
 
110
160
  ### Minor Changes
111
161
 
112
- - [#35032](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35032) [`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
162
+ - [#35032](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35032)
163
+ [`04295e9d5bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04295e9d5bc) - [ux]
164
+ Updating ORS response to include datasources and facilitating pasting JQL links turning into
165
+ datasource tables
113
166
 
114
167
  ### Patch Changes
115
168
 
@@ -119,7 +172,10 @@
119
172
 
120
173
  ### Minor Changes
121
174
 
122
- - [#35861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35861) [`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
175
+ - [#35861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35861)
176
+ [`f427908df3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f427908df3d) - change
177
+ the datasource response type to include the meta data section and the data response will wrap in
178
+ the data section
123
179
 
124
180
  ### Patch Changes
125
181
 
@@ -141,13 +197,17 @@
141
197
 
142
198
  ### Minor Changes
143
199
 
144
- - [#34180](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34180) [`b508cc26473`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b508cc26473) - Updated getDatasourceDetails request body to be `DatasourceDetailsRequest` type
200
+ - [#34180](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34180)
201
+ [`b508cc26473`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b508cc26473) - Updated
202
+ getDatasourceDetails request body to be `DatasourceDetailsRequest` type
145
203
 
146
204
  ## 1.1.7
147
205
 
148
206
  ### Patch Changes
149
207
 
150
- - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
208
+ - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443)
209
+ [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing
210
+ unused dependencies and dev dependencies
151
211
  - Updated dependencies
152
212
 
153
213
  ## 1.1.6
@@ -166,35 +226,45 @@
166
226
 
167
227
  ### Patch Changes
168
228
 
169
- - [#34035](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34035) [`43ad059dcc5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43ad059dcc5) - Updated mock response to the new `DatasourceDataResponseItem` format
229
+ - [#34035](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34035)
230
+ [`43ad059dcc5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43ad059dcc5) - Updated
231
+ mock response to the new `DatasourceDataResponseItem` format
170
232
  - Updated dependencies
171
233
 
172
234
  ## 1.1.3
173
235
 
174
236
  ### Patch Changes
175
237
 
176
- - [#33917](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33917) [`e9ad7ee17bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9ad7ee17bb) - Updated mock response to the new `DatasourceType` value format
238
+ - [#33917](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33917)
239
+ [`e9ad7ee17bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9ad7ee17bb) - Updated
240
+ mock response to the new `DatasourceType` value format
177
241
  - Updated dependencies
178
242
 
179
243
  ## 1.1.2
180
244
 
181
245
  ### Patch Changes
182
246
 
183
- - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
247
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
248
+ [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
249
+ legacy types are published for TS 4.5-4.8
184
250
  - Updated dependencies
185
251
 
186
252
  ## 1.1.1
187
253
 
188
254
  ### Patch Changes
189
255
 
190
- - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
256
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
257
+ [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade
258
+ Typescript from `4.5.5` to `4.9.5`
191
259
  - Updated dependencies
192
260
 
193
261
  ## 1.1.0
194
262
 
195
263
  ### Minor Changes
196
264
 
197
- - [#33177](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33177) [`670454dc4a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/670454dc4a0) - Add totalIssues to mock/types
265
+ - [#33177](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33177)
266
+ [`670454dc4a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/670454dc4a0) - Add
267
+ totalIssues to mock/types
198
268
 
199
269
  ### Patch Changes
200
270
 
@@ -204,7 +274,9 @@
204
274
 
205
275
  ### Minor Changes
206
276
 
207
- - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
277
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
278
+ [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
279
+ minor dependency bump
208
280
 
209
281
  ### Patch Changes
210
282
 
@@ -214,7 +286,9 @@
214
286
 
215
287
  ### Minor Changes
216
288
 
217
- - [#32751](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32751) [`5f0b51cb0e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f0b51cb0e9) - Updated `useDatasourceClientExtension` hook to use `useSmartLinkContext` for creating smart-card client
289
+ - [#32751](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32751)
290
+ [`5f0b51cb0e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f0b51cb0e9) - Updated
291
+ `useDatasourceClientExtension` hook to use `useSmartLinkContext` for creating smart-card client
218
292
 
219
293
  ### Patch Changes
220
294
 
@@ -224,7 +298,9 @@
224
298
 
225
299
  ### Patch Changes
226
300
 
227
- - [#32589](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32589) [`f1b712482b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f1b712482b1) - Fixed error handling inside of invoke function
301
+ - [#32589](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32589)
302
+ [`f1b712482b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f1b712482b1) - Fixed
303
+ error handling inside of invoke function
228
304
  - Updated dependencies
229
305
 
230
306
  ## 0.4.2
@@ -237,14 +313,18 @@
237
313
 
238
314
  ### Patch Changes
239
315
 
240
- - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
316
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424)
317
+ [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY
318
+ remove before merging to master; dupe adf-schema via adf-utils
241
319
  - Updated dependencies
242
320
 
243
321
  ## 0.4.0
244
322
 
245
323
  ### Minor Changes
246
324
 
247
- - [#32368](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32368) [`d19a6e77d60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d19a6e77d60) - Adds new hook useDatasourceClientExtension to fetch data for link datasources
325
+ - [#32368](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32368)
326
+ [`d19a6e77d60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d19a6e77d60) - Adds new
327
+ hook useDatasourceClientExtension to fetch data for link datasources
248
328
 
249
329
  ### Patch Changes
250
330
 
@@ -254,13 +334,17 @@
254
334
 
255
335
  ### Minor Changes
256
336
 
257
- - [#31900](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31900) [`7297fb71759`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7297fb71759) - Update response type for useSmartLinkClientExtension
337
+ - [#31900](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31900)
338
+ [`7297fb71759`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7297fb71759) - Update
339
+ response type for useSmartLinkClientExtension
258
340
 
259
341
  ## 0.2.0
260
342
 
261
343
  ### Minor Changes
262
344
 
263
- - [#31905](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31905) [`f32cef73d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f32cef73d0f) - use new types from smart link types
345
+ - [#31905](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31905)
346
+ [`f32cef73d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f32cef73d0f) - use new
347
+ types from smart link types
264
348
 
265
349
  ### Patch Changes
266
350
 
package/LICENSE.md CHANGED
@@ -1,13 +1,11 @@
1
1
  Copyright 2022 Atlassian Pty Ltd
2
2
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
4
+ compliance with the License. You may obtain a copy of the License at
6
5
 
7
6
  http://www.apache.org/licenses/LICENSE-2.0
8
7
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
8
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
9
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ implied. See the License for the specific language governing permissions and limitations under the
11
+ License.
@@ -13,6 +13,7 @@ var _react = require("react");
13
13
  var _lru_map = require("lru_map");
14
14
  var _linkProvider = require("@atlaskit/link-provider");
15
15
  var _linkingCommon = require("@atlaskit/linking-common");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _useResolverUrl = require("../use-resolver-url");
17
18
  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; }
18
19
  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; }
@@ -26,7 +27,8 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
26
27
  var resolverUrl = (0, _useResolverUrl.useResolverUrl)(client);
27
28
  var cachedRequest = /*#__PURE__*/function () {
28
29
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(datasourceId, data, url, lruMap, force) {
29
- var cacheKeyData, cacheKey, responsePromise;
30
+ var _Intl;
31
+ var cacheKeyData, cacheKey, responsePromise, headers;
30
32
  return _regenerator.default.wrap(function _callee$(_context) {
31
33
  while (1) switch (_context.prev = _context.next) {
32
34
  case 0:
@@ -47,23 +49,30 @@ var useDatasourceClientExtension = exports.useDatasourceClientExtension = functi
47
49
  }
48
50
  return _context.abrupt("return", responsePromise);
49
51
  case 6:
50
- _context.prev = 6;
51
- responsePromise = (0, _linkingCommon.request)('post', url, data, undefined, [200, 201, 202, 203, 204]);
52
+ headers = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.datasource.add-timezone-header') ? {
53
+ /**
54
+ * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
55
+ * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
56
+ */
57
+ 'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
58
+ } : undefined;
59
+ _context.prev = 7;
60
+ responsePromise = (0, _linkingCommon.request)('post', url, data, headers, [200, 201, 202, 203, 204]);
52
61
  lruMap.set(cacheKey, responsePromise);
53
- _context.next = 11;
62
+ _context.next = 12;
54
63
  return responsePromise;
55
- case 11:
64
+ case 12:
56
65
  return _context.abrupt("return", _context.sent);
57
- case 14:
58
- _context.prev = 14;
59
- _context.t0 = _context["catch"](6);
66
+ case 15:
67
+ _context.prev = 15;
68
+ _context.t0 = _context["catch"](7);
60
69
  lruMap.delete(cacheKey);
61
70
  throw _context.t0;
62
- case 18:
71
+ case 19:
63
72
  case "end":
64
73
  return _context.stop();
65
74
  }
66
- }, _callee, null, [[6, 14]]);
75
+ }, _callee, null, [[7, 15]]);
67
76
  }));
68
77
  return function cachedRequest(_x, _x2, _x3, _x4, _x5) {
69
78
  return _ref.apply(this, arguments);
@@ -2,6 +2,7 @@ import { useCallback, useMemo } from 'react';
2
2
  import { LRUMap } from 'lru_map';
3
3
  import { useSmartLinkContext } from '@atlaskit/link-provider';
4
4
  import { request } from '@atlaskit/linking-common';
5
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
6
  import { useResolverUrl } from '../use-resolver-url';
6
7
  const URL_RESPONSE_CACHE_SIZE = 50;
7
8
  export const datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
@@ -15,6 +16,7 @@ export const useDatasourceClientExtension = () => {
15
16
  } = useSmartLinkContext();
16
17
  const resolverUrl = useResolverUrl(client);
17
18
  const cachedRequest = async (datasourceId, data, url, lruMap, force) => {
19
+ var _Intl;
18
20
  const cacheKeyData = {
19
21
  ...data,
20
22
  // Sort fields to use cached version of response regardless of the order
@@ -33,8 +35,15 @@ export const useDatasourceClientExtension = () => {
33
35
  if (responsePromise) {
34
36
  return responsePromise;
35
37
  }
38
+ const headers = getBooleanFF('platform.linking-platform.datasource.add-timezone-header') ? {
39
+ /**
40
+ * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
41
+ * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
42
+ */
43
+ 'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
44
+ } : undefined;
36
45
  try {
37
- responsePromise = request('post', url, data, undefined, [200, 201, 202, 203, 204]);
46
+ responsePromise = request('post', url, data, headers, [200, 201, 202, 203, 204]);
38
47
  lruMap.set(cacheKey, responsePromise);
39
48
  return await responsePromise;
40
49
  } catch (e) {
@@ -8,6 +8,7 @@ import { useCallback, useMemo } from 'react';
8
8
  import { LRUMap } from 'lru_map';
9
9
  import { useSmartLinkContext } from '@atlaskit/link-provider';
10
10
  import { request } from '@atlaskit/linking-common';
11
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
11
12
  import { useResolverUrl } from '../use-resolver-url';
12
13
  var URL_RESPONSE_CACHE_SIZE = 50;
13
14
  export var datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
@@ -19,7 +20,8 @@ export var useDatasourceClientExtension = function useDatasourceClientExtension(
19
20
  var resolverUrl = useResolverUrl(client);
20
21
  var cachedRequest = /*#__PURE__*/function () {
21
22
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(datasourceId, data, url, lruMap, force) {
22
- var cacheKeyData, cacheKey, responsePromise;
23
+ var _Intl;
24
+ var cacheKeyData, cacheKey, responsePromise, headers;
23
25
  return _regeneratorRuntime.wrap(function _callee$(_context) {
24
26
  while (1) switch (_context.prev = _context.next) {
25
27
  case 0:
@@ -40,23 +42,30 @@ export var useDatasourceClientExtension = function useDatasourceClientExtension(
40
42
  }
41
43
  return _context.abrupt("return", responsePromise);
42
44
  case 6:
43
- _context.prev = 6;
44
- responsePromise = request('post', url, data, undefined, [200, 201, 202, 203, 204]);
45
+ headers = getBooleanFF('platform.linking-platform.datasource.add-timezone-header') ? {
46
+ /**
47
+ * This header exist to enable the backend to process relative time, eg: "today", with respect to user timezone.
48
+ * eg: used in "confluence-object-provider" to process confluence SLLV requests to filter data for relative time.
49
+ */
50
+ 'origin-timezone': (_Intl = Intl) === null || _Intl === void 0 ? void 0 : _Intl.DateTimeFormat().resolvedOptions().timeZone
51
+ } : undefined;
52
+ _context.prev = 7;
53
+ responsePromise = request('post', url, data, headers, [200, 201, 202, 203, 204]);
45
54
  lruMap.set(cacheKey, responsePromise);
46
- _context.next = 11;
55
+ _context.next = 12;
47
56
  return responsePromise;
48
- case 11:
57
+ case 12:
49
58
  return _context.abrupt("return", _context.sent);
50
- case 14:
51
- _context.prev = 14;
52
- _context.t0 = _context["catch"](6);
59
+ case 15:
60
+ _context.prev = 15;
61
+ _context.t0 = _context["catch"](7);
53
62
  lruMap.delete(cacheKey);
54
63
  throw _context.t0;
55
- case 18:
64
+ case 19:
56
65
  case "end":
57
66
  return _context.stop();
58
67
  }
59
- }, _callee, null, [[6, 14]]);
68
+ }, _callee, null, [[7, 15]]);
60
69
  }));
61
70
  return function cachedRequest(_x, _x2, _x3, _x4, _x5) {
62
71
  return _ref.apply(this, arguments);
@@ -1,4 +1,4 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension, } from './services/use-data-source-client-extension';
3
3
  export { mockDatasourceDetailsResponse as mockDatasourceResponse, mockDatasourceDetailsResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
4
- export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
4
+ export type { JsonLdDatasourceResponse, DatasourceResolveResponse } from './types';
@@ -1,5 +1,5 @@
1
1
  import type { CardClient } from '@atlaskit/link-provider';
2
- import { InvokeRequest, InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
2
+ import { type InvokeRequest, type InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
3
3
  /**
4
4
  * useSmartLinkClientExtension
5
5
  *
@@ -1,4 +1,4 @@
1
- import { JsonLd } from 'json-ld-types';
1
+ import { type JsonLd } from 'json-ld-types';
2
2
  import type { DatasourceParameters } from '@atlaskit/linking-types';
3
3
  export interface JsonLdDatasourceResponse extends JsonLd.Response {
4
4
  datasources?: DatasourceResolveResponse[];
@@ -1,4 +1,4 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension, } from './services/use-data-source-client-extension';
3
3
  export { mockDatasourceDetailsResponse as mockDatasourceResponse, mockDatasourceDetailsResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
4
- export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
4
+ export type { JsonLdDatasourceResponse, DatasourceResolveResponse } from './types';
@@ -1,5 +1,5 @@
1
1
  import type { CardClient } from '@atlaskit/link-provider';
2
- import { InvokeRequest, InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
2
+ import { type InvokeRequest, type InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
3
3
  /**
4
4
  * useSmartLinkClientExtension
5
5
  *
@@ -1,4 +1,4 @@
1
- import { JsonLd } from 'json-ld-types';
1
+ import { type JsonLd } from 'json-ld-types';
2
2
  import type { DatasourceParameters } from '@atlaskit/linking-types';
3
3
  export interface JsonLdDatasourceResponse extends JsonLd.Response {
4
4
  datasources?: DatasourceResolveResponse[];
package/package.json CHANGED
@@ -1,94 +1,99 @@
1
1
  {
2
- "name": "@atlaskit/link-client-extension",
3
- "version": "1.8.4",
4
- "description": "Extension methods for linking platform client",
5
- "author": "Atlassian Pty Ltd",
6
- "license": "Apache-2.0",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "atlassian": {
11
- "team": "Linking Platform",
12
- "inPublicMirror": false,
13
- "releaseModel": "continuous",
14
- "website": {
15
- "name": "LinkClientExtension"
16
- }
17
- },
18
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
19
- "main": "dist/cjs/index.js",
20
- "module": "dist/esm/index.js",
21
- "module:es2019": "dist/es2019/index.js",
22
- "types": "dist/types/index.d.ts",
23
- "typesVersions": {
24
- ">=4.5 <4.9": {
25
- "*": [
26
- "dist/types-ts4.5/*",
27
- "dist/types-ts4.5/index.d.ts"
28
- ]
29
- }
30
- },
31
- "sideEffects": false,
32
- "atlaskit:src": "src/index.ts",
33
- "af:exports": {
34
- ".": "./src/index.ts"
35
- },
36
- "dependencies": {
37
- "@atlaskit/linking-common": "^5.6.0",
38
- "@atlaskit/linking-types": "^8.7.0",
39
- "@babel/runtime": "^7.0.0",
40
- "json-ld-types": "^4.1.0",
41
- "lru_map": "^0.4.1"
42
- },
43
- "peerDependencies": {
44
- "@atlaskit/link-provider": "^1.9.0",
45
- "react": "^16.8.0"
46
- },
47
- "devDependencies": {
48
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
49
- "@testing-library/react": "^12.1.5",
50
- "@testing-library/react-hooks": "^8.0.1",
51
- "react-dom": "^16.8.0",
52
- "typescript": "~5.4.2",
53
- "wait-for-expect": "^1.2.0"
54
- },
55
- "techstack": {
56
- "@atlassian/frontend": {
57
- "code-structure": [
58
- "tangerine-next"
59
- ],
60
- "import-structure": [
61
- "atlassian-conventions"
62
- ],
63
- "circular-dependencies": [
64
- "file-and-folder-level"
65
- ]
66
- },
67
- "@repo/internal": {
68
- "dom-events": "use-bind-event-listener",
69
- "analytics": [
70
- "analytics-next"
71
- ],
72
- "design-tokens": [
73
- "color"
74
- ],
75
- "theming": [
76
- "react-context"
77
- ],
78
- "ui-components": [
79
- "lite-mode"
80
- ],
81
- "deprecation": [
82
- "no-deprecated-imports"
83
- ],
84
- "styling": [
85
- "static",
86
- "emotion"
87
- ],
88
- "imports": [
89
- "import-no-extraneous-disable-for-examples-and-docs"
90
- ]
91
- }
92
- },
93
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
94
- }
2
+ "name": "@atlaskit/link-client-extension",
3
+ "version": "1.9.1",
4
+ "description": "Extension methods for linking platform client",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "atlassian": {
11
+ "team": "Linking Platform",
12
+ "inPublicMirror": false,
13
+ "releaseModel": "continuous",
14
+ "website": {
15
+ "name": "LinkClientExtension"
16
+ }
17
+ },
18
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
19
+ "main": "dist/cjs/index.js",
20
+ "module": "dist/esm/index.js",
21
+ "module:es2019": "dist/es2019/index.js",
22
+ "types": "dist/types/index.d.ts",
23
+ "typesVersions": {
24
+ ">=4.5 <4.9": {
25
+ "*": [
26
+ "dist/types-ts4.5/*",
27
+ "dist/types-ts4.5/index.d.ts"
28
+ ]
29
+ }
30
+ },
31
+ "sideEffects": false,
32
+ "atlaskit:src": "src/index.ts",
33
+ "af:exports": {
34
+ ".": "./src/index.ts"
35
+ },
36
+ "dependencies": {
37
+ "@atlaskit/linking-common": "^5.7.0",
38
+ "@atlaskit/linking-types": "^8.9.0",
39
+ "@atlaskit/platform-feature-flags": "0.2.6",
40
+ "@babel/runtime": "^7.0.0",
41
+ "json-ld-types": "^4.1.0",
42
+ "lru_map": "^0.4.1"
43
+ },
44
+ "peerDependencies": {
45
+ "@atlaskit/link-provider": "^1.12.0",
46
+ "react": "^16.8.0"
47
+ },
48
+ "devDependencies": {
49
+ "@atlassian/feature-flags-test-utils": "0.2.1",
50
+ "@testing-library/react": "^12.1.5",
51
+ "@testing-library/react-hooks": "^8.0.1",
52
+ "react-dom": "^16.8.0",
53
+ "typescript": "~5.4.2",
54
+ "wait-for-expect": "^1.2.0"
55
+ },
56
+ "techstack": {
57
+ "@atlassian/frontend": {
58
+ "code-structure": [
59
+ "tangerine-next"
60
+ ],
61
+ "import-structure": [
62
+ "atlassian-conventions"
63
+ ],
64
+ "circular-dependencies": [
65
+ "file-and-folder-level"
66
+ ]
67
+ },
68
+ "@repo/internal": {
69
+ "dom-events": "use-bind-event-listener",
70
+ "analytics": [
71
+ "analytics-next"
72
+ ],
73
+ "design-tokens": [
74
+ "color"
75
+ ],
76
+ "theming": [
77
+ "react-context"
78
+ ],
79
+ "ui-components": [
80
+ "lite-mode"
81
+ ],
82
+ "deprecation": [
83
+ "no-deprecated-imports"
84
+ ],
85
+ "styling": [
86
+ "static",
87
+ "emotion"
88
+ ],
89
+ "imports": [
90
+ "import-no-extraneous-disable-for-examples-and-docs"
91
+ ]
92
+ }
93
+ },
94
+ "platform-feature-flags": {
95
+ "platform.linking-platform.datasource.add-timezone-header": {
96
+ "type": "boolean"
97
+ }
98
+ }
99
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/link-client-extension"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -27,12 +28,12 @@ import { JsonLd } from 'json-ld-types';
27
28
 
28
29
  // @public (undocumented)
29
30
  export type DatasourceResolveResponse = {
30
- id: string;
31
- ari?: string;
32
- key?: string;
33
- name?: string;
34
- description?: string;
35
- parameters: DatasourceParameters;
31
+ id: string;
32
+ ari?: string;
33
+ key?: string;
34
+ name?: string;
35
+ description?: string;
36
+ parameters: DatasourceParameters;
36
37
  };
37
38
 
38
39
  // @public (undocumented)
@@ -40,8 +41,8 @@ export const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
40
41
 
41
42
  // @public (undocumented)
42
43
  export interface JsonLdDatasourceResponse extends JsonLd.Response {
43
- // (undocumented)
44
- datasources?: DatasourceResolveResponse[];
44
+ // (undocumented)
45
+ datasources?: DatasourceResolveResponse[];
45
46
  }
46
47
 
47
48
  // @public (undocumented)
@@ -57,22 +58,22 @@ export { mockDatasourceDetailsResponse as mockDatasourceResponse };
57
58
 
58
59
  // @public (undocumented)
59
60
  export const useDatasourceClientExtension: () => {
60
- getDatasourceDetails: (
61
- datasourceId: string,
62
- data: DatasourceDetailsRequest,
63
- force?: any,
64
- ) => Promise<DatasourceDetailsResponse>;
65
- getDatasourceData: (
66
- datasourceId: string,
67
- data: DatasourceDataRequest,
68
- force?: any,
69
- ) => Promise<DatasourceDataResponse>;
61
+ getDatasourceDetails: (
62
+ datasourceId: string,
63
+ data: DatasourceDetailsRequest,
64
+ force?: any,
65
+ ) => Promise<DatasourceDetailsResponse>;
66
+ getDatasourceData: (
67
+ datasourceId: string,
68
+ data: DatasourceDataRequest,
69
+ force?: any,
70
+ ) => Promise<DatasourceDataResponse>;
70
71
  };
71
72
 
72
73
  // @public
73
74
  export const useSmartLinkClientExtension: (cardClient: CardClient) => {
74
- invoke: (data: InvokeRequest) => Promise<InvokeResponse>;
75
- relatedUrls: <TResponse>(url: string) => Promise<TResponse>;
75
+ invoke: (data: InvokeRequest) => Promise<InvokeResponse>;
76
+ relatedUrls: <TResponse>(url: string) => Promise<TResponse>;
76
77
  };
77
78
 
78
79
  // (No @packageDocumentation comment for this package)
@@ -86,8 +87,8 @@ export const useSmartLinkClientExtension: (cardClient: CardClient) => {
86
87
 
87
88
  ```json
88
89
  {
89
- "@atlaskit/link-provider": "^1.6.4",
90
- "react": "^16.8.0"
90
+ "@atlaskit/link-provider": "^1.6.4",
91
+ "react": "^16.8.0"
91
92
  }
92
93
  ```
93
94