@atlaskit/link-client-extension 0.1.0 → 0.3.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 +1,17 @@
1
1
  # @atlaskit/link-client-extension
2
+
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7297fb71759`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7297fb71759) - Update response type for useSmartLinkClientExtension
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`f32cef73d0f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f32cef73d0f) - use new types from smart link types
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
@@ -28,7 +28,7 @@ var useSmartLinkClientExtension = function useSmartLinkClientExtension(cardClien
28
28
  switch (_context.prev = _context.next) {
29
29
  case 0:
30
30
  _context.next = 2;
31
- return (0, _linkingCommon.request)('post', "".concat(resolvedUrl, "/invoke"), data, undefined, [200, 204]);
31
+ return (0, _linkingCommon.request)('post', "".concat(resolvedUrl, "/invoke"), data, undefined, [200, 201, 202, 203, 204]);
32
32
  case 2:
33
33
  response = _context.sent;
34
34
  return _context.abrupt("return", response);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -13,7 +13,7 @@ import { useResolverUrl } from '../use-resolver-url';
13
13
  export const useSmartLinkClientExtension = cardClient => {
14
14
  const resolvedUrl = useResolverUrl(cardClient);
15
15
  const invoke = useCallback(async data => {
16
- const response = await request('post', `${resolvedUrl}/invoke`, data, undefined, [200, 204]);
16
+ const response = await request('post', `${resolvedUrl}/invoke`, data, undefined, [200, 201, 202, 203, 204]);
17
17
  return response;
18
18
  }, [resolvedUrl]);
19
19
  return useMemo(() => ({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -22,7 +22,7 @@ export var useSmartLinkClientExtension = function useSmartLinkClientExtension(ca
22
22
  switch (_context.prev = _context.next) {
23
23
  case 0:
24
24
  _context.next = 2;
25
- return request('post', "".concat(resolvedUrl, "/invoke"), data, undefined, [200, 204]);
25
+ return request('post', "".concat(resolvedUrl, "/invoke"), data, undefined, [200, 201, 202, 203, 204]);
26
26
  case 2:
27
27
  response = _context.sent;
28
28
  return _context.abrupt("return", response);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { CardClient } from '@atlaskit/link-provider';
2
- import type { InvokeActionRequest, InvokeActionResponse } from '@atlaskit/linking-types/smart-link-actions';
2
+ import type { InvokeRequest, InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
3
3
  /**
4
4
  * useSmartLinkClientExtension
5
5
  *
@@ -9,8 +9,5 @@ import type { InvokeActionRequest, InvokeActionResponse } from '@atlaskit/linkin
9
9
  * @param cardClient
10
10
  */
11
11
  export declare const useSmartLinkClientExtension: (cardClient: CardClient) => {
12
- invoke: <T>(data: InvokeActionRequest) => Promise<InvokeActionResponse | {
13
- message?: string | undefined;
14
- errorCode?: string | undefined;
15
- }>;
12
+ invoke: (data: InvokeRequest) => Promise<InvokeResponse>;
16
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-client-extension",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Extension methods for linking platform client",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -26,8 +26,8 @@
26
26
  ".": "./src/index.ts"
27
27
  },
28
28
  "dependencies": {
29
- "@atlaskit/linking-common": "^2.3.0",
30
- "@atlaskit/linking-types": "^0.2.0",
29
+ "@atlaskit/linking-common": "^2.4.0",
30
+ "@atlaskit/linking-types": "^0.3.0",
31
31
  "@babel/runtime": "^7.0.0"
32
32
  },
33
33
  "peerDependencies": {
package/report.api.md CHANGED
@@ -16,18 +16,12 @@
16
16
 
17
17
  ```ts
18
18
  import type { CardClient } from '@atlaskit/link-provider';
19
- import type { InvokeActionRequest } from '@atlaskit/linking-types/smart-link-actions';
20
- import type { InvokeActionResponse } from '@atlaskit/linking-types/smart-link-actions';
19
+ import type { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
20
+ import type { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
21
21
 
22
22
  // @public
23
23
  export const useSmartLinkClientExtension: (cardClient: CardClient) => {
24
- invoke: <T>(data: InvokeActionRequest) => Promise<
25
- | InvokeActionResponse
26
- | {
27
- message?: string | undefined;
28
- errorCode?: string | undefined;
29
- }
30
- >;
24
+ invoke: (data: InvokeRequest) => Promise<InvokeResponse>;
31
25
  };
32
26
 
33
27
  // (No @packageDocumentation comment for this package)
@@ -5,15 +5,12 @@
5
5
  ```ts
6
6
 
7
7
  import type { CardClient } from '@atlaskit/link-provider';
8
- import type { InvokeActionRequest } from '@atlaskit/linking-types/smart-link-actions';
9
- import type { InvokeActionResponse } from '@atlaskit/linking-types/smart-link-actions';
8
+ import type { InvokeRequest } from '@atlaskit/linking-types/smart-link-actions';
9
+ import type { InvokeResponse } from '@atlaskit/linking-types/smart-link-actions';
10
10
 
11
11
  // @public
12
12
  export const useSmartLinkClientExtension: (cardClient: CardClient) => {
13
- invoke: <T>(data: InvokeActionRequest) => Promise<InvokeActionResponse | {
14
- message?: string | undefined;
15
- errorCode?: string | undefined;
16
- }>;
13
+ invoke: (data: InvokeRequest) => Promise<InvokeResponse>;
17
14
  };
18
15
 
19
16
  // (No @packageDocumentation comment for this package)