@atlaskit/editor-synced-block-provider 7.0.14 → 7.0.15
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 +6 -0
- package/blockService/ari/package.json +1 -8
- package/blockService/package.json +1 -8
- package/blockSubscription/package.json +1 -8
- package/clients/confluence/ari/package.json +1 -8
- package/common/types/package.json +1 -8
- package/errorHandling/package.json +1 -8
- package/fetchJiraMediaToken/package.json +1 -8
- package/fetchMediaToken/package.json +1 -8
- package/jira/ari/package.json +1 -8
- package/package.json +2 -2
- package/providers/block-service/blockServiceAPI/package.json +1 -8
- package/providers/types/package.json +1 -8
- package/rebaseTransaction/package.json +1 -8
- package/referenceSyncBlockStoreManager/package.json +1 -8
- package/requestJiraIssueAccess/package.json +1 -8
- package/resolveSyncBlockInstance/package.json +1 -8
- package/sourceInfo/package.json +1 -8
- package/syncBlockInMemorySessionCache/package.json +1 -8
- package/syncBlockProvider/package.json +1 -8
- package/syncBlockStoreManager/package.json +1 -8
- package/tokenRouting/package.json +1 -8
- package/types/package.json +1 -8
- package/useFetchSyncBlockData/package.json +1 -8
- package/useFetchSyncBlockTitle/package.json +1 -8
- package/useHandleContentChanges/package.json +1 -8
- package/utils/package.json +1 -8
- package/utils/resourceId/package.json +1 -8
- package/validValue/package.json +1 -8
- package/dist/types-ts4.5/clients/block-service/ari.d.ts +0 -34
- package/dist/types-ts4.5/clients/block-service/blockService.d.ts +0 -187
- package/dist/types-ts4.5/clients/block-service/blockSubscription.d.ts +0 -52
- package/dist/types-ts4.5/clients/confluence/ari.d.ts +0 -27
- package/dist/types-ts4.5/clients/confluence/fetchMediaToken.d.ts +0 -10
- package/dist/types-ts4.5/clients/confluence/sourceInfo.d.ts +0 -2
- package/dist/types-ts4.5/clients/confluence/utils.d.ts +0 -2
- package/dist/types-ts4.5/clients/jira/ari.d.ts +0 -18
- package/dist/types-ts4.5/clients/jira/fetchMediaToken.d.ts +0 -9
- package/dist/types-ts4.5/clients/jira/requestJiraIssueAccess.d.ts +0 -13
- package/dist/types-ts4.5/clients/jira/sourceInfo.d.ts +0 -22
- package/dist/types-ts4.5/clients/tokenRouting.d.ts +0 -11
- package/dist/types-ts4.5/common/consts.d.ts +0 -4
- package/dist/types-ts4.5/common/rebase-transaction.d.ts +0 -11
- package/dist/types-ts4.5/common/types.d.ts +0 -82
- package/dist/types-ts4.5/entry-points/blockService-ari.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockService.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/blockServiceAPI.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockSubscription.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/common-types.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/confluence-ari.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/errorHandling.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/fetchJiraMediaToken.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/fetchMediaToken.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/jira-ari.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/providers-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/rebaseTransaction.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/referenceSyncBlockStoreManager.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/requestJiraIssueAccess.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/resolveSyncBlockInstance.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/resourceId.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/sourceInfo.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/syncBlockInMemorySessionCache.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/syncBlockProvider.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/syncBlockStoreManager.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/tokenRouting.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/useFetchSyncBlockData.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/useFetchSyncBlockTitle.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/useHandleContentChanges.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/utils.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/validValue.d.ts +0 -1
- package/dist/types-ts4.5/hooks/useFetchSyncBlockData.d.ts +0 -16
- package/dist/types-ts4.5/hooks/useFetchSyncBlockTitle.d.ts +0 -3
- package/dist/types-ts4.5/hooks/useHandleContentChanges.d.ts +0 -3
- package/dist/types-ts4.5/index.d.ts +0 -25
- package/dist/types-ts4.5/providers/block-service/blockServiceAPI.d.ts +0 -127
- package/dist/types-ts4.5/providers/syncBlockProvider.d.ts +0 -110
- package/dist/types-ts4.5/providers/types.d.ts +0 -185
- package/dist/types-ts4.5/store-manager/referenceSyncBlockStoreManager.d.ts +0 -147
- package/dist/types-ts4.5/store-manager/sourceSyncBlockStoreManager.d.ts +0 -128
- package/dist/types-ts4.5/store-manager/syncBlockBatchFetcher.d.ts +0 -33
- package/dist/types-ts4.5/store-manager/syncBlockInMemorySessionCache.d.ts +0 -41
- package/dist/types-ts4.5/store-manager/syncBlockProviderFactoryManager.d.ts +0 -26
- package/dist/types-ts4.5/store-manager/syncBlockStoreManager.d.ts +0 -24
- package/dist/types-ts4.5/store-manager/syncBlockSubscriptionManager.d.ts +0 -84
- package/dist/types-ts4.5/utils/errorHandling.d.ts +0 -36
- package/dist/types-ts4.5/utils/experienceTracking.d.ts +0 -59
- package/dist/types-ts4.5/utils/resolveSyncBlockInstance.d.ts +0 -13
- package/dist/types-ts4.5/utils/resourceId.d.ts +0 -7
- package/dist/types-ts4.5/utils/retry.d.ts +0 -1
- package/dist/types-ts4.5/utils/utils.d.ts +0 -15
- package/dist/types-ts4.5/utils/validValue.d.ts +0 -3
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
-
import type { SyncBlockProduct } from '../../common/types';
|
|
3
|
-
/**
|
|
4
|
-
* Returns a diagnostic summary string from the last known connection state.
|
|
5
|
-
* This provides context that the opaque WebSocket error events cannot.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getConnectionDiagnosticsSummary: () => string;
|
|
8
|
-
export type BlockSubscriptionPayload = {
|
|
9
|
-
blockAri: string;
|
|
10
|
-
blockInstanceId: string;
|
|
11
|
-
content: string;
|
|
12
|
-
contentUpdatedAt?: number;
|
|
13
|
-
createdAt: number;
|
|
14
|
-
createdBy: string;
|
|
15
|
-
deletionReason?: string;
|
|
16
|
-
product: string;
|
|
17
|
-
sourceAri: string;
|
|
18
|
-
status: string;
|
|
19
|
-
};
|
|
20
|
-
export type ParsedBlockSubscriptionData = {
|
|
21
|
-
blockAri: string;
|
|
22
|
-
blockInstanceId: string;
|
|
23
|
-
content: ADFEntity[];
|
|
24
|
-
contentUpdatedAt?: string;
|
|
25
|
-
createdAt?: string;
|
|
26
|
-
createdBy: string;
|
|
27
|
-
product: SyncBlockProduct;
|
|
28
|
-
resourceId: string;
|
|
29
|
-
sourceAri: string;
|
|
30
|
-
status: string;
|
|
31
|
-
};
|
|
32
|
-
type SubscriptionCallback = (data: ParsedBlockSubscriptionData) => void;
|
|
33
|
-
type ErrorCallback = (error: Error) => void;
|
|
34
|
-
type CompleteCallback = () => void;
|
|
35
|
-
type Unsubscribe = () => void;
|
|
36
|
-
/**
|
|
37
|
-
* Extracts a meaningful error message from the error: GraphQL WebSocket Error: {"isTrusted":true}
|
|
38
|
-
*
|
|
39
|
-
* @param error - The error passed to the sink's error callback
|
|
40
|
-
* @returns A descriptive error message string
|
|
41
|
-
*/
|
|
42
|
-
export declare const extractGraphQLWSErrorMessage: (error: unknown) => string;
|
|
43
|
-
/**
|
|
44
|
-
* Creates a GraphQL subscription to block updates using the shared graphql-ws client.
|
|
45
|
-
*
|
|
46
|
-
* @param blockAri - The full block ARI to subscribe to (ari:cloud:blocks:{cloudId}:synced-block/{resourceId})
|
|
47
|
-
* @param onData - Callback function invoked when block data is updated
|
|
48
|
-
* @param onError - Optional callback function invoked on subscription errors
|
|
49
|
-
* @returns Unsubscribe function to close the subscription
|
|
50
|
-
*/
|
|
51
|
-
export declare const subscribeToBlockUpdates: (blockAri: string, onData: SubscriptionCallback, onError?: ErrorCallback, onComplete?: CompleteCallback) => Unsubscribe;
|
|
52
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The type of the Confluence page
|
|
3
|
-
*/
|
|
4
|
-
export type PAGE_TYPE = 'page' | 'blogpost';
|
|
5
|
-
/**
|
|
6
|
-
* Generates the Confluence page ARI
|
|
7
|
-
* @param pageId - the ID of the page
|
|
8
|
-
* @param cloudId - the cloud ID
|
|
9
|
-
* @param pageType - the type of the page
|
|
10
|
-
* @returns the Confluence page ARI
|
|
11
|
-
*/
|
|
12
|
-
export declare const getConfluencePageAri: ({ pageId, cloudId, pageType, }: {
|
|
13
|
-
cloudId: string;
|
|
14
|
-
pageId: string;
|
|
15
|
-
pageType: PAGE_TYPE;
|
|
16
|
-
}) => string;
|
|
17
|
-
/**
|
|
18
|
-
* Extracts the page ID and type from the Confluence page ARI
|
|
19
|
-
* @param ari - the Confluence page ARI
|
|
20
|
-
* @returns the page ID and type
|
|
21
|
-
*/
|
|
22
|
-
export declare const getPageIdAndTypeFromConfluencePageAri: ({ ari, }: {
|
|
23
|
-
ari: string;
|
|
24
|
-
}) => {
|
|
25
|
-
id: string;
|
|
26
|
-
type: PAGE_TYPE;
|
|
27
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type ConfigData = {
|
|
2
|
-
readonly clientId: string;
|
|
3
|
-
readonly fileStoreUrl: string;
|
|
4
|
-
};
|
|
5
|
-
export type TokenData = {
|
|
6
|
-
collectionId?: string;
|
|
7
|
-
config: ConfigData;
|
|
8
|
-
token: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const fetchMediaToken: (contentId: string) => Promise<TokenData>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates the Jira work item ARI
|
|
3
|
-
* @param workItemId - the ID of the work item
|
|
4
|
-
* @param cloudId - the cloud ID
|
|
5
|
-
* @returns the Jira work item ARI
|
|
6
|
-
*/
|
|
7
|
-
export declare const getJiraWorkItemAri: ({ cloudId, workItemId, }: {
|
|
8
|
-
cloudId: string;
|
|
9
|
-
workItemId: string;
|
|
10
|
-
}) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Extracts the Jira work item ID from the Jira work item ARI
|
|
13
|
-
* @param ari - the Jira work item ARI
|
|
14
|
-
* @returns the Jira work item ID
|
|
15
|
-
*/
|
|
16
|
-
export declare const getJiraWorkItemIdFromAri: ({ ari }: {
|
|
17
|
-
ari: string;
|
|
18
|
-
}) => string;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TokenData } from '../confluence/fetchMediaToken';
|
|
2
|
-
/**
|
|
3
|
-
* Fetches a media read token for a Jira issue, to allow media uploaded to Jira
|
|
4
|
-
* to be rendered in cross-product synced block references (e.g. in Confluence).
|
|
5
|
-
*
|
|
6
|
-
* @param issueAri - the Jira issue ARI (e.g. ari:cloud:jira:{cloudId}:issue/{issueId})
|
|
7
|
-
* @returns TokenData with token, config (clientId + fileStoreUrl), and optional collectionId
|
|
8
|
-
*/
|
|
9
|
-
export declare const fetchJiraMediaToken: (issueAri: string) => Promise<TokenData>;
|
|
@@ -1,13 +0,0 @@
|
|
|
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?: number | null;
|
|
9
|
-
issueKey?: string | null;
|
|
10
|
-
message?: string | null;
|
|
11
|
-
projectKey: string | null;
|
|
12
|
-
};
|
|
13
|
-
export declare const requestJiraSpaceAccess: (payload: AccessRequestPayload) => Promise<Response>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { SyncBlockSourceInfo } from '../../providers/types';
|
|
2
|
-
/**
|
|
3
|
-
* Fetch source-info metadata for a Jira work item used by reference sync blocks.
|
|
4
|
-
*
|
|
5
|
-
* Parity notes vs the Confluence equivalent (`fetchConfluencePageInfo`):
|
|
6
|
-
*
|
|
7
|
-
* - **Archived / draft URL variants** are intentionally omitted. Confluence pages can be
|
|
8
|
-
* "unpublished" (draft, archived, in-trash) and need REST fallbacks plus alternate URL
|
|
9
|
-
* shapes. Jira work items have no equivalent lifecycle — an issue either exists in AGG
|
|
10
|
-
* or it does not — so a single `webUrl` is sufficient.
|
|
11
|
-
*
|
|
12
|
-
* - **`#block-{localId}` deep-link anchor** is intentionally not appended. The current
|
|
13
|
-
* Jira issue view does not implement scroll-to-anchor for unknown fragments, so the
|
|
14
|
-
* anchor would be dead weight on the URL. The dispatching code in
|
|
15
|
-
* `syncBlockProvider.fetchSyncBlockSourceInfo` deliberately does not pass `localId`
|
|
16
|
-
* here for the same reason. If/when Jira issue view supports anchor scrolling for
|
|
17
|
-
* sync-block local IDs, accept `localId?: string` here and append `#block-{localId}`.
|
|
18
|
-
*
|
|
19
|
-
* - **`subType` / page-type variants** are not modeled — Jira issue type is exposed via
|
|
20
|
-
* the separate `issueType` field returned alongside `summary` / `webUrl`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const fetchJiraWorkItemInfo: (workItemAri: string, hasAccess: boolean) => Promise<SyncBlockSourceInfo | undefined>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SyncBlockProduct } from '../common/types';
|
|
2
|
-
import type { TokenData } from './confluence/fetchMediaToken';
|
|
3
|
-
export declare const requiresCrossProductAuth: ({ hostProduct, sourceProduct, }: {
|
|
4
|
-
hostProduct: SyncBlockProduct;
|
|
5
|
-
sourceProduct?: SyncBlockProduct;
|
|
6
|
-
}) => boolean;
|
|
7
|
-
export declare const fetchTokenForSourceProduct: ({ contentAri, contentId, sourceProduct, }: {
|
|
8
|
-
contentAri: string;
|
|
9
|
-
contentId: string;
|
|
10
|
-
sourceProduct?: SyncBlockProduct;
|
|
11
|
-
}) => Promise<TokenData>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
/**
|
|
3
|
-
* Rebase `currentTr` over `incomingTr` based on the provided `state`.
|
|
4
|
-
* This function adjusts the steps in `currentTr` to account for the changes made by `incomingTr`.
|
|
5
|
-
*
|
|
6
|
-
* @param currentTr - The transaction to be rebased.
|
|
7
|
-
* @param incomingTr - The transaction that has already been applied to the state.
|
|
8
|
-
* @param state - The editor state after applying `incomingTr`.
|
|
9
|
-
* @returns A new transaction that represents `currentTr` rebased over `incomingTr`.
|
|
10
|
-
*/
|
|
11
|
-
export declare const rebaseTransaction: (currentTr: Transaction, incomingTr: Transaction, state: EditorState) => Transaction;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
-
import type { JSONNode } from '@atlaskit/editor-json-transformer/types';
|
|
3
|
-
import type { SyncBlockInstance, SyncBlockJiraIssueType, SyncBlockSourceInfo } from '../providers/types';
|
|
4
|
-
import type { SYNC_BLOCK_PRODUCTS } from './consts';
|
|
5
|
-
export type BlockInstanceId = string;
|
|
6
|
-
export type ResourceId = string;
|
|
7
|
-
export type SyncBlockProduct = (typeof SYNC_BLOCK_PRODUCTS)[number];
|
|
8
|
-
export type SyncBlockStatus = 'active' | 'deleted' | 'unpublished';
|
|
9
|
-
export type SyncBlockAttrs = {
|
|
10
|
-
localId: BlockInstanceId;
|
|
11
|
-
resourceId: ResourceId;
|
|
12
|
-
};
|
|
13
|
-
export interface SyncBlockNode extends JSONNode {
|
|
14
|
-
attrs: SyncBlockAttrs;
|
|
15
|
-
content?: Array<JSONNode | undefined>;
|
|
16
|
-
type: 'syncBlock' | 'bodiedSyncBlock';
|
|
17
|
-
}
|
|
18
|
-
export declare enum SyncBlockError {
|
|
19
|
-
Errored = "errored",
|
|
20
|
-
NotFound = "not_found",
|
|
21
|
-
Forbidden = "forbidden",
|
|
22
|
-
InvalidRequest = "invalid_request",
|
|
23
|
-
RateLimited = "rate_limited",
|
|
24
|
-
Conflict = "conflict",// attempt to create block that already exists
|
|
25
|
-
ServerError = "server_error",
|
|
26
|
-
InvalidContent = "invalid_content",// content is not a valid JSON
|
|
27
|
-
Offline = "offline",
|
|
28
|
-
Unpublished = "unpublished",
|
|
29
|
-
Aborted = "aborted",
|
|
30
|
-
EntityNotFound = "entity_not_found"
|
|
31
|
-
}
|
|
32
|
-
export interface SyncBlockData {
|
|
33
|
-
blockInstanceId: BlockInstanceId;
|
|
34
|
-
content: Array<ADFEntity>;
|
|
35
|
-
contentUpdatedAt?: string;
|
|
36
|
-
createdAt?: string;
|
|
37
|
-
createdBy?: string;
|
|
38
|
-
deletionReason?: DeletionReason;
|
|
39
|
-
issueType?: SyncBlockJiraIssueType;
|
|
40
|
-
isSynced?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Whether the block is on the same page as the source block
|
|
43
|
-
*/
|
|
44
|
-
onSameDocument?: boolean;
|
|
45
|
-
product?: SyncBlockProduct;
|
|
46
|
-
/**
|
|
47
|
-
* The ARI of the block. E.G ari:cloud:blocks:<cloudId>:synced-block/<product>/<pageId>/<resourceId>
|
|
48
|
-
*/
|
|
49
|
-
resourceId: ResourceId;
|
|
50
|
-
sourceAri?: string;
|
|
51
|
-
sourceSubType?: string | null;
|
|
52
|
-
sourceTitle?: string;
|
|
53
|
-
sourceURL?: string;
|
|
54
|
-
status?: SyncBlockStatus;
|
|
55
|
-
updatedAt?: string;
|
|
56
|
-
}
|
|
57
|
-
export interface ReferenceSyncBlockResponse {
|
|
58
|
-
blockAri: string;
|
|
59
|
-
blockInstanceId?: BlockInstanceId;
|
|
60
|
-
contentUpdatedAt?: string;
|
|
61
|
-
createdAt?: string;
|
|
62
|
-
createdBy?: string;
|
|
63
|
-
documentAri: string;
|
|
64
|
-
}
|
|
65
|
-
export interface ReferenceSyncBlock extends ReferenceSyncBlockResponse {
|
|
66
|
-
hasAccess: boolean;
|
|
67
|
-
onSameDocument: boolean;
|
|
68
|
-
}
|
|
69
|
-
export type ReferenceSyncBlockData = {
|
|
70
|
-
error?: SyncBlockError;
|
|
71
|
-
references?: ReferenceSyncBlock[];
|
|
72
|
-
};
|
|
73
|
-
export type ReferencesSourceInfo = {
|
|
74
|
-
error?: SyncBlockError;
|
|
75
|
-
references?: Array<SyncBlockSourceInfo | undefined>;
|
|
76
|
-
};
|
|
77
|
-
export type DeletionReason = 'source-block-deleted' | 'source-block-unsynced' | 'source-block-unpublished';
|
|
78
|
-
export type DeletionReasonResponse = DeletionReason | 'source-document-deleted';
|
|
79
|
-
export type SyncBlockPrefetchData = {
|
|
80
|
-
prefetchPromise: Promise<SyncBlockInstance[] | undefined>;
|
|
81
|
-
resourceIds: string[];
|
|
82
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { generateBlockAri, generateBlockAriFromReference, getLocalIdFromBlockResourceId, } from '../clients/block-service/ari';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useMemoizedBlockServiceAPIProviders, useMemoizedBlockServiceFetchOnlyAPIProvider, fetchReferences, batchFetchData, writeDataBatch, blockAriToResourceId, convertToSyncBlockData, extractResourceIdFromBlockAri, } from '../providers/block-service/blockServiceAPI';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { extractGraphQLWSErrorMessage, getConnectionDiagnosticsSummary, } from '../clients/block-service/blockSubscription';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { SyncBlockError } from '../common/types';
|
|
2
|
-
export type { ResourceId, SyncBlockData, SyncBlockNode, SyncBlockProduct, SyncBlockStatus, BlockInstanceId, SyncBlockAttrs, ReferenceSyncBlockData, ReferencesSourceInfo, DeletionReason, SyncBlockPrefetchData, } from '../common/types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getConfluencePageAri, getPageIdAndTypeFromConfluencePageAri, } from '../clients/confluence/ari';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fetchErrorPayload } from '../utils/errorHandling';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fetchJiraMediaToken } from '../clients/jira/fetchMediaToken';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getJiraWorkItemAri, getJiraWorkItemIdFromAri } from '../clients/jira/ari';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { ADFFetchProvider, ADFWriteProvider, BatchFetchConfig, BlockNodeIdentifiers, BlockSubscriptionCompleteCallback, BlockSubscriptionErrorCallback, BlockUpdateCallback, SyncBlockDataProviderInterface, SyncBlockInstance, MediaEmojiProviderOptions, SyncedBlockRendererProviderOptions, SyncBlockRendererProviderCreator, SyncedBlockRendererDataProviders, Unsubscribe, UpdateReferenceSyncBlockResult, WriteSyncBlockResult, SyncBlockParentInfo, SyncBlockSourceInfo, SyncBlockJiraIssueType, } from '../providers/types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { rebaseTransaction } from '../common/rebase-transaction';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ReferenceSyncBlockStoreManager } from '../store-manager/referenceSyncBlockStoreManager';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveSyncBlockInstance } from '../utils/resolveSyncBlockInstance';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { parseResourceId, createResourceIdForReference } from '../utils/resourceId';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fetchConfluencePageInfo } from '../clients/confluence/sourceInfo';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SyncBlockInMemorySessionCache, syncBlockInMemorySessionCache, } from '../store-manager/syncBlockInMemorySessionCache';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SyncedBlockProvider, useMemoizedSyncedBlockProvider, } from '../providers/syncBlockProvider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SyncBlockStoreManager, useMemoizedSyncBlockStoreManager, } from '../store-manager/syncBlockStoreManager';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fetchTokenForSourceProduct, requiresCrossProductAuth } from '../clients/tokenRouting';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useFetchSyncBlockTitle } from '../hooks/useFetchSyncBlockTitle';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useHandleContentChanges } from '../hooks/useHandleContentChanges';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createSyncBlockNode, convertSyncBlockPMNodeToSyncBlockData, convertSyncBlockJSONNodeToSyncBlockNode, convertPMNodesToSyncBlockNodes, convertPMNodeToSyncBlockNode, convertContentUpdatedAt, getContentIdAndProductFromResourceId, getSourceProductFromResourceIdSafe, } from '../utils/utils';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { normaliseSyncBlockProduct, normaliseSyncBlockStatus } from '../utils/validValue';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { ProviderFactory, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { SyncBlockInstance } from '../providers/types';
|
|
4
|
-
import type { SyncBlockStoreManager } from '../store-manager/syncBlockStoreManager';
|
|
5
|
-
type SSRProviders = {
|
|
6
|
-
media?: MediaProvider | null;
|
|
7
|
-
};
|
|
8
|
-
export interface UseFetchSyncBlockDataResult {
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
providerFactory: ProviderFactory | undefined;
|
|
11
|
-
reloadData: () => Promise<void>;
|
|
12
|
-
ssrProviders?: SSRProviders | null;
|
|
13
|
-
syncBlockInstance: SyncBlockInstance | null;
|
|
14
|
-
}
|
|
15
|
-
export declare const useFetchSyncBlockData: (manager: SyncBlockStoreManager, resourceId?: string, localId?: string, fireAnalyticsEvent?: (payload: RendererSyncBlockEventPayload) => void) => UseFetchSyncBlockDataResult;
|
|
16
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { SyncBlockStoreManager } from '../store-manager/syncBlockStoreManager';
|
|
3
|
-
export declare const useFetchSyncBlockTitle: (manager: SyncBlockStoreManager, syncBlockNode: PMNode) => string | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { rebaseTransaction } from './common/rebase-transaction';
|
|
2
|
-
export { SyncBlockError } from './common/types';
|
|
3
|
-
export type { ResourceId, SyncBlockData, SyncBlockNode, SyncBlockProduct, SyncBlockStatus, BlockInstanceId, SyncBlockAttrs, ReferenceSyncBlockData, ReferencesSourceInfo, DeletionReason, SyncBlockPrefetchData, } from './common/types';
|
|
4
|
-
export { useFetchSyncBlockData, type UseFetchSyncBlockDataResult, } from './hooks/useFetchSyncBlockData';
|
|
5
|
-
export { useFetchSyncBlockTitle } from './hooks/useFetchSyncBlockTitle';
|
|
6
|
-
export { useHandleContentChanges } from './hooks/useHandleContentChanges';
|
|
7
|
-
export { generateBlockAri, generateBlockAriFromReference, getLocalIdFromBlockResourceId, } from './clients/block-service/ari';
|
|
8
|
-
export type { BlockContentResponse, BatchRetrieveSyncedBlocksResponse, ErrorResponse, } from './clients/block-service/blockService';
|
|
9
|
-
export { BlockError, updateSyncedBlocks } from './clients/block-service/blockService';
|
|
10
|
-
export { extractGraphQLWSErrorMessage, getConnectionDiagnosticsSummary, } from './clients/block-service/blockSubscription';
|
|
11
|
-
export { getConfluencePageAri, getPageIdAndTypeFromConfluencePageAri, } from './clients/confluence/ari';
|
|
12
|
-
export { fetchMediaToken, type TokenData, type ConfigData, } from './clients/confluence/fetchMediaToken';
|
|
13
|
-
export { getJiraWorkItemAri, getJiraWorkItemIdFromAri } from './clients/jira/ari';
|
|
14
|
-
export { useMemoizedBlockServiceAPIProviders, useMemoizedBlockServiceFetchOnlyAPIProvider, fetchReferences, batchFetchData, writeDataBatch, blockAriToResourceId, convertToSyncBlockData, extractResourceIdFromBlockAri, } from './providers/block-service/blockServiceAPI';
|
|
15
|
-
export { fetchConfluencePageInfo } from './clients/confluence/sourceInfo';
|
|
16
|
-
export { SyncedBlockProvider, useMemoizedSyncedBlockProvider } from './providers/syncBlockProvider';
|
|
17
|
-
export type { ADFFetchProvider, ADFWriteProvider, BatchFetchConfig, BlockNodeIdentifiers, BlockSubscriptionErrorCallback, BlockUpdateCallback, SyncBlockDataProviderInterface, SyncBlockInstance, MediaEmojiProviderOptions, SyncedBlockRendererProviderOptions, SyncBlockRendererProviderCreator, SyncedBlockRendererDataProviders, Unsubscribe, UpdateReferenceSyncBlockResult, WriteSyncBlockResult, SyncBlockParentInfo, SyncBlockSourceInfo, } from './providers/types';
|
|
18
|
-
export { ReferenceSyncBlockStoreManager } from './store-manager/referenceSyncBlockStoreManager';
|
|
19
|
-
export { SyncBlockInMemorySessionCache, syncBlockInMemorySessionCache, } from './store-manager/syncBlockInMemorySessionCache';
|
|
20
|
-
export { SyncBlockStoreManager, useMemoizedSyncBlockStoreManager, } from './store-manager/syncBlockStoreManager';
|
|
21
|
-
export { resolveSyncBlockInstance } from './utils/resolveSyncBlockInstance';
|
|
22
|
-
export { parseResourceId, createResourceIdForReference } from './utils/resourceId';
|
|
23
|
-
export { createSyncBlockNode, convertSyncBlockPMNodeToSyncBlockData, convertSyncBlockJSONNodeToSyncBlockNode, convertPMNodesToSyncBlockNodes, getContentIdAndProductFromResourceId, } from './utils/utils';
|
|
24
|
-
export { fetchErrorPayload } from './utils/errorHandling';
|
|
25
|
-
export { normaliseSyncBlockProduct, normaliseSyncBlockStatus } from './utils/validValue';
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import type { BlockContentResponse } from '../../clients/block-service/blockService';
|
|
2
|
-
import { SyncBlockError } from '../../common/types';
|
|
3
|
-
import type { ReferenceSyncBlockData, ResourceId, SyncBlockAttrs, SyncBlockData, SyncBlockProduct } from '../../common/types';
|
|
4
|
-
import type { ADFFetchProvider, ADFWriteProvider, BatchFetchConfig, BlockNodeIdentifiers, DeleteSyncBlockResult, SyncBlockInstance, UpdateReferenceSyncBlockResult, WriteSyncBlockResult } from '../types';
|
|
5
|
-
/**
|
|
6
|
-
* Extracts the ResourceId from a block ARI by returning the full path after synced-block/.
|
|
7
|
-
*
|
|
8
|
-
* Document ARI format from Block Service API:
|
|
9
|
-
* "ari:cloud:blocks:{uuid}:synced-block/{product}/{parentId}/{resourceId}"
|
|
10
|
-
*
|
|
11
|
-
* ResourceId format (extracted from ARI):
|
|
12
|
-
* "{product}/{parentId}/{resourceId}" (the full path after synced-block/)
|
|
13
|
-
*
|
|
14
|
-
* Example in context:
|
|
15
|
-
* Input: "ari:cloud:blocks:{uuid}:synced-block/confluence-page/{pageId}/{resourceId}"
|
|
16
|
-
* Output: "confluence-page/{pageId}/{resourceId}"
|
|
17
|
-
*
|
|
18
|
-
* @param blockAri - The block ARI string from Block Service API
|
|
19
|
-
* @returns The ResourceId (full path after synced-block/)
|
|
20
|
-
*/
|
|
21
|
-
export declare const blockAriToResourceId: (blockAri: string) => ResourceId | null;
|
|
22
|
-
export declare const convertToSyncBlockData: (data: BlockContentResponse, resourceId: ResourceId) => SyncBlockData;
|
|
23
|
-
export declare const fetchReferences: (documentAri: string) => Promise<SyncBlockInstance[] | SyncBlockError>;
|
|
24
|
-
/**
|
|
25
|
-
* Extracts the resourceId from a block ARI.
|
|
26
|
-
* Block ARI format: ari:cloud:blocks:<cloudId>:synced-block/<resourceId>
|
|
27
|
-
*/
|
|
28
|
-
export declare const extractResourceIdFromBlockAri: (blockAri: string) => string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Batch fetches multiple synced blocks by their resource IDs.
|
|
31
|
-
* @param cloudId - The cloudId of the block. E.G the cloudId of the confluence page, or the cloudId of the Jira instance
|
|
32
|
-
* @param parentAri - The ARI of the parent of the block. E.G the ARI of the confluence page, or the ARI of the Jira work item
|
|
33
|
-
* @param blockNodeIdentifiers - Array of block node identifiers to fetch
|
|
34
|
-
* @param config - Optional batch fetch configuration
|
|
35
|
-
* @returns Array of SyncBlockInstance results
|
|
36
|
-
*/
|
|
37
|
-
export declare const batchFetchData: (cloudId: string, parentAri: string | undefined, blockNodeIdentifiers: BlockNodeIdentifiers[], config?: BatchFetchConfig) => Promise<SyncBlockInstance[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Batch writes multiple synced blocks.
|
|
40
|
-
* @param cloudId - The cloudId of the block. E.G the cloudId of the confluence page, or the cloudId of the Jira instance
|
|
41
|
-
* @param parentAri - The ARI of the parent of the block. E.G the ARI of the confluence page, or the ARI of the Jira work item
|
|
42
|
-
* @param parentId - The parentId of the block. E.G the pageId for a confluence page, or the issueId for a Jira work item
|
|
43
|
-
* @param product - The product of the block. E.G 'confluence-page', 'jira-work-item'
|
|
44
|
-
* @param data - Array of SyncBlockData to write
|
|
45
|
-
* @param stepVersion - Optional version number
|
|
46
|
-
* @returns Array of WriteSyncBlockResult results
|
|
47
|
-
*/
|
|
48
|
-
export declare const writeDataBatch: (cloudId: string, parentAri: string | undefined, parentId: string | undefined, product: SyncBlockProduct, data: SyncBlockData[], stepVersion?: number) => Promise<WriteSyncBlockResult[]>;
|
|
49
|
-
interface BlockServiceADFFetchProviderProps {
|
|
50
|
-
cloudId: string;
|
|
51
|
-
parentAri: string | undefined;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* ADFFetchProvider implementation that fetches synced block data from Block Service API
|
|
55
|
-
*/
|
|
56
|
-
declare class BlockServiceADFFetchProvider implements ADFFetchProvider {
|
|
57
|
-
private cloudId;
|
|
58
|
-
private parentAri;
|
|
59
|
-
constructor({ cloudId, parentAri }: BlockServiceADFFetchProviderProps);
|
|
60
|
-
fetchData(resourceId: string): Promise<SyncBlockInstance>;
|
|
61
|
-
fetchReferences(referenceResourceId: string): Promise<ReferenceSyncBlockData>;
|
|
62
|
-
/**
|
|
63
|
-
* Batch fetches multiple synced blocks by their resource IDs.
|
|
64
|
-
* @param blockNodeIdentifiers - Array of block node identifiers to fetch
|
|
65
|
-
* @param config - Optional batch fetch configuration
|
|
66
|
-
* @returns Array of SyncBlockInstance results
|
|
67
|
-
*/
|
|
68
|
-
batchFetchData(blockNodeIdentifiers: BlockNodeIdentifiers[], config?: BatchFetchConfig): Promise<SyncBlockInstance[]>;
|
|
69
|
-
/**
|
|
70
|
-
* Subscribes to real-time updates for a specific block using GraphQL WebSocket subscriptions.
|
|
71
|
-
* @param resourceId - The resource ID of the block to subscribe to
|
|
72
|
-
* @param onUpdate - Callback function invoked when the block is updated
|
|
73
|
-
* @param onError - Optional callback function invoked on subscription errors
|
|
74
|
-
* @returns Unsubscribe function to stop receiving updates
|
|
75
|
-
*/
|
|
76
|
-
subscribeToBlockUpdates(resourceId: ResourceId, onUpdate: (data: SyncBlockInstance) => void, onError?: (error: Error) => void, onComplete?: () => void): () => void;
|
|
77
|
-
}
|
|
78
|
-
interface BlockServiceADFWriteProviderProps {
|
|
79
|
-
cloudId: string;
|
|
80
|
-
getVersion?: () => Promise<number | undefined>;
|
|
81
|
-
parentAri: string | undefined;
|
|
82
|
-
parentId?: string;
|
|
83
|
-
product: SyncBlockProduct;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* ADFWriteProvider implementation that writes synced block data to Block Service API
|
|
87
|
-
*/
|
|
88
|
-
declare class BlockServiceADFWriteProvider implements ADFWriteProvider {
|
|
89
|
-
private cloudId;
|
|
90
|
-
private parentId?;
|
|
91
|
-
private getVersion?;
|
|
92
|
-
product: SyncBlockProduct;
|
|
93
|
-
parentAri: string | undefined;
|
|
94
|
-
constructor({ cloudId, parentAri, parentId, product, getVersion, }: BlockServiceADFWriteProviderProps);
|
|
95
|
-
writeData(data: SyncBlockData): Promise<WriteSyncBlockResult>;
|
|
96
|
-
createData(data: SyncBlockData): Promise<WriteSyncBlockResult>;
|
|
97
|
-
deleteData(resourceId: string, deleteReason: string | undefined): Promise<DeleteSyncBlockResult>;
|
|
98
|
-
private deleteOrphanBlock;
|
|
99
|
-
generateResourceIdForReference(sourceId: ResourceId): ResourceId;
|
|
100
|
-
generateResourceId(): ResourceId;
|
|
101
|
-
generateBlockAri(resourceId: ResourceId): string;
|
|
102
|
-
updateReferenceData(blocks: SyncBlockAttrs[], noContent?: boolean): Promise<UpdateReferenceSyncBlockResult>;
|
|
103
|
-
writeDataBatch(data: SyncBlockData[]): Promise<WriteSyncBlockResult[]>;
|
|
104
|
-
}
|
|
105
|
-
interface BlockServiceAPIProvidersProps {
|
|
106
|
-
cloudId: string;
|
|
107
|
-
getVersion?: () => Promise<number | undefined>;
|
|
108
|
-
parentAri: string | undefined;
|
|
109
|
-
parentId?: string;
|
|
110
|
-
product: SyncBlockProduct;
|
|
111
|
-
}
|
|
112
|
-
export declare const useMemoizedBlockServiceAPIProviders: ({ cloudId, parentAri, parentId, product, getVersion, }: BlockServiceAPIProvidersProps) => {
|
|
113
|
-
fetchProvider: BlockServiceADFFetchProvider;
|
|
114
|
-
writeProvider: BlockServiceADFWriteProvider;
|
|
115
|
-
};
|
|
116
|
-
interface BlockServiceFetchOnlyAPIProviderProps {
|
|
117
|
-
cloudId: string;
|
|
118
|
-
parentAri: string | undefined;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* If the parentAri is not a valid ARI, pass in an empty string.
|
|
122
|
-
*/
|
|
123
|
-
export declare const useMemoizedBlockServiceFetchOnlyAPIProvider: ({ cloudId, parentAri, }: BlockServiceFetchOnlyAPIProviderProps) => {
|
|
124
|
-
fetchProvider: BlockServiceADFFetchProvider;
|
|
125
|
-
writeProvider: undefined;
|
|
126
|
-
};
|
|
127
|
-
export {};
|