@atlaskit/editor-synced-block-provider 3.2.0 → 3.2.1
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 +7 -0
- package/dist/cjs/clients/block-service/ari.js +13 -16
- package/dist/cjs/clients/confluence/ari.js +7 -40
- package/dist/cjs/clients/confluence/sourceInfo.js +3 -1
- package/dist/cjs/clients/jira/ari.js +5 -2
- package/dist/cjs/index.js +2 -27
- package/dist/cjs/providers/block-service/blockServiceAPI.js +71 -28
- package/dist/cjs/providers/syncBlockProvider.js +57 -38
- package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +5 -8
- package/dist/es2019/clients/block-service/ari.js +15 -16
- package/dist/es2019/clients/confluence/ari.js +11 -37
- package/dist/es2019/clients/confluence/sourceInfo.js +3 -1
- package/dist/es2019/clients/jira/ari.js +9 -2
- package/dist/es2019/index.js +2 -3
- package/dist/es2019/providers/block-service/blockServiceAPI.js +75 -28
- package/dist/es2019/providers/syncBlockProvider.js +45 -25
- package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +5 -8
- package/dist/esm/clients/block-service/ari.js +13 -16
- package/dist/esm/clients/confluence/ari.js +6 -39
- package/dist/esm/clients/confluence/sourceInfo.js +3 -1
- package/dist/esm/clients/jira/ari.js +5 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/providers/block-service/blockServiceAPI.js +70 -27
- package/dist/esm/providers/syncBlockProvider.js +57 -38
- package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +4 -8
- package/dist/types/clients/block-service/ari.d.ts +14 -4
- package/dist/types/clients/confluence/ari.d.ts +8 -21
- package/dist/types/clients/jira/ari.d.ts +7 -2
- package/dist/types/index.d.ts +5 -6
- package/dist/types/providers/block-service/blockServiceAPI.d.ts +31 -6
- package/dist/types/providers/syncBlockProvider.d.ts +14 -13
- package/dist/types/providers/types.d.ts +9 -6
- package/dist/types-ts4.5/clients/block-service/ari.d.ts +14 -4
- package/dist/types-ts4.5/clients/confluence/ari.d.ts +8 -21
- package/dist/types-ts4.5/clients/jira/ari.d.ts +7 -2
- package/dist/types-ts4.5/index.d.ts +5 -6
- package/dist/types-ts4.5/providers/block-service/blockServiceAPI.d.ts +31 -6
- package/dist/types-ts4.5/providers/syncBlockProvider.d.ts +14 -13
- package/dist/types-ts4.5/providers/types.d.ts +9 -6
- package/package.json +1 -1
- package/dist/cjs/clients/confluence/contentProperty.js +0 -284
- package/dist/cjs/providers/confluence/confluenceContentAPI.js +0 -446
- package/dist/es2019/clients/confluence/contentProperty.js +0 -288
- package/dist/es2019/providers/confluence/confluenceContentAPI.js +0 -310
- package/dist/esm/clients/confluence/contentProperty.js +0 -277
- package/dist/esm/providers/confluence/confluenceContentAPI.js +0 -440
- package/dist/types/clients/confluence/contentProperty.d.ts +0 -139
- package/dist/types/providers/confluence/confluenceContentAPI.d.ts +0 -44
- package/dist/types-ts4.5/clients/confluence/contentProperty.d.ts +0 -139
- package/dist/types-ts4.5/providers/confluence/confluenceContentAPI.d.ts +0 -44
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import type { SyncBlockData } from '../../common/types';
|
|
2
|
-
import { type PAGE_TYPE } from './ari';
|
|
3
|
-
type GetContentPropertyOptions = {
|
|
4
|
-
cloudId: string;
|
|
5
|
-
key: string;
|
|
6
|
-
pageId: string;
|
|
7
|
-
pageType: PAGE_TYPE;
|
|
8
|
-
signal?: AbortSignal;
|
|
9
|
-
};
|
|
10
|
-
type CreateContentPropertyOptions = {
|
|
11
|
-
cloudId: string;
|
|
12
|
-
key: string;
|
|
13
|
-
pageId: string;
|
|
14
|
-
pageType: PAGE_TYPE;
|
|
15
|
-
value: SyncBlockData;
|
|
16
|
-
};
|
|
17
|
-
type UpdateContentPropertyOptions = {
|
|
18
|
-
cloudId: string;
|
|
19
|
-
key: string;
|
|
20
|
-
pageId: string;
|
|
21
|
-
pageType: PAGE_TYPE;
|
|
22
|
-
signal?: AbortSignal;
|
|
23
|
-
value: SyncBlockData;
|
|
24
|
-
};
|
|
25
|
-
type DeleteContentPropertyOptions = {
|
|
26
|
-
cloudId: string;
|
|
27
|
-
key: string;
|
|
28
|
-
pageId: string;
|
|
29
|
-
pageType: PAGE_TYPE;
|
|
30
|
-
};
|
|
31
|
-
export type GetContentPropertyResult = {
|
|
32
|
-
data: {
|
|
33
|
-
confluence: {
|
|
34
|
-
page: {
|
|
35
|
-
properties: [
|
|
36
|
-
{
|
|
37
|
-
key: string | null;
|
|
38
|
-
value: string | null;
|
|
39
|
-
}
|
|
40
|
-
] | null;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export type GetBlogPostContentPropertyResult = {
|
|
46
|
-
data: {
|
|
47
|
-
confluence: {
|
|
48
|
-
blogPost: {
|
|
49
|
-
properties: [
|
|
50
|
-
{
|
|
51
|
-
key: string | null;
|
|
52
|
-
value: string | null;
|
|
53
|
-
}
|
|
54
|
-
] | null;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export type UpdateContentPropertyResult = {
|
|
60
|
-
data: {
|
|
61
|
-
confluence: {
|
|
62
|
-
updateValuePageProperty: {
|
|
63
|
-
pageProperty: {
|
|
64
|
-
key: string | null;
|
|
65
|
-
value: string | null;
|
|
66
|
-
} | null;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export type UpdateBlogPostContentPropertyResult = {
|
|
72
|
-
data: {
|
|
73
|
-
confluence: {
|
|
74
|
-
updateValueBlogPostProperty: {
|
|
75
|
-
blogPostProperty: {
|
|
76
|
-
key: string | null;
|
|
77
|
-
value: string | null;
|
|
78
|
-
} | null;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
export type CreateContentPropertyResult = {
|
|
84
|
-
data: {
|
|
85
|
-
confluence: {
|
|
86
|
-
createPageProperty: {
|
|
87
|
-
pageProperty: {
|
|
88
|
-
key: string | null;
|
|
89
|
-
value: string | null;
|
|
90
|
-
} | null;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
export type CreateBlogPostContentPropertyResult = {
|
|
96
|
-
data: {
|
|
97
|
-
confluence: {
|
|
98
|
-
createBlogPostProperty: {
|
|
99
|
-
blogPostProperty: {
|
|
100
|
-
key: string | null;
|
|
101
|
-
value: string | null;
|
|
102
|
-
} | null;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
export type DeletePageContentPropertyResult = {
|
|
108
|
-
data: {
|
|
109
|
-
confluence: {
|
|
110
|
-
deletePageProperty: {
|
|
111
|
-
errors: [
|
|
112
|
-
{
|
|
113
|
-
message: string;
|
|
114
|
-
}
|
|
115
|
-
];
|
|
116
|
-
success: boolean;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
export type DeleteBlogPostPropertyResult = {
|
|
122
|
-
data: {
|
|
123
|
-
confluence: {
|
|
124
|
-
deleteBlogPostProperty: {
|
|
125
|
-
errors: [
|
|
126
|
-
{
|
|
127
|
-
message: string;
|
|
128
|
-
}
|
|
129
|
-
];
|
|
130
|
-
success: boolean;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
export declare const getContentProperty: <T extends GetContentPropertyResult | GetBlogPostContentPropertyResult>({ pageId, key, cloudId, pageType, }: GetContentPropertyOptions) => Promise<T>;
|
|
136
|
-
export declare const updateContentProperty: <T extends UpdateContentPropertyResult | UpdateBlogPostContentPropertyResult>({ pageId, key, value, cloudId, pageType, }: UpdateContentPropertyOptions) => Promise<T>;
|
|
137
|
-
export declare const createContentProperty: <T extends CreateContentPropertyResult | CreateBlogPostContentPropertyResult>({ pageId, key, value, cloudId, pageType, }: CreateContentPropertyOptions) => Promise<T>;
|
|
138
|
-
export declare const deleteContentProperty: <T extends DeletePageContentPropertyResult | DeleteBlogPostPropertyResult>({ pageId, cloudId, pageType, key, }: DeleteContentPropertyOptions) => Promise<T>;
|
|
139
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type ResourceId, type SyncBlockAttrs, type SyncBlockData, type SyncBlockProduct } from '../../common/types';
|
|
2
|
-
import type { ADFFetchProvider, ADFWriteProvider, DeleteSyncBlockResult, SyncBlockInstance, UpdateReferenceSyncBlockResult, WriteSyncBlockResult } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Configuration for Content API providers
|
|
5
|
-
*/
|
|
6
|
-
interface ContentAPIConfig {
|
|
7
|
-
cloudId: string;
|
|
8
|
-
contentPropertyKey: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* ADFFetchProvider implementation that fetches synced block data from Confluence Content API
|
|
12
|
-
*/
|
|
13
|
-
declare class ConfluenceADFFetchProvider implements ADFFetchProvider {
|
|
14
|
-
private config;
|
|
15
|
-
constructor(config: ContentAPIConfig);
|
|
16
|
-
fetchData(resourceId: string): Promise<SyncBlockInstance>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* ADFWriteProvider implementation that writes synced block data to Confluence Content API
|
|
20
|
-
*/
|
|
21
|
-
declare class ConfluenceADFWriteProvider implements ADFWriteProvider {
|
|
22
|
-
private config;
|
|
23
|
-
product: SyncBlockProduct;
|
|
24
|
-
constructor(config: ContentAPIConfig);
|
|
25
|
-
private createNewContentProperty;
|
|
26
|
-
writeData(syncBlockData: SyncBlockData): Promise<WriteSyncBlockResult>;
|
|
27
|
-
createData(syncBlockData: SyncBlockData): Promise<WriteSyncBlockResult>;
|
|
28
|
-
deleteData(resourceId: string): Promise<DeleteSyncBlockResult>;
|
|
29
|
-
generateResourceId(sourceId: string, localId: string): string;
|
|
30
|
-
generateResourceIdForReference(sourceId: ResourceId): ResourceId;
|
|
31
|
-
updateReferenceData(_blocks: SyncBlockAttrs[], _noContent?: boolean): Promise<UpdateReferenceSyncBlockResult>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Convenience function to create providers with default content property key
|
|
35
|
-
*/
|
|
36
|
-
export declare const createContentAPIProvidersWithDefaultKey: (cloudId: string) => {
|
|
37
|
-
fetchProvider: ConfluenceADFFetchProvider;
|
|
38
|
-
writeProvider: ConfluenceADFWriteProvider;
|
|
39
|
-
};
|
|
40
|
-
export declare const useMemoizedContentAPIProviders: (cloudId: string) => {
|
|
41
|
-
fetchProvider: ConfluenceADFFetchProvider;
|
|
42
|
-
writeProvider: ConfluenceADFWriteProvider;
|
|
43
|
-
};
|
|
44
|
-
export {};
|