@wix/seatings 1.0.17 → 1.0.18
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 +4 -4
- package/type-bundles/context.bundle.d.ts +184 -562
- package/type-bundles/index.bundle.d.ts +184 -562
- package/type-bundles/meta.bundle.d.ts +8 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type HostModule
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
2
|
__type: 'host';
|
|
3
3
|
create(host: H): T;
|
|
4
4
|
};
|
|
5
|
-
type HostModuleAPI
|
|
6
|
-
type Host
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
7
|
channel: {
|
|
8
8
|
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
9
|
disconnect: () => void;
|
|
@@ -12,6 +12,10 @@ type Host$1<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
|
*/
|
|
@@ -36,92 +40,92 @@ type Host$1<Environment = unknown> = {
|
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
42
|
|
|
39
|
-
type RESTFunctionDescriptor
|
|
40
|
-
interface HttpClient
|
|
41
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
43
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
44
|
+
interface HttpClient {
|
|
45
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
42
46
|
fetchWithAuth: typeof fetch;
|
|
43
47
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
48
|
getActiveToken?: () => string | undefined;
|
|
45
49
|
}
|
|
46
|
-
type RequestOptionsFactory
|
|
47
|
-
type HttpResponse
|
|
50
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
51
|
+
type HttpResponse<T = any> = {
|
|
48
52
|
data: T;
|
|
49
53
|
status: number;
|
|
50
54
|
statusText: string;
|
|
51
55
|
headers: any;
|
|
52
56
|
request?: any;
|
|
53
57
|
};
|
|
54
|
-
type RequestOptions
|
|
58
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
55
59
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
56
60
|
url: string;
|
|
57
61
|
data?: Data;
|
|
58
62
|
params?: URLSearchParams;
|
|
59
|
-
} & APIMetadata
|
|
60
|
-
type APIMetadata
|
|
63
|
+
} & APIMetadata;
|
|
64
|
+
type APIMetadata = {
|
|
61
65
|
methodFqn?: string;
|
|
62
66
|
entityFqdn?: string;
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
|
-
type BuildRESTFunction
|
|
66
|
-
type EventDefinition
|
|
69
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
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
|
-
type ServicePluginMethodInput
|
|
81
|
+
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
79
83
|
metadata: any;
|
|
80
84
|
};
|
|
81
|
-
type ServicePluginContract
|
|
82
|
-
type ServicePluginMethodMetadata
|
|
85
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
86
|
+
type ServicePluginMethodMetadata = {
|
|
83
87
|
name: string;
|
|
84
88
|
primaryHttpMappingPath: string;
|
|
85
89
|
transformations: {
|
|
86
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput
|
|
90
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
91
|
toREST: (...args: unknown[]) => unknown;
|
|
88
92
|
};
|
|
89
93
|
};
|
|
90
|
-
type ServicePluginDefinition
|
|
94
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
95
|
__type: 'service-plugin-definition';
|
|
92
96
|
componentType: string;
|
|
93
|
-
methods: ServicePluginMethodMetadata
|
|
97
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
98
|
__contract: Contract;
|
|
95
99
|
};
|
|
96
|
-
declare function ServicePluginDefinition
|
|
97
|
-
type BuildServicePluginDefinition
|
|
98
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE
|
|
100
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
101
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
102
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
99
103
|
|
|
100
|
-
type RequestContext
|
|
104
|
+
type RequestContext = {
|
|
101
105
|
isSSR: boolean;
|
|
102
106
|
host: string;
|
|
103
107
|
protocol?: string;
|
|
104
108
|
};
|
|
105
|
-
type ResponseTransformer
|
|
109
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
110
|
/**
|
|
107
111
|
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
112
|
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
113
|
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
114
|
*/
|
|
111
|
-
type Method
|
|
112
|
-
type AmbassadorRequestOptions
|
|
115
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
116
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
113
117
|
_?: T;
|
|
114
118
|
url?: string;
|
|
115
|
-
method?: Method
|
|
119
|
+
method?: Method;
|
|
116
120
|
params?: any;
|
|
117
121
|
data?: any;
|
|
118
|
-
transformResponse?: ResponseTransformer
|
|
122
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
123
|
};
|
|
120
|
-
type AmbassadorFactory
|
|
124
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
125
|
__isAmbassador: boolean;
|
|
122
126
|
};
|
|
123
|
-
type AmbassadorFunctionDescriptor
|
|
124
|
-
type BuildAmbassadorFunction
|
|
127
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
128
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
125
129
|
|
|
126
130
|
declare global {
|
|
127
131
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -130,7 +134,7 @@ declare global {
|
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
136
|
|
|
133
|
-
declare const emptyObjectSymbol
|
|
137
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
138
|
|
|
135
139
|
/**
|
|
136
140
|
Represents a strictly empty plain object, the `{}` value.
|
|
@@ -158,7 +162,7 @@ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<n
|
|
|
158
162
|
|
|
159
163
|
@category Object
|
|
160
164
|
*/
|
|
161
|
-
type EmptyObject
|
|
165
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
168
|
Returns a boolean for whether the two given types are equal.
|
|
@@ -186,7 +190,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
186
190
|
@category Type Guard
|
|
187
191
|
@category Utilities
|
|
188
192
|
*/
|
|
189
|
-
type IsEqual
|
|
193
|
+
type IsEqual<A, B> =
|
|
190
194
|
(<G>() => G extends A ? 1 : 2) extends
|
|
191
195
|
(<G>() => G extends B ? 1 : 2)
|
|
192
196
|
? true
|
|
@@ -219,9 +223,9 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
219
223
|
|
|
220
224
|
@see {Except}
|
|
221
225
|
*/
|
|
222
|
-
type Filter
|
|
226
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
227
|
|
|
224
|
-
type ExceptOptions
|
|
228
|
+
type ExceptOptions = {
|
|
225
229
|
/**
|
|
226
230
|
Disallow assigning non-specified properties.
|
|
227
231
|
|
|
@@ -265,12 +269,78 @@ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
|
265
269
|
|
|
266
270
|
@category Object
|
|
267
271
|
*/
|
|
268
|
-
type Except
|
|
269
|
-
[KeyType in keyof ObjectType as Filter
|
|
272
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
273
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
274
|
} & (Options['requireExactProps'] extends true
|
|
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
|
|
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`.
|
|
@@ -357,9 +425,9 @@ type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
|
357
425
|
|
|
358
426
|
@category Object
|
|
359
427
|
*/
|
|
360
|
-
type ConditionalExcept
|
|
428
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
429
|
Base,
|
|
362
|
-
ConditionalKeys
|
|
430
|
+
ConditionalKeys<Base, Condition>
|
|
363
431
|
>;
|
|
364
432
|
|
|
365
433
|
/**
|
|
@@ -367,8 +435,8 @@ ConditionalKeys$1<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
|
|
371
|
-
[key: string]: Descriptors
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
439
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
374
442
|
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
@@ -376,12 +444,12 @@ type Descriptors$1 = RESTFunctionDescriptor$1 | AmbassadorFunctionDescriptor$1 |
|
|
|
376
444
|
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
445
|
* do not match the given host (as they will not work with the given host).
|
|
378
446
|
*/
|
|
379
|
-
type BuildDescriptors
|
|
447
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor
|
|
384
|
-
[Key in keyof T]: T[Key] extends Descriptors
|
|
450
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
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<{
|
|
452
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
387
455
|
1,
|
|
@@ -390,9 +458,9 @@ type BuildDescriptors$1<T extends Descriptors$1, H extends Host$1<any> | undefin
|
|
|
390
458
|
4,
|
|
391
459
|
5
|
|
392
460
|
][Depth]> : never;
|
|
393
|
-
}, EmptyObject
|
|
461
|
+
}, EmptyObject>;
|
|
394
462
|
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
-
type PublicMetadata
|
|
463
|
+
type PublicMetadata = {
|
|
396
464
|
PACKAGE_NAME?: string;
|
|
397
465
|
};
|
|
398
466
|
|
|
@@ -404,9 +472,9 @@ declare global {
|
|
|
404
472
|
* A type used to create concerete types from SDK descriptors in
|
|
405
473
|
* case a contextual client is available.
|
|
406
474
|
*/
|
|
407
|
-
type MaybeContext
|
|
408
|
-
host: Host
|
|
409
|
-
} ? BuildDescriptors
|
|
475
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
476
|
+
host: Host;
|
|
477
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
478
|
|
|
411
479
|
interface SeatingPlan$1 {
|
|
412
480
|
/**
|
|
@@ -430,12 +498,12 @@ interface SeatingPlan$1 {
|
|
|
430
498
|
* Seating plan created timestamp.
|
|
431
499
|
* @readonly
|
|
432
500
|
*/
|
|
433
|
-
_createdDate?: Date;
|
|
501
|
+
_createdDate?: Date | null;
|
|
434
502
|
/**
|
|
435
503
|
* Seating plan updated timestamp.
|
|
436
504
|
* @readonly
|
|
437
505
|
*/
|
|
438
|
-
_updatedDate?: Date;
|
|
506
|
+
_updatedDate?: Date | null;
|
|
439
507
|
/**
|
|
440
508
|
* Total capacity
|
|
441
509
|
* @readonly
|
|
@@ -948,7 +1016,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
|
948
1016
|
/** ID of the entity associated with the event. */
|
|
949
1017
|
entityId?: string;
|
|
950
1018
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
951
|
-
eventTime?: Date;
|
|
1019
|
+
eventTime?: Date | null;
|
|
952
1020
|
/**
|
|
953
1021
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
954
1022
|
* (for example, GDPR).
|
|
@@ -977,7 +1045,7 @@ interface EntityCreatedEvent$1 {
|
|
|
977
1045
|
entity?: string;
|
|
978
1046
|
}
|
|
979
1047
|
interface RestoreInfo$1 {
|
|
980
|
-
deletedDate?: Date;
|
|
1048
|
+
deletedDate?: Date | null;
|
|
981
1049
|
}
|
|
982
1050
|
interface EntityUpdatedEvent$1 {
|
|
983
1051
|
/**
|
|
@@ -1239,7 +1307,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
1239
1307
|
/** ID of the entity associated with the event. */
|
|
1240
1308
|
entityId?: string;
|
|
1241
1309
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1242
|
-
eventTime?: Date;
|
|
1310
|
+
eventTime?: Date | null;
|
|
1243
1311
|
/**
|
|
1244
1312
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
1245
1313
|
* (for example, GDPR).
|
|
@@ -1337,7 +1405,7 @@ interface FindSeatingPlanOptions {
|
|
|
1337
1405
|
seatingPlanMask?: SeatingPlanMask;
|
|
1338
1406
|
}
|
|
1339
1407
|
|
|
1340
|
-
declare function createSeatingPlan$1(httpClient: HttpClient
|
|
1408
|
+
declare function createSeatingPlan$1(httpClient: HttpClient): CreateSeatingPlanSignature;
|
|
1341
1409
|
interface CreateSeatingPlanSignature {
|
|
1342
1410
|
/**
|
|
1343
1411
|
* Crates a seating plan
|
|
@@ -1346,7 +1414,7 @@ interface CreateSeatingPlanSignature {
|
|
|
1346
1414
|
*/
|
|
1347
1415
|
(plan: SeatingPlan$1): Promise<SeatingPlan$1 & SeatingPlanNonNullableFields$1>;
|
|
1348
1416
|
}
|
|
1349
|
-
declare function updateSeatingPlan$1(httpClient: HttpClient
|
|
1417
|
+
declare function updateSeatingPlan$1(httpClient: HttpClient): UpdateSeatingPlanSignature;
|
|
1350
1418
|
interface UpdateSeatingPlanSignature {
|
|
1351
1419
|
/**
|
|
1352
1420
|
* Updates the seating plan
|
|
@@ -1354,7 +1422,7 @@ interface UpdateSeatingPlanSignature {
|
|
|
1354
1422
|
*/
|
|
1355
1423
|
(options?: UpdateSeatingPlanOptions | undefined): Promise<SeatingPlan$1 & SeatingPlanNonNullableFields$1>;
|
|
1356
1424
|
}
|
|
1357
|
-
declare function copySeatingPlan$1(httpClient: HttpClient
|
|
1425
|
+
declare function copySeatingPlan$1(httpClient: HttpClient): CopySeatingPlanSignature;
|
|
1358
1426
|
interface CopySeatingPlanSignature {
|
|
1359
1427
|
/**
|
|
1360
1428
|
* Copies the seating plan
|
|
@@ -1362,14 +1430,14 @@ interface CopySeatingPlanSignature {
|
|
|
1362
1430
|
*/
|
|
1363
1431
|
(_id: string | null, options: CopySeatingPlanOptions): Promise<CopySeatingPlanResponse & CopySeatingPlanResponseNonNullableFields>;
|
|
1364
1432
|
}
|
|
1365
|
-
declare function querySeatingPlan$1(httpClient: HttpClient
|
|
1433
|
+
declare function querySeatingPlan$1(httpClient: HttpClient): QuerySeatingPlanSignature;
|
|
1366
1434
|
interface QuerySeatingPlanSignature {
|
|
1367
1435
|
/**
|
|
1368
1436
|
* Lists seating plans by provided query request
|
|
1369
1437
|
*/
|
|
1370
1438
|
(options?: QuerySeatingPlanOptions | undefined): PlansQueryBuilder;
|
|
1371
1439
|
}
|
|
1372
|
-
declare function getSeatingPlan$1(httpClient: HttpClient
|
|
1440
|
+
declare function getSeatingPlan$1(httpClient: HttpClient): GetSeatingPlanSignature;
|
|
1373
1441
|
interface GetSeatingPlanSignature {
|
|
1374
1442
|
/**
|
|
1375
1443
|
* Returns the seating plan. Fails of not fond.
|
|
@@ -1378,7 +1446,7 @@ interface GetSeatingPlanSignature {
|
|
|
1378
1446
|
*/
|
|
1379
1447
|
(_id: string | null, options?: GetSeatingPlanOptions | undefined): Promise<SeatingPlan$1 & SeatingPlanNonNullableFields$1>;
|
|
1380
1448
|
}
|
|
1381
|
-
declare function findSeatingPlan$1(httpClient: HttpClient
|
|
1449
|
+
declare function findSeatingPlan$1(httpClient: HttpClient): FindSeatingPlanSignature;
|
|
1382
1450
|
interface FindSeatingPlanSignature {
|
|
1383
1451
|
/**
|
|
1384
1452
|
* Returns the first seating plan found by filter request.
|
|
@@ -1386,7 +1454,7 @@ interface FindSeatingPlanSignature {
|
|
|
1386
1454
|
*/
|
|
1387
1455
|
(filter: Record<string, any> | null, options?: FindSeatingPlanOptions | undefined): Promise<FindSeatingPlanResponse & FindSeatingPlanResponseNonNullableFields>;
|
|
1388
1456
|
}
|
|
1389
|
-
declare function deleteSeatingPlan$1(httpClient: HttpClient
|
|
1457
|
+
declare function deleteSeatingPlan$1(httpClient: HttpClient): DeleteSeatingPlanSignature;
|
|
1390
1458
|
interface DeleteSeatingPlanSignature {
|
|
1391
1459
|
/**
|
|
1392
1460
|
* Deletes the seating plan.
|
|
@@ -1394,53 +1462,35 @@ interface DeleteSeatingPlanSignature {
|
|
|
1394
1462
|
*/
|
|
1395
1463
|
(_id: string | null): Promise<DeleteSeatingPlanResponse & DeleteSeatingPlanResponseNonNullableFields>;
|
|
1396
1464
|
}
|
|
1397
|
-
declare function updateSeatingPlanThumbnail$1(httpClient: HttpClient
|
|
1465
|
+
declare function updateSeatingPlanThumbnail$1(httpClient: HttpClient): UpdateSeatingPlanThumbnailSignature;
|
|
1398
1466
|
interface UpdateSeatingPlanThumbnailSignature {
|
|
1399
1467
|
/**
|
|
1400
1468
|
* Updates seating plan thumbnail.
|
|
1401
1469
|
*/
|
|
1402
1470
|
(thumbnail: SeatingPlanThumbnail): Promise<UpdateSeatingPlanThumbnailResponse>;
|
|
1403
1471
|
}
|
|
1404
|
-
declare function getSeatingPlanThumbnail$1(httpClient: HttpClient
|
|
1472
|
+
declare function getSeatingPlanThumbnail$1(httpClient: HttpClient): GetSeatingPlanThumbnailSignature;
|
|
1405
1473
|
interface GetSeatingPlanThumbnailSignature {
|
|
1406
1474
|
/**
|
|
1407
1475
|
* Get seating plan thumbnail.
|
|
1408
1476
|
*/
|
|
1409
1477
|
(_id: string | null): Promise<GetSeatingPlanThumbnailResponse>;
|
|
1410
1478
|
}
|
|
1411
|
-
declare const onSeatingPlanCreated$1: EventDefinition
|
|
1412
|
-
declare const onSeatingPlanUpdated$1: EventDefinition
|
|
1413
|
-
declare const onSeatingPlanDeleted$1: EventDefinition
|
|
1414
|
-
|
|
1415
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1416
|
-
__type: 'event-definition';
|
|
1417
|
-
type: Type;
|
|
1418
|
-
isDomainEvent?: boolean;
|
|
1419
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1420
|
-
__payload: Payload;
|
|
1421
|
-
};
|
|
1422
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1423
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
1424
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
1425
|
-
|
|
1426
|
-
declare global {
|
|
1427
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1428
|
-
interface SymbolConstructor {
|
|
1429
|
-
readonly observable: symbol;
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1479
|
+
declare const onSeatingPlanCreated$1: EventDefinition<SeatingPlanCreatedEnvelope, "wix.seating.v1.seating_plan_created">;
|
|
1480
|
+
declare const onSeatingPlanUpdated$1: EventDefinition<SeatingPlanUpdatedEnvelope, "wix.seating.v1.seating_plan_updated">;
|
|
1481
|
+
declare const onSeatingPlanDeleted$1: EventDefinition<SeatingPlanDeletedEnvelope, "wix.seating.v1.seating_plan_deleted">;
|
|
1432
1482
|
|
|
1433
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
1483
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1434
1484
|
|
|
1435
|
-
declare const createSeatingPlan: MaybeContext
|
|
1436
|
-
declare const updateSeatingPlan: MaybeContext
|
|
1437
|
-
declare const copySeatingPlan: MaybeContext
|
|
1438
|
-
declare const querySeatingPlan: MaybeContext
|
|
1439
|
-
declare const getSeatingPlan: MaybeContext
|
|
1440
|
-
declare const findSeatingPlan: MaybeContext
|
|
1441
|
-
declare const deleteSeatingPlan: MaybeContext
|
|
1442
|
-
declare const updateSeatingPlanThumbnail: MaybeContext
|
|
1443
|
-
declare const getSeatingPlanThumbnail: MaybeContext
|
|
1485
|
+
declare const createSeatingPlan: MaybeContext<BuildRESTFunction<typeof createSeatingPlan$1> & typeof createSeatingPlan$1>;
|
|
1486
|
+
declare const updateSeatingPlan: MaybeContext<BuildRESTFunction<typeof updateSeatingPlan$1> & typeof updateSeatingPlan$1>;
|
|
1487
|
+
declare const copySeatingPlan: MaybeContext<BuildRESTFunction<typeof copySeatingPlan$1> & typeof copySeatingPlan$1>;
|
|
1488
|
+
declare const querySeatingPlan: MaybeContext<BuildRESTFunction<typeof querySeatingPlan$1> & typeof querySeatingPlan$1>;
|
|
1489
|
+
declare const getSeatingPlan: MaybeContext<BuildRESTFunction<typeof getSeatingPlan$1> & typeof getSeatingPlan$1>;
|
|
1490
|
+
declare const findSeatingPlan: MaybeContext<BuildRESTFunction<typeof findSeatingPlan$1> & typeof findSeatingPlan$1>;
|
|
1491
|
+
declare const deleteSeatingPlan: MaybeContext<BuildRESTFunction<typeof deleteSeatingPlan$1> & typeof deleteSeatingPlan$1>;
|
|
1492
|
+
declare const updateSeatingPlanThumbnail: MaybeContext<BuildRESTFunction<typeof updateSeatingPlanThumbnail$1> & typeof updateSeatingPlanThumbnail$1>;
|
|
1493
|
+
declare const getSeatingPlanThumbnail: MaybeContext<BuildRESTFunction<typeof getSeatingPlanThumbnail$1> & typeof getSeatingPlanThumbnail$1>;
|
|
1444
1494
|
|
|
1445
1495
|
type _publicOnSeatingPlanCreatedType = typeof onSeatingPlanCreated$1;
|
|
1446
1496
|
/** */
|
|
@@ -1521,440 +1571,30 @@ declare namespace context$1 {
|
|
|
1521
1571
|
export { type ActionEvent$1 as ActionEvent, type BaseEventMetadata$1 as BaseEventMetadata, type context$1_CapacityExceededViolation as CapacityExceededViolation, type Category$1 as Category, type context$1_CopySeatingPlanOptions as CopySeatingPlanOptions, type context$1_CopySeatingPlanRequest as CopySeatingPlanRequest, type context$1_CopySeatingPlanResponse as CopySeatingPlanResponse, type context$1_CopySeatingPlanResponseNonNullableFields as CopySeatingPlanResponseNonNullableFields, type context$1_CreateSeatingPlanRequest as CreateSeatingPlanRequest, type context$1_CreateSeatingPlanResponse as CreateSeatingPlanResponse, type context$1_CreateSeatingPlanResponseNonNullableFields as CreateSeatingPlanResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type Cursors$1 as Cursors, type context$1_DeleteSeatingPlanRequest as DeleteSeatingPlanRequest, type context$1_DeleteSeatingPlanResponse as DeleteSeatingPlanResponse, type context$1_DeleteSeatingPlanResponseNonNullableFields as DeleteSeatingPlanResponseNonNullableFields, type context$1_DiscardSeatingPlanVersionsRequest as DiscardSeatingPlanVersionsRequest, type context$1_DiscardSeatingPlanVersionsResponse as DiscardSeatingPlanVersionsResponse, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Element$1 as Element, type ElementGroup$1 as ElementGroup, type ElementGroupUiProperties$1 as ElementGroupUiProperties, type ElementUiProperties$1 as ElementUiProperties, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type ExtendedFields$1 as ExtendedFields, context$1_Fieldset as Fieldset, type context$1_FindSeatingPlanOptions as FindSeatingPlanOptions, type context$1_FindSeatingPlanRequest as FindSeatingPlanRequest, type context$1_FindSeatingPlanResponse as FindSeatingPlanResponse, type context$1_FindSeatingPlanResponseNonNullableFields as FindSeatingPlanResponseNonNullableFields, type context$1_GetSeatingPlanOptions as GetSeatingPlanOptions, type context$1_GetSeatingPlanRequest as GetSeatingPlanRequest, type context$1_GetSeatingPlanResponse as GetSeatingPlanResponse, type context$1_GetSeatingPlanResponseNonNullableFields as GetSeatingPlanResponseNonNullableFields, type context$1_GetSeatingPlanThumbnailRequest as GetSeatingPlanThumbnailRequest, type context$1_GetSeatingPlanThumbnailResponse as GetSeatingPlanThumbnailResponse, Icon$1 as Icon, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Image$1 as Image, type MessageEnvelope$1 as MessageEnvelope, type MultiRowProperties$1 as MultiRowProperties, Numbering$1 as Numbering, type Paging$1 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, type Place$1 as Place, PlaceTypeEnumType$1 as PlaceTypeEnumType, type context$1_PlansQueryBuilder as PlansQueryBuilder, type context$1_PlansQueryResult as PlansQueryResult, Position$1 as Position, type context$1_QuerySeatingPlanOptions as QuerySeatingPlanOptions, type context$1_QuerySeatingPlanRequest as QuerySeatingPlanRequest, type context$1_QuerySeatingPlanResponse as QuerySeatingPlanResponse, type context$1_QuerySeatingPlanResponseNonNullableFields as QuerySeatingPlanResponseNonNullableFields, type context$1_QuerySeatingPlanVersionsRequest as QuerySeatingPlanVersionsRequest, type context$1_QuerySeatingPlanVersionsResponse as QuerySeatingPlanVersionsResponse, type QueryV2$1 as QueryV2, type QueryV2PagingMethodOneOf$1 as QueryV2PagingMethodOneOf, type ReservationOptions$1 as ReservationOptions, type RestoreInfo$1 as RestoreInfo, type context$1_RestoreSeatingPlanRequest as RestoreSeatingPlanRequest, type context$1_RestoreSeatingPlanResponse as RestoreSeatingPlanResponse, type RowElement$1 as RowElement, type RowElementUiProperties$1 as RowElementUiProperties, type context$1_SaveSeatingPlanVersionRequest as SaveSeatingPlanVersionRequest, type context$1_SaveSeatingPlanVersionResponse as SaveSeatingPlanVersionResponse, type SeatingPlan$1 as SeatingPlan, type context$1_SeatingPlanCreatedEnvelope as SeatingPlanCreatedEnvelope, type context$1_SeatingPlanDeletedEnvelope as SeatingPlanDeletedEnvelope, type context$1_SeatingPlanMask as SeatingPlanMask, type SeatingPlanNonNullableFields$1 as SeatingPlanNonNullableFields, type context$1_SeatingPlanThumbnail as SeatingPlanThumbnail, type SeatingPlanUiProperties$1 as SeatingPlanUiProperties, type context$1_SeatingPlanUpdatedEnvelope as SeatingPlanUpdatedEnvelope, type Section$1 as Section, type Sequencing$1 as Sequencing, ShapeTypeEnumType$1 as ShapeTypeEnumType, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Type$1 as Type, type context$1_UpdateSeatingPlanOptions as UpdateSeatingPlanOptions, type context$1_UpdateSeatingPlanRequest as UpdateSeatingPlanRequest, type context$1_UpdateSeatingPlanResponse as UpdateSeatingPlanResponse, type context$1_UpdateSeatingPlanResponseNonNullableFields as UpdateSeatingPlanResponseNonNullableFields, type context$1_UpdateSeatingPlanThumbnailRequest as UpdateSeatingPlanThumbnailRequest, type context$1_UpdateSeatingPlanThumbnailResponse as UpdateSeatingPlanThumbnailResponse, type VerticalSequencing$1 as VerticalSequencing, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnSeatingPlanCreatedType as _publicOnSeatingPlanCreatedType, type context$1__publicOnSeatingPlanDeletedType as _publicOnSeatingPlanDeletedType, type context$1__publicOnSeatingPlanUpdatedType as _publicOnSeatingPlanUpdatedType, context$1_copySeatingPlan as copySeatingPlan, context$1_createSeatingPlan as createSeatingPlan, context$1_deleteSeatingPlan as deleteSeatingPlan, context$1_findSeatingPlan as findSeatingPlan, context$1_getSeatingPlan as getSeatingPlan, context$1_getSeatingPlanThumbnail as getSeatingPlanThumbnail, context$1_onSeatingPlanCreated as onSeatingPlanCreated, context$1_onSeatingPlanDeleted as onSeatingPlanDeleted, context$1_onSeatingPlanUpdated as onSeatingPlanUpdated, onSeatingPlanCreated$1 as publicOnSeatingPlanCreated, onSeatingPlanDeleted$1 as publicOnSeatingPlanDeleted, onSeatingPlanUpdated$1 as publicOnSeatingPlanUpdated, context$1_querySeatingPlan as querySeatingPlan, context$1_updateSeatingPlan as updateSeatingPlan, context$1_updateSeatingPlanThumbnail as updateSeatingPlanThumbnail };
|
|
1522
1572
|
}
|
|
1523
1573
|
|
|
1524
|
-
|
|
1525
|
-
__type: 'host';
|
|
1526
|
-
create(host: H): T;
|
|
1527
|
-
};
|
|
1528
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
1529
|
-
type Host<Environment = unknown> = {
|
|
1530
|
-
channel: {
|
|
1531
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
1532
|
-
disconnect: () => void;
|
|
1533
|
-
} | Promise<{
|
|
1534
|
-
disconnect: () => void;
|
|
1535
|
-
}>;
|
|
1536
|
-
};
|
|
1537
|
-
environment?: Environment;
|
|
1574
|
+
interface SeatingReservation {
|
|
1538
1575
|
/**
|
|
1539
|
-
*
|
|
1576
|
+
* The id of the reservation
|
|
1577
|
+
* @readonly
|
|
1540
1578
|
*/
|
|
1541
|
-
|
|
1579
|
+
_id?: string | null;
|
|
1542
1580
|
/**
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1581
|
+
* The seating plan id
|
|
1582
|
+
* @readonly
|
|
1545
1583
|
*/
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
1563
|
-
interface HttpClient {
|
|
1564
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
1565
|
-
fetchWithAuth: typeof fetch;
|
|
1566
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1567
|
-
getActiveToken?: () => string | undefined;
|
|
1568
|
-
}
|
|
1569
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
1570
|
-
type HttpResponse<T = any> = {
|
|
1571
|
-
data: T;
|
|
1572
|
-
status: number;
|
|
1573
|
-
statusText: string;
|
|
1574
|
-
headers: any;
|
|
1575
|
-
request?: any;
|
|
1576
|
-
};
|
|
1577
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
1578
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1579
|
-
url: string;
|
|
1580
|
-
data?: Data;
|
|
1581
|
-
params?: URLSearchParams;
|
|
1582
|
-
} & APIMetadata;
|
|
1583
|
-
type APIMetadata = {
|
|
1584
|
-
methodFqn?: string;
|
|
1585
|
-
entityFqdn?: string;
|
|
1586
|
-
packageName?: string;
|
|
1587
|
-
};
|
|
1588
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
1589
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
1590
|
-
__type: 'event-definition';
|
|
1591
|
-
type: Type;
|
|
1592
|
-
isDomainEvent?: boolean;
|
|
1593
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1594
|
-
__payload: Payload;
|
|
1595
|
-
};
|
|
1596
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
1597
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
1598
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
1599
|
-
|
|
1600
|
-
type ServicePluginMethodInput = {
|
|
1601
|
-
request: any;
|
|
1602
|
-
metadata: any;
|
|
1603
|
-
};
|
|
1604
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
1605
|
-
type ServicePluginMethodMetadata = {
|
|
1606
|
-
name: string;
|
|
1607
|
-
primaryHttpMappingPath: string;
|
|
1608
|
-
transformations: {
|
|
1609
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
1610
|
-
toREST: (...args: unknown[]) => unknown;
|
|
1611
|
-
};
|
|
1612
|
-
};
|
|
1613
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
1614
|
-
__type: 'service-plugin-definition';
|
|
1615
|
-
componentType: string;
|
|
1616
|
-
methods: ServicePluginMethodMetadata[];
|
|
1617
|
-
__contract: Contract;
|
|
1618
|
-
};
|
|
1619
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
1620
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
1621
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
1622
|
-
|
|
1623
|
-
type RequestContext = {
|
|
1624
|
-
isSSR: boolean;
|
|
1625
|
-
host: string;
|
|
1626
|
-
protocol?: string;
|
|
1627
|
-
};
|
|
1628
|
-
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
1629
|
-
/**
|
|
1630
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
1631
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
1632
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
1633
|
-
*/
|
|
1634
|
-
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
1635
|
-
type AmbassadorRequestOptions<T = any> = {
|
|
1636
|
-
_?: T;
|
|
1637
|
-
url?: string;
|
|
1638
|
-
method?: Method;
|
|
1639
|
-
params?: any;
|
|
1640
|
-
data?: any;
|
|
1641
|
-
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
1642
|
-
};
|
|
1643
|
-
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
1644
|
-
__isAmbassador: boolean;
|
|
1645
|
-
};
|
|
1646
|
-
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
1647
|
-
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
1648
|
-
|
|
1649
|
-
declare global {
|
|
1650
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1651
|
-
interface SymbolConstructor {
|
|
1652
|
-
readonly observable: symbol;
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
declare const emptyObjectSymbol: unique symbol;
|
|
1657
|
-
|
|
1658
|
-
/**
|
|
1659
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
1660
|
-
|
|
1661
|
-
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
1662
|
-
|
|
1663
|
-
@example
|
|
1664
|
-
```
|
|
1665
|
-
import type {EmptyObject} from 'type-fest';
|
|
1666
|
-
|
|
1667
|
-
// The following illustrates the problem with `{}`.
|
|
1668
|
-
const foo1: {} = {}; // Pass
|
|
1669
|
-
const foo2: {} = []; // Pass
|
|
1670
|
-
const foo3: {} = 42; // Pass
|
|
1671
|
-
const foo4: {} = {a: 1}; // Pass
|
|
1672
|
-
|
|
1673
|
-
// With `EmptyObject` only the first case is valid.
|
|
1674
|
-
const bar1: EmptyObject = {}; // Pass
|
|
1675
|
-
const bar2: EmptyObject = 42; // Fail
|
|
1676
|
-
const bar3: EmptyObject = []; // Fail
|
|
1677
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
1678
|
-
```
|
|
1679
|
-
|
|
1680
|
-
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
1681
|
-
|
|
1682
|
-
@category Object
|
|
1683
|
-
*/
|
|
1684
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
1685
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
Returns a boolean for whether the two given types are equal.
|
|
1688
|
-
|
|
1689
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
1690
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
1691
|
-
|
|
1692
|
-
Use-cases:
|
|
1693
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
1694
|
-
|
|
1695
|
-
@example
|
|
1696
|
-
```
|
|
1697
|
-
import type {IsEqual} from 'type-fest';
|
|
1698
|
-
|
|
1699
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
1700
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
1701
|
-
type Includes<Value extends readonly any[], Item> =
|
|
1702
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
1703
|
-
? IsEqual<Value[0], Item> extends true
|
|
1704
|
-
? true
|
|
1705
|
-
: Includes<rest, Item>
|
|
1706
|
-
: false;
|
|
1707
|
-
```
|
|
1708
|
-
|
|
1709
|
-
@category Type Guard
|
|
1710
|
-
@category Utilities
|
|
1711
|
-
*/
|
|
1712
|
-
type IsEqual<A, B> =
|
|
1713
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
1714
|
-
(<G>() => G extends B ? 1 : 2)
|
|
1715
|
-
? true
|
|
1716
|
-
: false;
|
|
1717
|
-
|
|
1718
|
-
/**
|
|
1719
|
-
Filter out keys from an object.
|
|
1720
|
-
|
|
1721
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
1722
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
1723
|
-
Returns `Key` otherwise.
|
|
1724
|
-
|
|
1725
|
-
@example
|
|
1726
|
-
```
|
|
1727
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
1728
|
-
//=> never
|
|
1729
|
-
```
|
|
1730
|
-
|
|
1731
|
-
@example
|
|
1732
|
-
```
|
|
1733
|
-
type Filtered = Filter<'bar', string>;
|
|
1734
|
-
//=> never
|
|
1735
|
-
```
|
|
1736
|
-
|
|
1737
|
-
@example
|
|
1738
|
-
```
|
|
1739
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
1740
|
-
//=> 'bar'
|
|
1741
|
-
```
|
|
1742
|
-
|
|
1743
|
-
@see {Except}
|
|
1744
|
-
*/
|
|
1745
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
1746
|
-
|
|
1747
|
-
type ExceptOptions = {
|
|
1748
|
-
/**
|
|
1749
|
-
Disallow assigning non-specified properties.
|
|
1750
|
-
|
|
1751
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
1752
|
-
|
|
1753
|
-
@default false
|
|
1754
|
-
*/
|
|
1755
|
-
requireExactProps?: boolean;
|
|
1756
|
-
};
|
|
1757
|
-
|
|
1758
|
-
/**
|
|
1759
|
-
Create a type from an object type without certain keys.
|
|
1760
|
-
|
|
1761
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
1762
|
-
|
|
1763
|
-
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
1764
|
-
|
|
1765
|
-
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
1766
|
-
|
|
1767
|
-
@example
|
|
1768
|
-
```
|
|
1769
|
-
import type {Except} from 'type-fest';
|
|
1770
|
-
|
|
1771
|
-
type Foo = {
|
|
1772
|
-
a: number;
|
|
1773
|
-
b: string;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
1777
|
-
//=> {b: string}
|
|
1778
|
-
|
|
1779
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
1780
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
1781
|
-
|
|
1782
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
1783
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
1784
|
-
|
|
1785
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
1786
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
1787
|
-
```
|
|
1788
|
-
|
|
1789
|
-
@category Object
|
|
1790
|
-
*/
|
|
1791
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
1792
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
1793
|
-
} & (Options['requireExactProps'] extends true
|
|
1794
|
-
? Partial<Record<KeysType, never>>
|
|
1795
|
-
: {});
|
|
1796
|
-
|
|
1797
|
-
/**
|
|
1798
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
1799
|
-
|
|
1800
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
1801
|
-
|
|
1802
|
-
@example
|
|
1803
|
-
```
|
|
1804
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
1805
|
-
|
|
1806
|
-
interface Example {
|
|
1807
|
-
a: string;
|
|
1808
|
-
b: string | number;
|
|
1809
|
-
c?: string;
|
|
1810
|
-
d: {};
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
1814
|
-
//=> 'a'
|
|
1815
|
-
```
|
|
1816
|
-
|
|
1817
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
1818
|
-
|
|
1819
|
-
@example
|
|
1820
|
-
```
|
|
1821
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
1822
|
-
|
|
1823
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
1824
|
-
//=> 'a' | 'c'
|
|
1825
|
-
```
|
|
1826
|
-
|
|
1827
|
-
@category Object
|
|
1828
|
-
*/
|
|
1829
|
-
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
1830
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
1831
|
-
{
|
|
1832
|
-
// Map through all the keys of the given base type.
|
|
1833
|
-
[Key in keyof Base]:
|
|
1834
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
1835
|
-
Base[Key] extends Condition
|
|
1836
|
-
// Retain this key since the condition passes.
|
|
1837
|
-
? Key
|
|
1838
|
-
// Discard this key since the condition fails.
|
|
1839
|
-
: never;
|
|
1840
|
-
|
|
1841
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
1842
|
-
}[keyof Base]
|
|
1843
|
-
>;
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
1847
|
-
|
|
1848
|
-
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
1849
|
-
|
|
1850
|
-
@example
|
|
1851
|
-
```
|
|
1852
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
1853
|
-
|
|
1854
|
-
class Awesome {
|
|
1855
|
-
name: string;
|
|
1856
|
-
successes: number;
|
|
1857
|
-
failures: bigint;
|
|
1858
|
-
|
|
1859
|
-
run() {}
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
1863
|
-
//=> {run: () => void}
|
|
1864
|
-
```
|
|
1865
|
-
|
|
1866
|
-
@example
|
|
1867
|
-
```
|
|
1868
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
1869
|
-
|
|
1870
|
-
interface Example {
|
|
1871
|
-
a: string;
|
|
1872
|
-
b: string | number;
|
|
1873
|
-
c: () => void;
|
|
1874
|
-
d: {};
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
1878
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
1879
|
-
```
|
|
1880
|
-
|
|
1881
|
-
@category Object
|
|
1882
|
-
*/
|
|
1883
|
-
type ConditionalExcept<Base, Condition> = Except<
|
|
1884
|
-
Base,
|
|
1885
|
-
ConditionalKeys<Base, Condition>
|
|
1886
|
-
>;
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
1890
|
-
* can either be a REST module or a host module.
|
|
1891
|
-
* This type is recursive, so it can describe nested modules.
|
|
1892
|
-
*/
|
|
1893
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$1<any> | ServicePluginDefinition<any> | {
|
|
1894
|
-
[key: string]: Descriptors | PublicMetadata | any;
|
|
1895
|
-
};
|
|
1896
|
-
/**
|
|
1897
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
1898
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
1899
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
1900
|
-
* do not match the given host (as they will not work with the given host).
|
|
1901
|
-
*/
|
|
1902
|
-
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
1903
|
-
done: T;
|
|
1904
|
-
recurse: T extends {
|
|
1905
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
1906
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$1<any> ? BuildEventDefinition$1<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
1907
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
1908
|
-
-1,
|
|
1909
|
-
0,
|
|
1910
|
-
1,
|
|
1911
|
-
2,
|
|
1912
|
-
3,
|
|
1913
|
-
4,
|
|
1914
|
-
5
|
|
1915
|
-
][Depth]> : never;
|
|
1916
|
-
}, EmptyObject>;
|
|
1917
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
1918
|
-
type PublicMetadata = {
|
|
1919
|
-
PACKAGE_NAME?: string;
|
|
1920
|
-
};
|
|
1921
|
-
|
|
1922
|
-
declare global {
|
|
1923
|
-
interface ContextualClient {
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
/**
|
|
1927
|
-
* A type used to create concerete types from SDK descriptors in
|
|
1928
|
-
* case a contextual client is available.
|
|
1929
|
-
*/
|
|
1930
|
-
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
1931
|
-
host: Host;
|
|
1932
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
1933
|
-
|
|
1934
|
-
interface SeatingReservation {
|
|
1935
|
-
/**
|
|
1936
|
-
* The id of the reservation
|
|
1937
|
-
* @readonly
|
|
1938
|
-
*/
|
|
1939
|
-
_id?: string | null;
|
|
1940
|
-
/**
|
|
1941
|
-
* The seating plan id
|
|
1942
|
-
* @readonly
|
|
1943
|
-
*/
|
|
1944
|
-
seatingPlanId?: string | null;
|
|
1945
|
-
/**
|
|
1946
|
-
* The external seating plan id
|
|
1947
|
-
* @readonly
|
|
1948
|
-
*/
|
|
1949
|
-
externalSeatingPlanId?: string | null;
|
|
1950
|
-
/** Reserved places */
|
|
1951
|
-
reservedPlaces?: PlaceReservation[];
|
|
1952
|
-
/**
|
|
1953
|
-
* A client defined external id for cross referencing.
|
|
1954
|
-
* Can reference external entities.
|
|
1955
|
-
* Format: "{fqdn}:{entity guid}"
|
|
1956
|
-
*/
|
|
1957
|
-
externalId?: string | null;
|
|
1584
|
+
seatingPlanId?: string | null;
|
|
1585
|
+
/**
|
|
1586
|
+
* The external seating plan id
|
|
1587
|
+
* @readonly
|
|
1588
|
+
*/
|
|
1589
|
+
externalSeatingPlanId?: string | null;
|
|
1590
|
+
/** Reserved places */
|
|
1591
|
+
reservedPlaces?: PlaceReservation[];
|
|
1592
|
+
/**
|
|
1593
|
+
* A client defined external id for cross referencing.
|
|
1594
|
+
* Can reference external entities.
|
|
1595
|
+
* Format: "{fqdn}:{entity guid}"
|
|
1596
|
+
*/
|
|
1597
|
+
externalId?: string | null;
|
|
1958
1598
|
}
|
|
1959
1599
|
interface PlaceReservation {
|
|
1960
1600
|
/** The place id. */
|
|
@@ -2268,12 +1908,12 @@ interface SeatingPlan {
|
|
|
2268
1908
|
* Seating plan created timestamp.
|
|
2269
1909
|
* @readonly
|
|
2270
1910
|
*/
|
|
2271
|
-
_createdDate?: Date;
|
|
1911
|
+
_createdDate?: Date | null;
|
|
2272
1912
|
/**
|
|
2273
1913
|
* Seating plan updated timestamp.
|
|
2274
1914
|
* @readonly
|
|
2275
1915
|
*/
|
|
2276
|
-
_updatedDate?: Date;
|
|
1916
|
+
_updatedDate?: Date | null;
|
|
2277
1917
|
/**
|
|
2278
1918
|
* Total capacity
|
|
2279
1919
|
* @readonly
|
|
@@ -2637,7 +2277,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
2637
2277
|
/** ID of the entity associated with the event. */
|
|
2638
2278
|
entityId?: string;
|
|
2639
2279
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2640
|
-
eventTime?: Date;
|
|
2280
|
+
eventTime?: Date | null;
|
|
2641
2281
|
/**
|
|
2642
2282
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
2643
2283
|
* (for example, GDPR).
|
|
@@ -2666,7 +2306,7 @@ interface EntityCreatedEvent {
|
|
|
2666
2306
|
entity?: string;
|
|
2667
2307
|
}
|
|
2668
2308
|
interface RestoreInfo {
|
|
2669
|
-
deletedDate?: Date;
|
|
2309
|
+
deletedDate?: Date | null;
|
|
2670
2310
|
}
|
|
2671
2311
|
interface EntityUpdatedEvent {
|
|
2672
2312
|
/**
|
|
@@ -2852,7 +2492,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
2852
2492
|
/** ID of the entity associated with the event. */
|
|
2853
2493
|
entityId?: string;
|
|
2854
2494
|
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2855
|
-
eventTime?: Date;
|
|
2495
|
+
eventTime?: Date | null;
|
|
2856
2496
|
/**
|
|
2857
2497
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
2858
2498
|
* (for example, GDPR).
|
|
@@ -2954,26 +2594,8 @@ interface GetSeatingReservationsSummarySignature {
|
|
|
2954
2594
|
/** @param - Filter for seating plan */
|
|
2955
2595
|
(filter: Record<string, any> | null): Promise<GetSeatingReservationsSummaryResponse & GetSeatingReservationsSummaryResponseNonNullableFields>;
|
|
2956
2596
|
}
|
|
2957
|
-
declare const onSeatingReservationCreated$1: EventDefinition
|
|
2958
|
-
declare const onSeatingReservationDeleted$1: EventDefinition
|
|
2959
|
-
|
|
2960
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2961
|
-
__type: 'event-definition';
|
|
2962
|
-
type: Type;
|
|
2963
|
-
isDomainEvent?: boolean;
|
|
2964
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2965
|
-
__payload: Payload;
|
|
2966
|
-
};
|
|
2967
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2968
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2969
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2970
|
-
|
|
2971
|
-
declare global {
|
|
2972
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2973
|
-
interface SymbolConstructor {
|
|
2974
|
-
readonly observable: symbol;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2597
|
+
declare const onSeatingReservationCreated$1: EventDefinition<SeatingReservationCreatedEnvelope, "wix.seating.v1.seating_reservation_created">;
|
|
2598
|
+
declare const onSeatingReservationDeleted$1: EventDefinition<SeatingReservationDeletedEnvelope, "wix.seating.v1.seating_reservation_deleted">;
|
|
2977
2599
|
|
|
2978
2600
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2979
2601
|
|