@atlaskit/link-client-extension 1.1.6 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/link-client-extension
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b508cc26473`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b508cc26473) - Updated getDatasourceDetails request body to be `DatasourceDetailsRequest` type
8
+
9
+ ## 1.1.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
14
+ - Updated dependencies
15
+
3
16
  ## 1.1.6
4
17
 
5
18
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "mockDatasourceDataResponse", {
9
9
  return _mocks.mockDatasourceDataResponse;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "mockDatasourceDataResponseWithSchema", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _mocks.mockDatasourceDataResponseWithSchema;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "mockDatasourceResponse", {
13
19
  enumerable: true,
14
20
  get: function get() {
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.mockDatasourceResponse = exports.mockDatasourceDataResponse = void 0;
7
+ exports.mockDatasourceResponse = exports.mockDatasourceDataResponseWithSchema = exports.mockDatasourceDataResponse = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
11
  var mockDatasourceDataResponse = {
8
12
  totalIssues: 1234,
9
13
  data: [{
@@ -159,4 +163,10 @@ var mockDatasourceResponse = {
159
163
  defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
160
164
  }
161
165
  };
162
- exports.mockDatasourceResponse = mockDatasourceResponse;
166
+ exports.mockDatasourceResponse = mockDatasourceResponse;
167
+ var mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, mockDatasourceDataResponse), {}, {
168
+ schema: {
169
+ properties: mockDatasourceResponse.schema.properties
170
+ }
171
+ });
172
+ exports.mockDatasourceDataResponseWithSchema = mockDatasourceDataResponseWithSchema;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
- export { mockDatasourceResponse, mockDatasourceDataResponse } from './services/use-data-source-client-extension/mocks';
3
+ export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema } from './services/use-data-source-client-extension/mocks';
@@ -151,4 +151,10 @@ export const mockDatasourceResponse = {
151
151
  }],
152
152
  defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
153
153
  }
154
+ };
155
+ export const mockDatasourceDataResponseWithSchema = {
156
+ ...mockDatasourceDataResponse,
157
+ schema: {
158
+ properties: mockDatasourceResponse.schema.properties
159
+ }
154
160
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
- export { mockDatasourceResponse, mockDatasourceDataResponse } from './services/use-data-source-client-extension/mocks';
3
+ export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema } from './services/use-data-source-client-extension/mocks';
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
4
  export var mockDatasourceDataResponse = {
2
5
  totalIssues: 1234,
3
6
  data: [{
@@ -151,4 +154,9 @@ export var mockDatasourceResponse = {
151
154
  }],
152
155
  defaultProperties: ['type', 'issue', 'summary', 'assignee', 'priority', 'labels', 'status', 'created']
153
156
  }
154
- };
157
+ };
158
+ export var mockDatasourceDataResponseWithSchema = _objectSpread(_objectSpread({}, mockDatasourceDataResponse), {}, {
159
+ schema: {
160
+ properties: mockDatasourceResponse.schema.properties
161
+ }
162
+ });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
- export { mockDatasourceResponse, mockDatasourceDataResponse, } from './services/use-data-source-client-extension/mocks';
3
+ export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
@@ -1,5 +1,5 @@
1
- import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceParameters, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceResponse } from '@atlaskit/linking-types';
2
2
  export declare const useDatasourceClientExtension: () => {
3
- getDatasourceDetails: (datasourceId: string, data: DatasourceParameters) => Promise<DatasourceResponse>;
3
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
4
4
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
5
5
  };
@@ -1,3 +1,4 @@
1
1
  import type { DatasourceDataResponse, DatasourceResponse } from '@atlaskit/linking-types';
2
2
  export declare const mockDatasourceDataResponse: DatasourceDataResponse;
3
3
  export declare const mockDatasourceResponse: DatasourceResponse;
4
+ export declare const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
@@ -1,3 +1,3 @@
1
1
  export { useSmartLinkClientExtension } from './services/use-smart-link-client-extension';
2
2
  export { useDatasourceClientExtension } from './services/use-data-source-client-extension';
3
- export { mockDatasourceResponse, mockDatasourceDataResponse, } from './services/use-data-source-client-extension/mocks';
3
+ export { mockDatasourceResponse, mockDatasourceDataResponse, mockDatasourceDataResponseWithSchema, } from './services/use-data-source-client-extension/mocks';
@@ -1,5 +1,5 @@
1
- import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceParameters, DatasourceResponse } from '@atlaskit/linking-types';
1
+ import type { DatasourceDataRequest, DatasourceDataResponse, DatasourceDetailsRequest, DatasourceResponse } from '@atlaskit/linking-types';
2
2
  export declare const useDatasourceClientExtension: () => {
3
- getDatasourceDetails: (datasourceId: string, data: DatasourceParameters) => Promise<DatasourceResponse>;
3
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
4
4
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
5
5
  };
@@ -1,3 +1,4 @@
1
1
  import type { DatasourceDataResponse, DatasourceResponse } from '@atlaskit/linking-types';
2
2
  export declare const mockDatasourceDataResponse: DatasourceDataResponse;
3
3
  export declare const mockDatasourceResponse: DatasourceResponse;
4
+ export declare const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "description": "Extension methods for linking platform client",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,16 +34,15 @@
34
34
  ".": "./src/index.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/linking-common": "^2.13.0",
37
+ "@atlaskit/linking-common": "^2.14.0",
38
38
  "@atlaskit/linking-types": "^5.0.0",
39
39
  "@babel/runtime": "^7.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@atlaskit/link-provider": "^1.6.2",
42
+ "@atlaskit/link-provider": "^1.6.4",
43
43
  "react": "^16.8.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@atlaskit/docs": "*",
47
46
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
48
47
  "@testing-library/react": "^12.1.5",
49
48
  "@testing-library/react-hooks": "^8.0.1",
package/report.api.md CHANGED
@@ -18,7 +18,7 @@
18
18
  import type { CardClient } from '@atlaskit/link-provider';
19
19
  import type { DatasourceDataRequest } from '@atlaskit/linking-types';
20
20
  import type { DatasourceDataResponse } from '@atlaskit/linking-types';
21
- import type { DatasourceParameters } from '@atlaskit/linking-types';
21
+ import type { DatasourceDetailsRequest } from '@atlaskit/linking-types';
22
22
  import type { DatasourceResponse } from '@atlaskit/linking-types';
23
23
  import { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
24
24
  import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
@@ -26,6 +26,9 @@ import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
26
26
  // @public (undocumented)
27
27
  export const mockDatasourceDataResponse: DatasourceDataResponse;
28
28
 
29
+ // @public (undocumented)
30
+ export const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
31
+
29
32
  // @public (undocumented)
30
33
  export const mockDatasourceResponse: DatasourceResponse;
31
34
 
@@ -33,7 +36,7 @@ export const mockDatasourceResponse: DatasourceResponse;
33
36
  export const useDatasourceClientExtension: () => {
34
37
  getDatasourceDetails: (
35
38
  datasourceId: string,
36
- data: DatasourceParameters,
39
+ data: DatasourceDetailsRequest,
37
40
  ) => Promise<DatasourceResponse>;
38
41
  getDatasourceData: (
39
42
  datasourceId: string,
@@ -57,7 +60,7 @@ export const useSmartLinkClientExtension: (cardClient: CardClient) => {
57
60
 
58
61
  ```json
