@wix/auto_sdk_data_collections 1.0.107 → 1.0.109
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/index.d.ts +73 -23
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +300 -96
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +172 -55
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +73 -23
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +300 -96
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +172 -55
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +73 -23
- package/build/internal/cjs/index.typings.d.ts +313 -101
- package/build/internal/cjs/meta.d.ts +184 -59
- package/build/internal/es/index.d.mts +73 -23
- package/build/internal/es/index.typings.d.mts +313 -101
- package/build/internal/es/meta.d.mts +184 -59
- package/package.json +4 -4
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A data collection defines the fields, data types, item permissions, and plugins for a set of data items.
|
|
5
|
+
* Use the Data Items API to store and retrieve the items themselves.
|
|
6
|
+
*/
|
|
4
7
|
interface DataCollection {
|
|
5
8
|
/**
|
|
6
9
|
* [Collection ID](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collections#collection-ids). For example, `my-first-collection`.
|
|
@@ -30,6 +33,8 @@ interface DataCollection {
|
|
|
30
33
|
maxPageSize?: number | null;
|
|
31
34
|
/**
|
|
32
35
|
* Collection's display name as shown in the CMS. For example, `My First Collection`.
|
|
36
|
+
*
|
|
37
|
+
* Default: The collection ID.
|
|
33
38
|
* @maxLength 1000
|
|
34
39
|
*/
|
|
35
40
|
displayName?: string | null;
|
|
@@ -47,6 +52,8 @@ interface DataCollection {
|
|
|
47
52
|
displayNamespace?: string | null;
|
|
48
53
|
/**
|
|
49
54
|
* Field whose value the CMS displays to represent the collection item when referenced in a different collection.
|
|
55
|
+
*
|
|
56
|
+
* Default: The first field in the request, or `title` if no fields are specified.
|
|
50
57
|
* @maxLength 1000
|
|
51
58
|
*/
|
|
52
59
|
displayField?: string | null;
|
|
@@ -219,7 +226,7 @@ interface Field extends FieldRangeValidationsOneOf {
|
|
|
219
226
|
* Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
220
227
|
*/
|
|
221
228
|
type?: TypeWithLiterals;
|
|
222
|
-
/**
|
|
229
|
+
/** Type-specific configuration, such as the referenced collection for a reference field or the calculation pattern for a page link. */
|
|
223
230
|
typeMetadata?: TypeMetadata;
|
|
224
231
|
/**
|
|
225
232
|
* Whether the field is a system field.
|
|
@@ -245,7 +252,7 @@ interface Field extends FieldRangeValidationsOneOf {
|
|
|
245
252
|
*/
|
|
246
253
|
readOnly?: boolean | null;
|
|
247
254
|
/**
|
|
248
|
-
* Whether the field is immutable. An immutable field can be set once, but then
|
|
255
|
+
* Whether the field is immutable. An immutable field can be set once, but then can't be updated.
|
|
249
256
|
*
|
|
250
257
|
* Default: `false`
|
|
251
258
|
*/
|
|
@@ -262,7 +269,7 @@ interface Field extends FieldRangeValidationsOneOf {
|
|
|
262
269
|
*/
|
|
263
270
|
plugins?: FieldPlugin[];
|
|
264
271
|
/**
|
|
265
|
-
*
|
|
272
|
+
* Conditions that control whether this field is included when retrieving data items.
|
|
266
273
|
* @readonly
|
|
267
274
|
*/
|
|
268
275
|
condition?: FieldCondition;
|
|
@@ -455,7 +462,7 @@ interface ObjectField {
|
|
|
455
462
|
* Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
456
463
|
*/
|
|
457
464
|
type?: TypeWithLiterals;
|
|
458
|
-
/**
|
|
465
|
+
/** Type-specific configuration, such as the referenced collection for a reference field or the calculation pattern for a page link. */
|
|
459
466
|
typeMetadata?: TypeMetadata;
|
|
460
467
|
/**
|
|
461
468
|
* Capabilities the object field supports.
|
|
@@ -464,12 +471,19 @@ interface ObjectField {
|
|
|
464
471
|
capabilities?: FieldCapabilities;
|
|
465
472
|
}
|
|
466
473
|
interface FieldsPattern {
|
|
467
|
-
/**
|
|
474
|
+
/**
|
|
475
|
+
* Pattern used to generate the field value from item properties.
|
|
476
|
+
* @maxLength 1000
|
|
477
|
+
*/
|
|
468
478
|
pattern?: string;
|
|
479
|
+
/** Whether to convert the generated value to lowercase. Default: `false`. */
|
|
469
480
|
lowercase?: boolean;
|
|
470
481
|
}
|
|
471
482
|
interface UrlizedOnlyPattern {
|
|
472
|
-
/**
|
|
483
|
+
/**
|
|
484
|
+
* Pattern used to generate the field value from item properties.
|
|
485
|
+
* @maxLength 1000
|
|
486
|
+
*/
|
|
473
487
|
pattern?: string;
|
|
474
488
|
}
|
|
475
489
|
interface Calculator extends CalculatorPatternOneOf {
|
|
@@ -538,10 +552,11 @@ interface _Object {
|
|
|
538
552
|
interface _Array {
|
|
539
553
|
/** Element's data type. */
|
|
540
554
|
elementType?: TypeWithLiterals;
|
|
541
|
-
/**
|
|
555
|
+
/** Type-specific configuration, such as the referenced collection for a reference field or the calculation pattern for a page link. */
|
|
542
556
|
typeMetadata?: TypeMetadata;
|
|
543
557
|
}
|
|
544
558
|
interface PageLink {
|
|
559
|
+
/** Calculation pattern used to generate the page link. Required for page link fields. */
|
|
545
560
|
calculator?: Calculator;
|
|
546
561
|
/**
|
|
547
562
|
* Defines reference to router pattern in the site document.
|
|
@@ -551,22 +566,28 @@ interface PageLink {
|
|
|
551
566
|
}
|
|
552
567
|
interface Slug {
|
|
553
568
|
/**
|
|
569
|
+
* Pattern used to generate the field value from item properties.
|
|
554
570
|
* @minLength 1
|
|
555
571
|
* @maxLength 1000
|
|
556
572
|
*/
|
|
557
573
|
pattern?: string;
|
|
558
574
|
}
|
|
559
575
|
interface Text extends TextValidationOneOf {
|
|
576
|
+
/** Length and pattern constraints for the text value. */
|
|
560
577
|
textValidation?: TextValidation;
|
|
578
|
+
/** Allowed text values. */
|
|
561
579
|
enumValues?: EnumValues;
|
|
562
580
|
defaultValue?: string | null;
|
|
563
581
|
}
|
|
564
582
|
/** @oneof */
|
|
565
583
|
interface TextValidationOneOf {
|
|
584
|
+
/** Length and pattern constraints for the text value. */
|
|
566
585
|
textValidation?: TextValidation;
|
|
586
|
+
/** Allowed text values. */
|
|
567
587
|
enumValues?: EnumValues;
|
|
568
588
|
}
|
|
569
589
|
interface _Number {
|
|
590
|
+
/** Value assigned when a data item omits this field. */
|
|
570
591
|
defaultValue?: number | null;
|
|
571
592
|
/** Minimum permitted value for a numerical field. */
|
|
572
593
|
min?: number | null;
|
|
@@ -574,48 +595,68 @@ interface _Number {
|
|
|
574
595
|
max?: number | null;
|
|
575
596
|
}
|
|
576
597
|
interface _Date extends _DateDefaultValueOneOf, _DateMinDateOneOf, _DateMaxDateOneOf {
|
|
598
|
+
/** Fixed date and time used as the default value. */
|
|
577
599
|
defaultValueFixed?: Date | null;
|
|
600
|
+
/** Offset from the current date, in days, used as the default value. */
|
|
578
601
|
defaultValueOffsetFromNowInDays?: number | null;
|
|
602
|
+
/** Earliest permitted date and time. */
|
|
579
603
|
minDateFixed?: Date | null;
|
|
604
|
+
/** Offset from the current date, in days, used as the earliest permitted date. */
|
|
580
605
|
minValueOffsetFromNowInDays?: number | null;
|
|
606
|
+
/** Latest permitted date and time. */
|
|
581
607
|
maxDateFixed?: Date | null;
|
|
608
|
+
/** Offset from the current date, in days, used as the latest permitted date. */
|
|
582
609
|
maxValueOffsetFromNowInDays?: number | null;
|
|
583
610
|
}
|
|
584
611
|
/** @oneof */
|
|
585
612
|
interface _DateDefaultValueOneOf {
|
|
613
|
+
/** Fixed date and time used as the default value. */
|
|
586
614
|
defaultValueFixed?: Date | null;
|
|
615
|
+
/** Offset from the current date, in days, used as the default value. */
|
|
587
616
|
defaultValueOffsetFromNowInDays?: number | null;
|
|
588
617
|
}
|
|
589
618
|
/** @oneof */
|
|
590
619
|
interface _DateMinDateOneOf {
|
|
620
|
+
/** Earliest permitted date and time. */
|
|
591
621
|
minDateFixed?: Date | null;
|
|
622
|
+
/** Offset from the current date, in days, used as the earliest permitted date. */
|
|
592
623
|
minValueOffsetFromNowInDays?: number | null;
|
|
593
624
|
}
|
|
594
625
|
/** @oneof */
|
|
595
626
|
interface _DateMaxDateOneOf {
|
|
627
|
+
/** Latest permitted date and time. */
|
|
596
628
|
maxDateFixed?: Date | null;
|
|
629
|
+
/** Offset from the current date, in days, used as the latest permitted date. */
|
|
597
630
|
maxValueOffsetFromNowInDays?: number | null;
|
|
598
631
|
}
|
|
599
632
|
interface Datetime extends DatetimeDefaultValueOneOf, DatetimeMinDateOneOf, DatetimeMaxDateOneOf {
|
|
633
|
+
/** Fixed date and time used as the default value. */
|
|
600
634
|
defaultValueFixed?: Date | null;
|
|
635
|
+
/** Offset from the current time, in seconds, used as the default value. */
|
|
601
636
|
defaultValueOffsetFromNowInSeconds?: number | null;
|
|
637
|
+
/** Earliest permitted date and time. */
|
|
602
638
|
minDateFixed?: Date | null;
|
|
603
639
|
minDateOffsetFromNowInSeconds?: number | null;
|
|
640
|
+
/** Latest permitted date and time. */
|
|
604
641
|
maxDateFixed?: Date | null;
|
|
605
642
|
maxDateOffsetFromNowInSeconds?: number | null;
|
|
606
643
|
}
|
|
607
644
|
/** @oneof */
|
|
608
645
|
interface DatetimeDefaultValueOneOf {
|
|
646
|
+
/** Fixed date and time used as the default value. */
|
|
609
647
|
defaultValueFixed?: Date | null;
|
|
648
|
+
/** Offset from the current time, in seconds, used as the default value. */
|
|
610
649
|
defaultValueOffsetFromNowInSeconds?: number | null;
|
|
611
650
|
}
|
|
612
651
|
/** @oneof */
|
|
613
652
|
interface DatetimeMinDateOneOf {
|
|
653
|
+
/** Earliest permitted date and time. */
|
|
614
654
|
minDateFixed?: Date | null;
|
|
615
655
|
minDateOffsetFromNowInSeconds?: number | null;
|
|
616
656
|
}
|
|
617
657
|
/** @oneof */
|
|
618
658
|
interface DatetimeMaxDateOneOf {
|
|
659
|
+
/** Latest permitted date and time. */
|
|
619
660
|
maxDateFixed?: Date | null;
|
|
620
661
|
maxDateOffsetFromNowInSeconds?: number | null;
|
|
621
662
|
}
|
|
@@ -623,6 +664,7 @@ interface Image {
|
|
|
623
664
|
defaultValue?: string | null;
|
|
624
665
|
}
|
|
625
666
|
interface _Boolean {
|
|
667
|
+
/** Value assigned when a data item omits this field. */
|
|
626
668
|
defaultValue?: boolean | null;
|
|
627
669
|
}
|
|
628
670
|
interface Document {
|
|
@@ -630,10 +672,12 @@ interface Document {
|
|
|
630
672
|
}
|
|
631
673
|
interface Url {
|
|
632
674
|
/**
|
|
675
|
+
* Value assigned when a data item omits this field.
|
|
633
676
|
* @minLength 1
|
|
634
677
|
* @maxLength 2048
|
|
635
678
|
*/
|
|
636
679
|
defaultValue?: string | null;
|
|
680
|
+
/** Length and pattern constraints for the text value. */
|
|
637
681
|
textValidation?: TextValidation;
|
|
638
682
|
}
|
|
639
683
|
interface RichText {
|
|
@@ -690,16 +734,21 @@ interface Time {
|
|
|
690
734
|
maxTime?: string | null;
|
|
691
735
|
}
|
|
692
736
|
interface RichContent {
|
|
737
|
+
/** Value assigned when a data item omits this field. */
|
|
693
738
|
defaultValue?: Record<string, any> | null;
|
|
694
739
|
}
|
|
695
740
|
interface MediaGallery {
|
|
696
741
|
defaultValue?: Record<string, any>[] | null;
|
|
697
742
|
}
|
|
698
743
|
interface Address {
|
|
744
|
+
/** Value assigned when a data item omits this field. */
|
|
699
745
|
defaultValue?: Record<string, any> | null;
|
|
700
746
|
}
|
|
701
747
|
interface Email {
|
|
702
|
-
/**
|
|
748
|
+
/**
|
|
749
|
+
* Value assigned when a data item omits this field.
|
|
750
|
+
* @format EMAIL
|
|
751
|
+
*/
|
|
703
752
|
defaultValue?: string | null;
|
|
704
753
|
}
|
|
705
754
|
interface LegacyColor {
|
|
@@ -751,12 +800,13 @@ interface ArraySizeRange {
|
|
|
751
800
|
*/
|
|
752
801
|
maxSize?: number | null;
|
|
753
802
|
}
|
|
754
|
-
/**
|
|
803
|
+
/** Plugins that extend a field's behavior. */
|
|
755
804
|
interface FieldPlugin extends FieldPluginOptionsOneOf {
|
|
756
805
|
/** Options for the CMS plugin. */
|
|
757
806
|
cmsOptions?: CmsOptions;
|
|
758
807
|
/** Options for the CATEGORY_FIELD plugin. */
|
|
759
808
|
categoryFieldOptions?: CategoryFieldOptions;
|
|
809
|
+
/** Field plugin type. */
|
|
760
810
|
type?: FieldPluginTypeWithLiterals;
|
|
761
811
|
}
|
|
762
812
|
/** @oneof */
|
|
@@ -767,9 +817,9 @@ interface FieldPluginOptionsOneOf {
|
|
|
767
817
|
categoryFieldOptions?: CategoryFieldOptions;
|
|
768
818
|
}
|
|
769
819
|
declare enum FieldPluginType {
|
|
770
|
-
/**
|
|
820
|
+
/** Unknown plugin type. */
|
|
771
821
|
UNKNOWN = "UNKNOWN",
|
|
772
|
-
/** CMS-related field attributes */
|
|
822
|
+
/** CMS-related field attributes. */
|
|
773
823
|
CMS = "CMS"
|
|
774
824
|
}
|
|
775
825
|
/** @enumType */
|
|
@@ -796,7 +846,7 @@ interface CategoryFieldOptions {
|
|
|
796
846
|
}
|
|
797
847
|
interface FieldCondition {
|
|
798
848
|
/**
|
|
799
|
-
* If `
|
|
849
|
+
* If `groupName` is set, this field will not be present in query results. To retrieve this field, pass `groupName` value to `includeFieldGroups` parameter in query operations.
|
|
800
850
|
* @maxLength 100
|
|
801
851
|
*/
|
|
802
852
|
groupName?: string | null;
|
|
@@ -889,7 +939,9 @@ interface PluginOptionsOneOf {
|
|
|
889
939
|
cmsOptions?: PluginCmsOptions;
|
|
890
940
|
}
|
|
891
941
|
declare enum Status {
|
|
942
|
+
/** Items are published by default. */
|
|
892
943
|
PUBLISHED = "PUBLISHED",
|
|
944
|
+
/** Items are drafts by default. */
|
|
893
945
|
DRAFT = "DRAFT"
|
|
894
946
|
}
|
|
895
947
|
/** @enumType */
|
|
@@ -965,7 +1017,11 @@ declare enum PluginType {
|
|
|
965
1017
|
/** @enumType */
|
|
966
1018
|
type PluginTypeWithLiterals = PluginType | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS';
|
|
967
1019
|
interface PublishPluginOptions {
|
|
968
|
-
/**
|
|
1020
|
+
/**
|
|
1021
|
+
* Publication status assigned to items that don't specify one.
|
|
1022
|
+
*
|
|
1023
|
+
* Default: `PUBLISHED`.
|
|
1024
|
+
*/
|
|
969
1025
|
defaultStatus?: StatusWithLiterals;
|
|
970
1026
|
}
|
|
971
1027
|
interface SingleItemPluginOptions {
|
|
@@ -976,7 +1032,11 @@ interface SingleItemPluginOptions {
|
|
|
976
1032
|
singleItemId?: string;
|
|
977
1033
|
}
|
|
978
1034
|
interface UrlizedPluginOptions {
|
|
979
|
-
/**
|
|
1035
|
+
/**
|
|
1036
|
+
* Encoding method for generating a URL in ASCII characters.
|
|
1037
|
+
*
|
|
1038
|
+
* Default: `ORIGINAL`.
|
|
1039
|
+
*/
|
|
980
1040
|
format?: FormatWithLiterals;
|
|
981
1041
|
}
|
|
982
1042
|
interface MultilingualOptions {
|
|
@@ -988,7 +1048,17 @@ interface MultilingualOptions {
|
|
|
988
1048
|
translatableFieldKeys?: string[];
|
|
989
1049
|
}
|
|
990
1050
|
interface PageLinkPluginOptions {
|
|
1051
|
+
/**
|
|
1052
|
+
* Whether page link values are stored with the items.
|
|
1053
|
+
*
|
|
1054
|
+
* Default: `false`.
|
|
1055
|
+
*/
|
|
991
1056
|
isPersisted?: boolean;
|
|
1057
|
+
/**
|
|
1058
|
+
* Whether page link values can be updated.
|
|
1059
|
+
*
|
|
1060
|
+
* Default: `false`.
|
|
1061
|
+
*/
|
|
992
1062
|
isMutable?: boolean;
|
|
993
1063
|
}
|
|
994
1064
|
interface PluginCmsOptions {
|
|
@@ -1224,32 +1294,32 @@ interface DataCollectionClonedEvent {
|
|
|
1224
1294
|
}
|
|
1225
1295
|
interface DataCollectionChangedEvent {
|
|
1226
1296
|
/**
|
|
1227
|
-
*
|
|
1297
|
+
* Fields added to the collection.
|
|
1228
1298
|
* @maxSize 1000
|
|
1229
1299
|
*/
|
|
1230
1300
|
fieldsAdded?: Field[];
|
|
1231
1301
|
/**
|
|
1232
|
-
*
|
|
1302
|
+
* Fields whose definitions changed.
|
|
1233
1303
|
* @maxSize 1000
|
|
1234
1304
|
*/
|
|
1235
1305
|
fieldsUpdated?: FieldUpdate[];
|
|
1236
1306
|
/**
|
|
1237
|
-
*
|
|
1307
|
+
* Fields removed from the collection.
|
|
1238
1308
|
* @maxSize 1000
|
|
1239
1309
|
*/
|
|
1240
1310
|
fieldsRemoved?: Field[];
|
|
1241
1311
|
/**
|
|
1242
|
-
*
|
|
1312
|
+
* Plugins added to the collection.
|
|
1243
1313
|
* @maxSize 100
|
|
1244
1314
|
*/
|
|
1245
1315
|
pluginsAdded?: Plugin[];
|
|
1246
1316
|
/**
|
|
1247
|
-
*
|
|
1317
|
+
* Plugins whose options changed.
|
|
1248
1318
|
* @maxSize 100
|
|
1249
1319
|
*/
|
|
1250
1320
|
pluginsUpdated?: PluginUpdate[];
|
|
1251
1321
|
/**
|
|
1252
|
-
*
|
|
1322
|
+
* Plugins removed from the collection.
|
|
1253
1323
|
* @maxSize 100
|
|
1254
1324
|
*/
|
|
1255
1325
|
pluginsRemoved?: Plugin[];
|
|
@@ -1259,15 +1329,15 @@ interface DataCollectionChangedEvent {
|
|
|
1259
1329
|
strictModeUpdated?: StrictModeUpdate;
|
|
1260
1330
|
}
|
|
1261
1331
|
interface FieldUpdate {
|
|
1262
|
-
/**
|
|
1332
|
+
/** Previous field definition. */
|
|
1263
1333
|
previous?: Field;
|
|
1264
|
-
/**
|
|
1334
|
+
/** Updated field definition. */
|
|
1265
1335
|
current?: Field;
|
|
1266
1336
|
}
|
|
1267
1337
|
interface PluginUpdate {
|
|
1268
|
-
/**
|
|
1338
|
+
/** Previous plugin configuration. */
|
|
1269
1339
|
previous?: Plugin;
|
|
1270
|
-
/**
|
|
1340
|
+
/** Updated plugin configuration. */
|
|
1271
1341
|
current?: Plugin;
|
|
1272
1342
|
}
|
|
1273
1343
|
interface PermissionsUpdate {
|
|
@@ -1295,7 +1365,7 @@ interface CreateDataCollectionRequest {
|
|
|
1295
1365
|
collection: DataCollection;
|
|
1296
1366
|
}
|
|
1297
1367
|
interface CreateDataCollectionResponse {
|
|
1298
|
-
/**
|
|
1368
|
+
/** Created collection. */
|
|
1299
1369
|
collection?: DataCollection;
|
|
1300
1370
|
}
|
|
1301
1371
|
interface GetDataCollectionRequest {
|
|
@@ -1313,8 +1383,9 @@ interface GetDataCollectionRequest {
|
|
|
1313
1383
|
*/
|
|
1314
1384
|
consistentRead?: boolean;
|
|
1315
1385
|
/**
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1386
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
1387
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
1388
|
+
* An empty list returns all properties available to the caller.
|
|
1318
1389
|
* @maxSize 100
|
|
1319
1390
|
* @maxLength 1000
|
|
1320
1391
|
*/
|
|
@@ -1328,17 +1399,23 @@ declare enum Segment {
|
|
|
1328
1399
|
/** @enumType */
|
|
1329
1400
|
type SegmentWithLiterals = Segment | 'UNKNOWN_SEGMENT' | 'PUBLIC' | 'DEV';
|
|
1330
1401
|
interface GetDataCollectionResponse {
|
|
1331
|
-
/**
|
|
1402
|
+
/** Requested collection. */
|
|
1332
1403
|
collection?: DataCollection;
|
|
1333
1404
|
}
|
|
1334
1405
|
interface ListDataCollectionsRequest {
|
|
1335
1406
|
/**
|
|
1336
1407
|
* Defines how collections in the response are sorted.
|
|
1337
1408
|
*
|
|
1338
|
-
*
|
|
1409
|
+
* Supported properties: `id`, `displayName`, `createdDate`, `updatedDate`.
|
|
1410
|
+
*
|
|
1411
|
+
* Default: `id` in ascending order.
|
|
1339
1412
|
*/
|
|
1340
1413
|
sort?: Sorting;
|
|
1341
|
-
/**
|
|
1414
|
+
/**
|
|
1415
|
+
* Pagination information. The maximum page size is `1000`.
|
|
1416
|
+
*
|
|
1417
|
+
* Default: `limit` is `1000` and `offset` is `0`.
|
|
1418
|
+
*/
|
|
1342
1419
|
paging?: Paging;
|
|
1343
1420
|
/**
|
|
1344
1421
|
* Whether to retrieve data from the primary database instance.
|
|
@@ -1349,8 +1426,9 @@ interface ListDataCollectionsRequest {
|
|
|
1349
1426
|
*/
|
|
1350
1427
|
consistentRead?: boolean;
|
|
1351
1428
|
/**
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1429
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
1430
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
1431
|
+
* An empty list returns all properties available to the caller.
|
|
1354
1432
|
* @maxSize 100
|
|
1355
1433
|
* @maxLength 128
|
|
1356
1434
|
*/
|
|
@@ -1413,7 +1491,13 @@ interface BulkGetDataCollectionsRequest {
|
|
|
1413
1491
|
* Default: `false`
|
|
1414
1492
|
*/
|
|
1415
1493
|
includeReferencedCollections?: boolean;
|
|
1416
|
-
/**
|
|
1494
|
+
/**
|
|
1495
|
+
* Sorting preferences for active and deleted collections. Results aren't returned in request order.
|
|
1496
|
+
*
|
|
1497
|
+
* Supported properties: `id`, `displayName`, `createdDate`, `updatedDate`.
|
|
1498
|
+
*
|
|
1499
|
+
* Default: `id` in ascending order.
|
|
1500
|
+
*/
|
|
1417
1501
|
sort?: Sorting;
|
|
1418
1502
|
/**
|
|
1419
1503
|
* Whether to retrieve data from the primary database instance.
|
|
@@ -1424,8 +1508,9 @@ interface BulkGetDataCollectionsRequest {
|
|
|
1424
1508
|
*/
|
|
1425
1509
|
consistentRead?: boolean;
|
|
1426
1510
|
/**
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1511
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
1512
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
1513
|
+
* An empty list returns all properties available to the caller.
|
|
1429
1514
|
* @maxSize 100
|
|
1430
1515
|
* @maxLength 1000
|
|
1431
1516
|
*/
|
|
@@ -1434,12 +1519,12 @@ interface BulkGetDataCollectionsRequest {
|
|
|
1434
1519
|
interface BulkGetDataCollectionsResponse {
|
|
1435
1520
|
/**
|
|
1436
1521
|
* List of requested collections.
|
|
1437
|
-
* When `
|
|
1522
|
+
* When `includeReferencedCollections` is `true` in the request, referenced collections are included here.
|
|
1438
1523
|
*/
|
|
1439
1524
|
activeCollections?: DataCollection[];
|
|
1440
1525
|
/** List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request. */
|
|
1441
1526
|
deletedCollections?: DataCollection[];
|
|
1442
|
-
/**
|
|
1527
|
+
/** Collections that couldn't be loaded, with an error for each failure. */
|
|
1443
1528
|
failedCollections?: FailedCollection[];
|
|
1444
1529
|
}
|
|
1445
1530
|
interface ApplicationError {
|
|
@@ -1452,7 +1537,7 @@ interface ApplicationError {
|
|
|
1452
1537
|
}
|
|
1453
1538
|
interface FailedCollection {
|
|
1454
1539
|
/**
|
|
1455
|
-
*
|
|
1540
|
+
* ID of the collection that couldn't be loaded.
|
|
1456
1541
|
* @maxLength 255
|
|
1457
1542
|
*/
|
|
1458
1543
|
collectionId?: string;
|
|
@@ -1478,13 +1563,13 @@ interface DeleteDataCollectionResponse {
|
|
|
1478
1563
|
}
|
|
1479
1564
|
interface RestoreDataCollectionRequest {
|
|
1480
1565
|
/**
|
|
1481
|
-
*
|
|
1566
|
+
* ID of the data collection to restore.
|
|
1482
1567
|
* @maxLength 256
|
|
1483
1568
|
*/
|
|
1484
1569
|
dataCollectionId?: string;
|
|
1485
1570
|
}
|
|
1486
1571
|
interface RestoreDataCollectionResponse {
|
|
1487
|
-
/** Restored data collection */
|
|
1572
|
+
/** Restored data collection. */
|
|
1488
1573
|
dataCollection?: DataCollection;
|
|
1489
1574
|
}
|
|
1490
1575
|
interface PatchDataCollectionRequest {
|
|
@@ -1574,7 +1659,11 @@ interface AddPublishPluginRequest {
|
|
|
1574
1659
|
dataCollectionId: string;
|
|
1575
1660
|
/** Publish plugin options. */
|
|
1576
1661
|
publishOptions: PublishPluginOptions;
|
|
1577
|
-
/**
|
|
1662
|
+
/**
|
|
1663
|
+
* Action to take when the Draft Items plugin is already installed.
|
|
1664
|
+
*
|
|
1665
|
+
* Default: `FAIL_WHEN_DRAFT_ITEMS_INSTALLED`.
|
|
1666
|
+
*/
|
|
1578
1667
|
draftItemsPluginConflictAction?: DraftItemsPluginConflictActionWithLiterals;
|
|
1579
1668
|
}
|
|
1580
1669
|
/** Behavior to apply when adding the Publish plugin to a collection that already has the Draft Items plugin. */
|
|
@@ -1611,7 +1700,10 @@ interface UpdatePublishPluginRequest {
|
|
|
1611
1700
|
* @maxLength 256
|
|
1612
1701
|
*/
|
|
1613
1702
|
dataCollectionId: string;
|
|
1614
|
-
/**
|
|
1703
|
+
/**
|
|
1704
|
+
* Replacement writable options for the Publish plugin. Omitted options use their defaults.
|
|
1705
|
+
* Server-managed lifecycle status is preserved.
|
|
1706
|
+
*/
|
|
1615
1707
|
publishOptions: PublishPluginOptions;
|
|
1616
1708
|
}
|
|
1617
1709
|
interface UpdatePublishPluginResponse {
|
|
@@ -1648,7 +1740,7 @@ interface UpdateUrlizedPluginRequest {
|
|
|
1648
1740
|
* @maxLength 256
|
|
1649
1741
|
*/
|
|
1650
1742
|
dataCollectionId: string;
|
|
1651
|
-
/**
|
|
1743
|
+
/** Replacement options for the Urlized plugin. Omitted options use their defaults. */
|
|
1652
1744
|
urlizedOptions: UrlizedPluginOptions;
|
|
1653
1745
|
}
|
|
1654
1746
|
interface UpdateUrlizedPluginResponse {
|
|
@@ -1685,7 +1777,7 @@ interface UpdateMultilingualPluginRequest {
|
|
|
1685
1777
|
* @maxLength 256
|
|
1686
1778
|
*/
|
|
1687
1779
|
dataCollectionId: string;
|
|
1688
|
-
/**
|
|
1780
|
+
/** Replacement options for the Multilingual plugin. Omitted options use their defaults. */
|
|
1689
1781
|
multilingualOptions: MultilingualOptions;
|
|
1690
1782
|
}
|
|
1691
1783
|
interface UpdateMultilingualPluginResponse {
|
|
@@ -1722,7 +1814,7 @@ interface UpdateCmsPluginRequest {
|
|
|
1722
1814
|
* @maxLength 256
|
|
1723
1815
|
*/
|
|
1724
1816
|
dataCollectionId: string;
|
|
1725
|
-
/**
|
|
1817
|
+
/** Replacement options for the CMS plugin. Omitted options use their defaults. */
|
|
1726
1818
|
cmsOptions: PluginCmsOptions;
|
|
1727
1819
|
}
|
|
1728
1820
|
interface UpdateCmsPluginResponse {
|
|
@@ -1759,7 +1851,7 @@ interface UpdateCatalogPluginRequest {
|
|
|
1759
1851
|
* @maxLength 256
|
|
1760
1852
|
*/
|
|
1761
1853
|
dataCollectionId: string;
|
|
1762
|
-
/**
|
|
1854
|
+
/** Replacement options for the Catalog plugin. Omitted options use their defaults. */
|
|
1763
1855
|
catalogOptions: CatalogOptions;
|
|
1764
1856
|
}
|
|
1765
1857
|
interface UpdateCatalogPluginResponse {
|
|
@@ -1774,7 +1866,11 @@ interface AddDraftItemsPluginRequest {
|
|
|
1774
1866
|
dataCollectionId: string;
|
|
1775
1867
|
/** Draft Items plugin options. */
|
|
1776
1868
|
draftItemsOptions: DraftItemsPluginOptions;
|
|
1777
|
-
/**
|
|
1869
|
+
/**
|
|
1870
|
+
* Action to take when the Publish plugin is already installed.
|
|
1871
|
+
*
|
|
1872
|
+
* Default: `FAIL_WHEN_PUBLISH_INSTALLED`.
|
|
1873
|
+
*/
|
|
1778
1874
|
publishPluginConflictAction?: PublishPluginConflictActionWithLiterals;
|
|
1779
1875
|
}
|
|
1780
1876
|
/** Behavior to apply when adding the Draft Items plugin to a collection that already has the Publish plugin. */
|
|
@@ -1796,7 +1892,11 @@ interface DeleteDraftItemsPluginRequest {
|
|
|
1796
1892
|
* @maxLength 256
|
|
1797
1893
|
*/
|
|
1798
1894
|
dataCollectionId: string;
|
|
1799
|
-
/**
|
|
1895
|
+
/**
|
|
1896
|
+
* Action to take for existing draft items.
|
|
1897
|
+
*
|
|
1898
|
+
* Default: `FAIL_IF_DRAFT_ITEMS_EXIST`.
|
|
1899
|
+
*/
|
|
1800
1900
|
draftItemsRemovalAction?: DraftItemsRemovalActionWithLiterals;
|
|
1801
1901
|
}
|
|
1802
1902
|
/** Behavior to apply to existing draft items when removing the Draft Items plugin. */
|
|
@@ -1820,7 +1920,10 @@ interface UpdateDraftItemsPluginRequest {
|
|
|
1820
1920
|
* @maxLength 256
|
|
1821
1921
|
*/
|
|
1822
1922
|
dataCollectionId: string;
|
|
1823
|
-
/**
|
|
1923
|
+
/**
|
|
1924
|
+
* Replacement writable options for the Draft Items plugin. Omitted options use their defaults.
|
|
1925
|
+
* Server-managed paired collection IDs are preserved.
|
|
1926
|
+
*/
|
|
1824
1927
|
draftItemsOptions: DraftItemsPluginOptions;
|
|
1825
1928
|
}
|
|
1826
1929
|
interface UpdateDraftItemsPluginResponse {
|
|
@@ -1833,7 +1936,7 @@ interface PatchDataCollectionFieldRequest {
|
|
|
1833
1936
|
* @maxLength 256
|
|
1834
1937
|
*/
|
|
1835
1938
|
dataCollectionId: string;
|
|
1836
|
-
/** Field to update. */
|
|
1939
|
+
/** Field to update. Specify `key` to identify the existing field. */
|
|
1837
1940
|
field: Field;
|
|
1838
1941
|
}
|
|
1839
1942
|
interface PatchDataCollectionFieldResponse {
|
|
@@ -1854,6 +1957,7 @@ interface UpdateDataPermissionsResponse {
|
|
|
1854
1957
|
dataCollection?: DataCollection;
|
|
1855
1958
|
}
|
|
1856
1959
|
interface BulkGetDataCollectionsPageBySnapshotsRequest extends BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf {
|
|
1960
|
+
/** App whose collection snapshots to retrieve. */
|
|
1857
1961
|
appOptions?: AppOptions;
|
|
1858
1962
|
/**
|
|
1859
1963
|
* Ids of schema snapshot
|
|
@@ -1872,6 +1976,7 @@ interface BulkGetDataCollectionsPageBySnapshotsRequest extends BulkGetDataCollec
|
|
|
1872
1976
|
}
|
|
1873
1977
|
/** @oneof */
|
|
1874
1978
|
interface BulkGetDataCollectionsPageBySnapshotsRequestTenantModeOptionsOneOf {
|
|
1979
|
+
/** App whose collection snapshots to retrieve. */
|
|
1875
1980
|
appOptions?: AppOptions;
|
|
1876
1981
|
}
|
|
1877
1982
|
declare enum TenantMode {
|
|
@@ -2152,15 +2257,27 @@ interface DeleteDataCollectionsSnapshotRequest {
|
|
|
2152
2257
|
interface DeleteDataCollectionsSnapshotResponse {
|
|
2153
2258
|
}
|
|
2154
2259
|
interface CreateMigratedCollectionsSnapshotRequest {
|
|
2155
|
-
/**
|
|
2260
|
+
/**
|
|
2261
|
+
* ID of the source snapshot.
|
|
2262
|
+
* @format GUID
|
|
2263
|
+
*/
|
|
2156
2264
|
existingSnapshotId?: string;
|
|
2157
|
-
/**
|
|
2265
|
+
/**
|
|
2266
|
+
* Namespace to assign to collections in the new snapshot.
|
|
2267
|
+
* @maxLength 255
|
|
2268
|
+
*/
|
|
2158
2269
|
newNamespace?: string;
|
|
2159
|
-
/**
|
|
2270
|
+
/**
|
|
2271
|
+
* Namespace to replace in the source snapshot.
|
|
2272
|
+
* @maxLength 255
|
|
2273
|
+
*/
|
|
2160
2274
|
existingNamespace?: string;
|
|
2161
2275
|
}
|
|
2162
2276
|
interface CreateMigratedCollectionsSnapshotResponse {
|
|
2163
|
-
/**
|
|
2277
|
+
/**
|
|
2278
|
+
* ID of the created snapshot.
|
|
2279
|
+
* @format GUID
|
|
2280
|
+
*/
|
|
2164
2281
|
snapshotId?: string;
|
|
2165
2282
|
}
|
|
2166
2283
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -2317,7 +2434,7 @@ interface AccountInfo {
|
|
|
2317
2434
|
siteId?: string | null;
|
|
2318
2435
|
}
|
|
2319
2436
|
/**
|
|
2320
|
-
* Creates a
|
|
2437
|
+
* Creates a data collection.
|
|
2321
2438
|
*
|
|
2322
2439
|
* The request body must include an ID, details for at least 1 field, and a permissions object. If any of these are missing, the collection isn't created.
|
|
2323
2440
|
* @param collection - Collection details.
|
|
@@ -2333,25 +2450,26 @@ interface AccountInfo {
|
|
|
2333
2450
|
* @param options - Options for creating a data collection.
|
|
2334
2451
|
* @permissionId WIX_DATA.CREATE_COLLECTION
|
|
2335
2452
|
* @applicableIdentity APP
|
|
2336
|
-
* @returns
|
|
2453
|
+
* @returns Created collection.
|
|
2337
2454
|
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollection
|
|
2338
2455
|
*/
|
|
2339
2456
|
declare function createDataCollection(collection: NonNullablePaths<DataCollection, `_id` | `fields.${number}.key` | `fields.${number}.type` | `permissions.insert` | `permissions.read` | `permissions.remove` | `permissions.update`, 2>): Promise<NonNullablePaths<DataCollection, `_id` | `collectionType` | `defaultDisplayOrder.fieldKey` | `defaultDisplayOrder.direction` | `capabilities.dataOperations` | `capabilities.collectionOperations` | `capabilities.indexLimits.regular` | `capabilities.indexLimits.unique` | `capabilities.indexLimits.total` | `fields` | `fields.${number}.key` | `fields.${number}.type` | `fields.${number}.typeMetadata.reference.referencedCollectionId` | `fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `fields.${number}.typeMetadata.array.elementType` | `fields.${number}.systemField` | `fields.${number}.capabilities.sortable` | `fields.${number}.encrypted` | `fields.${number}.condition.permission` | `permissions.insert` | `permissions.update` | `permissions.remove` | `permissions.read` | `plugins` | `plugins.${number}.publishOptions.defaultStatus` | `plugins.${number}.singleItemOptions.singleItemId` | `plugins.${number}.urlizedOptions.format` | `plugins.${number}.editablePageLinkOptions.isPersisted` | `plugins.${number}.editablePageLinkOptions.isMutable` | `plugins.${number}.type` | `pagingModes` | `deprecation.deprecated`, 4>>;
|
|
2340
2457
|
/**
|
|
2341
2458
|
* Retrieves a data collection by ID.
|
|
2342
2459
|
*
|
|
2343
|
-
*
|
|
2344
|
-
*
|
|
2345
|
-
*
|
|
2346
|
-
*
|
|
2347
|
-
*
|
|
2460
|
+
* Calls made with a visitor (unauthenticated) identity return a limited collection view.
|
|
2461
|
+
* The response includes display information, plugins, paging information, and supported operations.
|
|
2462
|
+
* It omits permissions, creation and update dates, index limits, and field descriptions and encryption settings.
|
|
2463
|
+
* Other identities return the full collection, subject to the requested field selection.
|
|
2464
|
+
*
|
|
2465
|
+
* To retrieve multiple collections in one call, use [Bulk Get Data Collections](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/bulk-get-data-collections).
|
|
2348
2466
|
* @param dataCollectionId - ID of the collection to retrieve.
|
|
2349
2467
|
* @public
|
|
2350
2468
|
* @requiredField dataCollectionId
|
|
2351
2469
|
* @param options - Options for retrieving a data collection.
|
|
2352
2470
|
* @permissionId WIX_DATA.GET_COLLECTION
|
|
2353
2471
|
* @applicableIdentity APP
|
|
2354
|
-
* @returns
|
|
2472
|
+
* @returns Requested collection.
|
|
2355
2473
|
* @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.GetDataCollection
|
|
2356
2474
|
*/
|
|
2357
2475
|
declare function getDataCollection(dataCollectionId: string, options?: GetDataCollectionOptions): Promise<NonNullablePaths<DataCollection, `_id` | `collectionType` | `defaultDisplayOrder.fieldKey` | `defaultDisplayOrder.direction` | `capabilities.dataOperations` | `capabilities.collectionOperations` | `capabilities.indexLimits.regular` | `capabilities.indexLimits.unique` | `capabilities.indexLimits.total` | `fields` | `fields.${number}.key` | `fields.${number}.type` | `fields.${number}.typeMetadata.reference.referencedCollectionId` | `fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `fields.${number}.typeMetadata.array.elementType` | `fields.${number}.systemField` | `fields.${number}.capabilities.sortable` | `fields.${number}.encrypted` | `fields.${number}.condition.permission` | `permissions.insert` | `permissions.update` | `permissions.remove` | `permissions.read` | `plugins` | `plugins.${number}.publishOptions.defaultStatus` | `plugins.${number}.singleItemOptions.singleItemId` | `plugins.${number}.urlizedOptions.format` | `plugins.${number}.editablePageLinkOptions.isPersisted` | `plugins.${number}.editablePageLinkOptions.isMutable` | `plugins.${number}.type` | `pagingModes` | `deprecation.deprecated`, 4>>;
|
|
@@ -2365,17 +2483,20 @@ interface GetDataCollectionOptions {
|
|
|
2365
2483
|
*/
|
|
2366
2484
|
consistentRead?: boolean;
|
|
2367
2485
|
/**
|
|
2368
|
-
*
|
|
2369
|
-
*
|
|
2486
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
2487
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
2488
|
+
* An empty list returns all properties available to the caller.
|
|
2370
2489
|
* @maxSize 100
|
|
2371
2490
|
* @maxLength 1000
|
|
2372
2491
|
*/
|
|
2373
2492
|
fields?: string[];
|
|
2374
2493
|
}
|
|
2375
2494
|
/**
|
|
2376
|
-
* Retrieves a
|
|
2495
|
+
* Retrieves a page of data collections associated with the site or project.
|
|
2377
2496
|
*
|
|
2378
|
-
* By default,
|
|
2497
|
+
* By default, results are sorted by `id` in ascending order, `paging.limit` is `1000`, and `paging.offset` is `0`.
|
|
2498
|
+
* The maximum page size is `1000`. Larger limits are reduced to `1000`.
|
|
2499
|
+
* To retrieve the next page, increase `paging.offset` by the number of collections returned.
|
|
2379
2500
|
* @public
|
|
2380
2501
|
* @param options - Options for retrieving a list of data collections.
|
|
2381
2502
|
* @permissionId WIX_DATA.LIST_COLLECTIONS
|
|
@@ -2387,10 +2508,16 @@ interface ListDataCollectionsOptions {
|
|
|
2387
2508
|
/**
|
|
2388
2509
|
* Defines how collections in the response are sorted.
|
|
2389
2510
|
*
|
|
2390
|
-
*
|
|
2511
|
+
* Supported properties: `id`, `displayName`, `createdDate`, `updatedDate`.
|
|
2512
|
+
*
|
|
2513
|
+
* Default: `id` in ascending order.
|
|
2391
2514
|
*/
|
|
2392
2515
|
sort?: Sorting;
|
|
2393
|
-
/**
|
|
2516
|
+
/**
|
|
2517
|
+
* Pagination information. The maximum page size is `1000`.
|
|
2518
|
+
*
|
|
2519
|
+
* Default: `limit` is `1000` and `offset` is `0`.
|
|
2520
|
+
*/
|
|
2394
2521
|
paging?: Paging;
|
|
2395
2522
|
/**
|
|
2396
2523
|
* Whether to retrieve data from the primary database instance.
|
|
@@ -2401,8 +2528,9 @@ interface ListDataCollectionsOptions {
|
|
|
2401
2528
|
*/
|
|
2402
2529
|
consistentRead?: boolean;
|
|
2403
2530
|
/**
|
|
2404
|
-
*
|
|
2405
|
-
*
|
|
2531
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
2532
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
2533
|
+
* An empty list returns all properties available to the caller.
|
|
2406
2534
|
* @maxSize 100
|
|
2407
2535
|
* @maxLength 128
|
|
2408
2536
|
*/
|
|
@@ -2411,11 +2539,16 @@ interface ListDataCollectionsOptions {
|
|
|
2411
2539
|
/**
|
|
2412
2540
|
* Retrieves multiple data collections by ID.
|
|
2413
2541
|
*
|
|
2414
|
-
*
|
|
2415
|
-
*
|
|
2416
|
-
*
|
|
2417
|
-
*
|
|
2418
|
-
*
|
|
2542
|
+
* Calls made with a visitor (unauthenticated) identity return a limited collection view.
|
|
2543
|
+
* The response includes display information, plugins, paging information, and supported operations.
|
|
2544
|
+
* It omits permissions, creation and update dates, index limits, and field descriptions and encryption settings.
|
|
2545
|
+
* Other identities return the full collection, subject to the requested field selection.
|
|
2546
|
+
*
|
|
2547
|
+
* Successful results are returned in `activeCollections` and, when requested, `deletedCollections`.
|
|
2548
|
+
* Collection loading failures are returned separately in `failedCollections`.
|
|
2549
|
+
* Results are sorted by `id` in ascending order unless `sort` specifies a different order.
|
|
2550
|
+
*
|
|
2551
|
+
* To retrieve a single collection, call [Get Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/get-data-collection).
|
|
2419
2552
|
* @public
|
|
2420
2553
|
* @documentationMaturity preview
|
|
2421
2554
|
* @permissionId WIX_DATA.BULK_GET_COLLECTIONS
|
|
@@ -2443,7 +2576,13 @@ interface BulkGetDataCollectionsOptions {
|
|
|
2443
2576
|
* Default: `false`
|
|
2444
2577
|
*/
|
|
2445
2578
|
includeReferencedCollections?: boolean;
|
|
2446
|
-
/**
|
|
2579
|
+
/**
|
|
2580
|
+
* Sorting preferences for active and deleted collections. Results aren't returned in request order.
|
|
2581
|
+
*
|
|
2582
|
+
* Supported properties: `id`, `displayName`, `createdDate`, `updatedDate`.
|
|
2583
|
+
*
|
|
2584
|
+
* Default: `id` in ascending order.
|
|
2585
|
+
*/
|
|
2447
2586
|
sort?: Sorting;
|
|
2448
2587
|
/**
|
|
2449
2588
|
* Whether to retrieve data from the primary database instance.
|
|
@@ -2454,8 +2593,9 @@ interface BulkGetDataCollectionsOptions {
|
|
|
2454
2593
|
*/
|
|
2455
2594
|
consistentRead?: boolean;
|
|
2456
2595
|
/**
|
|
2457
|
-
*
|
|
2458
|
-
*
|
|
2596
|
+
* Top-level collection properties to return, using camelCase names, such as `displayName`.
|
|
2597
|
+
* Applies to every returned collection. `id`, `revision`, and `collectionType` are always retained.
|
|
2598
|
+
* An empty list returns all properties available to the caller.
|
|
2459
2599
|
* @maxSize 100
|
|
2460
2600
|
* @maxLength 1000
|
|
2461
2601
|
*/
|
|
@@ -2505,7 +2645,7 @@ declare function updateDataCollection(collection: NonNullablePaths<DataCollectio
|
|
|
2505
2645
|
*
|
|
2506
2646
|
* Before deleting a collection:
|
|
2507
2647
|
* - Make sure the collection isn't connected to any site pages or elements.
|
|
2508
|
-
* - You can create a manual backup of
|
|
2648
|
+
* - You can create a manual backup of collections with the Backups API, in case you need to restore them later.
|
|
2509
2649
|
* - You can also export a collection to a CSV file with the Data Movement Jobs API, if you want to save the data outside of Wix.
|
|
2510
2650
|
*
|
|
2511
2651
|
* > **Note:**
|
|
@@ -2519,10 +2659,10 @@ declare function updateDataCollection(collection: NonNullablePaths<DataCollectio
|
|
|
2519
2659
|
*/
|
|
2520
2660
|
declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
|
|
2521
2661
|
/**
|
|
2522
|
-
* Restores recently deleted collection.
|
|
2662
|
+
* Restores a recently deleted data collection.
|
|
2523
2663
|
*
|
|
2524
2664
|
* Fails with `WDE0025` if collection was deleted too long ago or has never existed.
|
|
2525
|
-
* @param dataCollectionId -
|
|
2665
|
+
* @param dataCollectionId - ID of the data collection to restore.
|
|
2526
2666
|
* @public
|
|
2527
2667
|
* @documentationMaturity preview
|
|
2528
2668
|
* @requiredField dataCollectionId
|
|
@@ -2579,6 +2719,8 @@ interface PatchDataCollection {
|
|
|
2579
2719
|
maxPageSize?: number | null;
|
|
2580
2720
|
/**
|
|
2581
2721
|
* Collection's display name as shown in the CMS. For example, `My First Collection`.
|
|
2722
|
+
*
|
|
2723
|
+
* Default: The collection ID.
|
|
2582
2724
|
* @maxLength 1000
|
|
2583
2725
|
*/
|
|
2584
2726
|
displayName?: string | null;
|
|
@@ -2596,6 +2738,8 @@ interface PatchDataCollection {
|
|
|
2596
2738
|
displayNamespace?: string | null;
|
|
2597
2739
|
/**
|
|
2598
2740
|
* Field whose value the CMS displays to represent the collection item when referenced in a different collection.
|
|
2741
|
+
*
|
|
2742
|
+
* Default: The first field in the request, or `title` if no fields are specified.
|
|
2599
2743
|
* @maxLength 1000
|
|
2600
2744
|
*/
|
|
2601
2745
|
displayField?: string | null;
|
|
@@ -2663,13 +2807,13 @@ interface CreateDataCollectionFieldOptions {
|
|
|
2663
2807
|
field: Field;
|
|
2664
2808
|
}
|
|
2665
2809
|
/**
|
|
2666
|
-
*
|
|
2810
|
+
* Replaces the definition of a field in a data collection.
|
|
2667
2811
|
*
|
|
2668
2812
|
* <blockquote class="important">
|
|
2669
2813
|
* <strong>Important:</strong>
|
|
2670
2814
|
*
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
2815
|
+
* The field identified by `field.key` is replaced with the supplied definition.
|
|
2816
|
+
* Properties omitted from that field definition aren't preserved. Other fields in the collection aren't replaced.<br/><br/>
|
|
2673
2817
|
*
|
|
2674
2818
|
* To update only specific properties in the array without affecting others, use [Patch Data Collection Field](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection-field).
|
|
2675
2819
|
* </blockquote>
|
|
@@ -2753,6 +2897,8 @@ interface DeleteDataCollectionPluginOptions {
|
|
|
2753
2897
|
}
|
|
2754
2898
|
/**
|
|
2755
2899
|
* Adds the Publish plugin to a data collection.
|
|
2900
|
+
*
|
|
2901
|
+
* Fails if the collection already has this plugin.
|
|
2756
2902
|
* @public
|
|
2757
2903
|
* @documentationMaturity preview
|
|
2758
2904
|
* @requiredField dataCollectionId
|
|
@@ -2768,11 +2914,17 @@ declare function addPublishPlugin(dataCollectionId: string, options?: NonNullabl
|
|
|
2768
2914
|
interface AddPublishPluginOptions {
|
|
2769
2915
|
/** Publish plugin options. */
|
|
2770
2916
|
publishOptions: PublishPluginOptions;
|
|
2771
|
-
/**
|
|
2917
|
+
/**
|
|
2918
|
+
* Action to take when the Draft Items plugin is already installed.
|
|
2919
|
+
*
|
|
2920
|
+
* Default: `FAIL_WHEN_DRAFT_ITEMS_INSTALLED`.
|
|
2921
|
+
*/
|
|
2772
2922
|
draftItemsPluginConflictAction?: DraftItemsPluginConflictActionWithLiterals;
|
|
2773
2923
|
}
|
|
2774
2924
|
/**
|
|
2775
2925
|
* Removes the Publish plugin from a data collection.
|
|
2926
|
+
*
|
|
2927
|
+
* Fails if the collection doesn't have this plugin.
|
|
2776
2928
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2777
2929
|
* @public
|
|
2778
2930
|
* @documentationMaturity preview
|
|
@@ -2784,6 +2936,9 @@ interface AddPublishPluginOptions {
|
|
|
2784
2936
|
declare function deletePublishPlugin(dataCollectionId: string): Promise<NonNullablePaths<DeletePublishPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2785
2937
|
/**
|
|
2786
2938
|
* Updates the Publish plugin options on a data collection.
|
|
2939
|
+
*
|
|
2940
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
2941
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
2787
2942
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2788
2943
|
* @public
|
|
2789
2944
|
* @documentationMaturity preview
|
|
@@ -2796,11 +2951,16 @@ declare function deletePublishPlugin(dataCollectionId: string): Promise<NonNulla
|
|
|
2796
2951
|
*/
|
|
2797
2952
|
declare function updatePublishPlugin(dataCollectionId: string, options: NonNullablePaths<UpdatePublishPluginOptions, `publishOptions`, 0>): Promise<NonNullablePaths<UpdatePublishPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2798
2953
|
interface UpdatePublishPluginOptions {
|
|
2799
|
-
/**
|
|
2954
|
+
/**
|
|
2955
|
+
* Replacement writable options for the Publish plugin. Omitted options use their defaults.
|
|
2956
|
+
* Server-managed lifecycle status is preserved.
|
|
2957
|
+
*/
|
|
2800
2958
|
publishOptions: PublishPluginOptions;
|
|
2801
2959
|
}
|
|
2802
2960
|
/**
|
|
2803
2961
|
* Adds the Urlized plugin to a data collection.
|
|
2962
|
+
*
|
|
2963
|
+
* Fails if the collection already has this plugin.
|
|
2804
2964
|
* @public
|
|
2805
2965
|
* @documentationMaturity preview
|
|
2806
2966
|
* @requiredField dataCollectionId
|
|
@@ -2819,6 +2979,8 @@ interface AddUrlizedPluginOptions {
|
|
|
2819
2979
|
}
|
|
2820
2980
|
/**
|
|
2821
2981
|
* Removes the Urlized plugin from a data collection.
|
|
2982
|
+
*
|
|
2983
|
+
* Fails if the collection doesn't have this plugin.
|
|
2822
2984
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2823
2985
|
* @public
|
|
2824
2986
|
* @documentationMaturity preview
|
|
@@ -2830,6 +2992,9 @@ interface AddUrlizedPluginOptions {
|
|
|
2830
2992
|
declare function deleteUrlizedPlugin(dataCollectionId: string): Promise<NonNullablePaths<DeleteUrlizedPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2831
2993
|
/**
|
|
2832
2994
|
* Updates the Urlized plugin options on a data collection.
|
|
2995
|
+
*
|
|
2996
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
2997
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
2833
2998
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2834
2999
|
* @public
|
|
2835
3000
|
* @documentationMaturity preview
|
|
@@ -2842,11 +3007,13 @@ declare function deleteUrlizedPlugin(dataCollectionId: string): Promise<NonNulla
|
|
|
2842
3007
|
*/
|
|
2843
3008
|
declare function updateUrlizedPlugin(dataCollectionId: string, options: NonNullablePaths<UpdateUrlizedPluginOptions, `urlizedOptions`, 0>): Promise<NonNullablePaths<UpdateUrlizedPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2844
3009
|
interface UpdateUrlizedPluginOptions {
|
|
2845
|
-
/**
|
|
3010
|
+
/** Replacement options for the Urlized plugin. Omitted options use their defaults. */
|
|
2846
3011
|
urlizedOptions: UrlizedPluginOptions;
|
|
2847
3012
|
}
|
|
2848
3013
|
/**
|
|
2849
3014
|
* Adds the Multilingual plugin to a data collection.
|
|
3015
|
+
*
|
|
3016
|
+
* Fails if the collection already has this plugin.
|
|
2850
3017
|
* @public
|
|
2851
3018
|
* @documentationMaturity preview
|
|
2852
3019
|
* @requiredField dataCollectionId
|
|
@@ -2865,6 +3032,8 @@ interface AddMultilingualPluginOptions {
|
|
|
2865
3032
|
}
|
|
2866
3033
|
/**
|
|
2867
3034
|
* Removes the Multilingual plugin from a data collection.
|
|
3035
|
+
*
|
|
3036
|
+
* Fails if the collection doesn't have this plugin.
|
|
2868
3037
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2869
3038
|
* @public
|
|
2870
3039
|
* @documentationMaturity preview
|
|
@@ -2876,6 +3045,9 @@ interface AddMultilingualPluginOptions {
|
|
|
2876
3045
|
declare function deleteMultilingualPlugin(dataCollectionId: string): Promise<NonNullablePaths<DeleteMultilingualPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2877
3046
|
/**
|
|
2878
3047
|
* Updates the Multilingual plugin options on a data collection.
|
|
3048
|
+
*
|
|
3049
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
3050
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
2879
3051
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2880
3052
|
* @public
|
|
2881
3053
|
* @documentationMaturity preview
|
|
@@ -2888,11 +3060,13 @@ declare function deleteMultilingualPlugin(dataCollectionId: string): Promise<Non
|
|
|
2888
3060
|
*/
|
|
2889
3061
|
declare function updateMultilingualPlugin(dataCollectionId: string, options: NonNullablePaths<UpdateMultilingualPluginOptions, `multilingualOptions`, 0>): Promise<NonNullablePaths<UpdateMultilingualPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2890
3062
|
interface UpdateMultilingualPluginOptions {
|
|
2891
|
-
/**
|
|
3063
|
+
/** Replacement options for the Multilingual plugin. Omitted options use their defaults. */
|
|
2892
3064
|
multilingualOptions: MultilingualOptions;
|
|
2893
3065
|
}
|
|
2894
3066
|
/**
|
|
2895
3067
|
* Adds the CMS plugin to a data collection.
|
|
3068
|
+
*
|
|
3069
|
+
* Fails if the collection already has this plugin.
|
|
2896
3070
|
* @public
|
|
2897
3071
|
* @documentationMaturity preview
|
|
2898
3072
|
* @requiredField dataCollectionId
|
|
@@ -2911,6 +3085,8 @@ interface AddCmsPluginOptions {
|
|
|
2911
3085
|
}
|
|
2912
3086
|
/**
|
|
2913
3087
|
* Removes the CMS plugin from a data collection.
|
|
3088
|
+
*
|
|
3089
|
+
* Fails if the collection doesn't have this plugin.
|
|
2914
3090
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2915
3091
|
* @public
|
|
2916
3092
|
* @documentationMaturity preview
|
|
@@ -2922,6 +3098,9 @@ interface AddCmsPluginOptions {
|
|
|
2922
3098
|
declare function deleteCmsPlugin(dataCollectionId: string): Promise<NonNullablePaths<DeleteCmsPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2923
3099
|
/**
|
|
2924
3100
|
* Updates the CMS plugin options on a data collection.
|
|
3101
|
+
*
|
|
3102
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
3103
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
2925
3104
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2926
3105
|
* @public
|
|
2927
3106
|
* @documentationMaturity preview
|
|
@@ -2934,11 +3113,13 @@ declare function deleteCmsPlugin(dataCollectionId: string): Promise<NonNullableP
|
|
|
2934
3113
|
*/
|
|
2935
3114
|
declare function updateCmsPlugin(dataCollectionId: string, options: NonNullablePaths<UpdateCmsPluginOptions, `cmsOptions`, 0>): Promise<NonNullablePaths<UpdateCmsPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2936
3115
|
interface UpdateCmsPluginOptions {
|
|
2937
|
-
/**
|
|
3116
|
+
/** Replacement options for the CMS plugin. Omitted options use their defaults. */
|
|
2938
3117
|
cmsOptions: PluginCmsOptions;
|
|
2939
3118
|
}
|
|
2940
3119
|
/**
|
|
2941
3120
|
* Adds the Catalog plugin to a data collection.
|
|
3121
|
+
*
|
|
3122
|
+
* Fails if the collection already has this plugin.
|
|
2942
3123
|
* @public
|
|
2943
3124
|
* @documentationMaturity preview
|
|
2944
3125
|
* @requiredField dataCollectionId
|
|
@@ -2957,6 +3138,8 @@ interface AddCatalogPluginOptions {
|
|
|
2957
3138
|
}
|
|
2958
3139
|
/**
|
|
2959
3140
|
* Removes the Catalog plugin from a data collection.
|
|
3141
|
+
*
|
|
3142
|
+
* Fails if the collection doesn't have this plugin.
|
|
2960
3143
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2961
3144
|
* @public
|
|
2962
3145
|
* @documentationMaturity preview
|
|
@@ -2968,6 +3151,9 @@ interface AddCatalogPluginOptions {
|
|
|
2968
3151
|
declare function deleteCatalogPlugin(dataCollectionId: string): Promise<NonNullablePaths<DeleteCatalogPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2969
3152
|
/**
|
|
2970
3153
|
* Updates the Catalog plugin options on a data collection.
|
|
3154
|
+
*
|
|
3155
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
3156
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
2971
3157
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2972
3158
|
* @public
|
|
2973
3159
|
* @documentationMaturity preview
|
|
@@ -2980,11 +3166,13 @@ declare function deleteCatalogPlugin(dataCollectionId: string): Promise<NonNulla
|
|
|
2980
3166
|
*/
|
|
2981
3167
|
declare function updateCatalogPlugin(dataCollectionId: string, options: NonNullablePaths<UpdateCatalogPluginOptions, `catalogOptions`, 0>): Promise<NonNullablePaths<UpdateCatalogPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
2982
3168
|
interface UpdateCatalogPluginOptions {
|
|
2983
|
-
/**
|
|
3169
|
+
/** Replacement options for the Catalog plugin. Omitted options use their defaults. */
|
|
2984
3170
|
catalogOptions: CatalogOptions;
|
|
2985
3171
|
}
|
|
2986
3172
|
/**
|
|
2987
3173
|
* Adds the Draft Items plugin to a data collection.
|
|
3174
|
+
*
|
|
3175
|
+
* Fails if the collection already has this plugin.
|
|
2988
3176
|
* @public
|
|
2989
3177
|
* @documentationMaturity preview
|
|
2990
3178
|
* @requiredField dataCollectionId
|
|
@@ -3000,11 +3188,17 @@ declare function addDraftItemsPlugin(dataCollectionId: string, options?: NonNull
|
|
|
3000
3188
|
interface AddDraftItemsPluginOptions {
|
|
3001
3189
|
/** Draft Items plugin options. */
|
|
3002
3190
|
draftItemsOptions: DraftItemsPluginOptions;
|
|
3003
|
-
/**
|
|
3191
|
+
/**
|
|
3192
|
+
* Action to take when the Publish plugin is already installed.
|
|
3193
|
+
*
|
|
3194
|
+
* Default: `FAIL_WHEN_PUBLISH_INSTALLED`.
|
|
3195
|
+
*/
|
|
3004
3196
|
publishPluginConflictAction?: PublishPluginConflictActionWithLiterals;
|
|
3005
3197
|
}
|
|
3006
3198
|
/**
|
|
3007
3199
|
* Removes the Draft Items plugin from a data collection.
|
|
3200
|
+
*
|
|
3201
|
+
* Fails if the collection doesn't have this plugin.
|
|
3008
3202
|
* @param dataCollectionId - ID of the data collection to update.
|
|
3009
3203
|
* @public
|
|
3010
3204
|
* @documentationMaturity preview
|
|
@@ -3016,11 +3210,18 @@ interface AddDraftItemsPluginOptions {
|
|
|
3016
3210
|
*/
|
|
3017
3211
|
declare function deleteDraftItemsPlugin(dataCollectionId: string, options?: DeleteDraftItemsPluginOptions): Promise<NonNullablePaths<DeleteDraftItemsPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
3018
3212
|
interface DeleteDraftItemsPluginOptions {
|
|
3019
|
-
/**
|
|
3213
|
+
/**
|
|
3214
|
+
* Action to take for existing draft items.
|
|
3215
|
+
*
|
|
3216
|
+
* Default: `FAIL_IF_DRAFT_ITEMS_EXIST`.
|
|
3217
|
+
*/
|
|
3020
3218
|
draftItemsRemovalAction?: DraftItemsRemovalActionWithLiterals;
|
|
3021
3219
|
}
|
|
3022
3220
|
/**
|
|
3023
3221
|
* Updates the Draft Items plugin options on a data collection.
|
|
3222
|
+
*
|
|
3223
|
+
* The plugin must already be installed. The supplied options replace its writable options; omitted options use their defaults.
|
|
3224
|
+
* Server-managed properties are preserved, and other plugins aren't changed.
|
|
3024
3225
|
* @param dataCollectionId - ID of the data collection to update.
|
|
3025
3226
|
* @public
|
|
3026
3227
|
* @documentationMaturity preview
|
|
@@ -3033,17 +3234,20 @@ interface DeleteDraftItemsPluginOptions {
|
|
|
3033
3234
|
*/
|
|
3034
3235
|
declare function updateDraftItemsPlugin(dataCollectionId: string, options: NonNullablePaths<UpdateDraftItemsPluginOptions, `draftItemsOptions`, 0>): Promise<NonNullablePaths<UpdateDraftItemsPluginResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.fields.${number}.condition.permission` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes` | `dataCollection.deprecation.deprecated`, 5>>;
|
|
3035
3236
|
interface UpdateDraftItemsPluginOptions {
|
|
3036
|
-
/**
|
|
3237
|
+
/**
|
|
3238
|
+
* Replacement writable options for the Draft Items plugin. Omitted options use their defaults.
|
|
3239
|
+
* Server-managed paired collection IDs are preserved.
|
|
3240
|
+
*/
|
|
3037
3241
|
draftItemsOptions: DraftItemsPluginOptions;
|
|
3038
3242
|
}
|
|
3039
3243
|
/**
|
|
3040
|
-
* Updates specified properties
|
|
3244
|
+
* Updates specified properties of a field in a data collection.
|
|
3041
3245
|
*
|
|
3042
3246
|
* When you change a field's type, existing values aren't migrated. Use [Bulk Update Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-update-data-items) or [Bulk Patch Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-patch-data-items) to update item values to match the new type.
|
|
3043
3247
|
*
|
|
3044
3248
|
* To update properties in a data collection other than `fields`, use [Patch Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection).
|
|
3045
3249
|
* @param dataCollectionId - ID of the data collection to update.
|
|
3046
|
-
* @param field - Field to update.
|
|
3250
|
+
* @param field - Field to update. Specify `key` to identify the existing field.
|
|
3047
3251
|
* @public
|
|
3048
3252
|
* @requiredField dataCollectionId
|
|
3049
3253
|
* @requiredField field
|