@wix/data 1.0.72 → 1.0.74
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.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.http.js +10 -54
- package/build/cjs/src/data-v1-external-database-connection.http.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.d.ts +1 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.js +5 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.public.d.ts +2 -5
- package/build/cjs/src/data-v1-external-database-connection.public.js +2 -1
- package/build/cjs/src/data-v1-external-database-connection.public.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.types.d.ts +16 -13
- package/build/cjs/src/data-v1-external-database-connection.types.js +21 -5
- package/build/cjs/src/data-v1-external-database-connection.types.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +16 -37
- package/build/cjs/src/data-v1-external-database-connection.universal.js +52 -22
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.http.js +111 -115
- package/build/cjs/src/data-v2-data-collection.http.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-data-collection.meta.js +5 -1
- package/build/cjs/src/data-v2-data-collection.meta.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.public.d.ts +4 -4
- package/build/cjs/src/data-v2-data-collection.public.js +3 -1
- package/build/cjs/src/data-v2-data-collection.public.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.types.d.ts +92 -0
- package/build/cjs/src/data-v2-data-collection.types.js +40 -14
- package/build/cjs/src/data-v2-data-collection.types.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.universal.d.ts +92 -0
- package/build/cjs/src/data-v2-data-collection.universal.js +78 -31
- package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.http.js +42 -190
- package/build/cjs/src/data-v2-data-item.http.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-data-item.meta.js +5 -1
- package/build/cjs/src/data-v2-data-item.meta.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.public.d.ts +12 -12
- package/build/cjs/src/data-v2-data-item.types.js +4 -4
- package/build/cjs/src/data-v2-data-item.types.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.universal.js +202 -68
- package/build/cjs/src/data-v2-data-item.universal.js.map +1 -1
- package/build/cjs/src/data-v2-index.http.js +6 -28
- package/build/cjs/src/data-v2-index.http.js.map +1 -1
- package/build/cjs/src/data-v2-index.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-index.meta.js +5 -1
- package/build/cjs/src/data-v2-index.meta.js.map +1 -1
- package/build/cjs/src/data-v2-index.public.d.ts +1 -1
- package/build/cjs/src/data-v2-index.types.js +3 -3
- package/build/cjs/src/data-v2-index.types.js.map +1 -1
- package/build/cjs/src/data-v2-index.universal.js +30 -16
- package/build/cjs/src/data-v2-index.universal.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.http.js +10 -54
- package/build/es/src/data-v1-external-database-connection.http.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.meta.d.ts +1 -1
- package/build/es/src/data-v1-external-database-connection.public.d.ts +2 -5
- package/build/es/src/data-v1-external-database-connection.public.js +1 -1
- package/build/es/src/data-v1-external-database-connection.public.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.types.d.ts +16 -13
- package/build/es/src/data-v1-external-database-connection.types.js +16 -0
- package/build/es/src/data-v1-external-database-connection.types.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.universal.d.ts +16 -37
- package/build/es/src/data-v1-external-database-connection.universal.js +43 -17
- package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-collection.http.js +111 -115
- package/build/es/src/data-v2-data-collection.http.js.map +1 -1
- package/build/es/src/data-v2-data-collection.meta.d.ts +1 -1
- package/build/es/src/data-v2-data-collection.public.d.ts +4 -4
- package/build/es/src/data-v2-data-collection.public.js +1 -1
- package/build/es/src/data-v2-data-collection.public.js.map +1 -1
- package/build/es/src/data-v2-data-collection.types.d.ts +92 -0
- package/build/es/src/data-v2-data-collection.types.js +26 -0
- package/build/es/src/data-v2-data-collection.types.js.map +1 -1
- package/build/es/src/data-v2-data-collection.universal.d.ts +92 -0
- package/build/es/src/data-v2-data-collection.universal.js +60 -17
- package/build/es/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-item.http.js +42 -190
- package/build/es/src/data-v2-data-item.http.js.map +1 -1
- package/build/es/src/data-v2-data-item.meta.d.ts +1 -1
- package/build/es/src/data-v2-data-item.public.d.ts +12 -12
- package/build/es/src/data-v2-data-item.universal.js +193 -63
- package/build/es/src/data-v2-data-item.universal.js.map +1 -1
- package/build/es/src/data-v2-index.http.js +6 -28
- package/build/es/src/data-v2-index.http.js.map +1 -1
- package/build/es/src/data-v2-index.meta.d.ts +1 -1
- package/build/es/src/data-v2-index.public.d.ts +1 -1
- package/build/es/src/data-v2-index.universal.js +23 -13
- package/build/es/src/data-v2-index.universal.js.map +1 -1
- package/package.json +7 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = exports.deleteDataCollection = exports.updateDataCollection = exports.listDataCollections = exports.getDataCollection = exports.createDataCollection = exports.__metadata = void 0;
|
|
3
|
+
exports.IndexStatus = exports.Order = exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = exports.deleteDataCollection = exports.updateDataCollection = exports.listDataCollections = exports.getDataCollection = exports.createDataCollection = exports.__metadata = void 0;
|
|
4
4
|
const data_v2_data_collection_universal_1 = require("./data-v2-data-collection.universal");
|
|
5
5
|
exports.__metadata = { PACKAGE_NAME: '@wix/data' };
|
|
6
6
|
function createDataCollection(httpClient) {
|
|
@@ -47,4 +47,6 @@ Object.defineProperty(exports, "Format", { enumerable: true, get: function () {
|
|
|
47
47
|
Object.defineProperty(exports, "Type", { enumerable: true, get: function () { return data_v2_data_collection_universal_2.Type; } });
|
|
48
48
|
Object.defineProperty(exports, "PagingMode", { enumerable: true, get: function () { return data_v2_data_collection_universal_2.PagingMode; } });
|
|
49
49
|
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return data_v2_data_collection_universal_2.SortOrder; } });
|
|
50
|
+
Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return data_v2_data_collection_universal_2.Order; } });
|
|
51
|
+
Object.defineProperty(exports, "IndexStatus", { enumerable: true, get: function () { return data_v2_data_collection_universal_2.IndexStatus; } });
|
|
50
52
|
//# sourceMappingURL=data-v2-data-collection.public.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-v2-data-collection.public.js","sourceRoot":"","sources":["../../../src/data-v2-data-collection.public.ts"],"names":[],"mappings":";;;AACA,2FAS6C;AAEhC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,UAA0B,EAAE,EAAE,CACpC,IAAA,wDAA6B,EAC3B,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,gBAAwB,EAAE,OAAkC,EAAE,EAAE,CACtE,IAAA,qDAA0B,EACxB,gBAAgB,EAChB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,8CAQC;AAED,SAAgB,mBAAmB,CAAC,UAAsB;IACxD,OAAO,CAAC,OAAoC,EAAE,EAAE,CAC9C,IAAA,uDAA4B,EAC1B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kDAOC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,UAA0B,EAAE,EAAE,CACpC,IAAA,wDAA6B,EAC3B,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,gBAAwB,EAAE,EAAE,CAClC,IAAA,wDAA6B,EAC3B,gBAAgB;IAChB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,
|
|
1
|
+
{"version":3,"file":"data-v2-data-collection.public.js","sourceRoot":"","sources":["../../../src/data-v2-data-collection.public.ts"],"names":[],"mappings":";;;AACA,2FAS6C;AAEhC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,UAA0B,EAAE,EAAE,CACpC,IAAA,wDAA6B,EAC3B,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,gBAAwB,EAAE,OAAkC,EAAE,EAAE,CACtE,IAAA,qDAA0B,EACxB,gBAAgB,EAChB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,8CAQC;AAED,SAAgB,mBAAmB,CAAC,UAAsB;IACxD,OAAO,CAAC,OAAoC,EAAE,EAAE,CAC9C,IAAA,uDAA4B,EAC1B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kDAOC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,UAA0B,EAAE,EAAE,CACpC,IAAA,wDAA6B,EAC3B,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO,CAAC,gBAAwB,EAAE,EAAE,CAClC,IAAA,wDAA6B,EAC3B,gBAAgB;IAChB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oDAOC;AAED,yFAgB6C;AAf3C,mIAAA,cAAc,OAAA;AACd,8HAAA,SAAS,OAAA;AACT,kIAAA,aAAa,OAAA;AACb,wIAAA,mBAAmB,OAAA;AACnB,8HAAA,SAAS,OAAA;AACT,kIAAA,aAAa,OAAA;AACb,oIAAA,eAAe,OAAA;AACf,yHAAA,IAAI,OAAA;AACJ,2HAAA,MAAM,OAAA;AACN,2HAAA,MAAM,OAAA;AACN,yHAAA,IAAI,OAAA;AACJ,+HAAA,UAAU,OAAA;AACV,8HAAA,SAAS,OAAA;AACT,0HAAA,KAAK,OAAA;AACL,gIAAA,WAAW,OAAA"}
|
|
@@ -770,6 +770,98 @@ export interface SnapshotCollection {
|
|
|
770
770
|
snapshotId?: string;
|
|
771
771
|
/** snapshot collection */
|
|
772
772
|
collection?: DataCollection;
|
|
773
|
+
/** snapshot of collection indexes */
|
|
774
|
+
indexes?: Index[];
|
|
775
|
+
}
|
|
776
|
+
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
777
|
+
export interface Index {
|
|
778
|
+
/** Name of the index. */
|
|
779
|
+
name?: string;
|
|
780
|
+
/**
|
|
781
|
+
* Fields for which the index is defined.
|
|
782
|
+
*
|
|
783
|
+
* Max: 3 fields (for a unique index: 1 field)
|
|
784
|
+
*/
|
|
785
|
+
fields?: IndexField[];
|
|
786
|
+
/**
|
|
787
|
+
* Current status of the index.
|
|
788
|
+
* - `BUILDING`: Index creation is in progress.
|
|
789
|
+
* - `ACTIVE`: Index has been successfully created and can be used in queries.
|
|
790
|
+
* - `DROPPING`: Index is in the process of being dropped.
|
|
791
|
+
* - `DROPPED`: Index has been dropped successfully.
|
|
792
|
+
* - `FAILED`: Index creation has failed.
|
|
793
|
+
* - `INVALID`: Index contains incorrectly indexed data.
|
|
794
|
+
* @readonly
|
|
795
|
+
*/
|
|
796
|
+
status?: IndexStatus;
|
|
797
|
+
/**
|
|
798
|
+
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
799
|
+
* @readonly
|
|
800
|
+
*/
|
|
801
|
+
failure?: Failure;
|
|
802
|
+
/**
|
|
803
|
+
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
804
|
+
* If `true`, the index can have only one field.
|
|
805
|
+
*
|
|
806
|
+
* Default: `false`
|
|
807
|
+
*/
|
|
808
|
+
unique?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Whether the index ignores case.
|
|
811
|
+
*
|
|
812
|
+
* Default: `false`
|
|
813
|
+
*/
|
|
814
|
+
caseInsensitive?: boolean;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Order determines how values are ordered in the index. This is important when
|
|
818
|
+
* ordering and/or range querying by indexed fields.
|
|
819
|
+
*/
|
|
820
|
+
export declare enum Order {
|
|
821
|
+
ASC = "ASC",
|
|
822
|
+
DESC = "DESC"
|
|
823
|
+
}
|
|
824
|
+
export interface IndexField {
|
|
825
|
+
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
826
|
+
path?: string;
|
|
827
|
+
/**
|
|
828
|
+
* Sort order for the index. Base on how the data is regularly queried.
|
|
829
|
+
*
|
|
830
|
+
* Default: `ASC`
|
|
831
|
+
*/
|
|
832
|
+
order?: Order;
|
|
833
|
+
}
|
|
834
|
+
export declare enum IndexStatus {
|
|
835
|
+
/** Place holder. Never returned by the service. */
|
|
836
|
+
UNKNOWN = "UNKNOWN",
|
|
837
|
+
/** Index creation is in progress. */
|
|
838
|
+
BUILDING = "BUILDING",
|
|
839
|
+
/** Index has been successfully created and can be used in queries. */
|
|
840
|
+
ACTIVE = "ACTIVE",
|
|
841
|
+
/** Index is in the process of being dropped. */
|
|
842
|
+
DROPPING = "DROPPING",
|
|
843
|
+
/** Index has been dropped successfully. */
|
|
844
|
+
DROPPED = "DROPPED",
|
|
845
|
+
/** Index creation has failed. */
|
|
846
|
+
FAILED = "FAILED",
|
|
847
|
+
/** Index contains incorrectly indexed data. */
|
|
848
|
+
INVALID = "INVALID"
|
|
849
|
+
}
|
|
850
|
+
export interface Failure {
|
|
851
|
+
/**
|
|
852
|
+
* Error code.
|
|
853
|
+
* - `WDE0112`: Unknown error while building collection index.
|
|
854
|
+
* - `WDE0113`: Duplicate key error while building collection index.
|
|
855
|
+
* - `WDE0114`: Document too large while building collection index.
|
|
856
|
+
*/
|
|
857
|
+
code?: string;
|
|
858
|
+
/** Description of the failure. */
|
|
859
|
+
description?: string;
|
|
860
|
+
/**
|
|
861
|
+
* ID of the data item that caused the failure.
|
|
862
|
+
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
863
|
+
*/
|
|
864
|
+
itemId?: string | null;
|
|
773
865
|
}
|
|
774
866
|
export interface CreateDataCollectionsSnapshotRequest {
|
|
775
867
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = void 0;
|
|
3
|
+
exports.IndexStatus = exports.Order = exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = void 0;
|
|
4
4
|
var CollectionType;
|
|
5
5
|
(function (CollectionType) {
|
|
6
6
|
/** User-created collection. */
|
|
@@ -11,12 +11,12 @@ var CollectionType;
|
|
|
11
11
|
CollectionType["BLOCKS_APP"] = "BLOCKS_APP";
|
|
12
12
|
/** Collection located in externally connected storage. */
|
|
13
13
|
CollectionType["EXTERNAL"] = "EXTERNAL";
|
|
14
|
-
})(CollectionType
|
|
14
|
+
})(CollectionType || (exports.CollectionType = CollectionType = {}));
|
|
15
15
|
var Direction;
|
|
16
16
|
(function (Direction) {
|
|
17
17
|
Direction["ASC"] = "ASC";
|
|
18
18
|
Direction["DESC"] = "DESC";
|
|
19
|
-
})(Direction
|
|
19
|
+
})(Direction || (exports.Direction = Direction = {}));
|
|
20
20
|
var DataOperation;
|
|
21
21
|
(function (DataOperation) {
|
|
22
22
|
DataOperation["AGGREGATE"] = "AGGREGATE";
|
|
@@ -38,14 +38,14 @@ var DataOperation;
|
|
|
38
38
|
DataOperation["SAVE"] = "SAVE";
|
|
39
39
|
DataOperation["TRUNCATE"] = "TRUNCATE";
|
|
40
40
|
DataOperation["UPDATE"] = "UPDATE";
|
|
41
|
-
})(DataOperation
|
|
41
|
+
})(DataOperation || (exports.DataOperation = DataOperation = {}));
|
|
42
42
|
var CollectionOperation;
|
|
43
43
|
(function (CollectionOperation) {
|
|
44
44
|
/** Supports updating this collection. */
|
|
45
45
|
CollectionOperation["UPDATE"] = "UPDATE";
|
|
46
46
|
/** Supports removing this collections. */
|
|
47
47
|
CollectionOperation["REMOVE"] = "REMOVE";
|
|
48
|
-
})(CollectionOperation
|
|
48
|
+
})(CollectionOperation || (exports.CollectionOperation = CollectionOperation = {}));
|
|
49
49
|
var FieldType;
|
|
50
50
|
(function (FieldType) {
|
|
51
51
|
FieldType["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
@@ -87,7 +87,7 @@ var FieldType;
|
|
|
87
87
|
FieldType["LEGACY_COLOR"] = "LEGACY_COLOR";
|
|
88
88
|
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
89
89
|
FieldType["LEGACY_EXTERNAL_VIDEO"] = "LEGACY_EXTERNAL_VIDEO";
|
|
90
|
-
})(FieldType
|
|
90
|
+
})(FieldType || (exports.FieldType = FieldType = {}));
|
|
91
91
|
var QueryOperator;
|
|
92
92
|
(function (QueryOperator) {
|
|
93
93
|
QueryOperator["EQ"] = "EQ";
|
|
@@ -103,13 +103,13 @@ var QueryOperator;
|
|
|
103
103
|
QueryOperator["HAS_ALL"] = "HAS_ALL";
|
|
104
104
|
QueryOperator["EXISTS"] = "EXISTS";
|
|
105
105
|
QueryOperator["URLIZED"] = "URLIZED";
|
|
106
|
-
})(QueryOperator
|
|
106
|
+
})(QueryOperator || (exports.QueryOperator = QueryOperator = {}));
|
|
107
107
|
var FieldPluginType;
|
|
108
108
|
(function (FieldPluginType) {
|
|
109
109
|
FieldPluginType["UNKNOWN"] = "UNKNOWN";
|
|
110
110
|
/** CMS-related field attributes */
|
|
111
111
|
FieldPluginType["CMS"] = "CMS";
|
|
112
|
-
})(FieldPluginType
|
|
112
|
+
})(FieldPluginType || (exports.FieldPluginType = FieldPluginType = {}));
|
|
113
113
|
var Role;
|
|
114
114
|
(function (Role) {
|
|
115
115
|
/** Unknown. */
|
|
@@ -122,19 +122,19 @@ var Role;
|
|
|
122
122
|
Role["SITE_MEMBER"] = "SITE_MEMBER";
|
|
123
123
|
/** Any site visitor. */
|
|
124
124
|
Role["ANYONE"] = "ANYONE";
|
|
125
|
-
})(Role
|
|
125
|
+
})(Role || (exports.Role = Role = {}));
|
|
126
126
|
var Status;
|
|
127
127
|
(function (Status) {
|
|
128
128
|
Status["UNKNOWN_PUBLISH_PLUGIN_STATUS"] = "UNKNOWN_PUBLISH_PLUGIN_STATUS";
|
|
129
129
|
Status["PUBLISHED"] = "PUBLISHED";
|
|
130
130
|
Status["DRAFT"] = "DRAFT";
|
|
131
|
-
})(Status
|
|
131
|
+
})(Status || (exports.Status = Status = {}));
|
|
132
132
|
var Format;
|
|
133
133
|
(function (Format) {
|
|
134
134
|
Format["UNKNOWN_URLIZED_PLUGIN_FORMAT"] = "UNKNOWN_URLIZED_PLUGIN_FORMAT";
|
|
135
135
|
Format["ORIGINAL"] = "ORIGINAL";
|
|
136
136
|
Format["PLAIN"] = "PLAIN";
|
|
137
|
-
})(Format
|
|
137
|
+
})(Format || (exports.Format = Format = {}));
|
|
138
138
|
var Type;
|
|
139
139
|
(function (Type) {
|
|
140
140
|
/** Unknown plugin type. */
|
|
@@ -155,17 +155,43 @@ var Type;
|
|
|
155
155
|
Type["EDITABLE_PAGE_LINK"] = "EDITABLE_PAGE_LINK";
|
|
156
156
|
/** CMS-specific collection properties */
|
|
157
157
|
Type["CMS"] = "CMS";
|
|
158
|
-
})(Type
|
|
158
|
+
})(Type || (exports.Type = Type = {}));
|
|
159
159
|
var PagingMode;
|
|
160
160
|
(function (PagingMode) {
|
|
161
161
|
/** Offset-based paging. */
|
|
162
162
|
PagingMode["OFFSET"] = "OFFSET";
|
|
163
163
|
/** Cursor-based paging. */
|
|
164
164
|
PagingMode["CURSOR"] = "CURSOR";
|
|
165
|
-
})(PagingMode
|
|
165
|
+
})(PagingMode || (exports.PagingMode = PagingMode = {}));
|
|
166
166
|
var SortOrder;
|
|
167
167
|
(function (SortOrder) {
|
|
168
168
|
SortOrder["ASC"] = "ASC";
|
|
169
169
|
SortOrder["DESC"] = "DESC";
|
|
170
|
-
})(SortOrder
|
|
170
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
171
|
+
/**
|
|
172
|
+
* Order determines how values are ordered in the index. This is important when
|
|
173
|
+
* ordering and/or range querying by indexed fields.
|
|
174
|
+
*/
|
|
175
|
+
var Order;
|
|
176
|
+
(function (Order) {
|
|
177
|
+
Order["ASC"] = "ASC";
|
|
178
|
+
Order["DESC"] = "DESC";
|
|
179
|
+
})(Order || (exports.Order = Order = {}));
|
|
180
|
+
var IndexStatus;
|
|
181
|
+
(function (IndexStatus) {
|
|
182
|
+
/** Place holder. Never returned by the service. */
|
|
183
|
+
IndexStatus["UNKNOWN"] = "UNKNOWN";
|
|
184
|
+
/** Index creation is in progress. */
|
|
185
|
+
IndexStatus["BUILDING"] = "BUILDING";
|
|
186
|
+
/** Index has been successfully created and can be used in queries. */
|
|
187
|
+
IndexStatus["ACTIVE"] = "ACTIVE";
|
|
188
|
+
/** Index is in the process of being dropped. */
|
|
189
|
+
IndexStatus["DROPPING"] = "DROPPING";
|
|
190
|
+
/** Index has been dropped successfully. */
|
|
191
|
+
IndexStatus["DROPPED"] = "DROPPED";
|
|
192
|
+
/** Index creation has failed. */
|
|
193
|
+
IndexStatus["FAILED"] = "FAILED";
|
|
194
|
+
/** Index contains incorrectly indexed data. */
|
|
195
|
+
IndexStatus["INVALID"] = "INVALID";
|
|
196
|
+
})(IndexStatus || (exports.IndexStatus = IndexStatus = {}));
|
|
171
197
|
//# sourceMappingURL=data-v2-data-collection.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-v2-data-collection.types.js","sourceRoot":"","sources":["../../../src/data-v2-data-collection.types.ts"],"names":[],"mappings":";;;AA0EA,IAAY,cASX;AATD,WAAY,cAAc;IACxB,+BAA+B;IAC/B,mCAAiB,CAAA;IACjB,wQAAwQ;IACxQ,qCAAmB,CAAA;IACnB,8CAA8C;IAC9C,2CAAyB,CAAA;IACzB,0DAA0D;IAC1D,uCAAqB,CAAA;AACvB,CAAC,EATW,cAAc,
|
|
1
|
+
{"version":3,"file":"data-v2-data-collection.types.js","sourceRoot":"","sources":["../../../src/data-v2-data-collection.types.ts"],"names":[],"mappings":";;;AA0EA,IAAY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AAA;IACrB,sEAAsE;IACtE,gCAAiB,CAAA;IACjB,gDAAgD;IAChD,oCAAqB,CAAA;IACrB,2CAA2C;IAC3C,kCAAmB,CAAA;IACnB,iCAAiC;IACjC,gCAAiB,CAAA;IACjB,+CAA+C;IAC/C,kCAAmB,CAAA;AACrB,CAAC,EAfW,WAAW,2BAAX,WAAW,QAetB"}
|
|
@@ -812,6 +812,98 @@ export interface SnapshotCollection {
|
|
|
812
812
|
snapshotId?: string;
|
|
813
813
|
/** snapshot collection */
|
|
814
814
|
collection?: DataCollection;
|
|
815
|
+
/** snapshot of collection indexes */
|
|
816
|
+
indexes?: Index[];
|
|
817
|
+
}
|
|
818
|
+
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
819
|
+
export interface Index {
|
|
820
|
+
/** Name of the index. */
|
|
821
|
+
name?: string;
|
|
822
|
+
/**
|
|
823
|
+
* Fields for which the index is defined.
|
|
824
|
+
*
|
|
825
|
+
* Max: 3 fields (for a unique index: 1 field)
|
|
826
|
+
*/
|
|
827
|
+
fields?: IndexField[];
|
|
828
|
+
/**
|
|
829
|
+
* Current status of the index.
|
|
830
|
+
* - `BUILDING`: Index creation is in progress.
|
|
831
|
+
* - `ACTIVE`: Index has been successfully created and can be used in queries.
|
|
832
|
+
* - `DROPPING`: Index is in the process of being dropped.
|
|
833
|
+
* - `DROPPED`: Index has been dropped successfully.
|
|
834
|
+
* - `FAILED`: Index creation has failed.
|
|
835
|
+
* - `INVALID`: Index contains incorrectly indexed data.
|
|
836
|
+
* @readonly
|
|
837
|
+
*/
|
|
838
|
+
status?: IndexStatus;
|
|
839
|
+
/**
|
|
840
|
+
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
841
|
+
* @readonly
|
|
842
|
+
*/
|
|
843
|
+
failure?: Failure;
|
|
844
|
+
/**
|
|
845
|
+
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
846
|
+
* If `true`, the index can have only one field.
|
|
847
|
+
*
|
|
848
|
+
* Default: `false`
|
|
849
|
+
*/
|
|
850
|
+
unique?: boolean;
|
|
851
|
+
/**
|
|
852
|
+
* Whether the index ignores case.
|
|
853
|
+
*
|
|
854
|
+
* Default: `false`
|
|
855
|
+
*/
|
|
856
|
+
caseInsensitive?: boolean;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Order determines how values are ordered in the index. This is important when
|
|
860
|
+
* ordering and/or range querying by indexed fields.
|
|
861
|
+
*/
|
|
862
|
+
export declare enum Order {
|
|
863
|
+
ASC = "ASC",
|
|
864
|
+
DESC = "DESC"
|
|
865
|
+
}
|
|
866
|
+
export interface IndexField {
|
|
867
|
+
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
868
|
+
path?: string;
|
|
869
|
+
/**
|
|
870
|
+
* Sort order for the index. Base on how the data is regularly queried.
|
|
871
|
+
*
|
|
872
|
+
* Default: `ASC`
|
|
873
|
+
*/
|
|
874
|
+
order?: Order;
|
|
875
|
+
}
|
|
876
|
+
export declare enum IndexStatus {
|
|
877
|
+
/** Place holder. Never returned by the service. */
|
|
878
|
+
UNKNOWN = "UNKNOWN",
|
|
879
|
+
/** Index creation is in progress. */
|
|
880
|
+
BUILDING = "BUILDING",
|
|
881
|
+
/** Index has been successfully created and can be used in queries. */
|
|
882
|
+
ACTIVE = "ACTIVE",
|
|
883
|
+
/** Index is in the process of being dropped. */
|
|
884
|
+
DROPPING = "DROPPING",
|
|
885
|
+
/** Index has been dropped successfully. */
|
|
886
|
+
DROPPED = "DROPPED",
|
|
887
|
+
/** Index creation has failed. */
|
|
888
|
+
FAILED = "FAILED",
|
|
889
|
+
/** Index contains incorrectly indexed data. */
|
|
890
|
+
INVALID = "INVALID"
|
|
891
|
+
}
|
|
892
|
+
export interface Failure {
|
|
893
|
+
/**
|
|
894
|
+
* Error code.
|
|
895
|
+
* - `WDE0112`: Unknown error while building collection index.
|
|
896
|
+
* - `WDE0113`: Duplicate key error while building collection index.
|
|
897
|
+
* - `WDE0114`: Document too large while building collection index.
|
|
898
|
+
*/
|
|
899
|
+
code?: string;
|
|
900
|
+
/** Description of the failure. */
|
|
901
|
+
description?: string;
|
|
902
|
+
/**
|
|
903
|
+
* ID of the data item that caused the failure.
|
|
904
|
+
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
905
|
+
*/
|
|
906
|
+
itemId?: string | null;
|
|
815
907
|
}
|
|
816
908
|
export interface CreateDataCollectionsSnapshotRequest {
|
|
817
909
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -28,8 +32,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
32
|
});
|
|
29
33
|
};
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.deleteDataCollection = exports.updateDataCollection = exports.listDataCollections = exports.getDataCollection = exports.createDataCollection = exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = exports.__debug = void 0;
|
|
35
|
+
exports.deleteDataCollection = exports.updateDataCollection = exports.listDataCollections = exports.getDataCollection = exports.createDataCollection = exports.IndexStatus = exports.Order = exports.SortOrder = exports.PagingMode = exports.Type = exports.Format = exports.Status = exports.Role = exports.FieldPluginType = exports.QueryOperator = exports.FieldType = exports.CollectionOperation = exports.DataOperation = exports.Direction = exports.CollectionType = exports.__debug = void 0;
|
|
32
36
|
const velo_1 = require("@wix/metro-runtime/velo");
|
|
37
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
33
38
|
const ambassadorWixDataV2DataCollection = __importStar(require("./data-v2-data-collection.http"));
|
|
34
39
|
let __verbose = false;
|
|
35
40
|
function __log(...args) {
|
|
@@ -56,12 +61,12 @@ var CollectionType;
|
|
|
56
61
|
CollectionType["BLOCKS_APP"] = "BLOCKS_APP";
|
|
57
62
|
/** Collection located in externally connected storage. */
|
|
58
63
|
CollectionType["EXTERNAL"] = "EXTERNAL";
|
|
59
|
-
})(CollectionType
|
|
64
|
+
})(CollectionType || (exports.CollectionType = CollectionType = {}));
|
|
60
65
|
var Direction;
|
|
61
66
|
(function (Direction) {
|
|
62
67
|
Direction["ASC"] = "ASC";
|
|
63
68
|
Direction["DESC"] = "DESC";
|
|
64
|
-
})(Direction
|
|
69
|
+
})(Direction || (exports.Direction = Direction = {}));
|
|
65
70
|
var DataOperation;
|
|
66
71
|
(function (DataOperation) {
|
|
67
72
|
DataOperation["AGGREGATE"] = "AGGREGATE";
|
|
@@ -83,14 +88,14 @@ var DataOperation;
|
|
|
83
88
|
DataOperation["SAVE"] = "SAVE";
|
|
84
89
|
DataOperation["TRUNCATE"] = "TRUNCATE";
|
|
85
90
|
DataOperation["UPDATE"] = "UPDATE";
|
|
86
|
-
})(DataOperation
|
|
91
|
+
})(DataOperation || (exports.DataOperation = DataOperation = {}));
|
|
87
92
|
var CollectionOperation;
|
|
88
93
|
(function (CollectionOperation) {
|
|
89
94
|
/** Supports updating this collection. */
|
|
90
95
|
CollectionOperation["UPDATE"] = "UPDATE";
|
|
91
96
|
/** Supports removing this collections. */
|
|
92
97
|
CollectionOperation["REMOVE"] = "REMOVE";
|
|
93
|
-
})(CollectionOperation
|
|
98
|
+
})(CollectionOperation || (exports.CollectionOperation = CollectionOperation = {}));
|
|
94
99
|
var FieldType;
|
|
95
100
|
(function (FieldType) {
|
|
96
101
|
FieldType["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
@@ -132,7 +137,7 @@ var FieldType;
|
|
|
132
137
|
FieldType["LEGACY_COLOR"] = "LEGACY_COLOR";
|
|
133
138
|
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
134
139
|
FieldType["LEGACY_EXTERNAL_VIDEO"] = "LEGACY_EXTERNAL_VIDEO";
|
|
135
|
-
})(FieldType
|
|
140
|
+
})(FieldType || (exports.FieldType = FieldType = {}));
|
|
136
141
|
var QueryOperator;
|
|
137
142
|
(function (QueryOperator) {
|
|
138
143
|
QueryOperator["EQ"] = "EQ";
|
|
@@ -148,13 +153,13 @@ var QueryOperator;
|
|
|
148
153
|
QueryOperator["HAS_ALL"] = "HAS_ALL";
|
|
149
154
|
QueryOperator["EXISTS"] = "EXISTS";
|
|
150
155
|
QueryOperator["URLIZED"] = "URLIZED";
|
|
151
|
-
})(QueryOperator
|
|
156
|
+
})(QueryOperator || (exports.QueryOperator = QueryOperator = {}));
|
|
152
157
|
var FieldPluginType;
|
|
153
158
|
(function (FieldPluginType) {
|
|
154
159
|
FieldPluginType["UNKNOWN"] = "UNKNOWN";
|
|
155
160
|
/** CMS-related field attributes */
|
|
156
161
|
FieldPluginType["CMS"] = "CMS";
|
|
157
|
-
})(FieldPluginType
|
|
162
|
+
})(FieldPluginType || (exports.FieldPluginType = FieldPluginType = {}));
|
|
158
163
|
var Role;
|
|
159
164
|
(function (Role) {
|
|
160
165
|
/** Unknown. */
|
|
@@ -167,19 +172,19 @@ var Role;
|
|
|
167
172
|
Role["SITE_MEMBER"] = "SITE_MEMBER";
|
|
168
173
|
/** Any site visitor. */
|
|
169
174
|
Role["ANYONE"] = "ANYONE";
|
|
170
|
-
})(Role
|
|
175
|
+
})(Role || (exports.Role = Role = {}));
|
|
171
176
|
var Status;
|
|
172
177
|
(function (Status) {
|
|
173
178
|
Status["UNKNOWN_PUBLISH_PLUGIN_STATUS"] = "UNKNOWN_PUBLISH_PLUGIN_STATUS";
|
|
174
179
|
Status["PUBLISHED"] = "PUBLISHED";
|
|
175
180
|
Status["DRAFT"] = "DRAFT";
|
|
176
|
-
})(Status
|
|
181
|
+
})(Status || (exports.Status = Status = {}));
|
|
177
182
|
var Format;
|
|
178
183
|
(function (Format) {
|
|
179
184
|
Format["UNKNOWN_URLIZED_PLUGIN_FORMAT"] = "UNKNOWN_URLIZED_PLUGIN_FORMAT";
|
|
180
185
|
Format["ORIGINAL"] = "ORIGINAL";
|
|
181
186
|
Format["PLAIN"] = "PLAIN";
|
|
182
|
-
})(Format
|
|
187
|
+
})(Format || (exports.Format = Format = {}));
|
|
183
188
|
var Type;
|
|
184
189
|
(function (Type) {
|
|
185
190
|
/** Unknown plugin type. */
|
|
@@ -200,19 +205,45 @@ var Type;
|
|
|
200
205
|
Type["EDITABLE_PAGE_LINK"] = "EDITABLE_PAGE_LINK";
|
|
201
206
|
/** CMS-specific collection properties */
|
|
202
207
|
Type["CMS"] = "CMS";
|
|
203
|
-
})(Type
|
|
208
|
+
})(Type || (exports.Type = Type = {}));
|
|
204
209
|
var PagingMode;
|
|
205
210
|
(function (PagingMode) {
|
|
206
211
|
/** Offset-based paging. */
|
|
207
212
|
PagingMode["OFFSET"] = "OFFSET";
|
|
208
213
|
/** Cursor-based paging. */
|
|
209
214
|
PagingMode["CURSOR"] = "CURSOR";
|
|
210
|
-
})(PagingMode
|
|
215
|
+
})(PagingMode || (exports.PagingMode = PagingMode = {}));
|
|
211
216
|
var SortOrder;
|
|
212
217
|
(function (SortOrder) {
|
|
213
218
|
SortOrder["ASC"] = "ASC";
|
|
214
219
|
SortOrder["DESC"] = "DESC";
|
|
215
|
-
})(SortOrder
|
|
220
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
221
|
+
/**
|
|
222
|
+
* Order determines how values are ordered in the index. This is important when
|
|
223
|
+
* ordering and/or range querying by indexed fields.
|
|
224
|
+
*/
|
|
225
|
+
var Order;
|
|
226
|
+
(function (Order) {
|
|
227
|
+
Order["ASC"] = "ASC";
|
|
228
|
+
Order["DESC"] = "DESC";
|
|
229
|
+
})(Order || (exports.Order = Order = {}));
|
|
230
|
+
var IndexStatus;
|
|
231
|
+
(function (IndexStatus) {
|
|
232
|
+
/** Place holder. Never returned by the service. */
|
|
233
|
+
IndexStatus["UNKNOWN"] = "UNKNOWN";
|
|
234
|
+
/** Index creation is in progress. */
|
|
235
|
+
IndexStatus["BUILDING"] = "BUILDING";
|
|
236
|
+
/** Index has been successfully created and can be used in queries. */
|
|
237
|
+
IndexStatus["ACTIVE"] = "ACTIVE";
|
|
238
|
+
/** Index is in the process of being dropped. */
|
|
239
|
+
IndexStatus["DROPPING"] = "DROPPING";
|
|
240
|
+
/** Index has been dropped successfully. */
|
|
241
|
+
IndexStatus["DROPPED"] = "DROPPED";
|
|
242
|
+
/** Index creation has failed. */
|
|
243
|
+
IndexStatus["FAILED"] = "FAILED";
|
|
244
|
+
/** Index contains incorrectly indexed data. */
|
|
245
|
+
IndexStatus["INVALID"] = "INVALID";
|
|
246
|
+
})(IndexStatus || (exports.IndexStatus = IndexStatus = {}));
|
|
216
247
|
const _array = { typeMetadata: '_typeMetadata' };
|
|
217
248
|
const _createDataCollectionRequest = { collection: '_dataCollection' };
|
|
218
249
|
const _createDataCollectionResponse = { collection: '_dataCollection' };
|
|
@@ -301,9 +332,11 @@ function createDataCollection(collection) {
|
|
|
301
332
|
return fromJSON(result.data);
|
|
302
333
|
}
|
|
303
334
|
catch (err) {
|
|
304
|
-
const transformedError = (0,
|
|
305
|
-
|
|
306
|
-
|
|
335
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
336
|
+
spreadPathsToArguments: {},
|
|
337
|
+
explicitPathsToArguments: { collection: '$[0]' },
|
|
338
|
+
singleArgumentUnchanged: false,
|
|
339
|
+
}, ['collection']);
|
|
307
340
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
308
341
|
throw transformedError;
|
|
309
342
|
}
|
|
@@ -367,10 +400,14 @@ function getDataCollection(dataCollectionId, options) {
|
|
|
367
400
|
return fromJSON(result.data);
|
|
368
401
|
}
|
|
369
402
|
catch (err) {
|
|
370
|
-
const transformedError = (0,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
403
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
404
|
+
spreadPathsToArguments: {},
|
|
405
|
+
explicitPathsToArguments: {
|
|
406
|
+
dataCollectionId: '$[0]',
|
|
407
|
+
consistentRead: '$[1].consistentRead',
|
|
408
|
+
},
|
|
409
|
+
singleArgumentUnchanged: false,
|
|
410
|
+
}, ['dataCollectionId', 'options']);
|
|
374
411
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
375
412
|
throw transformedError;
|
|
376
413
|
}
|
|
@@ -433,9 +470,15 @@ function listDataCollections(options) {
|
|
|
433
470
|
return fromJSON(result.data);
|
|
434
471
|
}
|
|
435
472
|
catch (err) {
|
|
436
|
-
const transformedError = (0,
|
|
437
|
-
|
|
438
|
-
|
|
473
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
474
|
+
spreadPathsToArguments: {},
|
|
475
|
+
explicitPathsToArguments: {
|
|
476
|
+
sort: '$[0].sort',
|
|
477
|
+
paging: '$[0].paging',
|
|
478
|
+
consistentRead: '$[0].consistentRead',
|
|
479
|
+
},
|
|
480
|
+
singleArgumentUnchanged: false,
|
|
481
|
+
}, ['options']);
|
|
439
482
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
440
483
|
throw transformedError;
|
|
441
484
|
}
|
|
@@ -520,9 +563,11 @@ function updateDataCollection(collection) {
|
|
|
520
563
|
return fromJSON(result.data);
|
|
521
564
|
}
|
|
522
565
|
catch (err) {
|
|
523
|
-
const transformedError = (0,
|
|
524
|
-
|
|
525
|
-
|
|
566
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
567
|
+
spreadPathsToArguments: {},
|
|
568
|
+
explicitPathsToArguments: { collection: '$[0]' },
|
|
569
|
+
singleArgumentUnchanged: false,
|
|
570
|
+
}, ['collection']);
|
|
526
571
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
527
572
|
throw transformedError;
|
|
528
573
|
}
|
|
@@ -575,9 +620,11 @@ function deleteDataCollection(dataCollectionId) {
|
|
|
575
620
|
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
576
621
|
}
|
|
577
622
|
catch (err) {
|
|
578
|
-
const transformedError = (0,
|
|
579
|
-
|
|
580
|
-
|
|
623
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
624
|
+
spreadPathsToArguments: {},
|
|
625
|
+
explicitPathsToArguments: { dataCollectionId: '$[0]' },
|
|
626
|
+
singleArgumentUnchanged: false,
|
|
627
|
+
}, ['dataCollectionId']);
|
|
581
628
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
582
629
|
throw transformedError;
|
|
583
630
|
}
|