@wix/autocms-collection-metadata-service 1.0.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/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +46 -0
- package/type-bundles/context.bundle.d.ts +709 -0
- package/type-bundles/index.bundle.d.ts +709 -0
- package/type-bundles/meta.bundle.d.ts +273 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/** CollectionMetadata contains CM-specific metadata for a collection */
|
|
2
|
+
interface CollectionMetadata$1 {
|
|
3
|
+
/** ID of data collection */
|
|
4
|
+
dataCollectionId?: string;
|
|
5
|
+
/** active named view */
|
|
6
|
+
activeNamedViewId?: string | null;
|
|
7
|
+
/** if table view should be hidden */
|
|
8
|
+
hideTableView?: boolean | null;
|
|
9
|
+
/** named views */
|
|
10
|
+
namedViews?: Record<string, any>[] | null;
|
|
11
|
+
/** named view ID used for default site sort in datasets */
|
|
12
|
+
namedViewIdForSiteSort?: string | null;
|
|
13
|
+
/** Type of data permissions template used initially */
|
|
14
|
+
permissionsTemplate?: PermissionsTemplateType$1;
|
|
15
|
+
}
|
|
16
|
+
declare enum PermissionsTemplateType$1 {
|
|
17
|
+
UNDEFINED = "UNDEFINED",
|
|
18
|
+
SHOW_CONTENT = "SHOW_CONTENT",
|
|
19
|
+
COLLECT_CONTENT = "COLLECT_CONTENT",
|
|
20
|
+
CUSTOM = "CUSTOM"
|
|
21
|
+
}
|
|
22
|
+
interface CreateCollectionMetadataRequest$1 {
|
|
23
|
+
/** CollectionMetadata to be created */
|
|
24
|
+
collectionMetadata: CollectionMetadata$1;
|
|
25
|
+
}
|
|
26
|
+
interface CreateCollectionMetadataResponse$1 {
|
|
27
|
+
/** The created CollectionMetadata */
|
|
28
|
+
collectionMetadata?: CollectionMetadata$1;
|
|
29
|
+
}
|
|
30
|
+
interface GetCollectionMetadataRequest$1 {
|
|
31
|
+
/** Id of collection to retrieve metadata for */
|
|
32
|
+
dataCollectionId?: string;
|
|
33
|
+
}
|
|
34
|
+
interface GetCollectionMetadataResponse$1 {
|
|
35
|
+
/** The retrieved CollectionMetadata */
|
|
36
|
+
collectionMetadata?: CollectionMetadata$1;
|
|
37
|
+
}
|
|
38
|
+
interface UpdateCollectionMetadataRequest$1 {
|
|
39
|
+
/**
|
|
40
|
+
* ID of metadata to update, ignored if collection_metadata.data_collection_id is non-empty
|
|
41
|
+
* exists because of docs generation issue with nested fields and ** path variables
|
|
42
|
+
*/
|
|
43
|
+
dataCollectionId?: string;
|
|
44
|
+
/** CollectionMetadata to be updated, may be partial */
|
|
45
|
+
collectionMetadata: CollectionMetadata$1;
|
|
46
|
+
}
|
|
47
|
+
interface UpdateCollectionMetadataResponse$1 {
|
|
48
|
+
/** The updated CollectionMetadata */
|
|
49
|
+
collectionMetadata?: CollectionMetadata$1;
|
|
50
|
+
}
|
|
51
|
+
interface ReplaceCollectionMetadataRequest$1 {
|
|
52
|
+
/** The updated CollectionMetadatas */
|
|
53
|
+
items?: CollectionMetadata$1[];
|
|
54
|
+
}
|
|
55
|
+
interface ReplaceCollectionMetadataResponse$1 {
|
|
56
|
+
}
|
|
57
|
+
interface DeleteCollectionMetadataRequest$1 {
|
|
58
|
+
/** Id of collection to delete metadata for */
|
|
59
|
+
dataCollectionId?: string;
|
|
60
|
+
}
|
|
61
|
+
interface DeleteCollectionMetadataResponse$1 {
|
|
62
|
+
}
|
|
63
|
+
interface ListCollectionMetadataRequest$1 {
|
|
64
|
+
/** paging info */
|
|
65
|
+
paging?: CursorPaging$1;
|
|
66
|
+
}
|
|
67
|
+
interface CursorPaging$1 {
|
|
68
|
+
/** Maximum number of items to return in the results. */
|
|
69
|
+
limit?: number | null;
|
|
70
|
+
/**
|
|
71
|
+
* Pointer to the next or previous page in the list of results.
|
|
72
|
+
*
|
|
73
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
74
|
+
* Not relevant for the first request.
|
|
75
|
+
*/
|
|
76
|
+
cursor?: string | null;
|
|
77
|
+
}
|
|
78
|
+
interface ListCollectionMetadataResponse$1 {
|
|
79
|
+
/** The retrieved CollectionMetadatas */
|
|
80
|
+
items?: CollectionMetadata$1[];
|
|
81
|
+
/** paging metadata */
|
|
82
|
+
pagingMetadata?: CursorPagingMetadata$1;
|
|
83
|
+
}
|
|
84
|
+
interface CursorPagingMetadata$1 {
|
|
85
|
+
/** Number of items returned in the response. */
|
|
86
|
+
count?: number | null;
|
|
87
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
88
|
+
cursors?: Cursors$1;
|
|
89
|
+
/**
|
|
90
|
+
* Whether there are more pages to retrieve following the current page.
|
|
91
|
+
*
|
|
92
|
+
* + `true`: Another page of results can be retrieved.
|
|
93
|
+
* + `false`: This is the last page.
|
|
94
|
+
*/
|
|
95
|
+
hasNext?: boolean | null;
|
|
96
|
+
}
|
|
97
|
+
interface Cursors$1 {
|
|
98
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
99
|
+
next?: string | null;
|
|
100
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
101
|
+
prev?: string | null;
|
|
102
|
+
}
|
|
103
|
+
interface CollectionMetadataNonNullableFields$1 {
|
|
104
|
+
dataCollectionId: string;
|
|
105
|
+
permissionsTemplate: PermissionsTemplateType$1;
|
|
106
|
+
}
|
|
107
|
+
interface CreateCollectionMetadataResponseNonNullableFields$1 {
|
|
108
|
+
collectionMetadata?: CollectionMetadataNonNullableFields$1;
|
|
109
|
+
}
|
|
110
|
+
interface GetCollectionMetadataResponseNonNullableFields$1 {
|
|
111
|
+
collectionMetadata?: CollectionMetadataNonNullableFields$1;
|
|
112
|
+
}
|
|
113
|
+
interface UpdateCollectionMetadataResponseNonNullableFields$1 {
|
|
114
|
+
collectionMetadata?: CollectionMetadataNonNullableFields$1;
|
|
115
|
+
}
|
|
116
|
+
interface ListCollectionMetadataResponseNonNullableFields$1 {
|
|
117
|
+
items: CollectionMetadataNonNullableFields$1[];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** CollectionMetadata contains CM-specific metadata for a collection */
|
|
121
|
+
interface CollectionMetadata {
|
|
122
|
+
/** ID of data collection */
|
|
123
|
+
dataCollectionId?: string;
|
|
124
|
+
/** active named view */
|
|
125
|
+
activeNamedViewId?: string | null;
|
|
126
|
+
/** if table view should be hidden */
|
|
127
|
+
hideTableView?: boolean | null;
|
|
128
|
+
/** named views */
|
|
129
|
+
namedViews?: Record<string, any>[] | null;
|
|
130
|
+
/** named view ID used for default site sort in datasets */
|
|
131
|
+
namedViewIdForSiteSort?: string | null;
|
|
132
|
+
/** Type of data permissions template used initially */
|
|
133
|
+
permissionsTemplate?: PermissionsTemplateType;
|
|
134
|
+
}
|
|
135
|
+
declare enum PermissionsTemplateType {
|
|
136
|
+
UNDEFINED = "UNDEFINED",
|
|
137
|
+
SHOW_CONTENT = "SHOW_CONTENT",
|
|
138
|
+
COLLECT_CONTENT = "COLLECT_CONTENT",
|
|
139
|
+
CUSTOM = "CUSTOM"
|
|
140
|
+
}
|
|
141
|
+
interface CreateCollectionMetadataRequest {
|
|
142
|
+
/** CollectionMetadata to be created */
|
|
143
|
+
collectionMetadata: CollectionMetadata;
|
|
144
|
+
}
|
|
145
|
+
interface CreateCollectionMetadataResponse {
|
|
146
|
+
/** The created CollectionMetadata */
|
|
147
|
+
collectionMetadata?: CollectionMetadata;
|
|
148
|
+
}
|
|
149
|
+
interface GetCollectionMetadataRequest {
|
|
150
|
+
/** Id of collection to retrieve metadata for */
|
|
151
|
+
dataCollectionId?: string;
|
|
152
|
+
}
|
|
153
|
+
interface GetCollectionMetadataResponse {
|
|
154
|
+
/** The retrieved CollectionMetadata */
|
|
155
|
+
collectionMetadata?: CollectionMetadata;
|
|
156
|
+
}
|
|
157
|
+
interface UpdateCollectionMetadataRequest {
|
|
158
|
+
/**
|
|
159
|
+
* ID of metadata to update, ignored if collection_metadata.data_collection_id is non-empty
|
|
160
|
+
* exists because of docs generation issue with nested fields and ** path variables
|
|
161
|
+
*/
|
|
162
|
+
dataCollectionId?: string;
|
|
163
|
+
/** CollectionMetadata to be updated, may be partial */
|
|
164
|
+
collectionMetadata: CollectionMetadata;
|
|
165
|
+
}
|
|
166
|
+
interface UpdateCollectionMetadataResponse {
|
|
167
|
+
/** The updated CollectionMetadata */
|
|
168
|
+
collectionMetadata?: CollectionMetadata;
|
|
169
|
+
}
|
|
170
|
+
interface ReplaceCollectionMetadataRequest {
|
|
171
|
+
/** The updated CollectionMetadatas */
|
|
172
|
+
items?: CollectionMetadata[];
|
|
173
|
+
}
|
|
174
|
+
interface ReplaceCollectionMetadataResponse {
|
|
175
|
+
}
|
|
176
|
+
interface DeleteCollectionMetadataRequest {
|
|
177
|
+
/** Id of collection to delete metadata for */
|
|
178
|
+
dataCollectionId?: string;
|
|
179
|
+
}
|
|
180
|
+
interface DeleteCollectionMetadataResponse {
|
|
181
|
+
}
|
|
182
|
+
interface ListCollectionMetadataRequest {
|
|
183
|
+
/** paging info */
|
|
184
|
+
paging?: CursorPaging;
|
|
185
|
+
}
|
|
186
|
+
interface CursorPaging {
|
|
187
|
+
/** Maximum number of items to return in the results. */
|
|
188
|
+
limit?: number | null;
|
|
189
|
+
/**
|
|
190
|
+
* Pointer to the next or previous page in the list of results.
|
|
191
|
+
*
|
|
192
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
193
|
+
* Not relevant for the first request.
|
|
194
|
+
*/
|
|
195
|
+
cursor?: string | null;
|
|
196
|
+
}
|
|
197
|
+
interface ListCollectionMetadataResponse {
|
|
198
|
+
/** The retrieved CollectionMetadatas */
|
|
199
|
+
items?: CollectionMetadata[];
|
|
200
|
+
/** paging metadata */
|
|
201
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
202
|
+
}
|
|
203
|
+
interface CursorPagingMetadata {
|
|
204
|
+
/** Number of items returned in the response. */
|
|
205
|
+
count?: number | null;
|
|
206
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
207
|
+
cursors?: Cursors;
|
|
208
|
+
/**
|
|
209
|
+
* Whether there are more pages to retrieve following the current page.
|
|
210
|
+
*
|
|
211
|
+
* + `true`: Another page of results can be retrieved.
|
|
212
|
+
* + `false`: This is the last page.
|
|
213
|
+
*/
|
|
214
|
+
hasNext?: boolean | null;
|
|
215
|
+
}
|
|
216
|
+
interface Cursors {
|
|
217
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
218
|
+
next?: string | null;
|
|
219
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
220
|
+
prev?: string | null;
|
|
221
|
+
}
|
|
222
|
+
interface CollectionMetadataNonNullableFields {
|
|
223
|
+
dataCollectionId: string;
|
|
224
|
+
permissionsTemplate: PermissionsTemplateType;
|
|
225
|
+
}
|
|
226
|
+
interface CreateCollectionMetadataResponseNonNullableFields {
|
|
227
|
+
collectionMetadata?: CollectionMetadataNonNullableFields;
|
|
228
|
+
}
|
|
229
|
+
interface GetCollectionMetadataResponseNonNullableFields {
|
|
230
|
+
collectionMetadata?: CollectionMetadataNonNullableFields;
|
|
231
|
+
}
|
|
232
|
+
interface UpdateCollectionMetadataResponseNonNullableFields {
|
|
233
|
+
collectionMetadata?: CollectionMetadataNonNullableFields;
|
|
234
|
+
}
|
|
235
|
+
interface ListCollectionMetadataResponseNonNullableFields {
|
|
236
|
+
items: CollectionMetadataNonNullableFields[];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
240
|
+
getUrl: (context: any) => string;
|
|
241
|
+
httpMethod: K;
|
|
242
|
+
path: string;
|
|
243
|
+
pathParams: M;
|
|
244
|
+
__requestType: T;
|
|
245
|
+
__originalRequestType: S;
|
|
246
|
+
__responseType: Q;
|
|
247
|
+
__originalResponseType: R;
|
|
248
|
+
};
|
|
249
|
+
declare function createCollectionMetadata(): __PublicMethodMetaInfo<'POST', {}, CreateCollectionMetadataRequest, CreateCollectionMetadataRequest$1, CreateCollectionMetadataResponse & CreateCollectionMetadataResponseNonNullableFields, CreateCollectionMetadataResponse$1 & CreateCollectionMetadataResponseNonNullableFields$1>;
|
|
250
|
+
declare function getCollectionMetadata(): __PublicMethodMetaInfo<'GET', {
|
|
251
|
+
dataCollectionId: string;
|
|
252
|
+
}, GetCollectionMetadataRequest, GetCollectionMetadataRequest$1, GetCollectionMetadataResponse & GetCollectionMetadataResponseNonNullableFields, GetCollectionMetadataResponse$1 & GetCollectionMetadataResponseNonNullableFields$1>;
|
|
253
|
+
declare function updateCollectionMetadata(): __PublicMethodMetaInfo<'PATCH', {
|
|
254
|
+
dataCollectionId: string;
|
|
255
|
+
}, UpdateCollectionMetadataRequest, UpdateCollectionMetadataRequest$1, UpdateCollectionMetadataResponse & UpdateCollectionMetadataResponseNonNullableFields, UpdateCollectionMetadataResponse$1 & UpdateCollectionMetadataResponseNonNullableFields$1>;
|
|
256
|
+
declare function replaceCollectionMetadata(): __PublicMethodMetaInfo<'PUT', {}, ReplaceCollectionMetadataRequest, ReplaceCollectionMetadataRequest$1, ReplaceCollectionMetadataResponse, ReplaceCollectionMetadataResponse$1>;
|
|
257
|
+
declare function deleteCollectionMetadata(): __PublicMethodMetaInfo<'DELETE', {
|
|
258
|
+
dataCollectionId: string;
|
|
259
|
+
}, DeleteCollectionMetadataRequest, DeleteCollectionMetadataRequest$1, DeleteCollectionMetadataResponse, DeleteCollectionMetadataResponse$1>;
|
|
260
|
+
declare function listCollectionMetadata(): __PublicMethodMetaInfo<'GET', {}, ListCollectionMetadataRequest, ListCollectionMetadataRequest$1, ListCollectionMetadataResponse & ListCollectionMetadataResponseNonNullableFields, ListCollectionMetadataResponse$1 & ListCollectionMetadataResponseNonNullableFields$1>;
|
|
261
|
+
|
|
262
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
263
|
+
declare const meta_createCollectionMetadata: typeof createCollectionMetadata;
|
|
264
|
+
declare const meta_deleteCollectionMetadata: typeof deleteCollectionMetadata;
|
|
265
|
+
declare const meta_getCollectionMetadata: typeof getCollectionMetadata;
|
|
266
|
+
declare const meta_listCollectionMetadata: typeof listCollectionMetadata;
|
|
267
|
+
declare const meta_replaceCollectionMetadata: typeof replaceCollectionMetadata;
|
|
268
|
+
declare const meta_updateCollectionMetadata: typeof updateCollectionMetadata;
|
|
269
|
+
declare namespace meta {
|
|
270
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createCollectionMetadata as createCollectionMetadata, meta_deleteCollectionMetadata as deleteCollectionMetadata, meta_getCollectionMetadata as getCollectionMetadata, meta_listCollectionMetadata as listCollectionMetadata, meta_replaceCollectionMetadata as replaceCollectionMetadata, meta_updateCollectionMetadata as updateCollectionMetadata };
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export { meta as autocms };
|