@wix/data 1.0.127 → 1.0.129
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 +3 -3
- package/type-bundles/context.bundle.d.ts +18 -140
- package/type-bundles/index.bundle.d.ts +48 -160
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/data",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.129",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@wix/data_collections": "1.0.30",
|
|
23
|
-
"@wix/data_external-database": "1.0.
|
|
23
|
+
"@wix/data_external-database": "1.0.8",
|
|
24
24
|
"@wix/data_external-database-connections": "1.0.27",
|
|
25
25
|
"@wix/data_indexes": "1.0.23",
|
|
26
26
|
"@wix/data_items": "1.0.35"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "f1a39fb750f712e4848ccca19a04230b9dab8c7ebbdab91d51c41cb4"
|
|
51
51
|
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
type RESTFunctionDescriptor
|
|
2
|
-
interface HttpClient
|
|
3
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
4
|
fetchWithAuth: typeof fetch;
|
|
5
5
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
6
|
}
|
|
7
|
-
type RequestOptionsFactory
|
|
8
|
-
type HttpResponse
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
9
|
data: T;
|
|
10
10
|
status: number;
|
|
11
11
|
statusText: string;
|
|
12
12
|
headers: any;
|
|
13
13
|
request?: any;
|
|
14
14
|
};
|
|
15
|
-
type RequestOptions
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
16
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
17
|
url: string;
|
|
18
18
|
data?: Data;
|
|
19
19
|
params?: URLSearchParams;
|
|
20
|
-
} & APIMetadata
|
|
21
|
-
type APIMetadata
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
22
|
methodFqn?: string;
|
|
23
23
|
entityFqdn?: string;
|
|
24
24
|
packageName?: string;
|
|
25
25
|
};
|
|
26
|
-
type BuildRESTFunction
|
|
27
|
-
type EventDefinition
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
28
|
__type: 'event-definition';
|
|
29
29
|
type: Type;
|
|
30
30
|
isDomainEvent?: boolean;
|
|
31
31
|
transformations?: (envelope: unknown) => Payload;
|
|
32
32
|
__payload: Payload;
|
|
33
33
|
};
|
|
34
|
-
declare function EventDefinition
|
|
35
|
-
type EventHandler
|
|
36
|
-
type BuildEventDefinition
|
|
34
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
37
37
|
|
|
38
38
|
declare global {
|
|
39
39
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -42,9 +42,9 @@ declare global {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
declare function createRESTModule$3<T extends RESTFunctionDescriptor
|
|
45
|
+
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
46
46
|
|
|
47
|
-
declare function createEventModule$2<T extends EventDefinition
|
|
47
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
48
48
|
|
|
49
49
|
declare const getExternalDatabaseConnection: ReturnType<typeof createRESTModule$3<typeof publicGetExternalDatabaseConnection>>;
|
|
50
50
|
declare const listExternalDatabaseConnections: ReturnType<typeof createRESTModule$3<typeof publicListExternalDatabaseConnections>>;
|
|
@@ -67,53 +67,9 @@ declare namespace context$3 {
|
|
|
67
67
|
export { context$3_createExternalDatabaseConnection as createExternalDatabaseConnection, context$3_deleteExternalDatabaseConnection as deleteExternalDatabaseConnection, context$3_getExternalDatabaseConnection as getExternalDatabaseConnection, context$3_listExternalDatabaseConnections as listExternalDatabaseConnections, context$3_onExternalDatabaseConnectionCreated as onExternalDatabaseConnectionCreated, context$3_onExternalDatabaseConnectionDeleted as onExternalDatabaseConnectionDeleted, context$3_onExternalDatabaseConnectionUpdated as onExternalDatabaseConnectionUpdated, context$3_updateExternalDatabaseConnection as updateExternalDatabaseConnection };
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
interface HttpClient$2 {
|
|
72
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
73
|
-
fetchWithAuth: typeof fetch;
|
|
74
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
75
|
-
}
|
|
76
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
77
|
-
type HttpResponse$2<T = any> = {
|
|
78
|
-
data: T;
|
|
79
|
-
status: number;
|
|
80
|
-
statusText: string;
|
|
81
|
-
headers: any;
|
|
82
|
-
request?: any;
|
|
83
|
-
};
|
|
84
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
85
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
86
|
-
url: string;
|
|
87
|
-
data?: Data;
|
|
88
|
-
params?: URLSearchParams;
|
|
89
|
-
} & APIMetadata$2;
|
|
90
|
-
type APIMetadata$2 = {
|
|
91
|
-
methodFqn?: string;
|
|
92
|
-
entityFqdn?: string;
|
|
93
|
-
packageName?: string;
|
|
94
|
-
};
|
|
95
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
96
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
97
|
-
__type: 'event-definition';
|
|
98
|
-
type: Type;
|
|
99
|
-
isDomainEvent?: boolean;
|
|
100
|
-
transformations?: (envelope: unknown) => Payload;
|
|
101
|
-
__payload: Payload;
|
|
102
|
-
};
|
|
103
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
104
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
105
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
106
|
-
|
|
107
|
-
declare global {
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
109
|
-
interface SymbolConstructor {
|
|
110
|
-
readonly observable: symbol;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
70
|
+
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
113
71
|
|
|
114
|
-
declare function
|
|
115
|
-
|
|
116
|
-
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
72
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
117
73
|
|
|
118
74
|
declare const createDataCollection: ReturnType<typeof createRESTModule$2<typeof publicCreateDataCollection>>;
|
|
119
75
|
declare const getDataCollection: ReturnType<typeof createRESTModule$2<typeof publicGetDataCollection>>;
|
|
@@ -140,51 +96,7 @@ declare namespace context$2 {
|
|
|
140
96
|
export { context$2_createDataCollection as createDataCollection, context$2_deleteDataCollection as deleteDataCollection, context$2_getDataCollection as getDataCollection, context$2_listDataCollections as listDataCollections, context$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, context$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, context$2_onDataCollectionCreated as onDataCollectionCreated, context$2_onDataCollectionDeleted as onDataCollectionDeleted, context$2_onDataCollectionUpdated as onDataCollectionUpdated, context$2_updateDataCollection as updateDataCollection };
|
|
141
97
|
}
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
interface HttpClient$1 {
|
|
145
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
146
|
-
fetchWithAuth: typeof fetch;
|
|
147
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
148
|
-
}
|
|
149
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
150
|
-
type HttpResponse$1<T = any> = {
|
|
151
|
-
data: T;
|
|
152
|
-
status: number;
|
|
153
|
-
statusText: string;
|
|
154
|
-
headers: any;
|
|
155
|
-
request?: any;
|
|
156
|
-
};
|
|
157
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
158
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
159
|
-
url: string;
|
|
160
|
-
data?: Data;
|
|
161
|
-
params?: URLSearchParams;
|
|
162
|
-
} & APIMetadata$1;
|
|
163
|
-
type APIMetadata$1 = {
|
|
164
|
-
methodFqn?: string;
|
|
165
|
-
entityFqdn?: string;
|
|
166
|
-
packageName?: string;
|
|
167
|
-
};
|
|
168
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
169
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
170
|
-
__type: 'event-definition';
|
|
171
|
-
type: Type;
|
|
172
|
-
isDomainEvent?: boolean;
|
|
173
|
-
transformations?: (envelope: unknown) => Payload;
|
|
174
|
-
__payload: Payload;
|
|
175
|
-
};
|
|
176
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
177
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
178
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
179
|
-
|
|
180
|
-
declare global {
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
182
|
-
interface SymbolConstructor {
|
|
183
|
-
readonly observable: symbol;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
declare function createRESTModule$1<T extends RESTFunctionDescriptor$1>(descriptor: T, elevated?: boolean): BuildRESTFunction$1<T> & T;
|
|
99
|
+
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
188
100
|
|
|
189
101
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
190
102
|
|
|
@@ -241,40 +153,6 @@ declare namespace context$1 {
|
|
|
241
153
|
export { context$1_aggregateDataItems as aggregateDataItems, context$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, context$1_bulkInsertDataItems as bulkInsertDataItems, context$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, context$1_bulkRemoveDataItems as bulkRemoveDataItems, context$1_bulkSaveDataItems as bulkSaveDataItems, context$1_bulkUpdateDataItems as bulkUpdateDataItems, context$1_countDataItems as countDataItems, context$1_getDataItem as getDataItem, context$1_insertDataItem as insertDataItem, context$1_insertDataItemReference as insertDataItemReference, context$1_isReferencedDataItem as isReferencedDataItem, context$1_onDataItemCreated as onDataItemCreated, context$1_onDataItemDeleted as onDataItemDeleted, context$1_onDataItemUpdated as onDataItemUpdated, context$1_queryDataItems as queryDataItems, context$1_queryDistinctValues as queryDistinctValues, context$1_queryReferencedDataItems as queryReferencedDataItems, context$1_removeDataItem as removeDataItem, context$1_removeDataItemReference as removeDataItemReference, context$1_replaceDataItemReferences as replaceDataItemReferences, context$1_saveDataItem as saveDataItem, context$1_truncateDataItems as truncateDataItems, context$1_updateDataItem as updateDataItem };
|
|
242
154
|
}
|
|
243
155
|
|
|
244
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
245
|
-
interface HttpClient {
|
|
246
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
247
|
-
fetchWithAuth: typeof fetch;
|
|
248
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
249
|
-
}
|
|
250
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
251
|
-
type HttpResponse<T = any> = {
|
|
252
|
-
data: T;
|
|
253
|
-
status: number;
|
|
254
|
-
statusText: string;
|
|
255
|
-
headers: any;
|
|
256
|
-
request?: any;
|
|
257
|
-
};
|
|
258
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
259
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
260
|
-
url: string;
|
|
261
|
-
data?: Data;
|
|
262
|
-
params?: URLSearchParams;
|
|
263
|
-
} & APIMetadata;
|
|
264
|
-
type APIMetadata = {
|
|
265
|
-
methodFqn?: string;
|
|
266
|
-
entityFqdn?: string;
|
|
267
|
-
packageName?: string;
|
|
268
|
-
};
|
|
269
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
270
|
-
|
|
271
|
-
declare global {
|
|
272
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
273
|
-
interface SymbolConstructor {
|
|
274
|
-
readonly observable: symbol;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
156
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
279
157
|
|
|
280
158
|
declare const createIndex: ReturnType<typeof createRESTModule<typeof publicCreateIndex>>;
|
|
@@ -444,38 +444,38 @@ interface UpdateExternalDatabaseConnection {
|
|
|
444
444
|
capabilities?: Capabilities;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
interface HttpClient
|
|
448
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
447
|
+
interface HttpClient {
|
|
448
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
449
449
|
fetchWithAuth: typeof fetch;
|
|
450
450
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
451
451
|
}
|
|
452
|
-
type RequestOptionsFactory
|
|
453
|
-
type HttpResponse
|
|
452
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
453
|
+
type HttpResponse<T = any> = {
|
|
454
454
|
data: T;
|
|
455
455
|
status: number;
|
|
456
456
|
statusText: string;
|
|
457
457
|
headers: any;
|
|
458
458
|
request?: any;
|
|
459
459
|
};
|
|
460
|
-
type RequestOptions
|
|
460
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
461
461
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
462
462
|
url: string;
|
|
463
463
|
data?: Data;
|
|
464
464
|
params?: URLSearchParams;
|
|
465
|
-
} & APIMetadata
|
|
466
|
-
type APIMetadata
|
|
465
|
+
} & APIMetadata;
|
|
466
|
+
type APIMetadata = {
|
|
467
467
|
methodFqn?: string;
|
|
468
468
|
entityFqdn?: string;
|
|
469
469
|
packageName?: string;
|
|
470
470
|
};
|
|
471
|
-
type EventDefinition
|
|
471
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
472
472
|
__type: 'event-definition';
|
|
473
473
|
type: Type;
|
|
474
474
|
isDomainEvent?: boolean;
|
|
475
475
|
transformations?: (envelope: unknown) => Payload;
|
|
476
476
|
__payload: Payload;
|
|
477
477
|
};
|
|
478
|
-
declare function EventDefinition
|
|
478
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
479
479
|
|
|
480
480
|
declare global {
|
|
481
481
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -487,7 +487,7 @@ declare global {
|
|
|
487
487
|
declare const __metadata$3: {
|
|
488
488
|
PACKAGE_NAME: string;
|
|
489
489
|
};
|
|
490
|
-
declare function getExternalDatabaseConnection(httpClient: HttpClient
|
|
490
|
+
declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
491
491
|
name: string;
|
|
492
492
|
connectionStatus?: {
|
|
493
493
|
successful: boolean;
|
|
@@ -499,8 +499,8 @@ declare function getExternalDatabaseConnection(httpClient: HttpClient$3): (name:
|
|
|
499
499
|
fieldTypes: FieldType[];
|
|
500
500
|
} | undefined;
|
|
501
501
|
}>;
|
|
502
|
-
declare function listExternalDatabaseConnections(httpClient: HttpClient
|
|
503
|
-
declare function createExternalDatabaseConnection(httpClient: HttpClient
|
|
502
|
+
declare function listExternalDatabaseConnections(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
503
|
+
declare function createExternalDatabaseConnection(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
504
504
|
name: string;
|
|
505
505
|
connectionStatus?: {
|
|
506
506
|
successful: boolean;
|
|
@@ -512,7 +512,7 @@ declare function createExternalDatabaseConnection(httpClient: HttpClient$3): (ex
|
|
|
512
512
|
fieldTypes: FieldType[];
|
|
513
513
|
} | undefined;
|
|
514
514
|
}>;
|
|
515
|
-
declare function updateExternalDatabaseConnection(httpClient: HttpClient
|
|
515
|
+
declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
516
516
|
name: string;
|
|
517
517
|
connectionStatus?: {
|
|
518
518
|
successful: boolean;
|
|
@@ -524,10 +524,10 @@ declare function updateExternalDatabaseConnection(httpClient: HttpClient$3): (na
|
|
|
524
524
|
fieldTypes: FieldType[];
|
|
525
525
|
} | undefined;
|
|
526
526
|
}>;
|
|
527
|
-
declare function deleteExternalDatabaseConnection(httpClient: HttpClient
|
|
528
|
-
declare const onExternalDatabaseConnectionCreated: EventDefinition
|
|
529
|
-
declare const onExternalDatabaseConnectionUpdated: EventDefinition
|
|
530
|
-
declare const onExternalDatabaseConnectionDeleted: EventDefinition
|
|
527
|
+
declare function deleteExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
528
|
+
declare const onExternalDatabaseConnectionCreated: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
529
|
+
declare const onExternalDatabaseConnectionUpdated: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
530
|
+
declare const onExternalDatabaseConnectionDeleted: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
531
531
|
|
|
532
532
|
type index_d$3_Capabilities = Capabilities;
|
|
533
533
|
type index_d$3_CauseOfFailure = CauseOfFailure;
|
|
@@ -2188,50 +2188,10 @@ interface ListDataCollectionsOptions {
|
|
|
2188
2188
|
consistentRead?: boolean;
|
|
2189
2189
|
}
|
|
2190
2190
|
|
|
2191
|
-
interface HttpClient$2 {
|
|
2192
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
2193
|
-
fetchWithAuth: typeof fetch;
|
|
2194
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2195
|
-
}
|
|
2196
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
2197
|
-
type HttpResponse$2<T = any> = {
|
|
2198
|
-
data: T;
|
|
2199
|
-
status: number;
|
|
2200
|
-
statusText: string;
|
|
2201
|
-
headers: any;
|
|
2202
|
-
request?: any;
|
|
2203
|
-
};
|
|
2204
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
2205
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2206
|
-
url: string;
|
|
2207
|
-
data?: Data;
|
|
2208
|
-
params?: URLSearchParams;
|
|
2209
|
-
} & APIMetadata$2;
|
|
2210
|
-
type APIMetadata$2 = {
|
|
2211
|
-
methodFqn?: string;
|
|
2212
|
-
entityFqdn?: string;
|
|
2213
|
-
packageName?: string;
|
|
2214
|
-
};
|
|
2215
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2216
|
-
__type: 'event-definition';
|
|
2217
|
-
type: Type;
|
|
2218
|
-
isDomainEvent?: boolean;
|
|
2219
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2220
|
-
__payload: Payload;
|
|
2221
|
-
};
|
|
2222
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2223
|
-
|
|
2224
|
-
declare global {
|
|
2225
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2226
|
-
interface SymbolConstructor {
|
|
2227
|
-
readonly observable: symbol;
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
2191
|
declare const __metadata$2: {
|
|
2232
2192
|
PACKAGE_NAME: string;
|
|
2233
2193
|
};
|
|
2234
|
-
declare function createDataCollection(httpClient: HttpClient
|
|
2194
|
+
declare function createDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2235
2195
|
_id: string;
|
|
2236
2196
|
collectionType: CollectionType;
|
|
2237
2197
|
defaultDisplayOrder?: {
|
|
@@ -2332,7 +2292,7 @@ declare function createDataCollection(httpClient: HttpClient$2): (collection: Da
|
|
|
2332
2292
|
}[];
|
|
2333
2293
|
pagingModes: PagingMode[];
|
|
2334
2294
|
}>;
|
|
2335
|
-
declare function getDataCollection(httpClient: HttpClient
|
|
2295
|
+
declare function getDataCollection(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
2336
2296
|
_id: string;
|
|
2337
2297
|
collectionType: CollectionType;
|
|
2338
2298
|
defaultDisplayOrder?: {
|
|
@@ -2433,8 +2393,8 @@ declare function getDataCollection(httpClient: HttpClient$2): (dataCollectionId:
|
|
|
2433
2393
|
}[];
|
|
2434
2394
|
pagingModes: PagingMode[];
|
|
2435
2395
|
}>;
|
|
2436
|
-
declare function listDataCollections(httpClient: HttpClient
|
|
2437
|
-
declare function updateDataCollection(httpClient: HttpClient
|
|
2396
|
+
declare function listDataCollections(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2397
|
+
declare function updateDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2438
2398
|
_id: string;
|
|
2439
2399
|
collectionType: CollectionType;
|
|
2440
2400
|
defaultDisplayOrder?: {
|
|
@@ -2535,12 +2495,12 @@ declare function updateDataCollection(httpClient: HttpClient$2): (collection: Da
|
|
|
2535
2495
|
}[];
|
|
2536
2496
|
pagingModes: PagingMode[];
|
|
2537
2497
|
}>;
|
|
2538
|
-
declare function deleteDataCollection(httpClient: HttpClient
|
|
2539
|
-
declare const onDataCollectionClonedEvent: EventDefinition
|
|
2540
|
-
declare const onDataCollectionChangedEvent: EventDefinition
|
|
2541
|
-
declare const onDataCollectionCreated: EventDefinition
|
|
2542
|
-
declare const onDataCollectionUpdated: EventDefinition
|
|
2543
|
-
declare const onDataCollectionDeleted: EventDefinition
|
|
2498
|
+
declare function deleteDataCollection(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
2499
|
+
declare const onDataCollectionClonedEvent: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2500
|
+
declare const onDataCollectionChangedEvent: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2501
|
+
declare const onDataCollectionCreated: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2502
|
+
declare const onDataCollectionUpdated: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2503
|
+
declare const onDataCollectionDeleted: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2544
2504
|
|
|
2545
2505
|
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2546
2506
|
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
@@ -4302,73 +4262,33 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
4302
4262
|
newReferencedItemIds?: string[];
|
|
4303
4263
|
}
|
|
4304
4264
|
|
|
4305
|
-
interface HttpClient$1 {
|
|
4306
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4307
|
-
fetchWithAuth: typeof fetch;
|
|
4308
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4309
|
-
}
|
|
4310
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4311
|
-
type HttpResponse$1<T = any> = {
|
|
4312
|
-
data: T;
|
|
4313
|
-
status: number;
|
|
4314
|
-
statusText: string;
|
|
4315
|
-
headers: any;
|
|
4316
|
-
request?: any;
|
|
4317
|
-
};
|
|
4318
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4319
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4320
|
-
url: string;
|
|
4321
|
-
data?: Data;
|
|
4322
|
-
params?: URLSearchParams;
|
|
4323
|
-
} & APIMetadata$1;
|
|
4324
|
-
type APIMetadata$1 = {
|
|
4325
|
-
methodFqn?: string;
|
|
4326
|
-
entityFqdn?: string;
|
|
4327
|
-
packageName?: string;
|
|
4328
|
-
};
|
|
4329
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4330
|
-
__type: 'event-definition';
|
|
4331
|
-
type: Type;
|
|
4332
|
-
isDomainEvent?: boolean;
|
|
4333
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4334
|
-
__payload: Payload;
|
|
4335
|
-
};
|
|
4336
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4337
|
-
|
|
4338
|
-
declare global {
|
|
4339
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4340
|
-
interface SymbolConstructor {
|
|
4341
|
-
readonly observable: symbol;
|
|
4342
|
-
}
|
|
4343
|
-
}
|
|
4344
|
-
|
|
4345
4265
|
declare const __metadata$1: {
|
|
4346
4266
|
PACKAGE_NAME: string;
|
|
4347
4267
|
};
|
|
4348
|
-
declare function insertDataItem(httpClient: HttpClient
|
|
4349
|
-
declare function updateDataItem(httpClient: HttpClient
|
|
4350
|
-
declare function saveDataItem(httpClient: HttpClient
|
|
4351
|
-
declare function getDataItem(httpClient: HttpClient
|
|
4268
|
+
declare function insertDataItem(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4269
|
+
declare function updateDataItem(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4270
|
+
declare function saveDataItem(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4271
|
+
declare function getDataItem(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
4352
4272
|
_id: string;
|
|
4353
4273
|
dataCollectionId: string;
|
|
4354
4274
|
}>;
|
|
4355
|
-
declare function removeDataItem(httpClient: HttpClient
|
|
4356
|
-
declare function truncateDataItems(httpClient: HttpClient
|
|
4357
|
-
declare function queryDataItems(httpClient: HttpClient
|
|
4358
|
-
declare function aggregateDataItems(httpClient: HttpClient
|
|
4359
|
-
declare function countDataItems(httpClient: HttpClient
|
|
4360
|
-
declare function queryDistinctValues(httpClient: HttpClient
|
|
4361
|
-
declare function bulkInsertDataItems(httpClient: HttpClient
|
|
4362
|
-
declare function bulkUpdateDataItems(httpClient: HttpClient
|
|
4363
|
-
declare function bulkSaveDataItems(httpClient: HttpClient
|
|
4364
|
-
declare function bulkRemoveDataItems(httpClient: HttpClient
|
|
4365
|
-
declare function queryReferencedDataItems(httpClient: HttpClient
|
|
4366
|
-
declare function isReferencedDataItem(httpClient: HttpClient
|
|
4367
|
-
declare function insertDataItemReference(httpClient: HttpClient
|
|
4368
|
-
declare function removeDataItemReference(httpClient: HttpClient
|
|
4369
|
-
declare function bulkInsertDataItemReferences(httpClient: HttpClient
|
|
4370
|
-
declare function bulkRemoveDataItemReferences(httpClient: HttpClient
|
|
4371
|
-
declare function replaceDataItemReferences(httpClient: HttpClient
|
|
4275
|
+
declare function removeDataItem(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4276
|
+
declare function truncateDataItems(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
4277
|
+
declare function queryDataItems(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
4278
|
+
declare function aggregateDataItems(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
4279
|
+
declare function countDataItems(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4280
|
+
declare function queryDistinctValues(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
4281
|
+
declare function bulkInsertDataItems(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4282
|
+
declare function bulkUpdateDataItems(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4283
|
+
declare function bulkSaveDataItems(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4284
|
+
declare function bulkRemoveDataItems(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4285
|
+
declare function queryReferencedDataItems(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4286
|
+
declare function isReferencedDataItem(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4287
|
+
declare function insertDataItemReference(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4288
|
+
declare function removeDataItemReference(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4289
|
+
declare function bulkInsertDataItemReferences(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4290
|
+
declare function bulkRemoveDataItemReferences(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4291
|
+
declare function replaceDataItemReferences(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4372
4292
|
declare const onDataItemCreated: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4373
4293
|
declare const onDataItemUpdated: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4374
4294
|
declare const onDataItemDeleted: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
@@ -4733,38 +4653,6 @@ interface ListIndexesOptions {
|
|
|
4733
4653
|
paging?: Paging;
|
|
4734
4654
|
}
|
|
4735
4655
|
|
|
4736
|
-
interface HttpClient {
|
|
4737
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4738
|
-
fetchWithAuth: typeof fetch;
|
|
4739
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4740
|
-
}
|
|
4741
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4742
|
-
type HttpResponse<T = any> = {
|
|
4743
|
-
data: T;
|
|
4744
|
-
status: number;
|
|
4745
|
-
statusText: string;
|
|
4746
|
-
headers: any;
|
|
4747
|
-
request?: any;
|
|
4748
|
-
};
|
|
4749
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4750
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4751
|
-
url: string;
|
|
4752
|
-
data?: Data;
|
|
4753
|
-
params?: URLSearchParams;
|
|
4754
|
-
} & APIMetadata;
|
|
4755
|
-
type APIMetadata = {
|
|
4756
|
-
methodFqn?: string;
|
|
4757
|
-
entityFqdn?: string;
|
|
4758
|
-
packageName?: string;
|
|
4759
|
-
};
|
|
4760
|
-
|
|
4761
|
-
declare global {
|
|
4762
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4763
|
-
interface SymbolConstructor {
|
|
4764
|
-
readonly observable: symbol;
|
|
4765
|
-
}
|
|
4766
|
-
}
|
|
4767
|
-
|
|
4768
4656
|
declare const __metadata: {
|
|
4769
4657
|
PACKAGE_NAME: string;
|
|
4770
4658
|
};
|