@wix/data-extension-schema 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 +2 -0
- package/build/cjs/index.js +29 -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 +2 -0
- package/build/es/index.js +3 -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 +47 -0
- package/type-bundles/context.bundle.d.ts +1075 -0
- package/type-bundles/index.bundle.d.ts +1075 -0
- package/type-bundles/meta.bundle.d.ts +371 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
interface DataExtensionSchema$1 {
|
|
2
|
+
/**
|
|
3
|
+
* Schema ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/** FQDN of the entity this schema extends. */
|
|
8
|
+
fqdn?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Namespace for this schema. For example, an app creating schemas might use their app name as a namespace.
|
|
11
|
+
* When a site owner creates a user-defined schema, the namespace is: `_user_fields`.
|
|
12
|
+
*/
|
|
13
|
+
namespace?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Schema definition in [JSON schema format](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/the-json-schema) with the following [vocab](https://docs.json-everything.net/schema/vocabs/) extension:
|
|
16
|
+
* ```
|
|
17
|
+
* {
|
|
18
|
+
* "$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19
|
+
* "$id": "https://wixapis.com/v1/json-schema/extensions",
|
|
20
|
+
* "$vocabulary": {
|
|
21
|
+
* "https://wixapis.com/v1/json-schema/extensions/vocab/data-extensions": true
|
|
22
|
+
* },
|
|
23
|
+
* "$dynamicAnchor": "meta",
|
|
24
|
+
* "title": "Wix' data-extensions vocabulary meta schema",
|
|
25
|
+
* "type": [
|
|
26
|
+
* "object",
|
|
27
|
+
* "boolean"
|
|
28
|
+
* ],
|
|
29
|
+
* "properties": {
|
|
30
|
+
* "x-wix-permissions": {
|
|
31
|
+
* "type": "object",
|
|
32
|
+
* "description": "list of identity types that are allowed reading schema properties",
|
|
33
|
+
* "properties": {
|
|
34
|
+
* "read": {
|
|
35
|
+
* "type": "array",
|
|
36
|
+
* "items": {
|
|
37
|
+
* "type": "string",
|
|
38
|
+
* "enum": [
|
|
39
|
+
* "apps",
|
|
40
|
+
* "owning-app",
|
|
41
|
+
* "users",
|
|
42
|
+
* "users-of-users"
|
|
43
|
+
* ]
|
|
44
|
+
* }
|
|
45
|
+
* },
|
|
46
|
+
* "write": {
|
|
47
|
+
* "type": "array",
|
|
48
|
+
* "items": {
|
|
49
|
+
* "type": "string",
|
|
50
|
+
* "enum": [
|
|
51
|
+
* "apps",
|
|
52
|
+
* "owning-app",
|
|
53
|
+
* "users",
|
|
54
|
+
* "users-of-users"
|
|
55
|
+
* ]
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* },
|
|
60
|
+
* "x-wix-display": {
|
|
61
|
+
* "type": "object",
|
|
62
|
+
* "description": "field display properties",
|
|
63
|
+
* "schema": {
|
|
64
|
+
* "properties": {
|
|
65
|
+
* "placeholder": {
|
|
66
|
+
* "type": "string",
|
|
67
|
+
* "maxLength": 255,
|
|
68
|
+
* "description": "placeholder text for input fields"
|
|
69
|
+
* },
|
|
70
|
+
* "label": {
|
|
71
|
+
* "type": "string",
|
|
72
|
+
* "maxLength": 255,
|
|
73
|
+
* "description": "label of the input fields"
|
|
74
|
+
* },
|
|
75
|
+
* "hint": {
|
|
76
|
+
* "type": "string",
|
|
77
|
+
* "maxLength": 255,
|
|
78
|
+
* "description": "a short explanation that appears next to the input field"
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
* }
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
jsonSchema?: Record<string, any> | null;
|
|
88
|
+
/**
|
|
89
|
+
* Date and time the schema was last updated.
|
|
90
|
+
* @readonly
|
|
91
|
+
*/
|
|
92
|
+
updatedDate?: Date;
|
|
93
|
+
/**
|
|
94
|
+
* Date and time the schema was created.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
createdDate?: Date;
|
|
98
|
+
/**
|
|
99
|
+
* Revision number, which increments by 1 each time the schema is updated. To prevent conflicting changes, the existing revision must be used when updating a schema.
|
|
100
|
+
* @readonly
|
|
101
|
+
*/
|
|
102
|
+
revision?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Maximum allowed schema size in bytes.
|
|
105
|
+
* @readonly
|
|
106
|
+
*/
|
|
107
|
+
maxLimitBytes?: number | null;
|
|
108
|
+
/**
|
|
109
|
+
* Current schema size in bytes.
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
currentSizeBytes?: number | null;
|
|
113
|
+
/** Name of the specific entity field this schema is extending, or `"ROOT"` for extensions for the entire entity. Default: `"ROOT"`. */
|
|
114
|
+
extensionPoint?: string;
|
|
115
|
+
}
|
|
116
|
+
interface CreateDataExtensionSchemaRequest$1 {
|
|
117
|
+
/** Schema to create. */
|
|
118
|
+
dataExtensionSchema: DataExtensionSchema$1;
|
|
119
|
+
}
|
|
120
|
+
interface CreateDataExtensionSchemaResponse$1 {
|
|
121
|
+
/** Created schema. */
|
|
122
|
+
dataExtensionSchema?: DataExtensionSchema$1;
|
|
123
|
+
}
|
|
124
|
+
interface UpdateDataExtensionSchemaRequest$1 {
|
|
125
|
+
/** Schema to update. */
|
|
126
|
+
dataExtensionSchema?: DataExtensionSchema$1;
|
|
127
|
+
}
|
|
128
|
+
interface UpdateDataExtensionSchemaResponse$1 {
|
|
129
|
+
/** Updated schema. */
|
|
130
|
+
dataExtensionSchema?: DataExtensionSchema$1;
|
|
131
|
+
}
|
|
132
|
+
interface ListDataExtensionSchemasRequest$1 {
|
|
133
|
+
/** [Fully qualified domain name](https://dev.wix.com/docs/rest/articles/getting-started/fqdns). */
|
|
134
|
+
fqdn: string;
|
|
135
|
+
/** Namespaces within the given entity. */
|
|
136
|
+
namespaces?: string[];
|
|
137
|
+
/** Additional fields that are hidden by default. For example, fields with `"x-wix-archived": true`. */
|
|
138
|
+
fields?: RequestedField$1[];
|
|
139
|
+
}
|
|
140
|
+
declare enum RequestedField$1 {
|
|
141
|
+
/** Doesn't do anything */
|
|
142
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
143
|
+
/** Returns `x-wix-archived` fields in `DataExtensionSchema.json_schema`. */
|
|
144
|
+
ARCHIVED = "ARCHIVED"
|
|
145
|
+
}
|
|
146
|
+
interface ListDataExtensionSchemasResponse$1 {
|
|
147
|
+
/** Requested schemas. */
|
|
148
|
+
dataExtensionSchemas?: DataExtensionSchema$1[];
|
|
149
|
+
}
|
|
150
|
+
interface DeleteByWhiteListedMetaSiteRequest$1 {
|
|
151
|
+
/** Meta site id */
|
|
152
|
+
metaSiteId: string;
|
|
153
|
+
}
|
|
154
|
+
interface DeleteByWhiteListedMetaSiteResponse$1 {
|
|
155
|
+
/** has more */
|
|
156
|
+
hasMore?: boolean;
|
|
157
|
+
}
|
|
158
|
+
interface DataExtensionSchemaNonNullableFields$1 {
|
|
159
|
+
extensionPoint: string;
|
|
160
|
+
}
|
|
161
|
+
interface CreateDataExtensionSchemaResponseNonNullableFields$1 {
|
|
162
|
+
dataExtensionSchema?: DataExtensionSchemaNonNullableFields$1;
|
|
163
|
+
}
|
|
164
|
+
interface UpdateDataExtensionSchemaResponseNonNullableFields$1 {
|
|
165
|
+
dataExtensionSchema?: DataExtensionSchemaNonNullableFields$1;
|
|
166
|
+
}
|
|
167
|
+
interface ListDataExtensionSchemasResponseNonNullableFields$1 {
|
|
168
|
+
dataExtensionSchemas: DataExtensionSchemaNonNullableFields$1[];
|
|
169
|
+
}
|
|
170
|
+
interface DeleteByWhiteListedMetaSiteResponseNonNullableFields$1 {
|
|
171
|
+
hasMore: boolean;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
interface DataExtensionSchema {
|
|
175
|
+
/**
|
|
176
|
+
* Schema ID.
|
|
177
|
+
* @readonly
|
|
178
|
+
*/
|
|
179
|
+
_id?: string | null;
|
|
180
|
+
/** FQDN of the entity this schema extends. */
|
|
181
|
+
fqdn?: string | null;
|
|
182
|
+
/**
|
|
183
|
+
* Namespace for this schema. For example, an app creating schemas might use their app name as a namespace.
|
|
184
|
+
* When a site owner creates a user-defined schema, the namespace is: `_user_fields`.
|
|
185
|
+
*/
|
|
186
|
+
namespace?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* Schema definition in [JSON schema format](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/the-json-schema) with the following [vocab](https://docs.json-everything.net/schema/vocabs/) extension:
|
|
189
|
+
* ```
|
|
190
|
+
* {
|
|
191
|
+
* "$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
192
|
+
* "$id": "https://wixapis.com/v1/json-schema/extensions",
|
|
193
|
+
* "$vocabulary": {
|
|
194
|
+
* "https://wixapis.com/v1/json-schema/extensions/vocab/data-extensions": true
|
|
195
|
+
* },
|
|
196
|
+
* "$dynamicAnchor": "meta",
|
|
197
|
+
* "title": "Wix' data-extensions vocabulary meta schema",
|
|
198
|
+
* "type": [
|
|
199
|
+
* "object",
|
|
200
|
+
* "boolean"
|
|
201
|
+
* ],
|
|
202
|
+
* "properties": {
|
|
203
|
+
* "x-wix-permissions": {
|
|
204
|
+
* "type": "object",
|
|
205
|
+
* "description": "list of identity types that are allowed reading schema properties",
|
|
206
|
+
* "properties": {
|
|
207
|
+
* "read": {
|
|
208
|
+
* "type": "array",
|
|
209
|
+
* "items": {
|
|
210
|
+
* "type": "string",
|
|
211
|
+
* "enum": [
|
|
212
|
+
* "apps",
|
|
213
|
+
* "owning-app",
|
|
214
|
+
* "users",
|
|
215
|
+
* "users-of-users"
|
|
216
|
+
* ]
|
|
217
|
+
* }
|
|
218
|
+
* },
|
|
219
|
+
* "write": {
|
|
220
|
+
* "type": "array",
|
|
221
|
+
* "items": {
|
|
222
|
+
* "type": "string",
|
|
223
|
+
* "enum": [
|
|
224
|
+
* "apps",
|
|
225
|
+
* "owning-app",
|
|
226
|
+
* "users",
|
|
227
|
+
* "users-of-users"
|
|
228
|
+
* ]
|
|
229
|
+
* }
|
|
230
|
+
* }
|
|
231
|
+
* }
|
|
232
|
+
* },
|
|
233
|
+
* "x-wix-display": {
|
|
234
|
+
* "type": "object",
|
|
235
|
+
* "description": "field display properties",
|
|
236
|
+
* "schema": {
|
|
237
|
+
* "properties": {
|
|
238
|
+
* "placeholder": {
|
|
239
|
+
* "type": "string",
|
|
240
|
+
* "maxLength": 255,
|
|
241
|
+
* "description": "placeholder text for input fields"
|
|
242
|
+
* },
|
|
243
|
+
* "label": {
|
|
244
|
+
* "type": "string",
|
|
245
|
+
* "maxLength": 255,
|
|
246
|
+
* "description": "label of the input fields"
|
|
247
|
+
* },
|
|
248
|
+
* "hint": {
|
|
249
|
+
* "type": "string",
|
|
250
|
+
* "maxLength": 255,
|
|
251
|
+
* "description": "a short explanation that appears next to the input field"
|
|
252
|
+
* }
|
|
253
|
+
* }
|
|
254
|
+
* }
|
|
255
|
+
* }
|
|
256
|
+
* }
|
|
257
|
+
* }
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
jsonSchema?: Record<string, any> | null;
|
|
261
|
+
/**
|
|
262
|
+
* Date and time the schema was last updated.
|
|
263
|
+
* @readonly
|
|
264
|
+
*/
|
|
265
|
+
_updatedDate?: Date;
|
|
266
|
+
/**
|
|
267
|
+
* Date and time the schema was created.
|
|
268
|
+
* @readonly
|
|
269
|
+
*/
|
|
270
|
+
_createdDate?: Date;
|
|
271
|
+
/**
|
|
272
|
+
* Revision number, which increments by 1 each time the schema is updated. To prevent conflicting changes, the existing revision must be used when updating a schema.
|
|
273
|
+
* @readonly
|
|
274
|
+
*/
|
|
275
|
+
revision?: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* Maximum allowed schema size in bytes.
|
|
278
|
+
* @readonly
|
|
279
|
+
*/
|
|
280
|
+
maxLimitBytes?: number | null;
|
|
281
|
+
/**
|
|
282
|
+
* Current schema size in bytes.
|
|
283
|
+
* @readonly
|
|
284
|
+
*/
|
|
285
|
+
currentSizeBytes?: number | null;
|
|
286
|
+
/** Name of the specific entity field this schema is extending, or `"ROOT"` for extensions for the entire entity. Default: `"ROOT"`. */
|
|
287
|
+
extensionPoint?: string;
|
|
288
|
+
}
|
|
289
|
+
interface CreateDataExtensionSchemaRequest {
|
|
290
|
+
/** Schema to create. */
|
|
291
|
+
dataExtensionSchema: DataExtensionSchema;
|
|
292
|
+
}
|
|
293
|
+
interface CreateDataExtensionSchemaResponse {
|
|
294
|
+
/** Created schema. */
|
|
295
|
+
dataExtensionSchema?: DataExtensionSchema;
|
|
296
|
+
}
|
|
297
|
+
interface UpdateDataExtensionSchemaRequest {
|
|
298
|
+
/** Schema to update. */
|
|
299
|
+
dataExtensionSchema?: DataExtensionSchema;
|
|
300
|
+
}
|
|
301
|
+
interface UpdateDataExtensionSchemaResponse {
|
|
302
|
+
/** Updated schema. */
|
|
303
|
+
dataExtensionSchema?: DataExtensionSchema;
|
|
304
|
+
}
|
|
305
|
+
interface ListDataExtensionSchemasRequest {
|
|
306
|
+
/** [Fully qualified domain name](https://dev.wix.com/docs/rest/articles/getting-started/fqdns). */
|
|
307
|
+
fqdn: string;
|
|
308
|
+
/** Namespaces within the given entity. */
|
|
309
|
+
namespaces?: string[];
|
|
310
|
+
/** Additional fields that are hidden by default. For example, fields with `"x-wix-archived": true`. */
|
|
311
|
+
fields?: RequestedField[];
|
|
312
|
+
}
|
|
313
|
+
declare enum RequestedField {
|
|
314
|
+
/** Doesn't do anything */
|
|
315
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
316
|
+
/** Returns `x-wix-archived` fields in `DataExtensionSchema.json_schema`. */
|
|
317
|
+
ARCHIVED = "ARCHIVED"
|
|
318
|
+
}
|
|
319
|
+
interface ListDataExtensionSchemasResponse {
|
|
320
|
+
/** Requested schemas. */
|
|
321
|
+
dataExtensionSchemas?: DataExtensionSchema[];
|
|
322
|
+
}
|
|
323
|
+
interface DeleteByWhiteListedMetaSiteRequest {
|
|
324
|
+
/** Meta site id */
|
|
325
|
+
metaSiteId: string;
|
|
326
|
+
}
|
|
327
|
+
interface DeleteByWhiteListedMetaSiteResponse {
|
|
328
|
+
/** has more */
|
|
329
|
+
hasMore?: boolean;
|
|
330
|
+
}
|
|
331
|
+
interface DataExtensionSchemaNonNullableFields {
|
|
332
|
+
extensionPoint: string;
|
|
333
|
+
}
|
|
334
|
+
interface CreateDataExtensionSchemaResponseNonNullableFields {
|
|
335
|
+
dataExtensionSchema?: DataExtensionSchemaNonNullableFields;
|
|
336
|
+
}
|
|
337
|
+
interface UpdateDataExtensionSchemaResponseNonNullableFields {
|
|
338
|
+
dataExtensionSchema?: DataExtensionSchemaNonNullableFields;
|
|
339
|
+
}
|
|
340
|
+
interface ListDataExtensionSchemasResponseNonNullableFields {
|
|
341
|
+
dataExtensionSchemas: DataExtensionSchemaNonNullableFields[];
|
|
342
|
+
}
|
|
343
|
+
interface DeleteByWhiteListedMetaSiteResponseNonNullableFields {
|
|
344
|
+
hasMore: boolean;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
348
|
+
getUrl: (context: any) => string;
|
|
349
|
+
httpMethod: K;
|
|
350
|
+
path: string;
|
|
351
|
+
pathParams: M;
|
|
352
|
+
__requestType: T;
|
|
353
|
+
__originalRequestType: S;
|
|
354
|
+
__responseType: Q;
|
|
355
|
+
__originalResponseType: R;
|
|
356
|
+
};
|
|
357
|
+
declare function createDataExtensionSchema(): __PublicMethodMetaInfo<'POST', {}, CreateDataExtensionSchemaRequest, CreateDataExtensionSchemaRequest$1, CreateDataExtensionSchemaResponse & CreateDataExtensionSchemaResponseNonNullableFields, CreateDataExtensionSchemaResponse$1 & CreateDataExtensionSchemaResponseNonNullableFields$1>;
|
|
358
|
+
declare function updateDataExtensionSchema(): __PublicMethodMetaInfo<'PUT', {}, UpdateDataExtensionSchemaRequest, UpdateDataExtensionSchemaRequest$1, UpdateDataExtensionSchemaResponse & UpdateDataExtensionSchemaResponseNonNullableFields, UpdateDataExtensionSchemaResponse$1 & UpdateDataExtensionSchemaResponseNonNullableFields$1>;
|
|
359
|
+
declare function listDataExtensionSchemas(): __PublicMethodMetaInfo<'GET', {}, ListDataExtensionSchemasRequest, ListDataExtensionSchemasRequest$1, ListDataExtensionSchemasResponse & ListDataExtensionSchemasResponseNonNullableFields, ListDataExtensionSchemasResponse$1 & ListDataExtensionSchemasResponseNonNullableFields$1>;
|
|
360
|
+
declare function deleteByWhiteListedMetaSite(): __PublicMethodMetaInfo<'POST', {}, DeleteByWhiteListedMetaSiteRequest, DeleteByWhiteListedMetaSiteRequest$1, DeleteByWhiteListedMetaSiteResponse & DeleteByWhiteListedMetaSiteResponseNonNullableFields, DeleteByWhiteListedMetaSiteResponse$1 & DeleteByWhiteListedMetaSiteResponseNonNullableFields$1>;
|
|
361
|
+
|
|
362
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
363
|
+
declare const meta_createDataExtensionSchema: typeof createDataExtensionSchema;
|
|
364
|
+
declare const meta_deleteByWhiteListedMetaSite: typeof deleteByWhiteListedMetaSite;
|
|
365
|
+
declare const meta_listDataExtensionSchemas: typeof listDataExtensionSchemas;
|
|
366
|
+
declare const meta_updateDataExtensionSchema: typeof updateDataExtensionSchema;
|
|
367
|
+
declare namespace meta {
|
|
368
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createDataExtensionSchema as createDataExtensionSchema, meta_deleteByWhiteListedMetaSite as deleteByWhiteListedMetaSite, meta_listDataExtensionSchemas as listDataExtensionSchemas, meta_updateDataExtensionSchema as updateDataExtensionSchema };
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export { meta as schemas };
|