59
62
  {
60
- "@atlaskit/link-provider": "^1.6.2",
63
+ "@atlaskit/link-provider": "^1.6.4",
61
64
  "react": "^16.8.0"
62
65
  }
63
66
  ```
@@ -7,7 +7,7 @@
7
7
  import type { CardClient } from '@atlaskit/link-provider';
8
8
  import type { DatasourceDataRequest } from '@atlaskit/linking-types';
9
9
  import type { DatasourceDataResponse } from '@atlaskit/linking-types';
10
- import type { DatasourceParameters } from '@atlaskit/linking-types';
10
+ import type { DatasourceDetailsRequest } from '@atlaskit/linking-types';
11
11
  import type { DatasourceResponse } from '@atlaskit/linking-types';
12
12
  import { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
13
13
  import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
@@ -15,12 +15,15 @@ import { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
15
15
  // @public (undocumented)
16
16
  export const mockDatasourceDataResponse: DatasourceDataResponse;
17
17
 
18
+ // @public (undocumented)
19
+ export const mockDatasourceDataResponseWithSchema: DatasourceDataResponse;
20
+
18
21
  // @public (undocumented)
19
22
  export const mockDatasourceResponse: DatasourceResponse;
20
23
 
21
24
  // @public (undocumented)
22
25
  export const useDatasourceClientExtension: () => {
23
- getDatasourceDetails: (datasourceId: string, data: DatasourceParameters) => Promise<DatasourceResponse>;
26
+ getDatasourceDetails: (datasourceId: string, data: DatasourceDetailsRequest) => Promise<DatasourceResponse>;
24
27
  getDatasourceData: (datasourceId: string, data: DatasourceDataRequest) => Promise<DatasourceDataResponse>;
25
28
  };
26
29