@conloca/content-api-client 0.1.12 → 0.1.13
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/dist/index.d.mts +75 -41
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as API_ROUTES } from "./test-helpers-4tYApvzp.mjs";
|
|
2
|
-
import
|
|
2
|
+
import * as _conloca_content_api0 from "@conloca/content-api";
|
|
3
|
+
import { AssetEntry, AssetEntry as AssetEntry$1, AssetUsage, AssetUsage as AssetUsage$1, BatchResult, BlockEditable, ContentData, ContentEntry, ContentEntry as ContentEntry$1, ContentIdentity, ContentListResult, ContentManifest, ContentManifest as ContentManifest$1, ContentType, CreateContentInput, CreateResult, DataEditable, DeleteResult, ErrorCode, ErrorCodes, FolderListing, FolderListing as FolderListing$1, FolderTreeNode, FolderTreeNode as FolderTreeNode$1, GlobalFilters, LocaleVersion, LocalizedEntry, LocalizedEntry as LocalizedEntry$1, LocalizedManifest, MoveResult, SitesConfig, SitesConfig as SitesConfig$1, UpdateLocaleInput, UpdateResult, UpdateResult as UpdateResult$1, blockEditableSchema, dataEditableSchema, formatFileSize, localesOf } from "@conloca/content-api";
|
|
3
4
|
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
4
5
|
|
|
5
6
|
//#region src/client.d.ts
|
|
@@ -37,54 +38,54 @@ declare class ContentAPIClient {
|
|
|
37
38
|
private fetchAPI;
|
|
38
39
|
getContent(id: string): Promise<ContentEntry$1 | null>;
|
|
39
40
|
getLocalized(id: string, locale: string): Promise<LocalizedEntry$1 | null>;
|
|
40
|
-
createContent(data: CreateContentInput
|
|
41
|
-
updateLocalized(input: UpdateLocaleInput
|
|
42
|
-
deleteContent(id: string, etag: string): Promise<DeleteResult
|
|
41
|
+
createContent(data: CreateContentInput): Promise<CreateResult>;
|
|
42
|
+
updateLocalized(input: UpdateLocaleInput): Promise<UpdateResult$1>;
|
|
43
|
+
deleteContent(id: string, etag: string): Promise<DeleteResult>;
|
|
43
44
|
deleteLocalized(input: {
|
|
44
45
|
id: string;
|
|
45
46
|
locale: string;
|
|
46
47
|
etag: string;
|
|
47
|
-
}): Promise<DeleteResult
|
|
48
|
-
getSitePages(site: string, locale?: string): Promise<ContentListResult
|
|
48
|
+
}): Promise<DeleteResult>;
|
|
49
|
+
getSitePages(site: string, locale?: string): Promise<ContentListResult>;
|
|
49
50
|
getPageByPathname(site: string, pathname: string, locale?: string): Promise<ContentManifest$1 | null>;
|
|
50
51
|
isPathnameAvailable(site: string, pathname: string, excludeId?: string): Promise<boolean>;
|
|
51
|
-
movePage(site: string, id: string, pathname: string, locale: string, etag: string): Promise<MoveResult
|
|
52
|
-
getBlocks(collection?: string, locale?: string): Promise<ContentListResult
|
|
52
|
+
movePage(site: string, id: string, pathname: string, locale: string, etag: string): Promise<MoveResult>;
|
|
53
|
+
getBlocks(collection?: string, locale?: string): Promise<ContentListResult>;
|
|
53
54
|
getBlockByName(name: string, collection?: string, locale?: string): Promise<ContentManifest$1 | null>;
|
|
54
|
-
getData(collection?: string, locale?: string): Promise<ContentListResult
|
|
55
|
+
getData(collection?: string, locale?: string): Promise<ContentListResult>;
|
|
55
56
|
getDataByName(name: string, collection: string, locale?: string): Promise<ContentManifest$1 | null>;
|
|
56
57
|
isDataNameAvailable(name: string, collection: string, excludeId?: string): Promise<boolean>;
|
|
57
58
|
getDataCollections(): Promise<string[]>;
|
|
58
|
-
listAllContent(filters?: GlobalFilters): Promise<ContentListResult
|
|
59
|
-
findUntranslatedContent(targetLocale: string, excludeSites?: string[], includeUnpublished?: boolean): Promise<ContentListResult
|
|
60
|
-
getSitesConfig(): Promise<SitesConfig$
|
|
61
|
-
batchUpdate(operations: UpdateLocaleInput
|
|
59
|
+
listAllContent(filters?: GlobalFilters): Promise<ContentListResult>;
|
|
60
|
+
findUntranslatedContent(targetLocale: string, excludeSites?: string[], includeUnpublished?: boolean): Promise<ContentListResult>;
|
|
61
|
+
getSitesConfig(): Promise<SitesConfig$1>;
|
|
62
|
+
batchUpdate(operations: UpdateLocaleInput[]): Promise<BatchResult>;
|
|
62
63
|
getGitStatus(): Promise<GitStatus>;
|
|
63
64
|
commitChanges(message?: string): Promise<GitCommitResult>;
|
|
64
65
|
pushChanges(): Promise<GitPushResult>;
|
|
65
66
|
pullChanges(): Promise<GitPullResult>;
|
|
66
67
|
listAssets(): Promise<{
|
|
67
|
-
assets: AssetEntry$
|
|
68
|
+
assets: AssetEntry$1[];
|
|
68
69
|
}>;
|
|
69
|
-
getAsset(filename: string): Promise<AssetEntry$
|
|
70
|
+
getAsset(filename: string): Promise<AssetEntry$1 | null>;
|
|
70
71
|
uploadAsset(formData: FormData): Promise<{
|
|
71
72
|
success: true;
|
|
72
|
-
asset: AssetEntry$
|
|
73
|
+
asset: AssetEntry$1;
|
|
73
74
|
}>;
|
|
74
75
|
importAssetUrl(url: string, alt?: string, folder?: string): Promise<{
|
|
75
76
|
success: true;
|
|
76
|
-
asset: AssetEntry$
|
|
77
|
+
asset: AssetEntry$1;
|
|
77
78
|
}>;
|
|
78
79
|
deleteAsset(filename: string): Promise<{
|
|
79
80
|
success: boolean;
|
|
80
81
|
}>;
|
|
81
|
-
listFolder(path?: string): Promise<FolderListing$
|
|
82
|
+
listFolder(path?: string): Promise<FolderListing$1>;
|
|
82
83
|
createFolder(path: string): Promise<void>;
|
|
83
84
|
updateAssetMetadata(filename: string, updates: {
|
|
84
85
|
alt?: string;
|
|
85
86
|
tags?: string[];
|
|
86
|
-
}): Promise<AssetEntry$
|
|
87
|
-
getAssetUsage(filename: string): Promise<AssetUsage$
|
|
87
|
+
}): Promise<AssetEntry$1>;
|
|
88
|
+
getAssetUsage(filename: string): Promise<AssetUsage$1[]>;
|
|
88
89
|
moveAssets(filenames: string[], sourceFolder: string, targetFolder: string): Promise<{
|
|
89
90
|
success: boolean;
|
|
90
91
|
moved?: number;
|
|
@@ -123,24 +124,48 @@ declare class StaleWriteError extends APIClientError {
|
|
|
123
124
|
//#region src/hooks.d.ts
|
|
124
125
|
declare function getContentAPIClient(): ContentAPIClient;
|
|
125
126
|
declare function setContentAPIClient(client: ContentAPIClient): void;
|
|
126
|
-
declare function useContent(id: string): _tanstack_react_query0.UseQueryResult<
|
|
127
|
-
declare function useLocalizedContent(id: string, locale: string): _tanstack_react_query0.UseQueryResult<
|
|
128
|
-
declare function useCreateContent(): _tanstack_react_query0.UseMutationResult<
|
|
129
|
-
|
|
127
|
+
declare function useContent(id: string): _tanstack_react_query0.UseQueryResult<ContentEntry$1 | null, Error>;
|
|
128
|
+
declare function useLocalizedContent(id: string, locale: string): _tanstack_react_query0.UseQueryResult<LocalizedEntry$1 | null, Error>;
|
|
129
|
+
declare function useCreateContent(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.CreateResult | {
|
|
130
|
+
fullContent: ContentEntry$1 | null;
|
|
131
|
+
success: boolean;
|
|
132
|
+
id?: string;
|
|
133
|
+
etag?: string;
|
|
134
|
+
created?: Date;
|
|
135
|
+
reason?: "already_exists" | "write_error" | "invalid_name" | "name_taken" | "pathname_taken" | "pathname_in_redirects" | "metadata_too_large";
|
|
136
|
+
error?: Error;
|
|
137
|
+
existingId?: string;
|
|
138
|
+
}, Error, CreateContentInput, unknown>;
|
|
139
|
+
declare function useUpdateLocalized(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.UpdateResult | {
|
|
140
|
+
updatedContent: LocalizedEntry$1 | null;
|
|
141
|
+
success: boolean;
|
|
142
|
+
etag?: string;
|
|
143
|
+
modified?: Date;
|
|
144
|
+
reason?: "not_found" | "stale_write" | "write_error";
|
|
145
|
+
error?: Error;
|
|
146
|
+
currentEtag?: string;
|
|
147
|
+
conflictDetails?: {
|
|
148
|
+
metaChanged: boolean;
|
|
149
|
+
contentChanged: boolean;
|
|
150
|
+
currentMeta?: _conloca_content_api0.ContentMeta;
|
|
151
|
+
currentContent?: _conloca_content_api0.ContentData;
|
|
152
|
+
localContent?: _conloca_content_api0.ContentData;
|
|
153
|
+
};
|
|
154
|
+
}, Error, UpdateLocaleInput, unknown>;
|
|
130
155
|
interface DeleteContentArgs {
|
|
131
156
|
id: string;
|
|
132
157
|
etag: string;
|
|
133
158
|
locale?: string;
|
|
134
159
|
}
|
|
135
|
-
declare function useDeleteContent(): _tanstack_react_query0.UseMutationResult<DeleteResult, Error, DeleteContentArgs, unknown>;
|
|
160
|
+
declare function useDeleteContent(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.DeleteResult, Error, DeleteContentArgs, unknown>;
|
|
136
161
|
interface DeleteLocalizedArgs {
|
|
137
162
|
id: string;
|
|
138
163
|
locale: string;
|
|
139
164
|
etag: string;
|
|
140
165
|
}
|
|
141
|
-
declare function useDeleteLocalized(): _tanstack_react_query0.UseMutationResult<DeleteResult, Error, DeleteLocalizedArgs, unknown>;
|
|
166
|
+
declare function useDeleteLocalized(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.DeleteResult, Error, DeleteLocalizedArgs, unknown>;
|
|
142
167
|
declare function useSitePages(site: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentListResult, Error>;
|
|
143
|
-
declare function usePageByPathname(site: string, pathname: string, locale?: string): _tanstack_react_query0.UseQueryResult<
|
|
168
|
+
declare function usePageByPathname(site: string, pathname: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentManifest$1 | null, Error>;
|
|
144
169
|
declare function usePathnameAvailability(site: string, pathname: string, excludeId?: string): _tanstack_react_query0.UseQueryResult<{
|
|
145
170
|
available: boolean;
|
|
146
171
|
}, Error>;
|
|
@@ -151,18 +176,18 @@ interface MovePageArgs {
|
|
|
151
176
|
locale?: string;
|
|
152
177
|
etag: string;
|
|
153
178
|
}
|
|
154
|
-
declare function useMovePage(): _tanstack_react_query0.UseMutationResult<MoveResult, Error, MovePageArgs, unknown>;
|
|
179
|
+
declare function useMovePage(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.MoveResult, Error, MovePageArgs, unknown>;
|
|
155
180
|
declare function useBlocks(collection?: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentListResult, Error>;
|
|
156
|
-
declare function useBlockByName(name: string, collection?: string, locale?: string): _tanstack_react_query0.UseQueryResult<
|
|
181
|
+
declare function useBlockByName(name: string, collection?: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentManifest$1 | null, Error>;
|
|
157
182
|
declare function useData(collection?: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentListResult, Error>;
|
|
158
|
-
declare function useDataByName(name: string, collection: string, locale?: string): _tanstack_react_query0.UseQueryResult<
|
|
183
|
+
declare function useDataByName(name: string, collection: string, locale?: string): _tanstack_react_query0.UseQueryResult<ContentManifest$1 | null, Error>;
|
|
159
184
|
declare function useDataNameAvailability(name: string, collection: string, excludeId?: string): _tanstack_react_query0.UseQueryResult<{
|
|
160
185
|
available: boolean;
|
|
161
186
|
}, Error>;
|
|
162
187
|
declare function useDataCollections(): _tanstack_react_query0.UseQueryResult<string[], Error>;
|
|
163
188
|
declare function useAllContent(filters?: GlobalFilters): _tanstack_react_query0.UseQueryResult<ContentListResult, Error>;
|
|
164
189
|
declare function useUntranslatedContent(targetLocale: string, excludeSites?: string[], includeUnpublished?: boolean): _tanstack_react_query0.UseQueryResult<ContentListResult, Error>;
|
|
165
|
-
declare function useSitesConfig(): _tanstack_react_query0.UseQueryResult<SitesConfig, Error>;
|
|
190
|
+
declare function useSitesConfig(): _tanstack_react_query0.UseQueryResult<_conloca_content_api0.SitesConfig, Error>;
|
|
166
191
|
declare function useCurrentUser(): _tanstack_react_query0.UseQueryResult<{
|
|
167
192
|
authenticated: boolean;
|
|
168
193
|
user?: {
|
|
@@ -170,22 +195,31 @@ declare function useCurrentUser(): _tanstack_react_query0.UseQueryResult<{
|
|
|
170
195
|
sub: string;
|
|
171
196
|
};
|
|
172
197
|
}, Error>;
|
|
173
|
-
declare function useBatchUpdate(): _tanstack_react_query0.UseMutationResult<
|
|
198
|
+
declare function useBatchUpdate(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.BatchResult | {
|
|
199
|
+
updatedContents: {
|
|
200
|
+
index: number;
|
|
201
|
+
content: LocalizedEntry$1;
|
|
202
|
+
}[];
|
|
203
|
+
operations: _conloca_content_api0.BatchOperationResult[];
|
|
204
|
+
success: boolean;
|
|
205
|
+
failed: number;
|
|
206
|
+
updated: number;
|
|
207
|
+
}, Error, UpdateLocaleInput[], unknown>;
|
|
174
208
|
declare function useGitStatus(): _tanstack_react_query0.UseQueryResult<GitStatus, Error>;
|
|
175
209
|
declare function useCommitChanges(): _tanstack_react_query0.UseMutationResult<GitCommitResult, Error, string | undefined, unknown>;
|
|
176
210
|
declare function usePushChanges(): _tanstack_react_query0.UseMutationResult<GitPushResult, Error, void, unknown>;
|
|
177
211
|
declare function usePullChanges(): _tanstack_react_query0.UseMutationResult<GitPullResult, Error, void, unknown>;
|
|
178
212
|
declare function useAssets(): _tanstack_react_query0.UseQueryResult<{
|
|
179
|
-
assets:
|
|
213
|
+
assets: _conloca_content_api0.AssetEntry[];
|
|
180
214
|
}, Error>;
|
|
181
|
-
declare function useAsset(filename: string): _tanstack_react_query0.UseQueryResult<
|
|
215
|
+
declare function useAsset(filename: string): _tanstack_react_query0.UseQueryResult<_conloca_content_api0.AssetEntry | null, Error>;
|
|
182
216
|
declare function useUploadAsset(): _tanstack_react_query0.UseMutationResult<{
|
|
183
217
|
success: true;
|
|
184
|
-
asset:
|
|
218
|
+
asset: _conloca_content_api0.AssetEntry;
|
|
185
219
|
}, Error, FormData, unknown>;
|
|
186
220
|
declare function useImportAssetUrl(): _tanstack_react_query0.UseMutationResult<{
|
|
187
221
|
success: true;
|
|
188
|
-
asset:
|
|
222
|
+
asset: _conloca_content_api0.AssetEntry;
|
|
189
223
|
}, Error, {
|
|
190
224
|
url: string;
|
|
191
225
|
alt?: string;
|
|
@@ -194,18 +228,18 @@ declare function useImportAssetUrl(): _tanstack_react_query0.UseMutationResult<{
|
|
|
194
228
|
declare function useDeleteAsset(): _tanstack_react_query0.UseMutationResult<{
|
|
195
229
|
success: boolean;
|
|
196
230
|
}, Error, string, unknown>;
|
|
197
|
-
declare function useAssetFolders(path?: string): _tanstack_react_query0.UseQueryResult<FolderListing, Error>;
|
|
231
|
+
declare function useAssetFolders(path?: string): _tanstack_react_query0.UseQueryResult<_conloca_content_api0.FolderListing, Error>;
|
|
198
232
|
declare function useCreateFolder(): _tanstack_react_query0.UseMutationResult<void, Error, string, unknown>;
|
|
199
|
-
declare function useUpdateAssetMetadata(): _tanstack_react_query0.UseMutationResult<AssetEntry, Error, {
|
|
233
|
+
declare function useUpdateAssetMetadata(): _tanstack_react_query0.UseMutationResult<_conloca_content_api0.AssetEntry, Error, {
|
|
200
234
|
filename: string;
|
|
201
235
|
updates: {
|
|
202
236
|
alt?: string;
|
|
203
237
|
tags?: string[];
|
|
204
238
|
};
|
|
205
239
|
}, unknown>;
|
|
206
|
-
declare function useAssetUsage(filename: string | null): _tanstack_react_query0.UseQueryResult<AssetUsage[], Error>;
|
|
240
|
+
declare function useAssetUsage(filename: string | null): _tanstack_react_query0.UseQueryResult<_conloca_content_api0.AssetUsage[], Error>;
|
|
207
241
|
declare function useFolderTree(): _tanstack_react_query0.UseQueryResult<{
|
|
208
|
-
tree:
|
|
242
|
+
tree: _conloca_content_api0.FolderTreeNode[];
|
|
209
243
|
}, Error>;
|
|
210
244
|
declare function useMoveAssets(): _tanstack_react_query0.UseMutationResult<{
|
|
211
245
|
success: boolean;
|
|
@@ -217,5 +251,5 @@ declare function useMoveAssets(): _tanstack_react_query0.UseMutationResult<{
|
|
|
217
251
|
targetFolder: string;
|
|
218
252
|
}, unknown>;
|
|
219
253
|
//#endregion
|
|
220
|
-
export { APIClientError, API_ROUTES, type AssetEntry
|
|
254
|
+
export { APIClientError, API_ROUTES, type AssetEntry, type AssetUsage, type BlockEditable, ContentAPIClient, ContentAPIClientOptions, type ContentData, type ContentEntry, type ContentIdentity, type ContentManifest, type ContentType, type DataEditable, ErrorCodes, type FolderListing, type FolderTreeNode, type GitCommitResult, type GitPullResult, type GitPushResult, type GitStatus, type LocaleVersion, type LocalizedEntry, type LocalizedManifest, type SitesConfig, StaleWriteError, type UpdateResult, blockEditableSchema, dataEditableSchema, formatFileSize, getContentAPIClient, localesOf, setContentAPIClient, useAllContent, useAsset, useAssetFolders, useAssetUsage, useAssets, useBatchUpdate, useBlockByName, useBlocks, useCommitChanges, useContent, useCreateContent, useCreateFolder, useCurrentUser, useData, useDataByName, useDataCollections, useDataNameAvailability, useDeleteAsset, useDeleteContent, useDeleteLocalized, useFolderTree, useGitStatus, useImportAssetUrl, useLocalizedContent, useMoveAssets, useMovePage, usePageByPathname, usePathnameAvailability, usePullChanges, usePushChanges, useSitePages, useSitesConfig, useUntranslatedContent, useUpdateAssetMetadata, useUpdateLocalized, useUploadAsset };
|
|
221
255
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/client.ts","../src/hooks.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/client.ts","../src/hooks.tsx"],"mappings":";;;;;;UAwBiB,SAAA;EACf,UAAA;EACA,YAAA;EACA,KAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;AAAA;AAAA,UAGe,eAAA;EACf,OAAA;EACA,MAAA;EACA,OAAA;EACA,KAAA;AAAA;AAAA,UAGe,aAAA;EACf,OAAA;EACA,KAAA;AAAA;AAAA,UAGe,aAAA;EACf,OAAA;EACA,OAAA;EACA,KAAA;AAAA;AAAA,UAGe,uBAAA;EACf,OAAA;EACA,KAAA,UAAe,KAAA;AAAA;AAAA,cAGJ,gBAAA;EAAA,QACH,OAAA;EAAA,QACA,KAAA;cAEI,OAAA,GAAS,uBAAA;EAAA,QAaP,QAAA;EAgDR,UAAA,CAAW,EAAA,WAA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,aAAA,CAAA,0BAAa,cAAA;QAAA,qBAAA,CAAA,cAAA;AAAA;iBAUb,aAAA,CAAA,GAAa,sBAAA,CAAA,iBAAA;;;;GAAA,KAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as API_ROUTES } from "./test-helpers-CFATqjhm.mjs";
|
|
2
|
-
import { ErrorCodes, ErrorCodes as ErrorCodes$1, localesOf } from "@conloca/content-api";
|
|
2
|
+
import { ErrorCodes, ErrorCodes as ErrorCodes$1, blockEditableSchema, dataEditableSchema, formatFileSize, localesOf } from "@conloca/content-api";
|
|
3
3
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
|
|
5
5
|
//#region src/client.ts
|
|
@@ -1031,5 +1031,5 @@ function useMoveAssets() {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
1033
|
//#endregion
|
|
1034
|
-
export { APIClientError, API_ROUTES, ContentAPIClient, ErrorCodes, StaleWriteError, getContentAPIClient, localesOf, setContentAPIClient, useAllContent, useAsset, useAssetFolders, useAssetUsage, useAssets, useBatchUpdate, useBlockByName, useBlocks, useCommitChanges, useContent, useCreateContent, useCreateFolder, useCurrentUser, useData, useDataByName, useDataCollections, useDataNameAvailability, useDeleteAsset, useDeleteContent, useDeleteLocalized, useFolderTree, useGitStatus, useImportAssetUrl, useLocalizedContent, useMoveAssets, useMovePage, usePageByPathname, usePathnameAvailability, usePullChanges, usePushChanges, useSitePages, useSitesConfig, useUntranslatedContent, useUpdateAssetMetadata, useUpdateLocalized, useUploadAsset };
|
|
1034
|
+
export { APIClientError, API_ROUTES, ContentAPIClient, ErrorCodes, StaleWriteError, blockEditableSchema, dataEditableSchema, formatFileSize, getContentAPIClient, localesOf, setContentAPIClient, useAllContent, useAsset, useAssetFolders, useAssetUsage, useAssets, useBatchUpdate, useBlockByName, useBlocks, useCommitChanges, useContent, useCreateContent, useCreateFolder, useCurrentUser, useData, useDataByName, useDataCollections, useDataNameAvailability, useDeleteAsset, useDeleteContent, useDeleteLocalized, useFolderTree, useGitStatus, useImportAssetUrl, useLocalizedContent, useMoveAssets, useMovePage, usePageByPathname, usePathnameAvailability, usePullChanges, usePushChanges, useSitePages, useSitesConfig, useUntranslatedContent, useUpdateAssetMetadata, useUpdateLocalized, useUploadAsset };
|
|
1035
1035
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conloca/content-api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/conloca/
|
|
10
|
-
"directory": "
|
|
9
|
+
"url": "git+https://github.com/conloca/conloca.git",
|
|
10
|
+
"directory": "content-api-client"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "./dist/index.mjs",
|