@atlaskit/link-client-extension 1.8.4 → 1.9.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,22 +1,36 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#109647](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109647)
8
+ [`17d330a232539`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/17d330a232539) -
9
+ The changes here adds a "origin-timezone" header to datasource /data and /details requests.
10
+
3
11
  ## 1.8.4
4
12
 
5
13
  ### Patch Changes
6
14
 
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
15
+ - [#86596](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86596)
16
+ [`37621cb1f1b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/37621cb1f1b9) -
17
+ Update dependency json-ld-types
8
18
 
9
19
  ## 1.8.3
10
20
 
11
21
  ### Patch Changes
12
22
 
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`
23
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
24
+ [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
25
+ Upgrade Typescript from `4.9.5` to `5.4.2`
14
26
 
15
27
  ## 1.8.2
16
28
 
17
29
  ### Patch Changes
18
30
 
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
31
+ - [#68194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68194)
32
+ [`c1d4a8fecc4e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1d4a8fecc4e) -
33
+ bump json-ld-types to version 3.11.0
20
34
 
21
35
  ## 1.8.1
22
36
 
@@ -28,31 +42,41 @@
28
42
 
29
43
  ### Minor Changes
30
44
 
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
45
+ - [#42199](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42199)
46
+ [`896e6300360`](https://bitbucket.org/atlassian/atlassian-frontend/commits/896e6300360) - Add api
47
+ to make GET request to related-urls endpoint
32
48
 
33
49
  ## 1.7.3
34
50
 
35
51
  ### Patch Changes
36
52
 
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.
53
+ - [#41377](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41377)
54
+ [`6191c789222`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6191c789222) - Fix bug
55
+ where on next page load sorts the column in alphabetical order.
38
56
 
39
57
  ## 1.7.2
40
58
 
41
59
  ### Patch Changes
42
60
 
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
61
+ - [#40491](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40491)
62
+ [`1fedffbd64b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fedffbd64b) - Update
63
+ json-ld-types dependencies to be compatible with version
44
64
 
45
65
  ## 1.7.1
46
66
 
47
67
  ### Patch Changes
48
68
 
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
69
+ - [#40127](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40127)
70
+ [`2cd7af71b63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2cd7af71b63) - Bump
71
+ json-ld-types 3.8.0 -> 3.9.1
50
72
 
51
73
  ## 1.7.0
52
74
 
53
75
  ### Minor Changes
54
76
 
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.
77
+ - [#39265](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39265)
78
+ [`8b8a309cb62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b8a309cb62) - Added a
79
+ `DEFAULT_GET_DATA_PAGE_SIZE` constant for default page size on data calls.
56
80
 
57
81
  ### Patch Changes
58
82
 
@@ -62,26 +86,41 @@
62
86
 
63
87
  ### Patch Changes
64
88
 
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
89
+ - [#39465](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39465)
90
+ [`a21cffb7b23`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a21cffb7b23) - Extended
91
+ mock response returned for datasources
66
92
 
67
93
  ## 1.6.0
68
94
 
69
95
  ### Minor Changes
70
96
 
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.
97
+ - [#38189](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38189)
98
+ [`5bc0af1de85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5bc0af1de85) -
99
+ Introduce caching layer for both `getDatasourceDetails` and `getDatasourceData` calls. Export new
100
+ member - `mockDatasourceDetailsResponse` that has same value as previously exported
101
+ `mockDatasourceResponse`
102
+ - [`b3b6782c3a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b3b6782c3a0) - Add new
103
+ member `mockDatasourceDetailsResponse` that has same value as existing `mockDatasourceResponse`;
104
+ Add third optional boolean argument to `getDatasourceDetails` and `getDatasourceData` from
105
+ `useDatasourceClientExtension` hook called `force` — when it is false (Default) cached version of
106
+ response promise will be returned (in case request with same parameters has been made), when true
107
+ new request will be made regardless of cache state.
73
108
 
74
109
  ## 1.5.4
75
110
 
76
111
  ### Patch Changes
77
112
 
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
113
+ - [#37720](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37720)
114
+ [`e74ae7f06d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e74ae7f06d4) - Update
115
+ dependency json-ld-types@3.8.0
79
116
 
80
117
  ## 1.5.3
81
118
 
82
119
  ### Patch Changes
83
120
 
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
121
+ - [#37340](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37340)
122
+ [`b9355830504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9355830504) - Opt out
123
+ of peer dependency enforcement
85
124
 
86
125
  ## 1.5.2
87
126
 
@@ -93,13 +132,18 @@
93
132
 
94
133
  ### Patch Changes
95
134
 
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
135
+ - [#36757](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36757)
136
+ [`3fb20c4aeba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fb20c4aeba) - Add
137
+ postinstall check to enforce internal peer dependencies
97
138
 
98
139
  ## 1.5.0
99
140
 
100
141
  ### Minor Changes
101
142
 
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
143
+ - [#36138](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36138)
144
+ [`12411d70076`](https://bitbucket.org/atlassian/atlassian-frontend/commits/12411d70076) - export
145
+ more datasource types in the linking-type index and remove the defaultProperties in the
146
+ datasourceDataResponse
103
147
 
104
148
  ### Patch Changes
105
149
 
@@ -109,7 +153,10 @@
109
153
 
110
154
  ### Minor Changes
111
155
 
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
156
+ - [#35032](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35032)
157
+ [`04295e9d5bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04295e9d5bc) - [ux]
158
+ Updating ORS response to include datasources and facilitating pasting JQL links turning into
159
+ datasource tables
113
160
 
114
161
  ### Patch Changes
115
162
 
@@ -119,7 +166,10 @@
119
166
 
120
167
  ### Minor Changes
121
168
 
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
169
+ - [#35861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35861)
170
+ [`f427908df3d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f427908df3d) - change
171
+ the datasource response type to include the meta data section and the data response will wrap in
172
+ the data section
123
173
 
124
174
  ### Patch Changes
125
175
 
@@ -141,13 +191,17 @@
141
191
 
142
192
  ### Minor Changes
143
193
 
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
194
+ - [#34180](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34180)
195
+ [`b508cc26473`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b508cc26473) - Updated
196
+ getDatasourceDetails request body to be `DatasourceDetailsRequest` type
145
197
 
146
198
  ## 1.1.7
147
199
 
148
200
  ### Patch Changes
149
201
 
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
202
+ - [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443)
203
+ [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing
204
+ unused dependencies and dev dependencies
151
205
  - Updated dependencies
152
206
 
153
207
  ## 1.1.6
@@ -166,35 +220,45 @@
166
220
 
167
221
  ### Patch Changes
168
222
 
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
223
+ - [#34035](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34035)
224
+ [`43ad059dcc5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43ad059dcc5) - Updated
225
+ mock response to the new `DatasourceDataResponseItem` format
170
226
  - Updated dependencies
171
227
 
172
228
  ## 1.1.3
173
229
 
174
230
  ### Patch Changes
175
231
 
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
232
+ - [#33917](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33917)
233
+ [`e9ad7ee17bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9ad7ee17bb) - Updated
234
+ mock response to the new `DatasourceType` value format
177
235
  - Updated dependencies
178
236
 
179
237
  ## 1.1.2
180
238
 
181
239
  ### Patch Changes
182
240
 
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
241
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
242
+ [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
243
+ legacy types are published for TS 4.5-4.8
184
244
  - Updated dependencies
185
245
 
186
246
  ## 1.1.1
187
247
 
188
248
  ### Patch Changes
189
249
 
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`
250
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
251
+ [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade
252
+ Typescript from `4.5.5` to `4.9.5`
191
253
  - Updated dependencies
192
254
 
193
255
  ## 1.1.0
194
256
 
195
257
  ### Minor Changes
196
258
 
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
259
+ - [#33177](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33177)
260
+ [`670454dc4a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/670454dc4a0) - Add
261
+ totalIssues to mock/types
198
262
 
199
263
  ### Patch Changes
200
264
 
@@ -204,7 +268,9 @@
204
268
 
205
269
  ### Minor Changes
206
270
 
207
- - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
271
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
272
+ [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
273
+ minor dependency bump
208
274
 
209
275
  ### Patch Changes
210
276
 
@@ -214,7 +280,9 @@
214
280
 
215
281
  ### Minor Changes
216
282
 
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
283
+ - [#32751](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32751)
284
+ [`5f0b51cb0e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f0b51cb0e9) - Updated
285
+ `useDatasourceClientExtension` hook to use `useSmartLinkContext` for creating smart-card client
218
286
 
219
287
  ### Patch Changes
220
288
 
@@ -224,7 +292,9 @@
224
292
 
225
293
  ### Patch Changes
226
294
 
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
295
+ - [#32589](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32589)
296
+ [`f1b712482b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f1b712482b1) - Fixed
297
+ error handling inside of invoke function
228
298
  - Updated dependencies
229
299
 
230
300
  ## 0.4.2
@@ -237,14 +307,18 @@
237
307
 
238
308
  ### Patch Changes
239
309
 
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
310
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424)
311
+ [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY
312
+ remove before merging to master; dupe adf-schema via adf-utils
241
313
  - Updated dependencies
242
314
 
243
315
  ## 0.4.0
244
316
 
245
317
  ### Minor Changes
246
318
 
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
319
+ - [#32368](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32368)
320
+ [`d19a6e77d60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d19a6e77d60) - Adds new
321
+ hook useDatasourceClientExtension to fetch data for link datasources
248
322
 
249
323
  ### Patch Changes
250
324
 
@@ -254,13 +328,17 @@
254
328
 
255
329
  ### Minor Changes
256
330
 
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
331
+ - [#31900](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31900)
332
+ [`7297fb71759`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7297fb71759) - Update
333
+ response type for useSmartLinkClientExtension
258
334
 
259
335
  ## 0.2.0
260
336
 
261
337
  ### Minor Changes
262
338
 
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
339
+ - [#31905](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31905)
340
+ [`f32cef73d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f32cef73d0f) - use new
341
+ types from smart link types
264
342
 
265
343
  ### Patch Changes
266
344
 
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.8.4",
3
+ "version": "1.9.0",
4
4
  "description": "Extension methods for linking platform client",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,18 +34,19 @@
34
34
  ".": "./src/index.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/linking-common": "^5.6.0",
38
- "@atlaskit/linking-types": "^8.7.0",
37
+ "@atlaskit/linking-common": "^5.7.0",
38
+ "@atlaskit/linking-types": "^8.9.0",
39
+ "@atlaskit/platform-feature-flags": "0.2.5",
39
40
  "@babel/runtime": "^7.0.0",
40
41
  "json-ld-types": "^4.1.0",
41
42
  "lru_map": "^0.4.1"
42
43
  },
43
44
  "peerDependencies": {
44
- "@atlaskit/link-provider": "^1.9.0",
45
+ "@atlaskit/link-provider": "^1.10.0",
45
46
  "react": "^16.8.0"
46
47
  },
47
48
  "devDependencies": {
48
- "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
49
+ "@atlassian/feature-flags-test-utils": "0.2.1",
49
50
  "@testing-library/react": "^12.1.5",
50
51
  "@testing-library/react-hooks": "^8.0.1",
51
52
  "react-dom": "^16.8.0",
@@ -90,5 +91,9 @@
90
91
  ]
91
92
  }
92
93
  },
93
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
94
+ "platform-feature-flags": {
95
+ "platform.linking-platform.datasource.add-timezone-header": {
96
+ "type": "boolean"
97
+ }
98
+ }
94
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