@wix/table-reservations 1.0.152 → 1.0.154
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 +5 -5
- package/type-bundles/context.bundle.d.ts +119 -87
- package/type-bundles/index.bundle.d.ts +119 -87
- package/type-bundles/meta.bundle.d.ts +24 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/table-reservations",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.154",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,9 +18,9 @@
|
|
|
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.65",
|
|
22
|
+
"@wix/table-reservations_reservations": "1.0.52",
|
|
23
|
+
"@wix/table-reservations_time-slots": "1.0.47"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"glob": "^10.4.1",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"fqdn": ""
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "0605db8e3c9bf9dc284227abf7e55125fd0bb6684aff8132b9ff67df"
|
|
49
49
|
}
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -63,16 +67,16 @@ type APIMetadata = {
|
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
69
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
-
type EventDefinition
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
69
73
|
isDomainEvent?: boolean;
|
|
70
74
|
transformations?: (envelope: unknown) => Payload;
|
|
71
75
|
__payload: Payload;
|
|
72
76
|
};
|
|
73
|
-
declare function EventDefinition
|
|
74
|
-
type EventHandler
|
|
75
|
-
type BuildEventDefinition
|
|
77
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
76
80
|
|
|
77
81
|
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
|
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
277
|
|
|
278
|
+
/**
|
|
279
|
+
Returns a boolean for whether the given type is `never`.
|
|
280
|
+
|
|
281
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
+
|
|
285
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
+
|
|
287
|
+
@example
|
|
288
|
+
```
|
|
289
|
+
import type {IsNever, And} from 'type-fest';
|
|
290
|
+
|
|
291
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
+
And<
|
|
294
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
+
AreStringsEqual<I, O> extends true
|
|
300
|
+
? never
|
|
301
|
+
: void;
|
|
302
|
+
|
|
303
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
+
if (input === output) {
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
endIfEqual('abc', 'abc');
|
|
310
|
+
//=> never
|
|
311
|
+
|
|
312
|
+
endIfEqual('abc', '123');
|
|
313
|
+
//=> void
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
@category Type Guard
|
|
317
|
+
@category Utilities
|
|
318
|
+
*/
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
+
|
|
324
|
+
@see {@link IsNever}
|
|
325
|
+
|
|
326
|
+
@example
|
|
327
|
+
```
|
|
328
|
+
import type {IfNever} from 'type-fest';
|
|
329
|
+
|
|
330
|
+
type ShouldBeTrue = IfNever<never>;
|
|
331
|
+
//=> true
|
|
332
|
+
|
|
333
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
+
//=> 'bar'
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
@category Type Guard
|
|
338
|
+
@category Utilities
|
|
339
|
+
*/
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
+
);
|
|
343
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
382
|
+
// Retain this key
|
|
383
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -367,7 +435,7 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
439
|
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
@@ -380,7 +448,7 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
450
|
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition
|
|
451
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
452
|
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
@@ -468,12 +536,12 @@ interface Reservation {
|
|
|
468
536
|
* Date and time the reservation was created.
|
|
469
537
|
* @readonly
|
|
470
538
|
*/
|
|
471
|
-
_createdDate?: Date;
|
|
539
|
+
_createdDate?: Date | null;
|
|
472
540
|
/**
|
|
473
541
|
* Date and time the reservation was changed.
|
|
474
542
|
* @readonly
|
|
475
543
|
*/
|
|
476
|
-
_updatedDate?: Date;
|
|
544
|
+
_updatedDate?: Date | null;
|
|
477
545
|
/**
|
|
478
546
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
479
547
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -543,9 +611,9 @@ interface Details {
|
|
|
543
611
|
*/
|
|
544
612
|
tableIds?: string[] | null;
|
|
545
613
|
/** Start date and time of the reservation. */
|
|
546
|
-
startDate?: Date;
|
|
614
|
+
startDate?: Date | null;
|
|
547
615
|
/** End date and time of the reservation. */
|
|
548
|
-
endDate?: Date;
|
|
616
|
+
endDate?: Date | null;
|
|
549
617
|
/** Party size. */
|
|
550
618
|
partySize?: number | null;
|
|
551
619
|
}
|
|
@@ -779,7 +847,7 @@ interface HeldReservationDetails {
|
|
|
779
847
|
/** ID of the reservation location where the reservation is made. */
|
|
780
848
|
reservationLocationId?: string | null;
|
|
781
849
|
/** Start date and time of the reservation. */
|
|
782
|
-
startDate?: Date;
|
|
850
|
+
startDate?: Date | null;
|
|
783
851
|
/** Party size. */
|
|
784
852
|
partySize?: number | null;
|
|
785
853
|
}
|
|
@@ -841,9 +909,9 @@ interface ListReservationsRequest {
|
|
|
841
909
|
/** Defines how reservations in the response are sorted. */
|
|
842
910
|
sort?: Sorting$1;
|
|
843
911
|
/** Only reservations starting after this date are returned. */
|
|
844
|
-
startDateFrom?: Date;
|
|
912
|
+
startDateFrom?: Date | null;
|
|
845
913
|
/** Only reservations starting before this date are returned. */
|
|
846
|
-
startDateTo?: Date;
|
|
914
|
+
startDateTo?: Date | null;
|
|
847
915
|
/**
|
|
848
916
|
* Only reservations with this status are returned.
|
|
849
917
|
*
|
|
@@ -1374,7 +1442,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
1374
1442
|
/** ID of the entity associated with the event. */
|
|
1375
1443
|
entityId?: string;
|
|
1376
1444
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1377
|
-
eventTime?: Date;
|
|
1445
|
+
eventTime?: Date | null;
|
|
1378
1446
|
/**
|
|
1379
1447
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1380
1448
|
* (for example, GDPR).
|
|
@@ -1403,7 +1471,7 @@ interface EntityCreatedEvent$1 {
|
|
|
1403
1471
|
entity?: string;
|
|
1404
1472
|
}
|
|
1405
1473
|
interface RestoreInfo$1 {
|
|
1406
|
-
deletedDate?: Date;
|
|
1474
|
+
deletedDate?: Date | null;
|
|
1407
1475
|
}
|
|
1408
1476
|
interface EntityUpdatedEvent$1 {
|
|
1409
1477
|
/**
|
|
@@ -1625,7 +1693,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
1625
1693
|
/** ID of the entity associated with the event. */
|
|
1626
1694
|
entityId?: string;
|
|
1627
1695
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1628
|
-
eventTime?: Date;
|
|
1696
|
+
eventTime?: Date | null;
|
|
1629
1697
|
/**
|
|
1630
1698
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1631
1699
|
* (for example, GDPR).
|
|
@@ -1731,12 +1799,12 @@ interface UpdateReservation {
|
|
|
1731
1799
|
* Date and time the reservation was created.
|
|
1732
1800
|
* @readonly
|
|
1733
1801
|
*/
|
|
1734
|
-
_createdDate?: Date;
|
|
1802
|
+
_createdDate?: Date | null;
|
|
1735
1803
|
/**
|
|
1736
1804
|
* Date and time the reservation was changed.
|
|
1737
1805
|
* @readonly
|
|
1738
1806
|
*/
|
|
1739
|
-
_updatedDate?: Date;
|
|
1807
|
+
_updatedDate?: Date | null;
|
|
1740
1808
|
/**
|
|
1741
1809
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
1742
1810
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -1799,9 +1867,9 @@ interface ListReservationsOptions {
|
|
|
1799
1867
|
/** Defines how reservations in the response are sorted. */
|
|
1800
1868
|
sort?: Sorting$1;
|
|
1801
1869
|
/** Only reservations starting after this date are returned. */
|
|
1802
|
-
startDateFrom?: Date;
|
|
1870
|
+
startDateFrom?: Date | null;
|
|
1803
1871
|
/** Only reservations starting before this date are returned. */
|
|
1804
|
-
startDateTo?: Date;
|
|
1872
|
+
startDateTo?: Date | null;
|
|
1805
1873
|
/**
|
|
1806
1874
|
* Only reservations with this status are returned.
|
|
1807
1875
|
*
|
|
@@ -2044,29 +2112,11 @@ interface SearchReservationsSignature {
|
|
|
2044
2112
|
*/
|
|
2045
2113
|
(search: CursorSearch): Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
2046
2114
|
}
|
|
2047
|
-
declare const onReservationCreated$1: EventDefinition
|
|
2048
|
-
declare const onReservationUpdated$1: EventDefinition
|
|
2049
|
-
declare const onReservationDeleted$1: EventDefinition
|
|
2050
|
-
|
|
2051
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2052
|
-
__type: 'event-definition';
|
|
2053
|
-
type: Type;
|
|
2054
|
-
isDomainEvent?: boolean;
|
|
2055
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2056
|
-
__payload: Payload;
|
|
2057
|
-
};
|
|
2058
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2059
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2060
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
2061
|
-
|
|
2062
|
-
declare global {
|
|
2063
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2064
|
-
interface SymbolConstructor {
|
|
2065
|
-
readonly observable: symbol;
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2115
|
+
declare const onReservationCreated$1: EventDefinition<ReservationCreatedEnvelope, "wix.table_reservations.v1.reservation_created">;
|
|
2116
|
+
declare const onReservationUpdated$1: EventDefinition<ReservationUpdatedEnvelope, "wix.table_reservations.v1.reservation_updated">;
|
|
2117
|
+
declare const onReservationDeleted$1: EventDefinition<ReservationDeletedEnvelope, "wix.table_reservations.v1.reservation_deleted">;
|
|
2068
2118
|
|
|
2069
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
2119
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2070
2120
|
|
|
2071
2121
|
declare const createReservation: MaybeContext<BuildRESTFunction<typeof createReservation$1> & typeof createReservation$1>;
|
|
2072
2122
|
declare const getReservation: MaybeContext<BuildRESTFunction<typeof getReservation$1> & typeof getReservation$1>;
|
|
@@ -2249,12 +2299,12 @@ interface ReservationLocation {
|
|
|
2249
2299
|
* The date and time this reservation location was created.
|
|
2250
2300
|
* @readonly
|
|
2251
2301
|
*/
|
|
2252
|
-
_createdDate?: Date;
|
|
2302
|
+
_createdDate?: Date | null;
|
|
2253
2303
|
/**
|
|
2254
2304
|
* The date and time this reservation location was last updated.
|
|
2255
2305
|
* @readonly
|
|
2256
2306
|
*/
|
|
2257
|
-
_updatedDate?: Date;
|
|
2307
|
+
_updatedDate?: Date | null;
|
|
2258
2308
|
/**
|
|
2259
2309
|
* Physical location details.
|
|
2260
2310
|
*
|
|
@@ -3432,7 +3482,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
3432
3482
|
/** ID of the entity associated with the event. */
|
|
3433
3483
|
entityId?: string;
|
|
3434
3484
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3435
|
-
eventTime?: Date;
|
|
3485
|
+
eventTime?: Date | null;
|
|
3436
3486
|
/**
|
|
3437
3487
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
3438
3488
|
* (for example, GDPR).
|
|
@@ -3461,7 +3511,7 @@ interface EntityCreatedEvent {
|
|
|
3461
3511
|
entity?: string;
|
|
3462
3512
|
}
|
|
3463
3513
|
interface RestoreInfo {
|
|
3464
|
-
deletedDate?: Date;
|
|
3514
|
+
deletedDate?: Date | null;
|
|
3465
3515
|
}
|
|
3466
3516
|
interface EntityUpdatedEvent {
|
|
3467
3517
|
/**
|
|
@@ -3687,7 +3737,7 @@ interface SiteDeleted {
|
|
|
3687
3737
|
}
|
|
3688
3738
|
interface DeleteContext {
|
|
3689
3739
|
/** When the meta site was deleted. */
|
|
3690
|
-
dateDeleted?: Date;
|
|
3740
|
+
dateDeleted?: Date | null;
|
|
3691
3741
|
/** A status. */
|
|
3692
3742
|
deleteStatus?: DeleteStatus;
|
|
3693
3743
|
/** A reason (flow). */
|
|
@@ -4053,7 +4103,7 @@ interface FeatureEvent extends FeatureEventEventOneOf {
|
|
|
4053
4103
|
* Timestamp of the event in
|
|
4054
4104
|
* [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
|
|
4055
4105
|
*/
|
|
4056
|
-
timestamp?: Date;
|
|
4106
|
+
timestamp?: Date | null;
|
|
4057
4107
|
}
|
|
4058
4108
|
/** @oneof */
|
|
4059
4109
|
interface FeatureEventEventOneOf {
|
|
@@ -4172,13 +4222,13 @@ interface Feature extends FeatureQuantityInfoOneOf {
|
|
|
4172
4222
|
* @readonly
|
|
4173
4223
|
* @deprecated
|
|
4174
4224
|
*/
|
|
4175
|
-
createdAt?: Date;
|
|
4225
|
+
createdAt?: Date | null;
|
|
4176
4226
|
/**
|
|
4177
4227
|
* Deprecated.
|
|
4178
4228
|
* @readonly
|
|
4179
4229
|
* @deprecated
|
|
4180
4230
|
*/
|
|
4181
|
-
updatedAt?: Date;
|
|
4231
|
+
updatedAt?: Date | null;
|
|
4182
4232
|
/**
|
|
4183
4233
|
* Information about how often customers can use the feature during a specific
|
|
4184
4234
|
* period. Available only for quota features.
|
|
@@ -4639,7 +4689,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
4639
4689
|
/** ID of the entity associated with the event. */
|
|
4640
4690
|
entityId?: string;
|
|
4641
4691
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
4642
|
-
eventTime?: Date;
|
|
4692
|
+
eventTime?: Date | null;
|
|
4643
4693
|
/**
|
|
4644
4694
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
4645
4695
|
* (for example, GDPR).
|
|
@@ -4691,12 +4741,12 @@ interface UpdateReservationLocation {
|
|
|
4691
4741
|
* The date and time this reservation location was created.
|
|
4692
4742
|
* @readonly
|
|
4693
4743
|
*/
|
|
4694
|
-
_createdDate?: Date;
|
|
4744
|
+
_createdDate?: Date | null;
|
|
4695
4745
|
/**
|
|
4696
4746
|
* The date and time this reservation location was last updated.
|
|
4697
4747
|
* @readonly
|
|
4698
4748
|
*/
|
|
4699
|
-
_updatedDate?: Date;
|
|
4749
|
+
_updatedDate?: Date | null;
|
|
4700
4750
|
/**
|
|
4701
4751
|
* Physical location details.
|
|
4702
4752
|
*
|
|
@@ -4866,26 +4916,8 @@ interface ListReservationLocationsSignature {
|
|
|
4866
4916
|
*/
|
|
4867
4917
|
(options?: ListReservationLocationsOptions | undefined): Promise<ListReservationLocationsResponse & ListReservationLocationsResponseNonNullableFields>;
|
|
4868
4918
|
}
|
|
4869
|
-
declare const onReservationLocationUpdated$1: EventDefinition
|
|
4870
|
-
declare const onReservationLocationCreated$1: EventDefinition
|
|
4871
|
-
|
|
4872
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4873
|
-
__type: 'event-definition';
|
|
4874
|
-
type: Type;
|
|
4875
|
-
isDomainEvent?: boolean;
|
|
4876
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4877
|
-
__payload: Payload;
|
|
4878
|
-
};
|
|
4879
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4880
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4881
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4882
|
-
|
|
4883
|
-
declare global {
|
|
4884
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4885
|
-
interface SymbolConstructor {
|
|
4886
|
-
readonly observable: symbol;
|
|
4887
|
-
}
|
|
4888
|
-
}
|
|
4919
|
+
declare const onReservationLocationUpdated$1: EventDefinition<ReservationLocationUpdatedEnvelope, "wix.table_reservations.v1.reservation_location_updated">;
|
|
4920
|
+
declare const onReservationLocationCreated$1: EventDefinition<ReservationLocationCreatedEnvelope, "wix.table_reservations.v1.reservation_location_created">;
|
|
4889
4921
|
|
|
4890
4922
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4891
4923
|
|
|
@@ -5159,7 +5191,7 @@ declare namespace context$1 {
|
|
|
5159
5191
|
|
|
5160
5192
|
interface TimeSlot {
|
|
5161
5193
|
/** Start date and time of this time slot. */
|
|
5162
|
-
startDate?: Date;
|
|
5194
|
+
startDate?: Date | null;
|
|
5163
5195
|
/** Duration in minutes of this time slot. */
|
|
5164
5196
|
duration?: number;
|
|
5165
5197
|
/**
|
|
@@ -5187,7 +5219,7 @@ interface GetTimeSlotsRequest {
|
|
|
5187
5219
|
/** ID of the reservation location for which to retrieve time slots. */
|
|
5188
5220
|
reservationLocationId: string;
|
|
5189
5221
|
/** Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */
|
|
5190
|
-
date: Date;
|
|
5222
|
+
date: Date | null;
|
|
5191
5223
|
/**
|
|
5192
5224
|
* Duration in minutes of the time slot.
|
|
5193
5225
|
*
|
|
@@ -5213,7 +5245,7 @@ interface CheckReservationDetailsRequest {
|
|
|
5213
5245
|
/** Reservation location ID. */
|
|
5214
5246
|
reservationLocationId?: string;
|
|
5215
5247
|
/** Date. */
|
|
5216
|
-
date?: Date;
|
|
5248
|
+
date?: Date | null;
|
|
5217
5249
|
/** Duration. */
|
|
5218
5250
|
duration?: number | null;
|
|
5219
5251
|
/** Party size. */
|
|
@@ -5289,7 +5321,7 @@ interface CheckTimeSlotRequest {
|
|
|
5289
5321
|
/** ID of the reservation location for which to check the time slot. */
|
|
5290
5322
|
reservationLocationId: string;
|
|
5291
5323
|
/** Date and time of the time slot to check. */
|
|
5292
|
-
date: Date;
|
|
5324
|
+
date: Date | null;
|
|
5293
5325
|
/**
|
|
5294
5326
|
* Duration of the time slot in minutes .
|
|
5295
5327
|
*
|
|
@@ -5350,7 +5382,7 @@ interface GetTimeSlotsOptions {
|
|
|
5350
5382
|
}
|
|
5351
5383
|
interface CheckTimeSlotOptions {
|
|
5352
5384
|
/** Date and time of the time slot to check. */
|
|
5353
|
-
date: Date;
|
|
5385
|
+
date: Date | null;
|
|
5354
5386
|
/**
|
|
5355
5387
|
* Duration of the time slot in minutes .
|
|
5356
5388
|
*
|
|
@@ -5386,7 +5418,7 @@ interface GetTimeSlotsSignature {
|
|
|
5386
5418
|
* Min: `1`
|
|
5387
5419
|
* @param - Options for retrieving the time slots.
|
|
5388
5420
|
*/
|
|
5389
|
-
(reservationLocationId: string, date: Date, partySize: number | null, options?: GetTimeSlotsOptions | undefined): Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
5421
|
+
(reservationLocationId: string, date: Date | null, partySize: number | null, options?: GetTimeSlotsOptions | undefined): Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
5390
5422
|
}
|
|
5391
5423
|
declare function checkTimeSlot$1(httpClient: HttpClient): CheckTimeSlotSignature;
|
|
5392
5424
|
interface CheckTimeSlotSignature {
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -63,16 +67,16 @@ type APIMetadata = {
|
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
69
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
-
type EventDefinition
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
69
73
|
isDomainEvent?: boolean;
|
|
70
74
|
transformations?: (envelope: unknown) => Payload;
|
|
71
75
|
__payload: Payload;
|
|
72
76
|
};
|
|
73
|
-
declare function EventDefinition
|
|
74
|
-
type EventHandler
|
|
75
|
-
type BuildEventDefinition
|
|
77
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
76
80
|
|
|
77
81
|
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
|
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
277
|
|
|
278
|
+
/**
|
|
279
|
+
Returns a boolean for whether the given type is `never`.
|
|
280
|
+
|
|
281
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
+
|
|
285
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
+
|
|
287
|
+
@example
|
|
288
|
+
```
|
|
289
|
+
import type {IsNever, And} from 'type-fest';
|
|
290
|
+
|
|
291
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
+
And<
|
|
294
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
+
AreStringsEqual<I, O> extends true
|
|
300
|
+
? never
|
|
301
|
+
: void;
|
|
302
|
+
|
|
303
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
+
if (input === output) {
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
endIfEqual('abc', 'abc');
|
|
310
|
+
//=> never
|
|
311
|
+
|
|
312
|
+
endIfEqual('abc', '123');
|
|
313
|
+
//=> void
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
@category Type Guard
|
|
317
|
+
@category Utilities
|
|
318
|
+
*/
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
+
|
|
324
|
+
@see {@link IsNever}
|
|
325
|
+
|
|
326
|
+
@example
|
|
327
|
+
```
|
|
328
|
+
import type {IfNever} from 'type-fest';
|
|
329
|
+
|
|
330
|
+
type ShouldBeTrue = IfNever<never>;
|
|
331
|
+
//=> true
|
|
332
|
+
|
|
333
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
+
//=> 'bar'
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
@category Type Guard
|
|
338
|
+
@category Utilities
|
|
339
|
+
*/
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
+
);
|
|
343
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
382
|
+
// Retain this key
|
|
383
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -367,7 +435,7 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
439
|
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
@@ -380,7 +448,7 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
450
|
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition
|
|
451
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
452
|
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
@@ -468,12 +536,12 @@ interface Reservation {
|
|
|
468
536
|
* Date and time the reservation was created.
|
|
469
537
|
* @readonly
|
|
470
538
|
*/
|
|
471
|
-
_createdDate?: Date;
|
|
539
|
+
_createdDate?: Date | null;
|
|
472
540
|
/**
|
|
473
541
|
* Date and time the reservation was changed.
|
|
474
542
|
* @readonly
|
|
475
543
|
*/
|
|
476
|
-
_updatedDate?: Date;
|
|
544
|
+
_updatedDate?: Date | null;
|
|
477
545
|
/**
|
|
478
546
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
479
547
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -543,9 +611,9 @@ interface Details {
|
|
|
543
611
|
*/
|
|
544
612
|
tableIds?: string[] | null;
|
|
545
613
|
/** Start date and time of the reservation. */
|
|
546
|
-
startDate?: Date;
|
|
614
|
+
startDate?: Date | null;
|
|
547
615
|
/** End date and time of the reservation. */
|
|
548
|
-
endDate?: Date;
|
|
616
|
+
endDate?: Date | null;
|
|
549
617
|
/** Party size. */
|
|
550
618
|
partySize?: number | null;
|
|
551
619
|
}
|
|
@@ -779,7 +847,7 @@ interface HeldReservationDetails {
|
|
|
779
847
|
/** ID of the reservation location where the reservation is made. */
|
|
780
848
|
reservationLocationId?: string | null;
|
|
781
849
|
/** Start date and time of the reservation. */
|
|
782
|
-
startDate?: Date;
|
|
850
|
+
startDate?: Date | null;
|
|
783
851
|
/** Party size. */
|
|
784
852
|
partySize?: number | null;
|
|
785
853
|
}
|
|
@@ -841,9 +909,9 @@ interface ListReservationsRequest {
|
|
|
841
909
|
/** Defines how reservations in the response are sorted. */
|
|
842
910
|
sort?: Sorting$1;
|
|
843
911
|
/** Only reservations starting after this date are returned. */
|
|
844
|
-
startDateFrom?: Date;
|
|
912
|
+
startDateFrom?: Date | null;
|
|
845
913
|
/** Only reservations starting before this date are returned. */
|
|
846
|
-
startDateTo?: Date;
|
|
914
|
+
startDateTo?: Date | null;
|
|
847
915
|
/**
|
|
848
916
|
* Only reservations with this status are returned.
|
|
849
917
|
*
|
|
@@ -1374,7 +1442,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
1374
1442
|
/** ID of the entity associated with the event. */
|
|
1375
1443
|
entityId?: string;
|
|
1376
1444
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1377
|
-
eventTime?: Date;
|
|
1445
|
+
eventTime?: Date | null;
|
|
1378
1446
|
/**
|
|
1379
1447
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1380
1448
|
* (for example, GDPR).
|
|
@@ -1403,7 +1471,7 @@ interface EntityCreatedEvent$1 {
|
|
|
1403
1471
|
entity?: string;
|
|
1404
1472
|
}
|
|
1405
1473
|
interface RestoreInfo$1 {
|
|
1406
|
-
deletedDate?: Date;
|
|
1474
|
+
deletedDate?: Date | null;
|
|
1407
1475
|
}
|
|
1408
1476
|
interface EntityUpdatedEvent$1 {
|
|
1409
1477
|
/**
|
|
@@ -1625,7 +1693,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
1625
1693
|
/** ID of the entity associated with the event. */
|
|
1626
1694
|
entityId?: string;
|
|
1627
1695
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1628
|
-
eventTime?: Date;
|
|
1696
|
+
eventTime?: Date | null;
|
|
1629
1697
|
/**
|
|
1630
1698
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1631
1699
|
* (for example, GDPR).
|
|
@@ -1731,12 +1799,12 @@ interface UpdateReservation {
|
|
|
1731
1799
|
* Date and time the reservation was created.
|
|
1732
1800
|
* @readonly
|
|
1733
1801
|
*/
|
|
1734
|
-
_createdDate?: Date;
|
|
1802
|
+
_createdDate?: Date | null;
|
|
1735
1803
|
/**
|
|
1736
1804
|
* Date and time the reservation was changed.
|
|
1737
1805
|
* @readonly
|
|
1738
1806
|
*/
|
|
1739
|
-
_updatedDate?: Date;
|
|
1807
|
+
_updatedDate?: Date | null;
|
|
1740
1808
|
/**
|
|
1741
1809
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
1742
1810
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -1799,9 +1867,9 @@ interface ListReservationsOptions {
|
|
|
1799
1867
|
/** Defines how reservations in the response are sorted. */
|
|
1800
1868
|
sort?: Sorting$1;
|
|
1801
1869
|
/** Only reservations starting after this date are returned. */
|
|
1802
|
-
startDateFrom?: Date;
|
|
1870
|
+
startDateFrom?: Date | null;
|
|
1803
1871
|
/** Only reservations starting before this date are returned. */
|
|
1804
|
-
startDateTo?: Date;
|
|
1872
|
+
startDateTo?: Date | null;
|
|
1805
1873
|
/**
|
|
1806
1874
|
* Only reservations with this status are returned.
|
|
1807
1875
|
*
|
|
@@ -2044,29 +2112,11 @@ interface SearchReservationsSignature {
|
|
|
2044
2112
|
*/
|
|
2045
2113
|
(search: CursorSearch): Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
2046
2114
|
}
|
|
2047
|
-
declare const onReservationCreated$1: EventDefinition
|
|
2048
|
-
declare const onReservationUpdated$1: EventDefinition
|
|
2049
|
-
declare const onReservationDeleted$1: EventDefinition
|
|
2050
|
-
|
|
2051
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2052
|
-
__type: 'event-definition';
|
|
2053
|
-
type: Type;
|
|
2054
|
-
isDomainEvent?: boolean;
|
|
2055
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2056
|
-
__payload: Payload;
|
|
2057
|
-
};
|
|
2058
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2059
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2060
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
2061
|
-
|
|
2062
|
-
declare global {
|
|
2063
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2064
|
-
interface SymbolConstructor {
|
|
2065
|
-
readonly observable: symbol;
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2115
|
+
declare const onReservationCreated$1: EventDefinition<ReservationCreatedEnvelope, "wix.table_reservations.v1.reservation_created">;
|
|
2116
|
+
declare const onReservationUpdated$1: EventDefinition<ReservationUpdatedEnvelope, "wix.table_reservations.v1.reservation_updated">;
|
|
2117
|
+
declare const onReservationDeleted$1: EventDefinition<ReservationDeletedEnvelope, "wix.table_reservations.v1.reservation_deleted">;
|
|
2068
2118
|
|
|
2069
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
2119
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2070
2120
|
|
|
2071
2121
|
declare const createReservation: MaybeContext<BuildRESTFunction<typeof createReservation$1> & typeof createReservation$1>;
|
|
2072
2122
|
declare const getReservation: MaybeContext<BuildRESTFunction<typeof getReservation$1> & typeof getReservation$1>;
|
|
@@ -2249,12 +2299,12 @@ interface ReservationLocation {
|
|
|
2249
2299
|
* The date and time this reservation location was created.
|
|
2250
2300
|
* @readonly
|
|
2251
2301
|
*/
|
|
2252
|
-
_createdDate?: Date;
|
|
2302
|
+
_createdDate?: Date | null;
|
|
2253
2303
|
/**
|
|
2254
2304
|
* The date and time this reservation location was last updated.
|
|
2255
2305
|
* @readonly
|
|
2256
2306
|
*/
|
|
2257
|
-
_updatedDate?: Date;
|
|
2307
|
+
_updatedDate?: Date | null;
|
|
2258
2308
|
/**
|
|
2259
2309
|
* Physical location details.
|
|
2260
2310
|
*
|
|
@@ -3432,7 +3482,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
3432
3482
|
/** ID of the entity associated with the event. */
|
|
3433
3483
|
entityId?: string;
|
|
3434
3484
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3435
|
-
eventTime?: Date;
|
|
3485
|
+
eventTime?: Date | null;
|
|
3436
3486
|
/**
|
|
3437
3487
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
3438
3488
|
* (for example, GDPR).
|
|
@@ -3461,7 +3511,7 @@ interface EntityCreatedEvent {
|
|
|
3461
3511
|
entity?: string;
|
|
3462
3512
|
}
|
|
3463
3513
|
interface RestoreInfo {
|
|
3464
|
-
deletedDate?: Date;
|
|
3514
|
+
deletedDate?: Date | null;
|
|
3465
3515
|
}
|
|
3466
3516
|
interface EntityUpdatedEvent {
|
|
3467
3517
|
/**
|
|
@@ -3687,7 +3737,7 @@ interface SiteDeleted {
|
|
|
3687
3737
|
}
|
|
3688
3738
|
interface DeleteContext {
|
|
3689
3739
|
/** When the meta site was deleted. */
|
|
3690
|
-
dateDeleted?: Date;
|
|
3740
|
+
dateDeleted?: Date | null;
|
|
3691
3741
|
/** A status. */
|
|
3692
3742
|
deleteStatus?: DeleteStatus;
|
|
3693
3743
|
/** A reason (flow). */
|
|
@@ -4053,7 +4103,7 @@ interface FeatureEvent extends FeatureEventEventOneOf {
|
|
|
4053
4103
|
* Timestamp of the event in
|
|
4054
4104
|
* [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
|
|
4055
4105
|
*/
|
|
4056
|
-
timestamp?: Date;
|
|
4106
|
+
timestamp?: Date | null;
|
|
4057
4107
|
}
|
|
4058
4108
|
/** @oneof */
|
|
4059
4109
|
interface FeatureEventEventOneOf {
|
|
@@ -4172,13 +4222,13 @@ interface Feature extends FeatureQuantityInfoOneOf {
|
|
|
4172
4222
|
* @readonly
|
|
4173
4223
|
* @deprecated
|
|
4174
4224
|
*/
|
|
4175
|
-
createdAt?: Date;
|
|
4225
|
+
createdAt?: Date | null;
|
|
4176
4226
|
/**
|
|
4177
4227
|
* Deprecated.
|
|
4178
4228
|
* @readonly
|
|
4179
4229
|
* @deprecated
|
|
4180
4230
|
*/
|
|
4181
|
-
updatedAt?: Date;
|
|
4231
|
+
updatedAt?: Date | null;
|
|
4182
4232
|
/**
|
|
4183
4233
|
* Information about how often customers can use the feature during a specific
|
|
4184
4234
|
* period. Available only for quota features.
|
|
@@ -4639,7 +4689,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
4639
4689
|
/** ID of the entity associated with the event. */
|
|
4640
4690
|
entityId?: string;
|
|
4641
4691
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
4642
|
-
eventTime?: Date;
|
|
4692
|
+
eventTime?: Date | null;
|
|
4643
4693
|
/**
|
|
4644
4694
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
4645
4695
|
* (for example, GDPR).
|
|
@@ -4691,12 +4741,12 @@ interface UpdateReservationLocation {
|
|
|
4691
4741
|
* The date and time this reservation location was created.
|
|
4692
4742
|
* @readonly
|
|
4693
4743
|
*/
|
|
4694
|
-
_createdDate?: Date;
|
|
4744
|
+
_createdDate?: Date | null;
|
|
4695
4745
|
/**
|
|
4696
4746
|
* The date and time this reservation location was last updated.
|
|
4697
4747
|
* @readonly
|
|
4698
4748
|
*/
|
|
4699
|
-
_updatedDate?: Date;
|
|
4749
|
+
_updatedDate?: Date | null;
|
|
4700
4750
|
/**
|
|
4701
4751
|
* Physical location details.
|
|
4702
4752
|
*
|
|
@@ -4866,26 +4916,8 @@ interface ListReservationLocationsSignature {
|
|
|
4866
4916
|
*/
|
|
4867
4917
|
(options?: ListReservationLocationsOptions | undefined): Promise<ListReservationLocationsResponse & ListReservationLocationsResponseNonNullableFields>;
|
|
4868
4918
|
}
|
|
4869
|
-
declare const onReservationLocationUpdated$1: EventDefinition
|
|
4870
|
-
declare const onReservationLocationCreated$1: EventDefinition
|
|
4871
|
-
|
|
4872
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4873
|
-
__type: 'event-definition';
|
|
4874
|
-
type: Type;
|
|
4875
|
-
isDomainEvent?: boolean;
|
|
4876
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4877
|
-
__payload: Payload;
|
|
4878
|
-
};
|
|
4879
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4880
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4881
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4882
|
-
|
|
4883
|
-
declare global {
|
|
4884
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4885
|
-
interface SymbolConstructor {
|
|
4886
|
-
readonly observable: symbol;
|
|
4887
|
-
}
|
|
4888
|
-
}
|
|
4919
|
+
declare const onReservationLocationUpdated$1: EventDefinition<ReservationLocationUpdatedEnvelope, "wix.table_reservations.v1.reservation_location_updated">;
|
|
4920
|
+
declare const onReservationLocationCreated$1: EventDefinition<ReservationLocationCreatedEnvelope, "wix.table_reservations.v1.reservation_location_created">;
|
|
4889
4921
|
|
|
4890
4922
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4891
4923
|
|
|
@@ -5159,7 +5191,7 @@ declare namespace index_d$1 {
|
|
|
5159
5191
|
|
|
5160
5192
|
interface TimeSlot {
|
|
5161
5193
|
/** Start date and time of this time slot. */
|
|
5162
|
-
startDate?: Date;
|
|
5194
|
+
startDate?: Date | null;
|
|
5163
5195
|
/** Duration in minutes of this time slot. */
|
|
5164
5196
|
duration?: number;
|
|
5165
5197
|
/**
|
|
@@ -5187,7 +5219,7 @@ interface GetTimeSlotsRequest {
|
|
|
5187
5219
|
/** ID of the reservation location for which to retrieve time slots. */
|
|
5188
5220
|
reservationLocationId: string;
|
|
5189
5221
|
/** Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */
|
|
5190
|
-
date: Date;
|
|
5222
|
+
date: Date | null;
|
|
5191
5223
|
/**
|
|
5192
5224
|
* Duration in minutes of the time slot.
|
|
5193
5225
|
*
|
|
@@ -5213,7 +5245,7 @@ interface CheckReservationDetailsRequest {
|
|
|
5213
5245
|
/** Reservation location ID. */
|
|
5214
5246
|
reservationLocationId?: string;
|
|
5215
5247
|
/** Date. */
|
|
5216
|
-
date?: Date;
|
|
5248
|
+
date?: Date | null;
|
|
5217
5249
|
/** Duration. */
|
|
5218
5250
|
duration?: number | null;
|
|
5219
5251
|
/** Party size. */
|
|
@@ -5289,7 +5321,7 @@ interface CheckTimeSlotRequest {
|
|
|
5289
5321
|
/** ID of the reservation location for which to check the time slot. */
|
|
5290
5322
|
reservationLocationId: string;
|
|
5291
5323
|
/** Date and time of the time slot to check. */
|
|
5292
|
-
date: Date;
|
|
5324
|
+
date: Date | null;
|
|
5293
5325
|
/**
|
|
5294
5326
|
* Duration of the time slot in minutes .
|
|
5295
5327
|
*
|
|
@@ -5350,7 +5382,7 @@ interface GetTimeSlotsOptions {
|
|
|
5350
5382
|
}
|
|
5351
5383
|
interface CheckTimeSlotOptions {
|
|
5352
5384
|
/** Date and time of the time slot to check. */
|
|
5353
|
-
date: Date;
|
|
5385
|
+
date: Date | null;
|
|
5354
5386
|
/**
|
|
5355
5387
|
* Duration of the time slot in minutes .
|
|
5356
5388
|
*
|
|
@@ -5386,7 +5418,7 @@ interface GetTimeSlotsSignature {
|
|
|
5386
5418
|
* Min: `1`
|
|
5387
5419
|
* @param - Options for retrieving the time slots.
|
|
5388
5420
|
*/
|
|
5389
|
-
(reservationLocationId: string, date: Date, partySize: number | null, options?: GetTimeSlotsOptions | undefined): Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
5421
|
+
(reservationLocationId: string, date: Date | null, partySize: number | null, options?: GetTimeSlotsOptions | undefined): Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
5390
5422
|
}
|
|
5391
5423
|
declare function checkTimeSlot$1(httpClient: HttpClient): CheckTimeSlotSignature;
|
|
5392
5424
|
interface CheckTimeSlotSignature {
|
|
@@ -56,12 +56,12 @@ interface Reservation$1 {
|
|
|
56
56
|
* Date and time the reservation was created.
|
|
57
57
|
* @readonly
|
|
58
58
|
*/
|
|
59
|
-
createdDate?: Date;
|
|
59
|
+
createdDate?: Date | null;
|
|
60
60
|
/**
|
|
61
61
|
* Date and time the reservation was changed.
|
|
62
62
|
* @readonly
|
|
63
63
|
*/
|
|
64
|
-
updatedDate?: Date;
|
|
64
|
+
updatedDate?: Date | null;
|
|
65
65
|
/**
|
|
66
66
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
67
67
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -126,9 +126,9 @@ interface Details$1 {
|
|
|
126
126
|
*/
|
|
127
127
|
tableIds?: string[] | null;
|
|
128
128
|
/** Start date and time of the reservation. */
|
|
129
|
-
startDate?: Date;
|
|
129
|
+
startDate?: Date | null;
|
|
130
130
|
/** End date and time of the reservation. */
|
|
131
|
-
endDate?: Date;
|
|
131
|
+
endDate?: Date | null;
|
|
132
132
|
/** Party size. */
|
|
133
133
|
partySize?: number | null;
|
|
134
134
|
}
|
|
@@ -309,7 +309,7 @@ interface HeldReservationDetails$1 {
|
|
|
309
309
|
/** ID of the reservation location where the reservation is made. */
|
|
310
310
|
reservationLocationId?: string | null;
|
|
311
311
|
/** Start date and time of the reservation. */
|
|
312
|
-
startDate?: Date;
|
|
312
|
+
startDate?: Date | null;
|
|
313
313
|
/** Party size. */
|
|
314
314
|
partySize?: number | null;
|
|
315
315
|
}
|
|
@@ -367,9 +367,9 @@ interface ListReservationsRequest$1 {
|
|
|
367
367
|
/** Defines how reservations in the response are sorted. */
|
|
368
368
|
sort?: Sorting$3;
|
|
369
369
|
/** Only reservations starting after this date are returned. */
|
|
370
|
-
startDateFrom?: Date;
|
|
370
|
+
startDateFrom?: Date | null;
|
|
371
371
|
/** Only reservations starting before this date are returned. */
|
|
372
|
-
startDateTo?: Date;
|
|
372
|
+
startDateTo?: Date | null;
|
|
373
373
|
/**
|
|
374
374
|
* Only reservations with this status are returned.
|
|
375
375
|
*
|
|
@@ -1035,12 +1035,12 @@ interface Reservation {
|
|
|
1035
1035
|
* Date and time the reservation was created.
|
|
1036
1036
|
* @readonly
|
|
1037
1037
|
*/
|
|
1038
|
-
_createdDate?: Date;
|
|
1038
|
+
_createdDate?: Date | null;
|
|
1039
1039
|
/**
|
|
1040
1040
|
* Date and time the reservation was changed.
|
|
1041
1041
|
* @readonly
|
|
1042
1042
|
*/
|
|
1043
|
-
_updatedDate?: Date;
|
|
1043
|
+
_updatedDate?: Date | null;
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Revision number, which increments by 1 each time the reservation is updated.
|
|
1046
1046
|
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
@@ -1105,9 +1105,9 @@ interface Details {
|
|
|
1105
1105
|
*/
|
|
1106
1106
|
tableIds?: string[] | null;
|
|
1107
1107
|
/** Start date and time of the reservation. */
|
|
1108
|
-
startDate?: Date;
|
|
1108
|
+
startDate?: Date | null;
|
|
1109
1109
|
/** End date and time of the reservation. */
|
|
1110
|
-
endDate?: Date;
|
|
1110
|
+
endDate?: Date | null;
|
|
1111
1111
|
/** Party size. */
|
|
1112
1112
|
partySize?: number | null;
|
|
1113
1113
|
}
|
|
@@ -1286,7 +1286,7 @@ interface HeldReservationDetails {
|
|
|
1286
1286
|
/** ID of the reservation location where the reservation is made. */
|
|
1287
1287
|
reservationLocationId?: string | null;
|
|
1288
1288
|
/** Start date and time of the reservation. */
|
|
1289
|
-
startDate?: Date;
|
|
1289
|
+
startDate?: Date | null;
|
|
1290
1290
|
/** Party size. */
|
|
1291
1291
|
partySize?: number | null;
|
|
1292
1292
|
}
|
|
@@ -1344,9 +1344,9 @@ interface ListReservationsRequest {
|
|
|
1344
1344
|
/** Defines how reservations in the response are sorted. */
|
|
1345
1345
|
sort?: Sorting$2;
|
|
1346
1346
|
/** Only reservations starting after this date are returned. */
|
|
1347
|
-
startDateFrom?: Date;
|
|
1347
|
+
startDateFrom?: Date | null;
|
|
1348
1348
|
/** Only reservations starting before this date are returned. */
|
|
1349
|
-
startDateTo?: Date;
|
|
1349
|
+
startDateTo?: Date | null;
|
|
1350
1350
|
/**
|
|
1351
1351
|
* Only reservations with this status are returned.
|
|
1352
1352
|
*
|
|
@@ -2012,12 +2012,12 @@ interface ReservationLocation$1 {
|
|
|
2012
2012
|
* The date and time this reservation location was created.
|
|
2013
2013
|
* @readonly
|
|
2014
2014
|
*/
|
|
2015
|
-
createdDate?: Date;
|
|
2015
|
+
createdDate?: Date | null;
|
|
2016
2016
|
/**
|
|
2017
2017
|
* The date and time this reservation location was last updated.
|
|
2018
2018
|
* @readonly
|
|
2019
2019
|
*/
|
|
2020
|
-
updatedDate?: Date;
|
|
2020
|
+
updatedDate?: Date | null;
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Physical location details.
|
|
2023
2023
|
*
|
|
@@ -2798,12 +2798,12 @@ interface ReservationLocation {
|
|
|
2798
2798
|
* The date and time this reservation location was created.
|
|
2799
2799
|
* @readonly
|
|
2800
2800
|
*/
|
|
2801
|
-
_createdDate?: Date;
|
|
2801
|
+
_createdDate?: Date | null;
|
|
2802
2802
|
/**
|
|
2803
2803
|
* The date and time this reservation location was last updated.
|
|
2804
2804
|
* @readonly
|
|
2805
2805
|
*/
|
|
2806
|
-
_updatedDate?: Date;
|
|
2806
|
+
_updatedDate?: Date | null;
|
|
2807
2807
|
/**
|
|
2808
2808
|
* Physical location details.
|
|
2809
2809
|
*
|
|
@@ -3601,7 +3601,7 @@ declare namespace meta$1 {
|
|
|
3601
3601
|
|
|
3602
3602
|
interface TimeSlot$1 {
|
|
3603
3603
|
/** Start date and time of this time slot. */
|
|
3604
|
-
startDate?: Date;
|
|
3604
|
+
startDate?: Date | null;
|
|
3605
3605
|
/** Duration in minutes of this time slot. */
|
|
3606
3606
|
duration?: number;
|
|
3607
3607
|
/**
|
|
@@ -3624,7 +3624,7 @@ interface GetTimeSlotsRequest$1 {
|
|
|
3624
3624
|
/** ID of the reservation location for which to retrieve time slots. */
|
|
3625
3625
|
reservationLocationId: string;
|
|
3626
3626
|
/** Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */
|
|
3627
|
-
date: Date;
|
|
3627
|
+
date: Date | null;
|
|
3628
3628
|
/**
|
|
3629
3629
|
* Duration in minutes of the time slot.
|
|
3630
3630
|
*
|
|
@@ -3662,7 +3662,7 @@ interface CheckTimeSlotRequest$1 {
|
|
|
3662
3662
|
/** ID of the reservation location for which to check the time slot. */
|
|
3663
3663
|
reservationLocationId: string;
|
|
3664
3664
|
/** Date and time of the time slot to check. */
|
|
3665
|
-
date: Date;
|
|
3665
|
+
date: Date | null;
|
|
3666
3666
|
/**
|
|
3667
3667
|
* Duration of the time slot in minutes .
|
|
3668
3668
|
*
|
|
@@ -3712,7 +3712,7 @@ interface CheckTimeSlotResponseNonNullableFields$1 {
|
|
|
3712
3712
|
|
|
3713
3713
|
interface TimeSlot {
|
|
3714
3714
|
/** Start date and time of this time slot. */
|
|
3715
|
-
startDate?: Date;
|
|
3715
|
+
startDate?: Date | null;
|
|
3716
3716
|
/** Duration in minutes of this time slot. */
|
|
3717
3717
|
duration?: number;
|
|
3718
3718
|
/**
|
|
@@ -3735,7 +3735,7 @@ interface GetTimeSlotsRequest {
|
|
|
3735
3735
|
/** ID of the reservation location for which to retrieve time slots. */
|
|
3736
3736
|
reservationLocationId: string;
|
|
3737
3737
|
/** Date and time for which to retrieve a time slot in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#coordinated_Universal_Time_(UTC)) format. */
|
|
3738
|
-
date: Date;
|
|
3738
|
+
date: Date | null;
|
|
3739
3739
|
/**
|
|
3740
3740
|
* Duration in minutes of the time slot.
|
|
3741
3741
|
*
|
|
@@ -3773,7 +3773,7 @@ interface CheckTimeSlotRequest {
|
|
|
3773
3773
|
/** ID of the reservation location for which to check the time slot. */
|
|
3774
3774
|
reservationLocationId: string;
|
|
3775
3775
|
/** Date and time of the time slot to check. */
|
|
3776
|
-
date: Date;
|
|
3776
|
+
date: Date | null;
|
|
3777
3777
|
/**
|
|
3778
3778
|
* Duration of the time slot in minutes .
|
|
3779
3779
|
*
|