@wix/table-reservations 1.0.98 → 1.0.99

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