@wix/data 1.0.121 → 1.0.122
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.122",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -19,14 +19,13 @@
|
|
|
19
19
|
"service-plugins"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@wix/data_collections": "1.0.
|
|
23
|
-
"@wix/data_external-database": "1.0.
|
|
24
|
-
"@wix/data_external-database-connections": "1.0.
|
|
25
|
-
"@wix/data_indexes": "1.0.
|
|
26
|
-
"@wix/data_items": "1.0.
|
|
22
|
+
"@wix/data_collections": "1.0.26",
|
|
23
|
+
"@wix/data_external-database": "1.0.4",
|
|
24
|
+
"@wix/data_external-database-connections": "1.0.24",
|
|
25
|
+
"@wix/data_indexes": "1.0.21",
|
|
26
|
+
"@wix/data_items": "1.0.31"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
30
29
|
"glob": "^10.4.1",
|
|
31
30
|
"rollup": "^4.18.0",
|
|
32
31
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -48,5 +47,5 @@
|
|
|
48
47
|
"fqdn": ""
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "bb128870f1c47f6c1641b70c8e835cc086d8085a6677d4f23df0f42d"
|
|
52
51
|
}
|
|
@@ -280,42 +280,50 @@ interface UpdateExternalDatabaseConnection {
|
|
|
280
280
|
capabilities?: Capabilities;
|
|
281
281
|
}
|
|
282
282
|
|
|
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>>;
|
|
283
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
284
|
+
interface HttpClient$3 {
|
|
285
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
286
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
286
287
|
}
|
|
287
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
288
|
-
type HttpResponse<T = any> = {
|
|
288
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
289
|
+
type HttpResponse$3<T = any> = {
|
|
289
290
|
data: T;
|
|
290
291
|
status: number;
|
|
291
292
|
statusText: string;
|
|
292
293
|
headers: any;
|
|
293
294
|
request?: any;
|
|
294
295
|
};
|
|
295
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
296
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
296
297
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
297
298
|
url: string;
|
|
298
299
|
data?: Data;
|
|
299
300
|
params?: URLSearchParams;
|
|
300
|
-
} & APIMetadata;
|
|
301
|
-
type APIMetadata = {
|
|
301
|
+
} & APIMetadata$3;
|
|
302
|
+
type APIMetadata$3 = {
|
|
302
303
|
methodFqn?: string;
|
|
303
304
|
entityFqdn?: string;
|
|
304
305
|
packageName?: string;
|
|
305
306
|
};
|
|
306
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
307
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
307
|
+
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
308
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
308
309
|
__type: 'event-definition';
|
|
309
310
|
type: Type;
|
|
310
311
|
isDomainEvent?: boolean;
|
|
311
|
-
transformations?: unknown;
|
|
312
|
+
transformations?: (envelope: unknown) => Payload;
|
|
312
313
|
__payload: Payload;
|
|
313
314
|
};
|
|
314
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
315
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
316
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
315
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
316
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
317
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
317
318
|
|
|
318
|
-
declare
|
|
319
|
+
declare global {
|
|
320
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
321
|
+
interface SymbolConstructor {
|
|
322
|
+
readonly observable: symbol;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare function getExternalDatabaseConnection$1(httpClient: HttpClient$3): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
319
327
|
name: string;
|
|
320
328
|
connectionStatus?: {
|
|
321
329
|
successful: boolean;
|
|
@@ -327,8 +335,8 @@ declare function getExternalDatabaseConnection$1(httpClient: HttpClient): (name:
|
|
|
327
335
|
fieldTypes: FieldType[];
|
|
328
336
|
} | undefined;
|
|
329
337
|
}>;
|
|
330
|
-
declare function listExternalDatabaseConnections$1(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
331
|
-
declare function createExternalDatabaseConnection$1(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
338
|
+
declare function listExternalDatabaseConnections$1(httpClient: HttpClient$3): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
339
|
+
declare function createExternalDatabaseConnection$1(httpClient: HttpClient$3): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
332
340
|
name: string;
|
|
333
341
|
connectionStatus?: {
|
|
334
342
|
successful: boolean;
|
|
@@ -340,7 +348,7 @@ declare function createExternalDatabaseConnection$1(httpClient: HttpClient): (ex
|
|
|
340
348
|
fieldTypes: FieldType[];
|
|
341
349
|
} | undefined;
|
|
342
350
|
}>;
|
|
343
|
-
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
351
|
+
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient$3): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
344
352
|
name: string;
|
|
345
353
|
connectionStatus?: {
|
|
346
354
|
successful: boolean;
|
|
@@ -352,19 +360,19 @@ declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): (na
|
|
|
352
360
|
fieldTypes: FieldType[];
|
|
353
361
|
} | undefined;
|
|
354
362
|
}>;
|
|
355
|
-
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
356
|
-
declare const onExternalDatabaseConnectionCreated$1: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
357
|
-
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
358
|
-
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
363
|
+
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient$3): (name: string) => Promise<void>;
|
|
364
|
+
declare const onExternalDatabaseConnectionCreated$1: EventDefinition$2<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
365
|
+
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition$2<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
366
|
+
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition$2<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
359
367
|
|
|
360
|
-
declare const getExternalDatabaseConnection: BuildRESTFunction<typeof getExternalDatabaseConnection$1>;
|
|
361
|
-
declare const listExternalDatabaseConnections: BuildRESTFunction<typeof listExternalDatabaseConnections$1>;
|
|
362
|
-
declare const createExternalDatabaseConnection: BuildRESTFunction<typeof createExternalDatabaseConnection$1>;
|
|
363
|
-
declare const updateExternalDatabaseConnection: BuildRESTFunction<typeof updateExternalDatabaseConnection$1>;
|
|
364
|
-
declare const deleteExternalDatabaseConnection: BuildRESTFunction<typeof deleteExternalDatabaseConnection$1>;
|
|
365
|
-
declare const onExternalDatabaseConnectionCreated: BuildEventDefinition<typeof onExternalDatabaseConnectionCreated$1>;
|
|
366
|
-
declare const onExternalDatabaseConnectionUpdated: BuildEventDefinition<typeof onExternalDatabaseConnectionUpdated$1>;
|
|
367
|
-
declare const onExternalDatabaseConnectionDeleted: BuildEventDefinition<typeof onExternalDatabaseConnectionDeleted$1>;
|
|
368
|
+
declare const getExternalDatabaseConnection: BuildRESTFunction$3<typeof getExternalDatabaseConnection$1>;
|
|
369
|
+
declare const listExternalDatabaseConnections: BuildRESTFunction$3<typeof listExternalDatabaseConnections$1>;
|
|
370
|
+
declare const createExternalDatabaseConnection: BuildRESTFunction$3<typeof createExternalDatabaseConnection$1>;
|
|
371
|
+
declare const updateExternalDatabaseConnection: BuildRESTFunction$3<typeof updateExternalDatabaseConnection$1>;
|
|
372
|
+
declare const deleteExternalDatabaseConnection: BuildRESTFunction$3<typeof deleteExternalDatabaseConnection$1>;
|
|
373
|
+
declare const onExternalDatabaseConnectionCreated: BuildEventDefinition$2<typeof onExternalDatabaseConnectionCreated$1>;
|
|
374
|
+
declare const onExternalDatabaseConnectionUpdated: BuildEventDefinition$2<typeof onExternalDatabaseConnectionUpdated$1>;
|
|
375
|
+
declare const onExternalDatabaseConnectionDeleted: BuildEventDefinition$2<typeof onExternalDatabaseConnectionDeleted$1>;
|
|
368
376
|
|
|
369
377
|
declare const context$3_createExternalDatabaseConnection: typeof createExternalDatabaseConnection;
|
|
370
378
|
declare const context$3_deleteExternalDatabaseConnection: typeof deleteExternalDatabaseConnection;
|
|
@@ -1235,7 +1243,50 @@ interface ListDataCollectionsOptions {
|
|
|
1235
1243
|
consistentRead?: boolean;
|
|
1236
1244
|
}
|
|
1237
1245
|
|
|
1238
|
-
|
|
1246
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
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 & {
|
|
1239
1290
|
_id: string;
|
|
1240
1291
|
collectionType: CollectionType;
|
|
1241
1292
|
defaultDisplayOrder?: {
|
|
@@ -1336,7 +1387,7 @@ declare function createDataCollection$1(httpClient: HttpClient): (collection: Da
|
|
|
1336
1387
|
}[];
|
|
1337
1388
|
pagingModes: PagingMode[];
|
|
1338
1389
|
}>;
|
|
1339
|
-
declare function getDataCollection$1(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
1390
|
+
declare function getDataCollection$1(httpClient: HttpClient$2): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
1340
1391
|
_id: string;
|
|
1341
1392
|
collectionType: CollectionType;
|
|
1342
1393
|
defaultDisplayOrder?: {
|
|
@@ -1437,8 +1488,8 @@ declare function getDataCollection$1(httpClient: HttpClient): (dataCollectionId:
|
|
|
1437
1488
|
}[];
|
|
1438
1489
|
pagingModes: PagingMode[];
|
|
1439
1490
|
}>;
|
|
1440
|
-
declare function listDataCollections$1(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
1441
|
-
declare function updateDataCollection$1(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
1491
|
+
declare function listDataCollections$1(httpClient: HttpClient$2): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
1492
|
+
declare function updateDataCollection$1(httpClient: HttpClient$2): (collection: DataCollection) => Promise<DataCollection & {
|
|
1442
1493
|
_id: string;
|
|
1443
1494
|
collectionType: CollectionType;
|
|
1444
1495
|
defaultDisplayOrder?: {
|
|
@@ -1539,23 +1590,23 @@ declare function updateDataCollection$1(httpClient: HttpClient): (collection: Da
|
|
|
1539
1590
|
}[];
|
|
1540
1591
|
pagingModes: PagingMode[];
|
|
1541
1592
|
}>;
|
|
1542
|
-
declare function deleteDataCollection$1(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
1543
|
-
declare const onDataCollectionClonedEvent$1: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
1544
|
-
declare const onDataCollectionChangedEvent$1: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
1545
|
-
declare const onDataCollectionCreated$1: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
1546
|
-
declare const onDataCollectionUpdated$1: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
1547
|
-
declare const onDataCollectionDeleted$1: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
1593
|
+
declare function deleteDataCollection$1(httpClient: HttpClient$2): (dataCollectionId: string) => Promise<void>;
|
|
1594
|
+
declare const onDataCollectionClonedEvent$1: EventDefinition$1<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
1595
|
+
declare const onDataCollectionChangedEvent$1: EventDefinition$1<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
1596
|
+
declare const onDataCollectionCreated$1: EventDefinition$1<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
1597
|
+
declare const onDataCollectionUpdated$1: EventDefinition$1<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
1598
|
+
declare const onDataCollectionDeleted$1: EventDefinition$1<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
1548
1599
|
|
|
1549
|
-
declare const createDataCollection: BuildRESTFunction<typeof createDataCollection$1>;
|
|
1550
|
-
declare const getDataCollection: BuildRESTFunction<typeof getDataCollection$1>;
|
|
1551
|
-
declare const listDataCollections: BuildRESTFunction<typeof listDataCollections$1>;
|
|
1552
|
-
declare const updateDataCollection: BuildRESTFunction<typeof updateDataCollection$1>;
|
|
1553
|
-
declare const deleteDataCollection: BuildRESTFunction<typeof deleteDataCollection$1>;
|
|
1554
|
-
declare const onDataCollectionClonedEvent: BuildEventDefinition<typeof onDataCollectionClonedEvent$1>;
|
|
1555
|
-
declare const onDataCollectionChangedEvent: BuildEventDefinition<typeof onDataCollectionChangedEvent$1>;
|
|
1556
|
-
declare const onDataCollectionCreated: BuildEventDefinition<typeof onDataCollectionCreated$1>;
|
|
1557
|
-
declare const onDataCollectionUpdated: BuildEventDefinition<typeof onDataCollectionUpdated$1>;
|
|
1558
|
-
declare const onDataCollectionDeleted: BuildEventDefinition<typeof onDataCollectionDeleted$1>;
|
|
1600
|
+
declare const createDataCollection: BuildRESTFunction$2<typeof createDataCollection$1>;
|
|
1601
|
+
declare const getDataCollection: BuildRESTFunction$2<typeof getDataCollection$1>;
|
|
1602
|
+
declare const listDataCollections: BuildRESTFunction$2<typeof listDataCollections$1>;
|
|
1603
|
+
declare const updateDataCollection: BuildRESTFunction$2<typeof updateDataCollection$1>;
|
|
1604
|
+
declare const deleteDataCollection: BuildRESTFunction$2<typeof deleteDataCollection$1>;
|
|
1605
|
+
declare const onDataCollectionClonedEvent: BuildEventDefinition$1<typeof onDataCollectionClonedEvent$1>;
|
|
1606
|
+
declare const onDataCollectionChangedEvent: BuildEventDefinition$1<typeof onDataCollectionChangedEvent$1>;
|
|
1607
|
+
declare const onDataCollectionCreated: BuildEventDefinition$1<typeof onDataCollectionCreated$1>;
|
|
1608
|
+
declare const onDataCollectionUpdated: BuildEventDefinition$1<typeof onDataCollectionUpdated$1>;
|
|
1609
|
+
declare const onDataCollectionDeleted: BuildEventDefinition$1<typeof onDataCollectionDeleted$1>;
|
|
1559
1610
|
|
|
1560
1611
|
declare const context$2_createDataCollection: typeof createDataCollection;
|
|
1561
1612
|
declare const context$2_deleteDataCollection: typeof deleteDataCollection;
|
|
@@ -2606,55 +2657,98 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
2606
2657
|
newReferencedItemIds?: string[];
|
|
2607
2658
|
}
|
|
2608
2659
|
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2660
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2661
|
+
interface HttpClient$1 {
|
|
2662
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2663
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2664
|
+
}
|
|
2665
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2666
|
+
type HttpResponse$1<T = any> = {
|
|
2667
|
+
data: T;
|
|
2668
|
+
status: number;
|
|
2669
|
+
statusText: string;
|
|
2670
|
+
headers: any;
|
|
2671
|
+
request?: any;
|
|
2672
|
+
};
|
|
2673
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2674
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2675
|
+
url: string;
|
|
2676
|
+
data?: Data;
|
|
2677
|
+
params?: URLSearchParams;
|
|
2678
|
+
} & APIMetadata$1;
|
|
2679
|
+
type APIMetadata$1 = {
|
|
2680
|
+
methodFqn?: string;
|
|
2681
|
+
entityFqdn?: string;
|
|
2682
|
+
packageName?: string;
|
|
2683
|
+
};
|
|
2684
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2685
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2686
|
+
__type: 'event-definition';
|
|
2687
|
+
type: Type;
|
|
2688
|
+
isDomainEvent?: boolean;
|
|
2689
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2690
|
+
__payload: Payload;
|
|
2691
|
+
};
|
|
2692
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2693
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2694
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2695
|
+
|
|
2696
|
+
declare global {
|
|
2697
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2698
|
+
interface SymbolConstructor {
|
|
2699
|
+
readonly observable: symbol;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
declare function insertDataItem$1(httpClient: HttpClient$1): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
2704
|
+
declare function updateDataItem$1(httpClient: HttpClient$1): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
2705
|
+
declare function saveDataItem$1(httpClient: HttpClient$1): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
2706
|
+
declare function getDataItem$1(httpClient: HttpClient$1): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
2613
2707
|
_id: string;
|
|
2614
2708
|
dataCollectionId: string;
|
|
2615
2709
|
}>;
|
|
2616
|
-
declare function removeDataItem$1(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
2617
|
-
declare function truncateDataItems$1(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
2618
|
-
declare function queryDataItems$1(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
2619
|
-
declare function aggregateDataItems$1(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
2620
|
-
declare function countDataItems$1(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
2621
|
-
declare function queryDistinctValues$1(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
2622
|
-
declare function bulkInsertDataItems$1(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
2623
|
-
declare function bulkUpdateDataItems$1(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
2624
|
-
declare function bulkSaveDataItems$1(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
2625
|
-
declare function bulkRemoveDataItems$1(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
2626
|
-
declare function queryReferencedDataItems$1(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
2627
|
-
declare function isReferencedDataItem$1(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
2628
|
-
declare function insertDataItemReference$1(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
2629
|
-
declare function removeDataItemReference$1(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
2630
|
-
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
2631
|
-
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
2632
|
-
declare function replaceDataItemReferences$1(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
2710
|
+
declare function removeDataItem$1(httpClient: HttpClient$1): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
2711
|
+
declare function truncateDataItems$1(httpClient: HttpClient$1): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
2712
|
+
declare function queryDataItems$1(httpClient: HttpClient$1): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
2713
|
+
declare function aggregateDataItems$1(httpClient: HttpClient$1): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
2714
|
+
declare function countDataItems$1(httpClient: HttpClient$1): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
2715
|
+
declare function queryDistinctValues$1(httpClient: HttpClient$1): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
2716
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient$1): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
2717
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient$1): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
2718
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient$1): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
2719
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient$1): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
2720
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient$1): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
2721
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient$1): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
2722
|
+
declare function insertDataItemReference$1(httpClient: HttpClient$1): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
2723
|
+
declare function removeDataItemReference$1(httpClient: HttpClient$1): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
2724
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient$1): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
2725
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient$1): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
2726
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient$1): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
2633
2727
|
declare const onDataItemCreated$1: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
2634
2728
|
declare const onDataItemUpdated$1: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
2635
2729
|
declare const onDataItemDeleted$1: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
2636
2730
|
|
|
2637
|
-
declare const insertDataItem: BuildRESTFunction<typeof insertDataItem$1>;
|
|
2638
|
-
declare const updateDataItem: BuildRESTFunction<typeof updateDataItem$1>;
|
|
2639
|
-
declare const saveDataItem: BuildRESTFunction<typeof saveDataItem$1>;
|
|
2640
|
-
declare const getDataItem: BuildRESTFunction<typeof getDataItem$1>;
|
|
2641
|
-
declare const removeDataItem: BuildRESTFunction<typeof removeDataItem$1>;
|
|
2642
|
-
declare const truncateDataItems: BuildRESTFunction<typeof truncateDataItems$1>;
|
|
2643
|
-
declare const queryDataItems: BuildRESTFunction<typeof queryDataItems$1>;
|
|
2644
|
-
declare const aggregateDataItems: BuildRESTFunction<typeof aggregateDataItems$1>;
|
|
2645
|
-
declare const countDataItems: BuildRESTFunction<typeof countDataItems$1>;
|
|
2646
|
-
declare const queryDistinctValues: BuildRESTFunction<typeof queryDistinctValues$1>;
|
|
2647
|
-
declare const bulkInsertDataItems: BuildRESTFunction<typeof bulkInsertDataItems$1>;
|
|
2648
|
-
declare const bulkUpdateDataItems: BuildRESTFunction<typeof bulkUpdateDataItems$1>;
|
|
2649
|
-
declare const bulkSaveDataItems: BuildRESTFunction<typeof bulkSaveDataItems$1>;
|
|
2650
|
-
declare const bulkRemoveDataItems: BuildRESTFunction<typeof bulkRemoveDataItems$1>;
|
|
2651
|
-
declare const queryReferencedDataItems: BuildRESTFunction<typeof queryReferencedDataItems$1>;
|
|
2652
|
-
declare const isReferencedDataItem: BuildRESTFunction<typeof isReferencedDataItem$1>;
|
|
2653
|
-
declare const insertDataItemReference: BuildRESTFunction<typeof insertDataItemReference$1>;
|
|
2654
|
-
declare const removeDataItemReference: BuildRESTFunction<typeof removeDataItemReference$1>;
|
|
2655
|
-
declare const bulkInsertDataItemReferences: BuildRESTFunction<typeof bulkInsertDataItemReferences$1>;
|
|
2656
|
-
declare const bulkRemoveDataItemReferences: BuildRESTFunction<typeof bulkRemoveDataItemReferences$1>;
|
|
2657
|
-
declare const replaceDataItemReferences: BuildRESTFunction<typeof replaceDataItemReferences$1>;
|
|
2731
|
+
declare const insertDataItem: BuildRESTFunction$1<typeof insertDataItem$1>;
|
|
2732
|
+
declare const updateDataItem: BuildRESTFunction$1<typeof updateDataItem$1>;
|
|
2733
|
+
declare const saveDataItem: BuildRESTFunction$1<typeof saveDataItem$1>;
|
|
2734
|
+
declare const getDataItem: BuildRESTFunction$1<typeof getDataItem$1>;
|
|
2735
|
+
declare const removeDataItem: BuildRESTFunction$1<typeof removeDataItem$1>;
|
|
2736
|
+
declare const truncateDataItems: BuildRESTFunction$1<typeof truncateDataItems$1>;
|
|
2737
|
+
declare const queryDataItems: BuildRESTFunction$1<typeof queryDataItems$1>;
|
|
2738
|
+
declare const aggregateDataItems: BuildRESTFunction$1<typeof aggregateDataItems$1>;
|
|
2739
|
+
declare const countDataItems: BuildRESTFunction$1<typeof countDataItems$1>;
|
|
2740
|
+
declare const queryDistinctValues: BuildRESTFunction$1<typeof queryDistinctValues$1>;
|
|
2741
|
+
declare const bulkInsertDataItems: BuildRESTFunction$1<typeof bulkInsertDataItems$1>;
|
|
2742
|
+
declare const bulkUpdateDataItems: BuildRESTFunction$1<typeof bulkUpdateDataItems$1>;
|
|
2743
|
+
declare const bulkSaveDataItems: BuildRESTFunction$1<typeof bulkSaveDataItems$1>;
|
|
2744
|
+
declare const bulkRemoveDataItems: BuildRESTFunction$1<typeof bulkRemoveDataItems$1>;
|
|
2745
|
+
declare const queryReferencedDataItems: BuildRESTFunction$1<typeof queryReferencedDataItems$1>;
|
|
2746
|
+
declare const isReferencedDataItem: BuildRESTFunction$1<typeof isReferencedDataItem$1>;
|
|
2747
|
+
declare const insertDataItemReference: BuildRESTFunction$1<typeof insertDataItemReference$1>;
|
|
2748
|
+
declare const removeDataItemReference: BuildRESTFunction$1<typeof removeDataItemReference$1>;
|
|
2749
|
+
declare const bulkInsertDataItemReferences: BuildRESTFunction$1<typeof bulkInsertDataItemReferences$1>;
|
|
2750
|
+
declare const bulkRemoveDataItemReferences: BuildRESTFunction$1<typeof bulkRemoveDataItemReferences$1>;
|
|
2751
|
+
declare const replaceDataItemReferences: BuildRESTFunction$1<typeof replaceDataItemReferences$1>;
|
|
2658
2752
|
declare const onDataItemCreated: BuildEventDefinition<typeof onDataItemCreated$1>;
|
|
2659
2753
|
declare const onDataItemUpdated: BuildEventDefinition<typeof onDataItemUpdated$1>;
|
|
2660
2754
|
declare const onDataItemDeleted: BuildEventDefinition<typeof onDataItemDeleted$1>;
|
|
@@ -2820,6 +2914,39 @@ interface ListIndexesOptions {
|
|
|
2820
2914
|
paging?: Paging;
|
|
2821
2915
|
}
|
|
2822
2916
|
|
|
2917
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2918
|
+
interface HttpClient {
|
|
2919
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2920
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2921
|
+
}
|
|
2922
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2923
|
+
type HttpResponse<T = any> = {
|
|
2924
|
+
data: T;
|
|
2925
|
+
status: number;
|
|
2926
|
+
statusText: string;
|
|
2927
|
+
headers: any;
|
|
2928
|
+
request?: any;
|
|
2929
|
+
};
|
|
2930
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2931
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2932
|
+
url: string;
|
|
2933
|
+
data?: Data;
|
|
2934
|
+
params?: URLSearchParams;
|
|
2935
|
+
} & APIMetadata;
|
|
2936
|
+
type APIMetadata = {
|
|
2937
|
+
methodFqn?: string;
|
|
2938
|
+
entityFqdn?: string;
|
|
2939
|
+
packageName?: string;
|
|
2940
|
+
};
|
|
2941
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2942
|
+
|
|
2943
|
+
declare global {
|
|
2944
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2945
|
+
interface SymbolConstructor {
|
|
2946
|
+
readonly observable: symbol;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2823
2950
|
declare function createIndex$1(httpClient: HttpClient): (dataCollectionId: string, index: Index) => Promise<Index & {
|
|
2824
2951
|
name: string;
|
|
2825
2952
|
fields: {
|
|
@@ -441,41 +441,49 @@ interface UpdateExternalDatabaseConnection {
|
|
|
441
441
|
capabilities?: Capabilities;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
interface HttpClient {
|
|
445
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
444
|
+
interface HttpClient$3 {
|
|
445
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
446
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
446
447
|
}
|
|
447
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
448
|
-
type HttpResponse<T = any> = {
|
|
448
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
449
|
+
type HttpResponse$3<T = any> = {
|
|
449
450
|
data: T;
|
|
450
451
|
status: number;
|
|
451
452
|
statusText: string;
|
|
452
453
|
headers: any;
|
|
453
454
|
request?: any;
|
|
454
455
|
};
|
|
455
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
456
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
456
457
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
457
458
|
url: string;
|
|
458
459
|
data?: Data;
|
|
459
460
|
params?: URLSearchParams;
|
|
460
|
-
} & APIMetadata;
|
|
461
|
-
type APIMetadata = {
|
|
461
|
+
} & APIMetadata$3;
|
|
462
|
+
type APIMetadata$3 = {
|
|
462
463
|
methodFqn?: string;
|
|
463
464
|
entityFqdn?: string;
|
|
464
465
|
packageName?: string;
|
|
465
466
|
};
|
|
466
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
467
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
467
468
|
__type: 'event-definition';
|
|
468
469
|
type: Type;
|
|
469
470
|
isDomainEvent?: boolean;
|
|
470
|
-
transformations?: unknown;
|
|
471
|
+
transformations?: (envelope: unknown) => Payload;
|
|
471
472
|
__payload: Payload;
|
|
472
473
|
};
|
|
473
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
474
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
475
|
+
|
|
476
|
+
declare global {
|
|
477
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
478
|
+
interface SymbolConstructor {
|
|
479
|
+
readonly observable: symbol;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
474
482
|
|
|
475
483
|
declare const __metadata$3: {
|
|
476
484
|
PACKAGE_NAME: string;
|
|
477
485
|
};
|
|
478
|
-
declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
486
|
+
declare function getExternalDatabaseConnection(httpClient: HttpClient$3): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
479
487
|
name: string;
|
|
480
488
|
connectionStatus?: {
|
|
481
489
|
successful: boolean;
|
|
@@ -487,8 +495,8 @@ declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: s
|
|
|
487
495
|
fieldTypes: FieldType[];
|
|
488
496
|
} | undefined;
|
|
489
497
|
}>;
|
|
490
|
-
declare function listExternalDatabaseConnections(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
491
|
-
declare function createExternalDatabaseConnection(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
498
|
+
declare function listExternalDatabaseConnections(httpClient: HttpClient$3): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
499
|
+
declare function createExternalDatabaseConnection(httpClient: HttpClient$3): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
492
500
|
name: string;
|
|
493
501
|
connectionStatus?: {
|
|
494
502
|
successful: boolean;
|
|
@@ -500,7 +508,7 @@ declare function createExternalDatabaseConnection(httpClient: HttpClient): (exte
|
|
|
500
508
|
fieldTypes: FieldType[];
|
|
501
509
|
} | undefined;
|
|
502
510
|
}>;
|
|
503
|
-
declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
511
|
+
declare function updateExternalDatabaseConnection(httpClient: HttpClient$3): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
504
512
|
name: string;
|
|
505
513
|
connectionStatus?: {
|
|
506
514
|
successful: boolean;
|
|
@@ -512,10 +520,10 @@ declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name
|
|
|
512
520
|
fieldTypes: FieldType[];
|
|
513
521
|
} | undefined;
|
|
514
522
|
}>;
|
|
515
|
-
declare function deleteExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
516
|
-
declare const onExternalDatabaseConnectionCreated: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
517
|
-
declare const onExternalDatabaseConnectionUpdated: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
518
|
-
declare const onExternalDatabaseConnectionDeleted: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
523
|
+
declare function deleteExternalDatabaseConnection(httpClient: HttpClient$3): (name: string) => Promise<void>;
|
|
524
|
+
declare const onExternalDatabaseConnectionCreated: EventDefinition$2<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
525
|
+
declare const onExternalDatabaseConnectionUpdated: EventDefinition$2<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
526
|
+
declare const onExternalDatabaseConnectionDeleted: EventDefinition$2<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
519
527
|
|
|
520
528
|
type index_d$3_Capabilities = Capabilities;
|
|
521
529
|
type index_d$3_CauseOfFailure = CauseOfFailure;
|
|
@@ -2166,10 +2174,49 @@ interface ListDataCollectionsOptions {
|
|
|
2166
2174
|
consistentRead?: boolean;
|
|
2167
2175
|
}
|
|
2168
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
|
+
|
|
2169
2216
|
declare const __metadata$2: {
|
|
2170
2217
|
PACKAGE_NAME: string;
|
|
2171
2218
|
};
|
|
2172
|
-
declare function createDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2219
|
+
declare function createDataCollection(httpClient: HttpClient$2): (collection: DataCollection) => Promise<DataCollection & {
|
|
2173
2220
|
_id: string;
|
|
2174
2221
|
collectionType: CollectionType;
|
|
2175
2222
|
defaultDisplayOrder?: {
|
|
@@ -2270,7 +2317,7 @@ declare function createDataCollection(httpClient: HttpClient): (collection: Data
|
|
|
2270
2317
|
}[];
|
|
2271
2318
|
pagingModes: PagingMode[];
|
|
2272
2319
|
}>;
|
|
2273
|
-
declare function getDataCollection(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
2320
|
+
declare function getDataCollection(httpClient: HttpClient$2): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
2274
2321
|
_id: string;
|
|
2275
2322
|
collectionType: CollectionType;
|
|
2276
2323
|
defaultDisplayOrder?: {
|
|
@@ -2371,8 +2418,8 @@ declare function getDataCollection(httpClient: HttpClient): (dataCollectionId: s
|
|
|
2371
2418
|
}[];
|
|
2372
2419
|
pagingModes: PagingMode[];
|
|
2373
2420
|
}>;
|
|
2374
|
-
declare function listDataCollections(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2375
|
-
declare function updateDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2421
|
+
declare function listDataCollections(httpClient: HttpClient$2): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2422
|
+
declare function updateDataCollection(httpClient: HttpClient$2): (collection: DataCollection) => Promise<DataCollection & {
|
|
2376
2423
|
_id: string;
|
|
2377
2424
|
collectionType: CollectionType;
|
|
2378
2425
|
defaultDisplayOrder?: {
|
|
@@ -2473,12 +2520,12 @@ declare function updateDataCollection(httpClient: HttpClient): (collection: Data
|
|
|
2473
2520
|
}[];
|
|
2474
2521
|
pagingModes: PagingMode[];
|
|
2475
2522
|
}>;
|
|
2476
|
-
declare function deleteDataCollection(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
2477
|
-
declare const onDataCollectionClonedEvent: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2478
|
-
declare const onDataCollectionChangedEvent: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2479
|
-
declare const onDataCollectionCreated: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2480
|
-
declare const onDataCollectionUpdated: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2481
|
-
declare const onDataCollectionDeleted: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2523
|
+
declare function deleteDataCollection(httpClient: HttpClient$2): (dataCollectionId: string) => Promise<void>;
|
|
2524
|
+
declare const onDataCollectionClonedEvent: EventDefinition$1<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2525
|
+
declare const onDataCollectionChangedEvent: EventDefinition$1<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2526
|
+
declare const onDataCollectionCreated: EventDefinition$1<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2527
|
+
declare const onDataCollectionUpdated: EventDefinition$1<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2528
|
+
declare const onDataCollectionDeleted: EventDefinition$1<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2482
2529
|
|
|
2483
2530
|
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2484
2531
|
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
@@ -4218,33 +4265,72 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
4218
4265
|
newReferencedItemIds?: string[];
|
|
4219
4266
|
}
|
|
4220
4267
|
|
|
4268
|
+
interface HttpClient$1 {
|
|
4269
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4270
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4271
|
+
}
|
|
4272
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4273
|
+
type HttpResponse$1<T = any> = {
|
|
4274
|
+
data: T;
|
|
4275
|
+
status: number;
|
|
4276
|
+
statusText: string;
|
|
4277
|
+
headers: any;
|
|
4278
|
+
request?: any;
|
|
4279
|
+
};
|
|
4280
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4281
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4282
|
+
url: string;
|
|
4283
|
+
data?: Data;
|
|
4284
|
+
params?: URLSearchParams;
|
|
4285
|
+
} & APIMetadata$1;
|
|
4286
|
+
type APIMetadata$1 = {
|
|
4287
|
+
methodFqn?: string;
|
|
4288
|
+
entityFqdn?: string;
|
|
4289
|
+
packageName?: string;
|
|
4290
|
+
};
|
|
4291
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4292
|
+
__type: 'event-definition';
|
|
4293
|
+
type: Type;
|
|
4294
|
+
isDomainEvent?: boolean;
|
|
4295
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4296
|
+
__payload: Payload;
|
|
4297
|
+
};
|
|
4298
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4299
|
+
|
|
4300
|
+
declare global {
|
|
4301
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4302
|
+
interface SymbolConstructor {
|
|
4303
|
+
readonly observable: symbol;
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4221
4307
|
declare const __metadata$1: {
|
|
4222
4308
|
PACKAGE_NAME: string;
|
|
4223
4309
|
};
|
|
4224
|
-
declare function insertDataItem(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4225
|
-
declare function updateDataItem(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4226
|
-
declare function saveDataItem(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4227
|
-
declare function getDataItem(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
4310
|
+
declare function insertDataItem(httpClient: HttpClient$1): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4311
|
+
declare function updateDataItem(httpClient: HttpClient$1): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4312
|
+
declare function saveDataItem(httpClient: HttpClient$1): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4313
|
+
declare function getDataItem(httpClient: HttpClient$1): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
4228
4314
|
_id: string;
|
|
4229
4315
|
dataCollectionId: string;
|
|
4230
4316
|
}>;
|
|
4231
|
-
declare function removeDataItem(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4232
|
-
declare function truncateDataItems(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
4233
|
-
declare function queryDataItems(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
4234
|
-
declare function aggregateDataItems(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
4235
|
-
declare function countDataItems(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4236
|
-
declare function queryDistinctValues(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
4237
|
-
declare function bulkInsertDataItems(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4238
|
-
declare function bulkUpdateDataItems(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4239
|
-
declare function bulkSaveDataItems(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4240
|
-
declare function bulkRemoveDataItems(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4241
|
-
declare function queryReferencedDataItems(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4242
|
-
declare function isReferencedDataItem(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4243
|
-
declare function insertDataItemReference(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4244
|
-
declare function removeDataItemReference(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4245
|
-
declare function bulkInsertDataItemReferences(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4246
|
-
declare function bulkRemoveDataItemReferences(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4247
|
-
declare function replaceDataItemReferences(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4317
|
+
declare function removeDataItem(httpClient: HttpClient$1): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4318
|
+
declare function truncateDataItems(httpClient: HttpClient$1): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
4319
|
+
declare function queryDataItems(httpClient: HttpClient$1): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
4320
|
+
declare function aggregateDataItems(httpClient: HttpClient$1): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
4321
|
+
declare function countDataItems(httpClient: HttpClient$1): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4322
|
+
declare function queryDistinctValues(httpClient: HttpClient$1): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
4323
|
+
declare function bulkInsertDataItems(httpClient: HttpClient$1): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4324
|
+
declare function bulkUpdateDataItems(httpClient: HttpClient$1): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4325
|
+
declare function bulkSaveDataItems(httpClient: HttpClient$1): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4326
|
+
declare function bulkRemoveDataItems(httpClient: HttpClient$1): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4327
|
+
declare function queryReferencedDataItems(httpClient: HttpClient$1): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4328
|
+
declare function isReferencedDataItem(httpClient: HttpClient$1): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4329
|
+
declare function insertDataItemReference(httpClient: HttpClient$1): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4330
|
+
declare function removeDataItemReference(httpClient: HttpClient$1): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4331
|
+
declare function bulkInsertDataItemReferences(httpClient: HttpClient$1): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4332
|
+
declare function bulkRemoveDataItemReferences(httpClient: HttpClient$1): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4333
|
+
declare function replaceDataItemReferences(httpClient: HttpClient$1): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4248
4334
|
declare const onDataItemCreated: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4249
4335
|
declare const onDataItemUpdated: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4250
4336
|
declare const onDataItemDeleted: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
@@ -4607,6 +4693,37 @@ interface ListIndexesOptions {
|
|
|
4607
4693
|
paging?: Paging;
|
|
4608
4694
|
}
|
|
4609
4695
|
|
|
4696
|
+
interface HttpClient {
|
|
4697
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4698
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4699
|
+
}
|
|
4700
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4701
|
+
type HttpResponse<T = any> = {
|
|
4702
|
+
data: T;
|
|
4703
|
+
status: number;
|
|
4704
|
+
statusText: string;
|
|
4705
|
+
headers: any;
|
|
4706
|
+
request?: any;
|
|
4707
|
+
};
|
|
4708
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4709
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4710
|
+
url: string;
|
|
4711
|
+
data?: Data;
|
|
4712
|
+
params?: URLSearchParams;
|
|
4713
|
+
} & APIMetadata;
|
|
4714
|
+
type APIMetadata = {
|
|
4715
|
+
methodFqn?: string;
|
|
4716
|
+
entityFqdn?: string;
|
|
4717
|
+
packageName?: string;
|
|
4718
|
+
};
|
|
4719
|
+
|
|
4720
|
+
declare global {
|
|
4721
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4722
|
+
interface SymbolConstructor {
|
|
4723
|
+
readonly observable: symbol;
|
|
4724
|
+
}
|
|
4725
|
+
}
|
|
4726
|
+
|
|
4610
4727
|
declare const __metadata: {
|
|
4611
4728
|
PACKAGE_NAME: string;
|
|
4612
4729
|
};
|
|
@@ -984,6 +984,13 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
|
984
984
|
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
985
985
|
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
986
986
|
|
|
987
|
+
declare global {
|
|
988
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
989
|
+
interface SymbolConstructor {
|
|
990
|
+
readonly observable: symbol;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
987
994
|
interface QueryDataItemsEnvelope {
|
|
988
995
|
request: QueryDataItemsRequest;
|
|
989
996
|
metadata: Context;
|
|
@@ -841,6 +841,13 @@ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
|
841
841
|
};
|
|
842
842
|
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
843
843
|
|
|
844
|
+
declare global {
|
|
845
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
846
|
+
interface SymbolConstructor {
|
|
847
|
+
readonly observable: symbol;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
844
851
|
interface QueryDataItemsEnvelope {
|
|
845
852
|
request: QueryDataItemsRequest;
|
|
846
853
|
metadata: Context;
|