@wix/table-reservations 1.0.96 → 1.0.97
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 +6 -5
- package/type-bundles/context.bundle.d.ts +42 -126
- package/type-bundles/index.bundle.d.ts +24 -102
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/table-reservations",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.97",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/table-reservations_reservation-locations": "1.0.
|
|
22
|
-
"@wix/table-reservations_reservations": "1.0.
|
|
23
|
-
"@wix/table-reservations_time-slots": "1.0.
|
|
21
|
+
"@wix/table-reservations_reservation-locations": "1.0.32",
|
|
22
|
+
"@wix/table-reservations_reservations": "1.0.29",
|
|
23
|
+
"@wix/table-reservations_time-slots": "1.0.22"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
26
27
|
"glob": "^10.4.1",
|
|
27
28
|
"rollup": "^4.18.0",
|
|
28
29
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -44,5 +45,5 @@
|
|
|
44
45
|
"fqdn": ""
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "aee87298fef5949b74cb7282c731a44f7e756448013a0e6e4a805e4d"
|
|
48
49
|
}
|
|
@@ -941,82 +941,74 @@ interface ReservationsQueryBuilder {
|
|
|
941
941
|
find: () => Promise<ReservationsQueryResult>;
|
|
942
942
|
}
|
|
943
943
|
|
|
944
|
-
type RESTFunctionDescriptor
|
|
945
|
-
interface HttpClient
|
|
946
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
947
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
944
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
945
|
+
interface HttpClient {
|
|
946
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
948
947
|
}
|
|
949
|
-
type RequestOptionsFactory
|
|
950
|
-
type HttpResponse
|
|
948
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
949
|
+
type HttpResponse<T = any> = {
|
|
951
950
|
data: T;
|
|
952
951
|
status: number;
|
|
953
952
|
statusText: string;
|
|
954
953
|
headers: any;
|
|
955
954
|
request?: any;
|
|
956
955
|
};
|
|
957
|
-
type RequestOptions
|
|
956
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
958
957
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
959
958
|
url: string;
|
|
960
959
|
data?: Data;
|
|
961
960
|
params?: URLSearchParams;
|
|
962
|
-
} & APIMetadata
|
|
963
|
-
type APIMetadata
|
|
961
|
+
} & APIMetadata;
|
|
962
|
+
type APIMetadata = {
|
|
964
963
|
methodFqn?: string;
|
|
965
964
|
entityFqdn?: string;
|
|
966
965
|
packageName?: string;
|
|
967
966
|
};
|
|
968
|
-
type BuildRESTFunction
|
|
969
|
-
type EventDefinition
|
|
967
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
968
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
970
969
|
__type: 'event-definition';
|
|
971
970
|
type: Type;
|
|
972
971
|
isDomainEvent?: boolean;
|
|
973
|
-
transformations?:
|
|
972
|
+
transformations?: unknown;
|
|
974
973
|
__payload: Payload;
|
|
975
974
|
};
|
|
976
|
-
declare function EventDefinition
|
|
977
|
-
type EventHandler
|
|
978
|
-
type BuildEventDefinition
|
|
979
|
-
|
|
980
|
-
declare global {
|
|
981
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
982
|
-
interface SymbolConstructor {
|
|
983
|
-
readonly observable: symbol;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
975
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
976
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
977
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
986
978
|
|
|
987
|
-
declare function createReservation$1(httpClient: HttpClient
|
|
979
|
+
declare function createReservation$1(httpClient: HttpClient): (reservation: Reservation, options?: CreateReservationOptions) => Promise<Reservation & {
|
|
988
980
|
status: Status$1;
|
|
989
981
|
source: Source;
|
|
990
982
|
paymentStatus: PaymentStatus;
|
|
991
983
|
}>;
|
|
992
|
-
declare function getReservation$1(httpClient: HttpClient
|
|
984
|
+
declare function getReservation$1(httpClient: HttpClient): (reservationId: string, options?: GetReservationOptions) => Promise<Reservation & {
|
|
993
985
|
status: Status$1;
|
|
994
986
|
source: Source;
|
|
995
987
|
paymentStatus: PaymentStatus;
|
|
996
988
|
}>;
|
|
997
|
-
declare function updateReservation$1(httpClient: HttpClient
|
|
989
|
+
declare function updateReservation$1(httpClient: HttpClient): (_id: string | null, reservation: UpdateReservation, options?: UpdateReservationOptions) => Promise<Reservation & {
|
|
998
990
|
status: Status$1;
|
|
999
991
|
source: Source;
|
|
1000
992
|
paymentStatus: PaymentStatus;
|
|
1001
993
|
}>;
|
|
1002
|
-
declare function createHeldReservation$1(httpClient: HttpClient
|
|
1003
|
-
declare function reserveReservation$1(httpClient: HttpClient
|
|
1004
|
-
declare function cancelReservation$1(httpClient: HttpClient
|
|
1005
|
-
declare function listReservations$1(httpClient: HttpClient
|
|
1006
|
-
declare function queryReservations$1(httpClient: HttpClient
|
|
1007
|
-
declare function searchReservations$1(httpClient: HttpClient
|
|
1008
|
-
declare const onReservationCreated$1: EventDefinition
|
|
994
|
+
declare function createHeldReservation$1(httpClient: HttpClient): (reservationDetails: HeldReservationDetails) => Promise<CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields>;
|
|
995
|
+
declare function reserveReservation$1(httpClient: HttpClient): (reservationId: string, reservee: Reservee, revision: string | null) => Promise<ReserveReservationResponse & ReserveReservationResponseNonNullableFields>;
|
|
996
|
+
declare function cancelReservation$1(httpClient: HttpClient): (reservationId: string, revision: string | null, options?: CancelReservationOptions) => Promise<CancelReservationResponse & CancelReservationResponseNonNullableFields>;
|
|
997
|
+
declare function listReservations$1(httpClient: HttpClient): (options?: ListReservationsOptions) => Promise<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
|
|
998
|
+
declare function queryReservations$1(httpClient: HttpClient): () => ReservationsQueryBuilder;
|
|
999
|
+
declare function searchReservations$1(httpClient: HttpClient): (search: CursorSearch) => Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
1000
|
+
declare const onReservationCreated$1: EventDefinition<ReservationCreatedEnvelope, "wix.table_reservations.v1.reservation_created">;
|
|
1009
1001
|
|
|
1010
|
-
declare const createReservation: BuildRESTFunction
|
|
1011
|
-
declare const getReservation: BuildRESTFunction
|
|
1012
|
-
declare const updateReservation: BuildRESTFunction
|
|
1013
|
-
declare const createHeldReservation: BuildRESTFunction
|
|
1014
|
-
declare const reserveReservation: BuildRESTFunction
|
|
1015
|
-
declare const cancelReservation: BuildRESTFunction
|
|
1016
|
-
declare const listReservations: BuildRESTFunction
|
|
1017
|
-
declare const queryReservations: BuildRESTFunction
|
|
1018
|
-
declare const searchReservations: BuildRESTFunction
|
|
1019
|
-
declare const onReservationCreated: BuildEventDefinition
|
|
1002
|
+
declare const createReservation: BuildRESTFunction<typeof createReservation$1>;
|
|
1003
|
+
declare const getReservation: BuildRESTFunction<typeof getReservation$1>;
|
|
1004
|
+
declare const updateReservation: BuildRESTFunction<typeof updateReservation$1>;
|
|
1005
|
+
declare const createHeldReservation: BuildRESTFunction<typeof createHeldReservation$1>;
|
|
1006
|
+
declare const reserveReservation: BuildRESTFunction<typeof reserveReservation$1>;
|
|
1007
|
+
declare const cancelReservation: BuildRESTFunction<typeof cancelReservation$1>;
|
|
1008
|
+
declare const listReservations: BuildRESTFunction<typeof listReservations$1>;
|
|
1009
|
+
declare const queryReservations: BuildRESTFunction<typeof queryReservations$1>;
|
|
1010
|
+
declare const searchReservations: BuildRESTFunction<typeof searchReservations$1>;
|
|
1011
|
+
declare const onReservationCreated: BuildEventDefinition<typeof onReservationCreated$1>;
|
|
1020
1012
|
|
|
1021
1013
|
declare const context$2_cancelReservation: typeof cancelReservation;
|
|
1022
1014
|
declare const context$2_createHeldReservation: typeof createHeldReservation;
|
|
@@ -1791,50 +1783,7 @@ interface ListReservationLocationsOptions {
|
|
|
1791
1783
|
fieldsets?: Set[];
|
|
1792
1784
|
}
|
|
1793
1785
|
|
|
1794
|
-
|
|
1795
|
-
interface HttpClient$1 {
|
|
1796
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
1797
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1798
|
-
}
|
|
1799
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
1800
|
-
type HttpResponse$1<T = any> = {
|
|
1801
|
-
data: T;
|
|
1802
|
-
status: number;
|
|
1803
|
-
statusText: string;
|
|
1804
|
-
headers: any;
|
|
1805
|
-
request?: any;
|
|
1806
|
-
};
|
|
1807
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
1808
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1809
|
-
url: string;
|
|
1810
|
-
data?: Data;
|
|
1811
|
-
params?: URLSearchParams;
|
|
1812
|
-
} & APIMetadata$1;
|
|
1813
|
-
type APIMetadata$1 = {
|
|
1814
|
-
methodFqn?: string;
|
|
1815
|
-
entityFqdn?: string;
|
|
1816
|
-
packageName?: string;
|
|
1817
|
-
};
|
|
1818
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
1819
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
1820
|
-
__type: 'event-definition';
|
|
1821
|
-
type: Type;
|
|
1822
|
-
isDomainEvent?: boolean;
|
|
1823
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1824
|
-
__payload: Payload;
|
|
1825
|
-
};
|
|
1826
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
1827
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
1828
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
1829
|
-
|
|
1830
|
-
declare global {
|
|
1831
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1832
|
-
interface SymbolConstructor {
|
|
1833
|
-
readonly observable: symbol;
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
declare function getReservationLocation$1(httpClient: HttpClient$1): (reservationLocationId: string, options?: GetReservationLocationOptions) => Promise<ReservationLocation & {
|
|
1786
|
+
declare function getReservationLocation$1(httpClient: HttpClient): (reservationLocationId: string, options?: GetReservationLocationOptions) => Promise<ReservationLocation & {
|
|
1838
1787
|
configuration?: {
|
|
1839
1788
|
onlineReservations?: {
|
|
1840
1789
|
seatPacing?: {
|
|
@@ -1918,7 +1867,7 @@ declare function getReservationLocation$1(httpClient: HttpClient$1): (reservatio
|
|
|
1918
1867
|
} | undefined;
|
|
1919
1868
|
} | undefined;
|
|
1920
1869
|
}>;
|
|
1921
|
-
declare function updateReservationLocation$1(httpClient: HttpClient
|
|
1870
|
+
declare function updateReservationLocation$1(httpClient: HttpClient): (_id: string | null, reservationLocation: UpdateReservationLocation) => Promise<ReservationLocation & {
|
|
1922
1871
|
configuration?: {
|
|
1923
1872
|
onlineReservations?: {
|
|
1924
1873
|
seatPacing?: {
|
|
@@ -2002,15 +1951,15 @@ declare function updateReservationLocation$1(httpClient: HttpClient$1): (_id: st
|
|
|
2002
1951
|
} | undefined;
|
|
2003
1952
|
} | undefined;
|
|
2004
1953
|
}>;
|
|
2005
|
-
declare function queryReservationLocations$1(httpClient: HttpClient
|
|
2006
|
-
declare function listReservationLocations$1(httpClient: HttpClient
|
|
1954
|
+
declare function queryReservationLocations$1(httpClient: HttpClient): (options?: QueryReservationLocationsOptions) => ReservationLocationsQueryBuilder;
|
|
1955
|
+
declare function listReservationLocations$1(httpClient: HttpClient): (options?: ListReservationLocationsOptions) => Promise<ListReservationLocationsResponse & ListReservationLocationsResponseNonNullableFields>;
|
|
2007
1956
|
declare const onReservationLocationUpdated$1: EventDefinition<ReservationLocationUpdatedEnvelope, "wix.table_reservations.v1.reservation_location_updated">;
|
|
2008
1957
|
declare const onReservationLocationCreated$1: EventDefinition<ReservationLocationCreatedEnvelope, "wix.table_reservations.v1.reservation_location_created">;
|
|
2009
1958
|
|
|
2010
|
-
declare const getReservationLocation: BuildRESTFunction
|
|
2011
|
-
declare const updateReservationLocation: BuildRESTFunction
|
|
2012
|
-
declare const queryReservationLocations: BuildRESTFunction
|
|
2013
|
-
declare const listReservationLocations: BuildRESTFunction
|
|
1959
|
+
declare const getReservationLocation: BuildRESTFunction<typeof getReservationLocation$1>;
|
|
1960
|
+
declare const updateReservationLocation: BuildRESTFunction<typeof updateReservationLocation$1>;
|
|
1961
|
+
declare const queryReservationLocations: BuildRESTFunction<typeof queryReservationLocations$1>;
|
|
1962
|
+
declare const listReservationLocations: BuildRESTFunction<typeof listReservationLocations$1>;
|
|
2014
1963
|
declare const onReservationLocationUpdated: BuildEventDefinition<typeof onReservationLocationUpdated$1>;
|
|
2015
1964
|
declare const onReservationLocationCreated: BuildEventDefinition<typeof onReservationLocationCreated$1>;
|
|
2016
1965
|
|
|
@@ -2068,39 +2017,6 @@ interface GetTimeSlotsOptions {
|
|
|
2068
2017
|
slotsAfter?: number | null;
|
|
2069
2018
|
}
|
|
2070
2019
|
|
|
2071
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2072
|
-
interface HttpClient {
|
|
2073
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2074
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2075
|
-
}
|
|
2076
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2077
|
-
type HttpResponse<T = any> = {
|
|
2078
|
-
data: T;
|
|
2079
|
-
status: number;
|
|
2080
|
-
statusText: string;
|
|
2081
|
-
headers: any;
|
|
2082
|
-
request?: any;
|
|
2083
|
-
};
|
|
2084
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2085
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2086
|
-
url: string;
|
|
2087
|
-
data?: Data;
|
|
2088
|
-
params?: URLSearchParams;
|
|
2089
|
-
} & APIMetadata;
|
|
2090
|
-
type APIMetadata = {
|
|
2091
|
-
methodFqn?: string;
|
|
2092
|
-
entityFqdn?: string;
|
|
2093
|
-
packageName?: string;
|
|
2094
|
-
};
|
|
2095
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2096
|
-
|
|
2097
|
-
declare global {
|
|
2098
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2099
|
-
interface SymbolConstructor {
|
|
2100
|
-
readonly observable: symbol;
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
2020
|
declare function getTimeSlots$1(httpClient: HttpClient): (reservationLocationId: string, date: Date, partySize: number | null, options?: GetTimeSlotsOptions) => Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
2105
2021
|
|
|
2106
2022
|
declare const getTimeSlots: BuildRESTFunction<typeof getTimeSlots$1>;
|
|
@@ -1264,70 +1264,62 @@ interface ReservationsQueryBuilder {
|
|
|
1264
1264
|
find: () => Promise<ReservationsQueryResult>;
|
|
1265
1265
|
}
|
|
1266
1266
|
|
|
1267
|
-
interface HttpClient
|
|
1268
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
1269
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1267
|
+
interface HttpClient {
|
|
1268
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
1270
1269
|
}
|
|
1271
|
-
type RequestOptionsFactory
|
|
1272
|
-
type HttpResponse
|
|
1270
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
1271
|
+
type HttpResponse<T = any> = {
|
|
1273
1272
|
data: T;
|
|
1274
1273
|
status: number;
|
|
1275
1274
|
statusText: string;
|
|
1276
1275
|
headers: any;
|
|
1277
1276
|
request?: any;
|
|
1278
1277
|
};
|
|
1279
|
-
type RequestOptions
|
|
1278
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
1280
1279
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1281
1280
|
url: string;
|
|
1282
1281
|
data?: Data;
|
|
1283
1282
|
params?: URLSearchParams;
|
|
1284
|
-
} & APIMetadata
|
|
1285
|
-
type APIMetadata
|
|
1283
|
+
} & APIMetadata;
|
|
1284
|
+
type APIMetadata = {
|
|
1286
1285
|
methodFqn?: string;
|
|
1287
1286
|
entityFqdn?: string;
|
|
1288
1287
|
packageName?: string;
|
|
1289
1288
|
};
|
|
1290
|
-
type EventDefinition
|
|
1289
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
1291
1290
|
__type: 'event-definition';
|
|
1292
1291
|
type: Type;
|
|
1293
1292
|
isDomainEvent?: boolean;
|
|
1294
|
-
transformations?:
|
|
1293
|
+
transformations?: unknown;
|
|
1295
1294
|
__payload: Payload;
|
|
1296
1295
|
};
|
|
1297
|
-
declare function EventDefinition
|
|
1298
|
-
|
|
1299
|
-
declare global {
|
|
1300
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1301
|
-
interface SymbolConstructor {
|
|
1302
|
-
readonly observable: symbol;
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1296
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
1305
1297
|
|
|
1306
1298
|
declare const __metadata$2: {
|
|
1307
1299
|
PACKAGE_NAME: string;
|
|
1308
1300
|
};
|
|
1309
|
-
declare function createReservation(httpClient: HttpClient
|
|
1301
|
+
declare function createReservation(httpClient: HttpClient): (reservation: Reservation, options?: CreateReservationOptions) => Promise<Reservation & {
|
|
1310
1302
|
status: Status$1;
|
|
1311
1303
|
source: Source;
|
|
1312
1304
|
paymentStatus: PaymentStatus;
|
|
1313
1305
|
}>;
|
|
1314
|
-
declare function getReservation(httpClient: HttpClient
|
|
1306
|
+
declare function getReservation(httpClient: HttpClient): (reservationId: string, options?: GetReservationOptions) => Promise<Reservation & {
|
|
1315
1307
|
status: Status$1;
|
|
1316
1308
|
source: Source;
|
|
1317
1309
|
paymentStatus: PaymentStatus;
|
|
1318
1310
|
}>;
|
|
1319
|
-
declare function updateReservation(httpClient: HttpClient
|
|
1311
|
+
declare function updateReservation(httpClient: HttpClient): (_id: string | null, reservation: UpdateReservation, options?: UpdateReservationOptions) => Promise<Reservation & {
|
|
1320
1312
|
status: Status$1;
|
|
1321
1313
|
source: Source;
|
|
1322
1314
|
paymentStatus: PaymentStatus;
|
|
1323
1315
|
}>;
|
|
1324
|
-
declare function createHeldReservation(httpClient: HttpClient
|
|
1325
|
-
declare function reserveReservation(httpClient: HttpClient
|
|
1326
|
-
declare function cancelReservation(httpClient: HttpClient
|
|
1327
|
-
declare function listReservations(httpClient: HttpClient
|
|
1328
|
-
declare function queryReservations(httpClient: HttpClient
|
|
1329
|
-
declare function searchReservations(httpClient: HttpClient
|
|
1330
|
-
declare const onReservationCreated: EventDefinition
|
|
1316
|
+
declare function createHeldReservation(httpClient: HttpClient): (reservationDetails: HeldReservationDetails) => Promise<CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields>;
|
|
1317
|
+
declare function reserveReservation(httpClient: HttpClient): (reservationId: string, reservee: Reservee, revision: string | null) => Promise<ReserveReservationResponse & ReserveReservationResponseNonNullableFields>;
|
|
1318
|
+
declare function cancelReservation(httpClient: HttpClient): (reservationId: string, revision: string | null, options?: CancelReservationOptions) => Promise<CancelReservationResponse & CancelReservationResponseNonNullableFields>;
|
|
1319
|
+
declare function listReservations(httpClient: HttpClient): (options?: ListReservationsOptions) => Promise<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
|
|
1320
|
+
declare function queryReservations(httpClient: HttpClient): () => ReservationsQueryBuilder;
|
|
1321
|
+
declare function searchReservations(httpClient: HttpClient): (search: CursorSearch) => Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
1322
|
+
declare const onReservationCreated: EventDefinition<ReservationCreatedEnvelope, "wix.table_reservations.v1.reservation_created">;
|
|
1331
1323
|
|
|
1332
1324
|
type index_d$2_Aggregation = Aggregation;
|
|
1333
1325
|
type index_d$2_AggregationData = AggregationData;
|
|
@@ -3789,49 +3781,10 @@ interface ListReservationLocationsOptions {
|
|
|
3789
3781
|
fieldsets?: Set[];
|
|
3790
3782
|
}
|
|
3791
3783
|
|
|
3792
|
-
interface HttpClient$1 {
|
|
3793
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3794
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3795
|
-
}
|
|
3796
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3797
|
-
type HttpResponse$1<T = any> = {
|
|
3798
|
-
data: T;
|
|
3799
|
-
status: number;
|
|
3800
|
-
statusText: string;
|
|
3801
|
-
headers: any;
|
|
3802
|
-
request?: any;
|
|
3803
|
-
};
|
|
3804
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3805
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3806
|
-
url: string;
|
|
3807
|
-
data?: Data;
|
|
3808
|
-
params?: URLSearchParams;
|
|
3809
|
-
} & APIMetadata$1;
|
|
3810
|
-
type APIMetadata$1 = {
|
|
3811
|
-
methodFqn?: string;
|
|
3812
|
-
entityFqdn?: string;
|
|
3813
|
-
packageName?: string;
|
|
3814
|
-
};
|
|
3815
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
3816
|
-
__type: 'event-definition';
|
|
3817
|
-
type: Type;
|
|
3818
|
-
isDomainEvent?: boolean;
|
|
3819
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3820
|
-
__payload: Payload;
|
|
3821
|
-
};
|
|
3822
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
3823
|
-
|
|
3824
|
-
declare global {
|
|
3825
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3826
|
-
interface SymbolConstructor {
|
|
3827
|
-
readonly observable: symbol;
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
3784
|
declare const __metadata$1: {
|
|
3832
3785
|
PACKAGE_NAME: string;
|
|
3833
3786
|
};
|
|
3834
|
-
declare function getReservationLocation(httpClient: HttpClient
|
|
3787
|
+
declare function getReservationLocation(httpClient: HttpClient): (reservationLocationId: string, options?: GetReservationLocationOptions) => Promise<ReservationLocation & {
|
|
3835
3788
|
configuration?: {
|
|
3836
3789
|
onlineReservations?: {
|
|
3837
3790
|
seatPacing?: {
|
|
@@ -3915,7 +3868,7 @@ declare function getReservationLocation(httpClient: HttpClient$1): (reservationL
|
|
|
3915
3868
|
} | undefined;
|
|
3916
3869
|
} | undefined;
|
|
3917
3870
|
}>;
|
|
3918
|
-
declare function updateReservationLocation(httpClient: HttpClient
|
|
3871
|
+
declare function updateReservationLocation(httpClient: HttpClient): (_id: string | null, reservationLocation: UpdateReservationLocation) => Promise<ReservationLocation & {
|
|
3919
3872
|
configuration?: {
|
|
3920
3873
|
onlineReservations?: {
|
|
3921
3874
|
seatPacing?: {
|
|
@@ -3999,8 +3952,8 @@ declare function updateReservationLocation(httpClient: HttpClient$1): (_id: stri
|
|
|
3999
3952
|
} | undefined;
|
|
4000
3953
|
} | undefined;
|
|
4001
3954
|
}>;
|
|
4002
|
-
declare function queryReservationLocations(httpClient: HttpClient
|
|
4003
|
-
declare function listReservationLocations(httpClient: HttpClient
|
|
3955
|
+
declare function queryReservationLocations(httpClient: HttpClient): (options?: QueryReservationLocationsOptions) => ReservationLocationsQueryBuilder;
|
|
3956
|
+
declare function listReservationLocations(httpClient: HttpClient): (options?: ListReservationLocationsOptions) => Promise<ListReservationLocationsResponse & ListReservationLocationsResponseNonNullableFields>;
|
|
4004
3957
|
declare const onReservationLocationUpdated: EventDefinition<ReservationLocationUpdatedEnvelope, "wix.table_reservations.v1.reservation_location_updated">;
|
|
4005
3958
|
declare const onReservationLocationCreated: EventDefinition<ReservationLocationCreatedEnvelope, "wix.table_reservations.v1.reservation_location_created">;
|
|
4006
3959
|
|
|
@@ -4351,37 +4304,6 @@ interface GetTimeSlotsOptions {
|
|
|
4351
4304
|
slotsAfter?: number | null;
|
|
4352
4305
|
}
|
|
4353
4306
|
|
|
4354
|
-
interface HttpClient {
|
|
4355
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4356
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4357
|
-
}
|
|
4358
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4359
|
-
type HttpResponse<T = any> = {
|
|
4360
|
-
data: T;
|
|
4361
|
-
status: number;
|
|
4362
|
-
statusText: string;
|
|
4363
|
-
headers: any;
|
|
4364
|
-
request?: any;
|
|
4365
|
-
};
|
|
4366
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4367
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4368
|
-
url: string;
|
|
4369
|
-
data?: Data;
|
|
4370
|
-
params?: URLSearchParams;
|
|
4371
|
-
} & APIMetadata;
|
|
4372
|
-
type APIMetadata = {
|
|
4373
|
-
methodFqn?: string;
|
|
4374
|
-
entityFqdn?: string;
|
|
4375
|
-
packageName?: string;
|
|
4376
|
-
};
|
|
4377
|
-
|
|
4378
|
-
declare global {
|
|
4379
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4380
|
-
interface SymbolConstructor {
|
|
4381
|
-
readonly observable: symbol;
|
|
4382
|
-
}
|
|
4383
|
-
}
|
|
4384
|
-
|
|
4385
4307
|
declare const __metadata: {
|
|
4386
4308
|
PACKAGE_NAME: string;
|
|
4387
4309
|
};
|