@atlaskit/link-client-extension 1.6.0 → 1.7.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 +16 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/services/use-data-source-client-extension/index.js +3 -1
- package/dist/cjs/services/use-data-source-client-extension/mocks.js +8 -4
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/services/use-data-source-client-extension/index.js +1 -0
- package/dist/es2019/services/use-data-source-client-extension/mocks.js +6 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/services/use-data-source-client-extension/index.js +1 -0
- package/dist/esm/services/use-data-source-client-extension/mocks.js +8 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/use-data-source-client-extension/index.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/services/use-data-source-client-extension/index.d.ts +1 -0
- package/package.json +3 -3
- package/report.api.md +3 -0
- package/tmp/api-report-tmp.d.ts +3 -0
- package/dist/cjs/version.json +0 -5
- package/dist/es2019/version.json +0 -5
- package/dist/esm/version.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/link-client-extension
|
|
2
2
|
|
|
3
|
+
## 1.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8b8a309cb62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b8a309cb62) - Added a `DEFAULT_GET_DATA_PAGE_SIZE` constant for default page size on data calls.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.6.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`a21cffb7b23`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a21cffb7b23) - Extended mock response returned for datasources
|
|
18
|
+
|
|
3
19
|
## 1.6.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _useDataSourceClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "mockDatasourceDataResponse", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.useDatasourceClientExtension = exports.datasourceDetailsResponsePromiseCache = exports.datasourceDataResponsePromiseCache = void 0;
|
|
7
|
+
exports.useDatasourceClientExtension = exports.datasourceDetailsResponsePromiseCache = exports.datasourceDataResponsePromiseCache = exports.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _react = require("react");
|
|
@@ -17,6 +17,8 @@ var datasourceDetailsResponsePromiseCache = new _lru_map.LRUMap(URL_RESPONSE_CAC
|
|
|
17
17
|
exports.datasourceDetailsResponsePromiseCache = datasourceDetailsResponsePromiseCache;
|
|
18
18
|
var datasourceDataResponsePromiseCache = new _lru_map.LRUMap(URL_RESPONSE_CACHE_SIZE);
|
|
19
19
|
exports.datasourceDataResponsePromiseCache = datasourceDataResponsePromiseCache;
|
|
20
|
+
var DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
21
|
+
exports.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE;
|
|
20
22
|
var useDatasourceClientExtension = function useDatasourceClientExtension() {
|
|
21
23
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
22
24
|
client = _useSmartLinkContext.connections.client;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.mockDatasourceDetailsResponse = exports.mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponse = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
function ownKeys(
|
|
10
|
-
function _objectSpread(
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
11
|
var mockDatasourceDataResponse = {
|
|
12
12
|
meta: {
|
|
13
13
|
key: 'jira-object-provider',
|
|
@@ -15,7 +15,9 @@ var mockDatasourceDataResponse = {
|
|
|
15
15
|
auth: [],
|
|
16
16
|
definitionId: 'object-resolver-service',
|
|
17
17
|
product: 'jira',
|
|
18
|
-
visibility: 'restricted'
|
|
18
|
+
visibility: 'restricted',
|
|
19
|
+
extensionKey: 'jira-object-provider',
|
|
20
|
+
destinationObjectTypes: ['issue']
|
|
19
21
|
},
|
|
20
22
|
data: {
|
|
21
23
|
totalCount: 1234,
|
|
@@ -120,7 +122,9 @@ var mockDatasourceDetailsResponse = {
|
|
|
120
122
|
auth: [],
|
|
121
123
|
definitionId: 'object-resolver-service',
|
|
122
124
|
product: 'jira',
|
|
123
|
-
visibility: 'restricted'
|
|
125
|
+
visibility: 'restricted',
|
|
126
|
+
extensionKey: 'jira-object-provider',
|
|
127
|
+
destinationObjectTypes: ['issue']
|
|
124
128
|
},
|
|
125
129
|
data: {
|
|
126
130
|
ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
|
|
2
|
-
export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
|
|
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';
|
|
@@ -6,6 +6,7 @@ import { useResolverUrl } from '../use-resolver-url';
|
|
|
6
6
|
const URL_RESPONSE_CACHE_SIZE = 50;
|
|
7
7
|
export const datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
|
|
8
8
|
export const datasourceDataResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
|
|
9
|
+
export const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
9
10
|
export const useDatasourceClientExtension = () => {
|
|
10
11
|
const {
|
|
11
12
|
connections: {
|
|
@@ -5,7 +5,9 @@ export const mockDatasourceDataResponse = {
|
|
|
5
5
|
auth: [],
|
|
6
6
|
definitionId: 'object-resolver-service',
|
|
7
7
|
product: 'jira',
|
|
8
|
-
visibility: 'restricted'
|
|
8
|
+
visibility: 'restricted',
|
|
9
|
+
extensionKey: 'jira-object-provider',
|
|
10
|
+
destinationObjectTypes: ['issue']
|
|
9
11
|
},
|
|
10
12
|
data: {
|
|
11
13
|
totalCount: 1234,
|
|
@@ -109,7 +111,9 @@ export const mockDatasourceDetailsResponse = {
|
|
|
109
111
|
auth: [],
|
|
110
112
|
definitionId: 'object-resolver-service',
|
|
111
113
|
product: 'jira',
|
|
112
|
-
visibility: 'restricted'
|
|
114
|
+
visibility: 'restricted',
|
|
115
|
+
extensionKey: 'jira-object-provider',
|
|
116
|
+
destinationObjectTypes: ['issue']
|
|
113
117
|
},
|
|
114
118
|
data: {
|
|
115
119
|
ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
|
|
2
|
-
export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
|
|
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';
|
|
@@ -8,6 +8,7 @@ import { useResolverUrl } from '../use-resolver-url';
|
|
|
8
8
|
var URL_RESPONSE_CACHE_SIZE = 50;
|
|
9
9
|
export var datasourceDetailsResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
|
|
10
10
|
export var datasourceDataResponsePromiseCache = new LRUMap(URL_RESPONSE_CACHE_SIZE);
|
|
11
|
+
export var DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
11
12
|
export var useDatasourceClientExtension = function useDatasourceClientExtension() {
|
|
12
13
|
var _useSmartLinkContext = useSmartLinkContext(),
|
|
13
14
|
client = _useSmartLinkContext.connections.client;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
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; }
|
|
3
|
+
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) { _defineProperty(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; }
|
|
4
4
|
export var mockDatasourceDataResponse = {
|
|
5
5
|
meta: {
|
|
6
6
|
key: 'jira-object-provider',
|
|
@@ -8,7 +8,9 @@ export var mockDatasourceDataResponse = {
|
|
|
8
8
|
auth: [],
|
|
9
9
|
definitionId: 'object-resolver-service',
|
|
10
10
|
product: 'jira',
|
|
11
|
-
visibility: 'restricted'
|
|
11
|
+
visibility: 'restricted',
|
|
12
|
+
extensionKey: 'jira-object-provider',
|
|
13
|
+
destinationObjectTypes: ['issue']
|
|
12
14
|
},
|
|
13
15
|
data: {
|
|
14
16
|
totalCount: 1234,
|
|
@@ -112,7 +114,9 @@ export var mockDatasourceDetailsResponse = {
|
|
|
112
114
|
auth: [],
|
|
113
115
|
definitionId: 'object-resolver-service',
|
|
114
116
|
product: 'jira',
|
|
115
|
-
visibility: 'restricted'
|
|
117
|
+
visibility: 'restricted',
|
|
118
|
+
extensionKey: 'jira-object-provider',
|
|
119
|
+
destinationObjectTypes: ['issue']
|
|
116
120
|
},
|
|
117
121
|
data: {
|
|
118
122
|
ari: 'ari:cloud:linking-platform:datasource/12e74246-a3f1-46c1-9fd9-8d952aa9f12f',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
|
|
2
|
-
export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
|
|
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
4
|
export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
|
|
@@ -2,6 +2,7 @@ import { LRUMap } from 'lru_map';
|
|
|
2
2
|
import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceDetailsResponse } from '@atlaskit/linking-types';
|
|
3
3
|
export declare const datasourceDetailsResponsePromiseCache: LRUMap<string, Promise<DatasourceDetailsResponse>>;
|
|
4
4
|
export declare const datasourceDataResponsePromiseCache: LRUMap<string, Promise<DatasourceDataResponse>>;
|
|
5
|
+
export declare const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
5
6
|
export declare const useDatasourceClientExtension: () => {
|
|
6
7
|
getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest, force?: any) => Promise<DatasourceDetailsResponse>;
|
|
7
8
|
getDatasourceData: (datasourceId: string, data: DatasourceDataRequest, force?: any) => Promise<DatasourceDataResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
|
|
2
|
-
export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
|
|
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
4
|
export type { JsonLdDatasourceResponse, DatasourceResolveResponse, } from './types';
|
|
@@ -2,6 +2,7 @@ import { LRUMap } from 'lru_map';
|
|
|
2
2
|
import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceDetailsResponse } from '@atlaskit/linking-types';
|
|
3
3
|
export declare const datasourceDetailsResponsePromiseCache: LRUMap<string, Promise<DatasourceDetailsResponse>>;
|
|
4
4
|
export declare const datasourceDataResponsePromiseCache: LRUMap<string, Promise<DatasourceDataResponse>>;
|
|
5
|
+
export declare const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
5
6
|
export declare const useDatasourceClientExtension: () => {
|
|
6
7
|
getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest, force?: any) => Promise<DatasourceDetailsResponse>;
|
|
7
8
|
getDatasourceData: (datasourceId: string, data: DatasourceDataRequest, force?: any) => Promise<DatasourceDataResponse>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-client-extension",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Extension methods for linking platform client",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
".": "./src/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/linking-common": "^4.
|
|
38
|
-
"@atlaskit/linking-types": "^8.
|
|
37
|
+
"@atlaskit/linking-common": "^4.9.0",
|
|
38
|
+
"@atlaskit/linking-types": "^8.3.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"json-ld-types": "3.8.0",
|
|
41
41
|
"lru_map": "^0.4.1"
|
package/report.api.md
CHANGED
|
@@ -35,6 +35,9 @@ export type DatasourceResolveResponse = {
|
|
|
35
35
|
parameters: DatasourceParameters;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
export const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
40
|
+
|
|
38
41
|
// @public (undocumented)
|
|
39
42
|
export interface JsonLdDatasourceResponse extends JsonLd.Response {
|
|
40
43
|
// (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ export type DatasourceResolveResponse = {
|
|
|
24
24
|
parameters: DatasourceParameters;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
// @public (undocumented)
|
|
28
|
+
export const DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE = 20;
|
|
29
|
+
|
|
27
30
|
// @public (undocumented)
|
|
28
31
|
export interface JsonLdDatasourceResponse extends JsonLd.Response {
|
|
29
32
|
// (undocumented)
|
package/dist/cjs/version.json
DELETED
package/dist/es2019/version.json
DELETED