@atlaskit/editor-synced-block-provider 6.1.3 → 6.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,19 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d3b98f06b9def`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d3b98f06b9def) -
8
+ [ux] EDITOR-6025 Implement request access flow for synced blocks whose source is a Jira work item
9
+ the viewer cannot access.
10
+
11
+ ## 6.1.4
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 6.1.3
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.requestJiraSpaceAccess = void 0;
7
+ /**
8
+ * Sends a "request access" notification for a Jira work item the current viewer
9
+ * cannot see. A copy of jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
10
+ */
11
+ var REQUEST_ACCESS_URL = '/rest/internal/latest/project-access/access-requested';
12
+
13
+ /**
14
+ * Note: the type definition is copied from jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
15
+ * Though 'null' is a possible value, if we want notification to actually be sent, accountId and projectKey or issueId have to have actual values.
16
+ */
17
+
18
+ var requestJiraSpaceAccess = exports.requestJiraSpaceAccess = function requestJiraSpaceAccess(payload) {
19
+ // we return nothing on purpose to be vague, not disclose if the project exists or not,
20
+ // so we use fetch instead of performPutRequest as performPutRequest will return null for empty response
21
+
22
+ return fetch(REQUEST_ACCESS_URL, {
23
+ method: 'PUT',
24
+ headers: {
25
+ 'Content-Type': 'application/json'
26
+ },
27
+ body: JSON.stringify(payload)
28
+ });
29
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Sends a "request access" notification for a Jira work item the current viewer
3
+ * cannot see. A copy of jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
4
+ */
5
+ const REQUEST_ACCESS_URL = '/rest/internal/latest/project-access/access-requested';
6
+
7
+ /**
8
+ * Note: the type definition is copied from jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
9
+ * Though 'null' is a possible value, if we want notification to actually be sent, accountId and projectKey or issueId have to have actual values.
10
+ */
11
+
12
+ export const requestJiraSpaceAccess = payload => {
13
+ // we return nothing on purpose to be vague, not disclose if the project exists or not,
14
+ // so we use fetch instead of performPutRequest as performPutRequest will return null for empty response
15
+
16
+ return fetch(REQUEST_ACCESS_URL, {
17
+ method: 'PUT',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ body: JSON.stringify(payload)
22
+ });
23
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Sends a "request access" notification for a Jira work item the current viewer
3
+ * cannot see. A copy of jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
4
+ */
5
+ var REQUEST_ACCESS_URL = '/rest/internal/latest/project-access/access-requested';
6
+
7
+ /**
8
+ * Note: the type definition is copied from jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
9
+ * Though 'null' is a possible value, if we want notification to actually be sent, accountId and projectKey or issueId have to have actual values.
10
+ */
11
+
12
+ export var requestJiraSpaceAccess = function requestJiraSpaceAccess(payload) {
13
+ // we return nothing on purpose to be vague, not disclose if the project exists or not,
14
+ // so we use fetch instead of performPutRequest as performPutRequest will return null for empty response
15
+
16
+ return fetch(REQUEST_ACCESS_URL, {
17
+ method: 'PUT',
18
+ headers: {
19
+ 'Content-Type': 'application/json'
20
+ },
21
+ body: JSON.stringify(payload)
22
+ });
23
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Note: the type definition is copied from jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
3
+ * Though 'null' is a possible value, if we want notification to actually be sent, accountId and projectKey or issueId have to have actual values.
4
+ */
5
+ export type AccessRequestPayload = {
6
+ accountId: string | null;
7
+ boardId?: number | null;
8
+ issueId?: string | null;
9
+ issueKey?: string | null;
10
+ message?: string | null;
11
+ projectKey: string | null;
12
+ };
13
+ export declare const requestJiraSpaceAccess: (payload: AccessRequestPayload) => Promise<Response>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Note: the type definition is copied from jira/src/packages/platform/space-not-found-with-request-access/src/requestSpaceAccess.tsx
3
+ * Though 'null' is a possible value, if we want notification to actually be sent, accountId and projectKey or issueId have to have actual values.
4
+ */
5
+ export type AccessRequestPayload = {
6
+ accountId: string | null;
7
+ boardId?: number | null;
8
+ issueId?: string | null;
9
+ issueKey?: string | null;
10
+ message?: string | null;
11
+ projectKey: string | null;
12
+ };
13
+ export declare const requestJiraSpaceAccess: (payload: AccessRequestPayload) => Promise<Response>;
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/editor-prosemirror": "^7.3.0",
30
30
  "@atlaskit/node-data-provider": "^11.0.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^65.0.0",
32
+ "@atlaskit/tmp-editor-statsig": "^66.1.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@compiled/react": "^0.20.0",
35
35
  "graphql-ws": "^5.14.2",
@@ -38,7 +38,7 @@
38
38
  "uuid": "^3.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@atlaskit/editor-common": "^114.6.0",
41
+ "@atlaskit/editor-common": "^114.8.0",
42
42
  "react": "^18.2.0"
43
43
  },
44
44
  "devDependencies": {
@@ -81,7 +81,7 @@
81
81
  }
82
82
  },
83
83
  "name": "@atlaskit/editor-synced-block-provider",
84
- "version": "6.1.3",
84
+ "version": "6.2.0",
85
85
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
86
86
  "author": "Atlassian Pty Ltd",
87
87
  "license": "Apache-2.0",
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/editor-synced-block-provider/requestJiraIssueAccess",
3
+ "main": "../dist/cjs/clients/jira/requestJiraIssueAccess.js",
4
+ "module": "../dist/esm/clients/jira/requestJiraIssueAccess.js",
5
+ "module:es2019": "../dist/es2019/clients/jira/requestJiraIssueAccess.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/clients/jira/requestJiraIssueAccess.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/clients/jira/requestJiraIssueAccess.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }