@wix/data 1.0.123 → 1.0.124
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/data",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.124",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@wix/data_collections": "1.0.27",
|
|
23
|
-
"@wix/data_external-database": "1.0.
|
|
23
|
+
"@wix/data_external-database": "1.0.6",
|
|
24
24
|
"@wix/data_external-database-connections": "1.0.25",
|
|
25
25
|
"@wix/data_indexes": "1.0.22",
|
|
26
|
-
"@wix/data_items": "1.0.
|
|
26
|
+
"@wix/data_items": "1.0.33"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"glob": "^10.4.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "c10dd752b2c83ecf2094f13f2d11f73e6f47eb8e8ebea249e8ac191a"
|
|
51
51
|
}
|
|
@@ -280,41 +280,41 @@ interface UpdateExternalDatabaseConnection {
|
|
|
280
280
|
capabilities?: Capabilities;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
type RESTFunctionDescriptor
|
|
284
|
-
interface HttpClient
|
|
285
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
283
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
284
|
+
interface HttpClient {
|
|
285
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
286
286
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
287
287
|
}
|
|
288
|
-
type RequestOptionsFactory
|
|
289
|
-
type HttpResponse
|
|
288
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
289
|
+
type HttpResponse<T = any> = {
|
|
290
290
|
data: T;
|
|
291
291
|
status: number;
|
|
292
292
|
statusText: string;
|
|
293
293
|
headers: any;
|
|
294
294
|
request?: any;
|
|
295
295
|
};
|
|
296
|
-
type RequestOptions
|
|
296
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
297
297
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
298
298
|
url: string;
|
|
299
299
|
data?: Data;
|
|
300
300
|
params?: URLSearchParams;
|
|
301
|
-
} & APIMetadata
|
|
302
|
-
type APIMetadata
|
|
301
|
+
} & APIMetadata;
|
|
302
|
+
type APIMetadata = {
|
|
303
303
|
methodFqn?: string;
|
|
304
304
|
entityFqdn?: string;
|
|
305
305
|
packageName?: string;
|
|
306
306
|
};
|
|
307
|
-
type BuildRESTFunction
|
|
308
|
-
type EventDefinition
|
|
307
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
308
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
309
309
|
__type: 'event-definition';
|
|
310
310
|
type: Type;
|
|
311
311
|
isDomainEvent?: boolean;
|
|
312
312
|
transformations?: (envelope: unknown) => Payload;
|
|
313
313
|
__payload: Payload;
|
|
314
314
|
};
|
|
315
|
-
declare function EventDefinition
|
|
316
|
-
type EventHandler
|
|
317
|
-
type BuildEventDefinition
|
|
315
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
316
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
317
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
318
318
|
|
|
319
319
|
declare global {
|
|
320
320
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -323,7 +323,7 @@ declare global {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
declare function getExternalDatabaseConnection$1(httpClient: HttpClient
|
|
326
|
+
declare function getExternalDatabaseConnection$1(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
327
327
|
name: string;
|
|
328
328
|
connectionStatus?: {
|
|
329
329
|
successful: boolean;
|
|
@@ -335,8 +335,8 @@ declare function getExternalDatabaseConnection$1(httpClient: HttpClient$3): (nam
|
|
|
335
335
|
fieldTypes: FieldType[];
|
|
336
336
|
} | undefined;
|
|
337
337
|
}>;
|
|
338
|
-
declare function listExternalDatabaseConnections$1(httpClient: HttpClient
|
|
339
|
-
declare function createExternalDatabaseConnection$1(httpClient: HttpClient
|
|
338
|
+
declare function listExternalDatabaseConnections$1(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
339
|
+
declare function createExternalDatabaseConnection$1(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
340
340
|
name: string;
|
|
341
341
|
connectionStatus?: {
|
|
342
342
|
successful: boolean;
|
|
@@ -348,7 +348,7 @@ declare function createExternalDatabaseConnection$1(httpClient: HttpClient$3): (
|
|
|
348
348
|
fieldTypes: FieldType[];
|
|
349
349
|
} | undefined;
|
|
350
350
|
}>;
|
|
351
|
-
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient
|
|
351
|
+
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
352
352
|
name: string;
|
|
353
353
|
connectionStatus?: {
|
|
354
354
|
successful: boolean;
|
|
@@ -360,19 +360,19 @@ declare function updateExternalDatabaseConnection$1(httpClient: HttpClient$3): (
|
|
|
360
360
|
fieldTypes: FieldType[];
|
|
361
361
|
} | undefined;
|
|
362
362
|
}>;
|
|
363
|
-
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient
|
|
364
|
-
declare const onExternalDatabaseConnectionCreated$1: EventDefinition
|
|
365
|
-
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition
|
|
366
|
-
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition
|
|
363
|
+
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
364
|
+
declare const onExternalDatabaseConnectionCreated$1: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
365
|
+
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
366
|
+
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
367
367
|
|
|
368
|
-
declare const getExternalDatabaseConnection: BuildRESTFunction
|
|
369
|
-
declare const listExternalDatabaseConnections: BuildRESTFunction
|
|
370
|
-
declare const createExternalDatabaseConnection: BuildRESTFunction
|
|
371
|
-
declare const updateExternalDatabaseConnection: BuildRESTFunction
|
|
372
|
-
declare const deleteExternalDatabaseConnection: BuildRESTFunction
|
|
373
|
-
declare const onExternalDatabaseConnectionCreated: BuildEventDefinition
|
|
374
|
-
declare const onExternalDatabaseConnectionUpdated: BuildEventDefinition
|
|
375
|
-
declare const onExternalDatabaseConnectionDeleted: BuildEventDefinition
|
|
368
|
+
declare const getExternalDatabaseConnection: BuildRESTFunction<typeof getExternalDatabaseConnection$1>;
|
|
369
|
+
declare const listExternalDatabaseConnections: BuildRESTFunction<typeof listExternalDatabaseConnections$1>;
|
|
370
|
+
declare const createExternalDatabaseConnection: BuildRESTFunction<typeof createExternalDatabaseConnection$1>;
|
|
371
|
+
declare const updateExternalDatabaseConnection: BuildRESTFunction<typeof updateExternalDatabaseConnection$1>;
|
|
372
|
+
declare const deleteExternalDatabaseConnection: BuildRESTFunction<typeof deleteExternalDatabaseConnection$1>;
|
|
373
|
+
declare const onExternalDatabaseConnectionCreated: BuildEventDefinition<typeof onExternalDatabaseConnectionCreated$1>;
|
|
374
|
+
declare const onExternalDatabaseConnectionUpdated: BuildEventDefinition<typeof onExternalDatabaseConnectionUpdated$1>;
|
|
375
|
+
declare const onExternalDatabaseConnectionDeleted: BuildEventDefinition<typeof onExternalDatabaseConnectionDeleted$1>;
|
|
376
376
|
|
|
377
377
|
declare const context$3_createExternalDatabaseConnection: typeof createExternalDatabaseConnection;
|
|
378
378
|
declare const context$3_deleteExternalDatabaseConnection: typeof deleteExternalDatabaseConnection;
|
|
@@ -1243,50 +1243,7 @@ interface ListDataCollectionsOptions {
|
|
|
1243
1243
|
consistentRead?: boolean;
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
1246
|
-
|
|
1247
|
-
interface HttpClient$2 {
|
|
1248
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1249
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1250
|
-
}
|
|
1251
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1252
|
-
type HttpResponse$2<T = any> = {
|
|
1253
|
-
data: T;
|
|
1254
|
-
status: number;
|
|
1255
|
-
statusText: string;
|
|
1256
|
-
headers: any;
|
|
1257
|
-
request?: any;
|
|
1258
|
-
};
|
|
1259
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1260
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1261
|
-
url: string;
|
|
1262
|
-
data?: Data;
|
|
1263
|
-
params?: URLSearchParams;
|
|
1264
|
-
} & APIMetadata$2;
|
|
1265
|
-
type APIMetadata$2 = {
|
|
1266
|
-
methodFqn?: string;
|
|
1267
|
-
entityFqdn?: string;
|
|
1268
|
-
packageName?: string;
|
|
1269
|
-
};
|
|
1270
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1271
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
1272
|
-
__type: 'event-definition';
|
|
1273
|
-
type: Type;
|
|
1274
|
-
isDomainEvent?: boolean;
|
|
1275
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1276
|
-
__payload: Payload;
|
|
1277
|
-
};
|
|
1278
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
1279
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
1280
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
1281
|
-
|
|
1282
|
-
declare global {
|
|
1283
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1284
|
-
interface SymbolConstructor {
|
|
1285
|
-
readonly observable: symbol;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
declare function createDataCollection$1(httpClient: HttpClient$2): (collection: DataCollection) => Promise<DataCollection & {
|
|
1246
|
+
declare function createDataCollection$1(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
1290
1247
|
_id: string;
|
|
1291
1248
|
collectionType: CollectionType;
|
|
1292
1249
|
defaultDisplayOrder?: {
|
|
@@ -1387,7 +1344,7 @@ declare function createDataCollection$1(httpClient: HttpClient$2): (collection:
|
|
|
1387
1344
|
}[];
|
|
1388
1345
|
pagingModes: PagingMode[];
|
|
1389
1346
|
}>;
|
|
1390
|
-
declare function getDataCollection$1(httpClient: HttpClient
|
|
1347
|
+
declare function getDataCollection$1(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
1391
1348
|
_id: string;
|
|
1392
1349
|
collectionType: CollectionType;
|
|
1393
1350
|
defaultDisplayOrder?: {
|
|
@@ -1488,8 +1445,8 @@ declare function getDataCollection$1(httpClient: HttpClient$2): (dataCollectionI
|
|
|
1488
1445
|
}[];
|
|
1489
1446
|
pagingModes: PagingMode[];
|
|
1490
1447
|
}>;
|
|
1491
|
-
declare function listDataCollections$1(httpClient: HttpClient
|
|
1492
|
-
declare function updateDataCollection$1(httpClient: HttpClient
|
|
1448
|
+
declare function listDataCollections$1(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
1449
|
+
declare function updateDataCollection$1(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
1493
1450
|
_id: string;
|
|
1494
1451
|
collectionType: CollectionType;
|
|
1495
1452
|
defaultDisplayOrder?: {
|
|
@@ -1590,23 +1547,23 @@ declare function updateDataCollection$1(httpClient: HttpClient$2): (collection:
|
|
|
1590
1547
|
}[];
|
|
1591
1548
|
pagingModes: PagingMode[];
|
|
1592
1549
|
}>;
|
|
1593
|
-
declare function deleteDataCollection$1(httpClient: HttpClient
|
|
1594
|
-
declare const onDataCollectionClonedEvent$1: EventDefinition
|
|
1595
|
-
declare const onDataCollectionChangedEvent$1: EventDefinition
|
|
1596
|
-
declare const onDataCollectionCreated$1: EventDefinition
|
|
1597
|
-
declare const onDataCollectionUpdated$1: EventDefinition
|
|
1598
|
-
declare const onDataCollectionDeleted$1: EventDefinition
|
|
1550
|
+
declare function deleteDataCollection$1(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
1551
|
+
declare const onDataCollectionClonedEvent$1: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
1552
|
+
declare const onDataCollectionChangedEvent$1: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
1553
|
+
declare const onDataCollectionCreated$1: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
1554
|
+
declare const onDataCollectionUpdated$1: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
1555
|
+
declare const onDataCollectionDeleted$1: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
1599
1556
|
|
|
1600
|
-
declare const createDataCollection: BuildRESTFunction
|
|
1601
|
-
declare const getDataCollection: BuildRESTFunction
|
|
1602
|
-
declare const listDataCollections: BuildRESTFunction
|
|
1603
|
-
declare const updateDataCollection: BuildRESTFunction
|
|
1604
|
-
declare const deleteDataCollection: BuildRESTFunction
|
|
1605
|
-
declare const onDataCollectionClonedEvent: BuildEventDefinition
|
|
1606
|
-
declare const onDataCollectionChangedEvent: BuildEventDefinition
|
|
1607
|
-
declare const onDataCollectionCreated: BuildEventDefinition
|
|
1608
|
-
declare const onDataCollectionUpdated: BuildEventDefinition
|
|
1609
|
-
declare const onDataCollectionDeleted: BuildEventDefinition
|
|
1557
|
+
declare const createDataCollection: BuildRESTFunction<typeof createDataCollection$1>;
|
|
1558
|
+
declare const getDataCollection: BuildRESTFunction<typeof getDataCollection$1>;
|
|
1559
|
+
declare const listDataCollections: BuildRESTFunction<typeof listDataCollections$1>;
|
|
1560
|
+
declare const updateDataCollection: BuildRESTFunction<typeof updateDataCollection$1>;
|
|
1561
|
+
declare const deleteDataCollection: BuildRESTFunction<typeof deleteDataCollection$1>;
|
|
1562
|
+
declare const onDataCollectionClonedEvent: BuildEventDefinition<typeof onDataCollectionClonedEvent$1>;
|
|
1563
|
+
declare const onDataCollectionChangedEvent: BuildEventDefinition<typeof onDataCollectionChangedEvent$1>;
|
|
1564
|
+
declare const onDataCollectionCreated: BuildEventDefinition<typeof onDataCollectionCreated$1>;
|
|
1565
|
+
declare const onDataCollectionUpdated: BuildEventDefinition<typeof onDataCollectionUpdated$1>;
|
|
1566
|
+
declare const onDataCollectionDeleted: BuildEventDefinition<typeof onDataCollectionDeleted$1>;
|
|
1610
1567
|
|
|
1611
1568
|
declare const context$2_createDataCollection: typeof createDataCollection;
|
|
1612
1569
|
declare const context$2_deleteDataCollection: typeof deleteDataCollection;
|
|
@@ -2317,7 +2274,7 @@ interface QueryDataItemsOptions {
|
|
|
2317
2274
|
* Up to 50 referenced items can be included for each item that matches the query.
|
|
2318
2275
|
* @deprecated
|
|
2319
2276
|
* @replacedBy referenced_item_options
|
|
2320
|
-
* @
|
|
2277
|
+
* @targetRemovalDate 2025-08-01
|
|
2321
2278
|
*/
|
|
2322
2279
|
includeReferencedItems?: string[] | undefined;
|
|
2323
2280
|
/**
|
|
@@ -2668,98 +2625,55 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
2668
2625
|
newReferencedItemIds?: string[];
|
|
2669
2626
|
}
|
|
2670
2627
|
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
}
|
|
2676
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2677
|
-
type HttpResponse$1<T = any> = {
|
|
2678
|
-
data: T;
|
|
2679
|
-
status: number;
|
|
2680
|
-
statusText: string;
|
|
2681
|
-
headers: any;
|
|
2682
|
-
request?: any;
|
|
2683
|
-
};
|
|
2684
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2685
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2686
|
-
url: string;
|
|
2687
|
-
data?: Data;
|
|
2688
|
-
params?: URLSearchParams;
|
|
2689
|
-
} & APIMetadata$1;
|
|
2690
|
-
type APIMetadata$1 = {
|
|
2691
|
-
methodFqn?: string;
|
|
2692
|
-
entityFqdn?: string;
|
|
2693
|
-
packageName?: string;
|
|
2694
|
-
};
|
|
2695
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2696
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2697
|
-
__type: 'event-definition';
|
|
2698
|
-
type: Type;
|
|
2699
|
-
isDomainEvent?: boolean;
|
|
2700
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2701
|
-
__payload: Payload;
|
|
2702
|
-
};
|
|
2703
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2704
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2705
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2706
|
-
|
|
2707
|
-
declare global {
|
|
2708
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2709
|
-
interface SymbolConstructor {
|
|
2710
|
-
readonly observable: symbol;
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
declare function insertDataItem$1(httpClient: HttpClient$1): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
2715
|
-
declare function updateDataItem$1(httpClient: HttpClient$1): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
2716
|
-
declare function saveDataItem$1(httpClient: HttpClient$1): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
2717
|
-
declare function getDataItem$1(httpClient: HttpClient$1): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
2628
|
+
declare function insertDataItem$1(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
2629
|
+
declare function updateDataItem$1(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
2630
|
+
declare function saveDataItem$1(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
2631
|
+
declare function getDataItem$1(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
2718
2632
|
_id: string;
|
|
2719
2633
|
dataCollectionId: string;
|
|
2720
2634
|
}>;
|
|
2721
|
-
declare function removeDataItem$1(httpClient: HttpClient
|
|
2722
|
-
declare function truncateDataItems$1(httpClient: HttpClient
|
|
2723
|
-
declare function queryDataItems$1(httpClient: HttpClient
|
|
2724
|
-
declare function aggregateDataItems$1(httpClient: HttpClient
|
|
2725
|
-
declare function countDataItems$1(httpClient: HttpClient
|
|
2726
|
-
declare function queryDistinctValues$1(httpClient: HttpClient
|
|
2727
|
-
declare function bulkInsertDataItems$1(httpClient: HttpClient
|
|
2728
|
-
declare function bulkUpdateDataItems$1(httpClient: HttpClient
|
|
2729
|
-
declare function bulkSaveDataItems$1(httpClient: HttpClient
|
|
2730
|
-
declare function bulkRemoveDataItems$1(httpClient: HttpClient
|
|
2731
|
-
declare function queryReferencedDataItems$1(httpClient: HttpClient
|
|
2732
|
-
declare function isReferencedDataItem$1(httpClient: HttpClient
|
|
2733
|
-
declare function insertDataItemReference$1(httpClient: HttpClient
|
|
2734
|
-
declare function removeDataItemReference$1(httpClient: HttpClient
|
|
2735
|
-
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient
|
|
2736
|
-
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient
|
|
2737
|
-
declare function replaceDataItemReferences$1(httpClient: HttpClient
|
|
2635
|
+
declare function removeDataItem$1(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
2636
|
+
declare function truncateDataItems$1(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
2637
|
+
declare function queryDataItems$1(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
2638
|
+
declare function aggregateDataItems$1(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
2639
|
+
declare function countDataItems$1(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
2640
|
+
declare function queryDistinctValues$1(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
2641
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
2642
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
2643
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
2644
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
2645
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
2646
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
2647
|
+
declare function insertDataItemReference$1(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
2648
|
+
declare function removeDataItemReference$1(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
2649
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
2650
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
2651
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
2738
2652
|
declare const onDataItemCreated$1: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
2739
2653
|
declare const onDataItemUpdated$1: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
2740
2654
|
declare const onDataItemDeleted$1: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
2741
2655
|
|
|
2742
|
-
declare const insertDataItem: BuildRESTFunction
|
|
2743
|
-
declare const updateDataItem: BuildRESTFunction
|
|
2744
|
-
declare const saveDataItem: BuildRESTFunction
|
|
2745
|
-
declare const getDataItem: BuildRESTFunction
|
|
2746
|
-
declare const removeDataItem: BuildRESTFunction
|
|
2747
|
-
declare const truncateDataItems: BuildRESTFunction
|
|
2748
|
-
declare const queryDataItems: BuildRESTFunction
|
|
2749
|
-
declare const aggregateDataItems: BuildRESTFunction
|
|
2750
|
-
declare const countDataItems: BuildRESTFunction
|
|
2751
|
-
declare const queryDistinctValues: BuildRESTFunction
|
|
2752
|
-
declare const bulkInsertDataItems: BuildRESTFunction
|
|
2753
|
-
declare const bulkUpdateDataItems: BuildRESTFunction
|
|
2754
|
-
declare const bulkSaveDataItems: BuildRESTFunction
|
|
2755
|
-
declare const bulkRemoveDataItems: BuildRESTFunction
|
|
2756
|
-
declare const queryReferencedDataItems: BuildRESTFunction
|
|
2757
|
-
declare const isReferencedDataItem: BuildRESTFunction
|
|
2758
|
-
declare const insertDataItemReference: BuildRESTFunction
|
|
2759
|
-
declare const removeDataItemReference: BuildRESTFunction
|
|
2760
|
-
declare const bulkInsertDataItemReferences: BuildRESTFunction
|
|
2761
|
-
declare const bulkRemoveDataItemReferences: BuildRESTFunction
|
|
2762
|
-
declare const replaceDataItemReferences: BuildRESTFunction
|
|
2656
|
+
declare const insertDataItem: BuildRESTFunction<typeof insertDataItem$1>;
|
|
2657
|
+
declare const updateDataItem: BuildRESTFunction<typeof updateDataItem$1>;
|
|
2658
|
+
declare const saveDataItem: BuildRESTFunction<typeof saveDataItem$1>;
|
|
2659
|
+
declare const getDataItem: BuildRESTFunction<typeof getDataItem$1>;
|
|
2660
|
+
declare const removeDataItem: BuildRESTFunction<typeof removeDataItem$1>;
|
|
2661
|
+
declare const truncateDataItems: BuildRESTFunction<typeof truncateDataItems$1>;
|
|
2662
|
+
declare const queryDataItems: BuildRESTFunction<typeof queryDataItems$1>;
|
|
2663
|
+
declare const aggregateDataItems: BuildRESTFunction<typeof aggregateDataItems$1>;
|
|
2664
|
+
declare const countDataItems: BuildRESTFunction<typeof countDataItems$1>;
|
|
2665
|
+
declare const queryDistinctValues: BuildRESTFunction<typeof queryDistinctValues$1>;
|
|
2666
|
+
declare const bulkInsertDataItems: BuildRESTFunction<typeof bulkInsertDataItems$1>;
|
|
2667
|
+
declare const bulkUpdateDataItems: BuildRESTFunction<typeof bulkUpdateDataItems$1>;
|
|
2668
|
+
declare const bulkSaveDataItems: BuildRESTFunction<typeof bulkSaveDataItems$1>;
|
|
2669
|
+
declare const bulkRemoveDataItems: BuildRESTFunction<typeof bulkRemoveDataItems$1>;
|
|
2670
|
+
declare const queryReferencedDataItems: BuildRESTFunction<typeof queryReferencedDataItems$1>;
|
|
2671
|
+
declare const isReferencedDataItem: BuildRESTFunction<typeof isReferencedDataItem$1>;
|
|
2672
|
+
declare const insertDataItemReference: BuildRESTFunction<typeof insertDataItemReference$1>;
|
|
2673
|
+
declare const removeDataItemReference: BuildRESTFunction<typeof removeDataItemReference$1>;
|
|
2674
|
+
declare const bulkInsertDataItemReferences: BuildRESTFunction<typeof bulkInsertDataItemReferences$1>;
|
|
2675
|
+
declare const bulkRemoveDataItemReferences: BuildRESTFunction<typeof bulkRemoveDataItemReferences$1>;
|
|
2676
|
+
declare const replaceDataItemReferences: BuildRESTFunction<typeof replaceDataItemReferences$1>;
|
|
2763
2677
|
declare const onDataItemCreated: BuildEventDefinition<typeof onDataItemCreated$1>;
|
|
2764
2678
|
declare const onDataItemUpdated: BuildEventDefinition<typeof onDataItemUpdated$1>;
|
|
2765
2679
|
declare const onDataItemDeleted: BuildEventDefinition<typeof onDataItemDeleted$1>;
|
|
@@ -2925,39 +2839,6 @@ interface ListIndexesOptions {
|
|
|
2925
2839
|
paging?: Paging;
|
|
2926
2840
|
}
|
|
2927
2841
|
|
|
2928
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2929
|
-
interface HttpClient {
|
|
2930
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2931
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2932
|
-
}
|
|
2933
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2934
|
-
type HttpResponse<T = any> = {
|
|
2935
|
-
data: T;
|
|
2936
|
-
status: number;
|
|
2937
|
-
statusText: string;
|
|
2938
|
-
headers: any;
|
|
2939
|
-
request?: any;
|
|
2940
|
-
};
|
|
2941
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2942
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2943
|
-
url: string;
|
|
2944
|
-
data?: Data;
|
|
2945
|
-
params?: URLSearchParams;
|
|
2946
|
-
} & APIMetadata;
|
|
2947
|
-
type APIMetadata = {
|
|
2948
|
-
methodFqn?: string;
|
|
2949
|
-
entityFqdn?: string;
|
|
2950
|
-
packageName?: string;
|
|
2951
|
-
};
|
|
2952
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2953
|
-
|
|
2954
|
-
declare global {
|
|
2955
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2956
|
-
interface SymbolConstructor {
|
|
2957
|
-
readonly observable: symbol;
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
|
|
2961
2842
|
declare function createIndex$1(httpClient: HttpClient): (dataCollectionId: string, index: Index) => Promise<Index & {
|
|
2962
2843
|
name: string;
|
|
2963
2844
|
fields: {
|
|
@@ -441,37 +441,37 @@ interface UpdateExternalDatabaseConnection {
|
|
|
441
441
|
capabilities?: Capabilities;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
interface HttpClient
|
|
445
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
444
|
+
interface HttpClient {
|
|
445
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
446
446
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
447
447
|
}
|
|
448
|
-
type RequestOptionsFactory
|
|
449
|
-
type HttpResponse
|
|
448
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
449
|
+
type HttpResponse<T = any> = {
|
|
450
450
|
data: T;
|
|
451
451
|
status: number;
|
|
452
452
|
statusText: string;
|
|
453
453
|
headers: any;
|
|
454
454
|
request?: any;
|
|
455
455
|
};
|
|
456
|
-
type RequestOptions
|
|
456
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
457
457
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
458
458
|
url: string;
|
|
459
459
|
data?: Data;
|
|
460
460
|
params?: URLSearchParams;
|
|
461
|
-
} & APIMetadata
|
|
462
|
-
type APIMetadata
|
|
461
|
+
} & APIMetadata;
|
|
462
|
+
type APIMetadata = {
|
|
463
463
|
methodFqn?: string;
|
|
464
464
|
entityFqdn?: string;
|
|
465
465
|
packageName?: string;
|
|
466
466
|
};
|
|
467
|
-
type EventDefinition
|
|
467
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
468
468
|
__type: 'event-definition';
|
|
469
469
|
type: Type;
|
|
470
470
|
isDomainEvent?: boolean;
|
|
471
471
|
transformations?: (envelope: unknown) => Payload;
|
|
472
472
|
__payload: Payload;
|
|
473
473
|
};
|
|
474
|
-
declare function EventDefinition
|
|
474
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
475
475
|
|
|
476
476
|
declare global {
|
|
477
477
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -483,7 +483,7 @@ declare global {
|
|
|
483
483
|
declare const __metadata$3: {
|
|
484
484
|
PACKAGE_NAME: string;
|
|
485
485
|
};
|
|
486
|
-
declare function getExternalDatabaseConnection(httpClient: HttpClient
|
|
486
|
+
declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
487
487
|
name: string;
|
|
488
488
|
connectionStatus?: {
|
|
489
489
|
successful: boolean;
|
|
@@ -495,8 +495,8 @@ declare function getExternalDatabaseConnection(httpClient: HttpClient$3): (name:
|
|
|
495
495
|
fieldTypes: FieldType[];
|
|
496
496
|
} | undefined;
|
|
497
497
|
}>;
|
|
498
|
-
declare function listExternalDatabaseConnections(httpClient: HttpClient
|
|
499
|
-
declare function createExternalDatabaseConnection(httpClient: HttpClient
|
|
498
|
+
declare function listExternalDatabaseConnections(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
499
|
+
declare function createExternalDatabaseConnection(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
500
500
|
name: string;
|
|
501
501
|
connectionStatus?: {
|
|
502
502
|
successful: boolean;
|
|
@@ -508,7 +508,7 @@ declare function createExternalDatabaseConnection(httpClient: HttpClient$3): (ex
|
|
|
508
508
|
fieldTypes: FieldType[];
|
|
509
509
|
} | undefined;
|
|
510
510
|
}>;
|
|
511
|
-
declare function updateExternalDatabaseConnection(httpClient: HttpClient
|
|
511
|
+
declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
512
512
|
name: string;
|
|
513
513
|
connectionStatus?: {
|
|
514
514
|
successful: boolean;
|
|
@@ -520,10 +520,10 @@ declare function updateExternalDatabaseConnection(httpClient: HttpClient$3): (na
|
|
|
520
520
|
fieldTypes: FieldType[];
|
|
521
521
|
} | undefined;
|
|
522
522
|
}>;
|
|
523
|
-
declare function deleteExternalDatabaseConnection(httpClient: HttpClient
|
|
524
|
-
declare const onExternalDatabaseConnectionCreated: EventDefinition
|
|
525
|
-
declare const onExternalDatabaseConnectionUpdated: EventDefinition
|
|
526
|
-
declare const onExternalDatabaseConnectionDeleted: EventDefinition
|
|
523
|
+
declare function deleteExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
524
|
+
declare const onExternalDatabaseConnectionCreated: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
525
|
+
declare const onExternalDatabaseConnectionUpdated: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
526
|
+
declare const onExternalDatabaseConnectionDeleted: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
527
527
|
|
|
528
528
|
type index_d$3_Capabilities = Capabilities;
|
|
529
529
|
type index_d$3_CauseOfFailure = CauseOfFailure;
|
|
@@ -2174,49 +2174,10 @@ interface ListDataCollectionsOptions {
|
|
|
2174
2174
|
consistentRead?: boolean;
|
|
2175
2175
|
}
|
|
2176
2176
|
|
|
2177
|
-
interface HttpClient$2 {
|
|
2178
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
2179
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2180
|
-
}
|
|
2181
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
2182
|
-
type HttpResponse$2<T = any> = {
|
|
2183
|
-
data: T;
|
|
2184
|
-
status: number;
|
|
2185
|
-
statusText: string;
|
|
2186
|
-
headers: any;
|
|
2187
|
-
request?: any;
|
|
2188
|
-
};
|
|
2189
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
2190
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2191
|
-
url: string;
|
|
2192
|
-
data?: Data;
|
|
2193
|
-
params?: URLSearchParams;
|
|
2194
|
-
} & APIMetadata$2;
|
|
2195
|
-
type APIMetadata$2 = {
|
|
2196
|
-
methodFqn?: string;
|
|
2197
|
-
entityFqdn?: string;
|
|
2198
|
-
packageName?: string;
|
|
2199
|
-
};
|
|
2200
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2201
|
-
__type: 'event-definition';
|
|
2202
|
-
type: Type;
|
|
2203
|
-
isDomainEvent?: boolean;
|
|
2204
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2205
|
-
__payload: Payload;
|
|
2206
|
-
};
|
|
2207
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2208
|
-
|
|
2209
|
-
declare global {
|
|
2210
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2211
|
-
interface SymbolConstructor {
|
|
2212
|
-
readonly observable: symbol;
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
2177
|
declare const __metadata$2: {
|
|
2217
2178
|
PACKAGE_NAME: string;
|
|
2218
2179
|
};
|
|
2219
|
-
declare function createDataCollection(httpClient: HttpClient
|
|
2180
|
+
declare function createDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2220
2181
|
_id: string;
|
|
2221
2182
|
collectionType: CollectionType;
|
|
2222
2183
|
defaultDisplayOrder?: {
|
|
@@ -2317,7 +2278,7 @@ declare function createDataCollection(httpClient: HttpClient$2): (collection: Da
|
|
|
2317
2278
|
}[];
|
|
2318
2279
|
pagingModes: PagingMode[];
|
|
2319
2280
|
}>;
|
|
2320
|
-
declare function getDataCollection(httpClient: HttpClient
|
|
2281
|
+
declare function getDataCollection(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
2321
2282
|
_id: string;
|
|
2322
2283
|
collectionType: CollectionType;
|
|
2323
2284
|
defaultDisplayOrder?: {
|
|
@@ -2418,8 +2379,8 @@ declare function getDataCollection(httpClient: HttpClient$2): (dataCollectionId:
|
|
|
2418
2379
|
}[];
|
|
2419
2380
|
pagingModes: PagingMode[];
|
|
2420
2381
|
}>;
|
|
2421
|
-
declare function listDataCollections(httpClient: HttpClient
|
|
2422
|
-
declare function updateDataCollection(httpClient: HttpClient
|
|
2382
|
+
declare function listDataCollections(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2383
|
+
declare function updateDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2423
2384
|
_id: string;
|
|
2424
2385
|
collectionType: CollectionType;
|
|
2425
2386
|
defaultDisplayOrder?: {
|
|
@@ -2520,12 +2481,12 @@ declare function updateDataCollection(httpClient: HttpClient$2): (collection: Da
|
|
|
2520
2481
|
}[];
|
|
2521
2482
|
pagingModes: PagingMode[];
|
|
2522
2483
|
}>;
|
|
2523
|
-
declare function deleteDataCollection(httpClient: HttpClient
|
|
2524
|
-
declare const onDataCollectionClonedEvent: EventDefinition
|
|
2525
|
-
declare const onDataCollectionChangedEvent: EventDefinition
|
|
2526
|
-
declare const onDataCollectionCreated: EventDefinition
|
|
2527
|
-
declare const onDataCollectionUpdated: EventDefinition
|
|
2528
|
-
declare const onDataCollectionDeleted: EventDefinition
|
|
2484
|
+
declare function deleteDataCollection(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
2485
|
+
declare const onDataCollectionClonedEvent: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2486
|
+
declare const onDataCollectionChangedEvent: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2487
|
+
declare const onDataCollectionCreated: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2488
|
+
declare const onDataCollectionUpdated: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2489
|
+
declare const onDataCollectionDeleted: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2529
2490
|
|
|
2530
2491
|
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2531
2492
|
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
@@ -2893,7 +2854,7 @@ interface QueryDataItemsRequest {
|
|
|
2893
2854
|
* Up to 50 referenced items can be included for each item that matches the query.
|
|
2894
2855
|
* @deprecated
|
|
2895
2856
|
* @replacedBy referenced_item_options
|
|
2896
|
-
* @
|
|
2857
|
+
* @targetRemovalDate 2025-08-01
|
|
2897
2858
|
*/
|
|
2898
2859
|
includeReferencedItems?: string[];
|
|
2899
2860
|
/**
|
|
@@ -3933,7 +3894,7 @@ interface QueryDataItemsOptions {
|
|
|
3933
3894
|
* Up to 50 referenced items can be included for each item that matches the query.
|
|
3934
3895
|
* @deprecated
|
|
3935
3896
|
* @replacedBy referenced_item_options
|
|
3936
|
-
* @
|
|
3897
|
+
* @targetRemovalDate 2025-08-01
|
|
3937
3898
|
*/
|
|
3938
3899
|
includeReferencedItems?: string[] | undefined;
|
|
3939
3900
|
/**
|
|
@@ -4284,72 +4245,33 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
4284
4245
|
newReferencedItemIds?: string[];
|
|
4285
4246
|
}
|
|
4286
4247
|
|
|
4287
|
-
interface HttpClient$1 {
|
|
4288
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4289
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4290
|
-
}
|
|
4291
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4292
|
-
type HttpResponse$1<T = any> = {
|
|
4293
|
-
data: T;
|
|
4294
|
-
status: number;
|
|
4295
|
-
statusText: string;
|
|
4296
|
-
headers: any;
|
|
4297
|
-
request?: any;
|
|
4298
|
-
};
|
|
4299
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4300
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4301
|
-
url: string;
|
|
4302
|
-
data?: Data;
|
|
4303
|
-
params?: URLSearchParams;
|
|
4304
|
-
} & APIMetadata$1;
|
|
4305
|
-
type APIMetadata$1 = {
|
|
4306
|
-
methodFqn?: string;
|
|
4307
|
-
entityFqdn?: string;
|
|
4308
|
-
packageName?: string;
|
|
4309
|
-
};
|
|
4310
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4311
|
-
__type: 'event-definition';
|
|
4312
|
-
type: Type;
|
|
4313
|
-
isDomainEvent?: boolean;
|
|
4314
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4315
|
-
__payload: Payload;
|
|
4316
|
-
};
|
|
4317
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4318
|
-
|
|
4319
|
-
declare global {
|
|
4320
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4321
|
-
interface SymbolConstructor {
|
|
4322
|
-
readonly observable: symbol;
|
|
4323
|
-
}
|
|
4324
|
-
}
|
|
4325
|
-
|
|
4326
4248
|
declare const __metadata$1: {
|
|
4327
4249
|
PACKAGE_NAME: string;
|
|
4328
4250
|
};
|
|
4329
|
-
declare function insertDataItem(httpClient: HttpClient
|
|
4330
|
-
declare function updateDataItem(httpClient: HttpClient
|
|
4331
|
-
declare function saveDataItem(httpClient: HttpClient
|
|
4332
|
-
declare function getDataItem(httpClient: HttpClient
|
|
4251
|
+
declare function insertDataItem(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4252
|
+
declare function updateDataItem(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4253
|
+
declare function saveDataItem(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4254
|
+
declare function getDataItem(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
4333
4255
|
_id: string;
|
|
4334
4256
|
dataCollectionId: string;
|
|
4335
4257
|
}>;
|
|
4336
|
-
declare function removeDataItem(httpClient: HttpClient
|
|
4337
|
-
declare function truncateDataItems(httpClient: HttpClient
|
|
4338
|
-
declare function queryDataItems(httpClient: HttpClient
|
|
4339
|
-
declare function aggregateDataItems(httpClient: HttpClient
|
|
4340
|
-
declare function countDataItems(httpClient: HttpClient
|
|
4341
|
-
declare function queryDistinctValues(httpClient: HttpClient
|
|
4342
|
-
declare function bulkInsertDataItems(httpClient: HttpClient
|
|
4343
|
-
declare function bulkUpdateDataItems(httpClient: HttpClient
|
|
4344
|
-
declare function bulkSaveDataItems(httpClient: HttpClient
|
|
4345
|
-
declare function bulkRemoveDataItems(httpClient: HttpClient
|
|
4346
|
-
declare function queryReferencedDataItems(httpClient: HttpClient
|
|
4347
|
-
declare function isReferencedDataItem(httpClient: HttpClient
|
|
4348
|
-
declare function insertDataItemReference(httpClient: HttpClient
|
|
4349
|
-
declare function removeDataItemReference(httpClient: HttpClient
|
|
4350
|
-
declare function bulkInsertDataItemReferences(httpClient: HttpClient
|
|
4351
|
-
declare function bulkRemoveDataItemReferences(httpClient: HttpClient
|
|
4352
|
-
declare function replaceDataItemReferences(httpClient: HttpClient
|
|
4258
|
+
declare function removeDataItem(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4259
|
+
declare function truncateDataItems(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
4260
|
+
declare function queryDataItems(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
4261
|
+
declare function aggregateDataItems(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
4262
|
+
declare function countDataItems(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4263
|
+
declare function queryDistinctValues(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
4264
|
+
declare function bulkInsertDataItems(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4265
|
+
declare function bulkUpdateDataItems(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4266
|
+
declare function bulkSaveDataItems(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4267
|
+
declare function bulkRemoveDataItems(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4268
|
+
declare function queryReferencedDataItems(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4269
|
+
declare function isReferencedDataItem(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4270
|
+
declare function insertDataItemReference(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4271
|
+
declare function removeDataItemReference(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4272
|
+
declare function bulkInsertDataItemReferences(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4273
|
+
declare function bulkRemoveDataItemReferences(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4274
|
+
declare function replaceDataItemReferences(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4353
4275
|
declare const onDataItemCreated: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4354
4276
|
declare const onDataItemUpdated: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4355
4277
|
declare const onDataItemDeleted: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
@@ -4714,37 +4636,6 @@ interface ListIndexesOptions {
|
|
|
4714
4636
|
paging?: Paging;
|
|
4715
4637
|
}
|
|
4716
4638
|
|
|
4717
|
-
interface HttpClient {
|
|
4718
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4719
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4720
|
-
}
|
|
4721
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4722
|
-
type HttpResponse<T = any> = {
|
|
4723
|
-
data: T;
|
|
4724
|
-
status: number;
|
|
4725
|
-
statusText: string;
|
|
4726
|
-
headers: any;
|
|
4727
|
-
request?: any;
|
|
4728
|
-
};
|
|
4729
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4730
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4731
|
-
url: string;
|
|
4732
|
-
data?: Data;
|
|
4733
|
-
params?: URLSearchParams;
|
|
4734
|
-
} & APIMetadata;
|
|
4735
|
-
type APIMetadata = {
|
|
4736
|
-
methodFqn?: string;
|
|
4737
|
-
entityFqdn?: string;
|
|
4738
|
-
packageName?: string;
|
|
4739
|
-
};
|
|
4740
|
-
|
|
4741
|
-
declare global {
|
|
4742
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4743
|
-
interface SymbolConstructor {
|
|
4744
|
-
readonly observable: symbol;
|
|
4745
|
-
}
|
|
4746
|
-
}
|
|
4747
|
-
|
|
4748
4639
|
declare const __metadata: {
|
|
4749
4640
|
PACKAGE_NAME: string;
|
|
4750
4641
|
};
|
|
@@ -3061,7 +3061,7 @@ interface QueryDataItemsRequest$1 {
|
|
|
3061
3061
|
* Up to 50 referenced items can be included for each item that matches the query.
|
|
3062
3062
|
* @deprecated
|
|
3063
3063
|
* @replacedBy referenced_item_options
|
|
3064
|
-
* @
|
|
3064
|
+
* @targetRemovalDate 2025-08-01
|
|
3065
3065
|
*/
|
|
3066
3066
|
includeReferencedItems?: string[];
|
|
3067
3067
|
/**
|
|
@@ -4010,7 +4010,7 @@ interface QueryDataItemsRequest {
|
|
|
4010
4010
|
* Up to 50 referenced items can be included for each item that matches the query.
|
|
4011
4011
|
* @deprecated
|
|
4012
4012
|
* @replacedBy referenced_item_options
|
|
4013
|
-
* @
|
|
4013
|
+
* @targetRemovalDate 2025-08-01
|
|
4014
4014
|
*/
|
|
4015
4015
|
includeReferencedItems?: string[];
|
|
4016
4016
|
/**
|