@wix/calendar 1.0.24 → 1.0.26
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 +7 -7
- package/type-bundles/context.bundle.d.ts +473 -2385
- package/type-bundles/index.bundle.d.ts +473 -2385
|
@@ -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;
|
|
@@ -40,92 +40,92 @@ type Host$4<Environment = unknown> = {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
type RESTFunctionDescriptor
|
|
44
|
-
interface HttpClient
|
|
45
|
-
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>>;
|
|
46
46
|
fetchWithAuth: typeof fetch;
|
|
47
47
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
48
48
|
getActiveToken?: () => string | undefined;
|
|
49
49
|
}
|
|
50
|
-
type RequestOptionsFactory
|
|
51
|
-
type HttpResponse
|
|
50
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
51
|
+
type HttpResponse<T = any> = {
|
|
52
52
|
data: T;
|
|
53
53
|
status: number;
|
|
54
54
|
statusText: string;
|
|
55
55
|
headers: any;
|
|
56
56
|
request?: any;
|
|
57
57
|
};
|
|
58
|
-
type RequestOptions
|
|
58
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
59
59
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
60
60
|
url: string;
|
|
61
61
|
data?: Data;
|
|
62
62
|
params?: URLSearchParams;
|
|
63
|
-
} & APIMetadata
|
|
64
|
-
type APIMetadata
|
|
63
|
+
} & APIMetadata;
|
|
64
|
+
type APIMetadata = {
|
|
65
65
|
methodFqn?: string;
|
|
66
66
|
entityFqdn?: string;
|
|
67
67
|
packageName?: string;
|
|
68
68
|
};
|
|
69
|
-
type BuildRESTFunction
|
|
70
|
-
type EventDefinition
|
|
69
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
71
71
|
__type: 'event-definition';
|
|
72
72
|
type: Type;
|
|
73
73
|
isDomainEvent?: boolean;
|
|
74
74
|
transformations?: (envelope: unknown) => Payload;
|
|
75
75
|
__payload: Payload;
|
|
76
76
|
};
|
|
77
|
-
declare function EventDefinition
|
|
78
|
-
type EventHandler
|
|
79
|
-
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;
|
|
80
80
|
|
|
81
|
-
type ServicePluginMethodInput
|
|
81
|
+
type ServicePluginMethodInput = {
|
|
82
82
|
request: any;
|
|
83
83
|
metadata: any;
|
|
84
84
|
};
|
|
85
|
-
type ServicePluginContract
|
|
86
|
-
type ServicePluginMethodMetadata
|
|
85
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
86
|
+
type ServicePluginMethodMetadata = {
|
|
87
87
|
name: string;
|
|
88
88
|
primaryHttpMappingPath: string;
|
|
89
89
|
transformations: {
|
|
90
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput
|
|
90
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
91
91
|
toREST: (...args: unknown[]) => unknown;
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
|
-
type ServicePluginDefinition
|
|
94
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
95
95
|
__type: 'service-plugin-definition';
|
|
96
96
|
componentType: string;
|
|
97
|
-
methods: ServicePluginMethodMetadata
|
|
97
|
+
methods: ServicePluginMethodMetadata[];
|
|
98
98
|
__contract: Contract;
|
|
99
99
|
};
|
|
100
|
-
declare function ServicePluginDefinition
|
|
101
|
-
type BuildServicePluginDefinition
|
|
102
|
-
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";
|
|
103
103
|
|
|
104
|
-
type RequestContext
|
|
104
|
+
type RequestContext = {
|
|
105
105
|
isSSR: boolean;
|
|
106
106
|
host: string;
|
|
107
107
|
protocol?: string;
|
|
108
108
|
};
|
|
109
|
-
type ResponseTransformer
|
|
109
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
110
110
|
/**
|
|
111
111
|
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
112
112
|
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
113
113
|
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
114
114
|
*/
|
|
115
|
-
type Method
|
|
116
|
-
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> = {
|
|
117
117
|
_?: T;
|
|
118
118
|
url?: string;
|
|
119
|
-
method?: Method
|
|
119
|
+
method?: Method;
|
|
120
120
|
params?: any;
|
|
121
121
|
data?: any;
|
|
122
|
-
transformResponse?: ResponseTransformer
|
|
122
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
123
123
|
};
|
|
124
|
-
type AmbassadorFactory
|
|
124
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
125
125
|
__isAmbassador: boolean;
|
|
126
126
|
};
|
|
127
|
-
type AmbassadorFunctionDescriptor
|
|
128
|
-
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;
|
|
129
129
|
|
|
130
130
|
declare global {
|
|
131
131
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -134,7 +134,7 @@ declare global {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
declare const emptyObjectSymbol
|
|
137
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
Represents a strictly empty plain object, the `{}` value.
|
|
@@ -162,7 +162,7 @@ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<n
|
|
|
162
162
|
|
|
163
163
|
@category Object
|
|
164
164
|
*/
|
|
165
|
-
type EmptyObject
|
|
165
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
Returns a boolean for whether the two given types are equal.
|
|
@@ -190,7 +190,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
190
190
|
@category Type Guard
|
|
191
191
|
@category Utilities
|
|
192
192
|
*/
|
|
193
|
-
type IsEqual
|
|
193
|
+
type IsEqual<A, B> =
|
|
194
194
|
(<G>() => G extends A ? 1 : 2) extends
|
|
195
195
|
(<G>() => G extends B ? 1 : 2)
|
|
196
196
|
? true
|
|
@@ -223,9 +223,9 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
223
223
|
|
|
224
224
|
@see {Except}
|
|
225
225
|
*/
|
|
226
|
-
type Filter
|
|
226
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
227
227
|
|
|
228
|
-
type ExceptOptions
|
|
228
|
+
type ExceptOptions = {
|
|
229
229
|
/**
|
|
230
230
|
Disallow assigning non-specified properties.
|
|
231
231
|
|
|
@@ -269,8 +269,8 @@ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
|
269
269
|
|
|
270
270
|
@category Object
|
|
271
271
|
*/
|
|
272
|
-
type Except
|
|
273
|
-
[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];
|
|
274
274
|
} & (Options['requireExactProps'] extends true
|
|
275
275
|
? Partial<Record<KeysType, never>>
|
|
276
276
|
: {});
|
|
@@ -316,7 +316,7 @@ endIfEqual('abc', '123');
|
|
|
316
316
|
@category Type Guard
|
|
317
317
|
@category Utilities
|
|
318
318
|
*/
|
|
319
|
-
type IsNever
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
@@ -337,8 +337,8 @@ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
|
337
337
|
@category Type Guard
|
|
338
338
|
@category Utilities
|
|
339
339
|
*/
|
|
340
|
-
type IfNever
|
|
341
|
-
IsNever
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
342
|
);
|
|
343
343
|
|
|
344
344
|
/**
|
|
@@ -373,7 +373,7 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
373
373
|
|
|
374
374
|
@category Object
|
|
375
375
|
*/
|
|
376
|
-
type ConditionalKeys
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
377
377
|
{
|
|
378
378
|
// Map through all the keys of the given base type.
|
|
379
379
|
[Key in keyof Base]-?:
|
|
@@ -381,7 +381,7 @@ type ConditionalKeys$4<Base, Condition> =
|
|
|
381
381
|
Base[Key] extends Condition
|
|
382
382
|
// Retain this key
|
|
383
383
|
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
-
? IfNever
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
385
385
|
// Discard this key since the condition fails.
|
|
386
386
|
: never;
|
|
387
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
@@ -425,9 +425,9 @@ type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
|
425
425
|
|
|
426
426
|
@category Object
|
|
427
427
|
*/
|
|
428
|
-
type ConditionalExcept
|
|
428
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
429
429
|
Base,
|
|
430
|
-
ConditionalKeys
|
|
430
|
+
ConditionalKeys<Base, Condition>
|
|
431
431
|
>;
|
|
432
432
|
|
|
433
433
|
/**
|
|
@@ -435,8 +435,8 @@ ConditionalKeys$4<Base, Condition>
|
|
|
435
435
|
* can either be a REST module or a host module.
|
|
436
436
|
* This type is recursive, so it can describe nested modules.
|
|
437
437
|
*/
|
|
438
|
-
type Descriptors
|
|
439
|
-
[key: string]: Descriptors
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
439
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
440
440
|
};
|
|
441
441
|
/**
|
|
442
442
|
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
@@ -444,12 +444,12 @@ type Descriptors$4 = RESTFunctionDescriptor$4 | AmbassadorFunctionDescriptor$4 |
|
|
|
444
444
|
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
445
445
|
* do not match the given host (as they will not work with the given host).
|
|
446
446
|
*/
|
|
447
|
-
type BuildDescriptors
|
|
447
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
448
448
|
done: T;
|
|
449
449
|
recurse: T extends {
|
|
450
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE
|
|
451
|
-
} ? never : T extends AmbassadorFunctionDescriptor
|
|
452
|
-
[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, [
|
|
453
453
|
-1,
|
|
454
454
|
0,
|
|
455
455
|
1,
|
|
@@ -458,9 +458,9 @@ type BuildDescriptors$4<T extends Descriptors$4, H extends Host$4<any> | undefin
|
|
|
458
458
|
4,
|
|
459
459
|
5
|
|
460
460
|
][Depth]> : never;
|
|
461
|
-
}, EmptyObject
|
|
461
|
+
}, EmptyObject>;
|
|
462
462
|
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
463
|
-
type PublicMetadata
|
|
463
|
+
type PublicMetadata = {
|
|
464
464
|
PACKAGE_NAME?: string;
|
|
465
465
|
};
|
|
466
466
|
|
|
@@ -472,9 +472,9 @@ declare global {
|
|
|
472
472
|
* A type used to create concerete types from SDK descriptors in
|
|
473
473
|
* case a contextual client is available.
|
|
474
474
|
*/
|
|
475
|
-
type MaybeContext
|
|
476
|
-
host: Host
|
|
477
|
-
} ? BuildDescriptors
|
|
475
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
476
|
+
host: Host;
|
|
477
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
478
478
|
|
|
479
479
|
interface Event$1 {
|
|
480
480
|
/**
|
|
@@ -2419,7 +2419,7 @@ interface ListEventsByMemberIdOptions {
|
|
|
2419
2419
|
eventIds?: string[];
|
|
2420
2420
|
}
|
|
2421
2421
|
|
|
2422
|
-
declare function getEvent$1(httpClient: HttpClient
|
|
2422
|
+
declare function getEvent$1(httpClient: HttpClient): GetEventSignature;
|
|
2423
2423
|
interface GetEventSignature {
|
|
2424
2424
|
/**
|
|
2425
2425
|
* Retrieves an event by ID.
|
|
@@ -2428,7 +2428,7 @@ interface GetEventSignature {
|
|
|
2428
2428
|
*/
|
|
2429
2429
|
(eventId: string | null, options?: GetEventOptions | undefined): Promise<Event$1 & EventNonNullableFields>;
|
|
2430
2430
|
}
|
|
2431
|
-
declare function listEvents$1(httpClient: HttpClient
|
|
2431
|
+
declare function listEvents$1(httpClient: HttpClient): ListEventsSignature;
|
|
2432
2432
|
interface ListEventsSignature {
|
|
2433
2433
|
/**
|
|
2434
2434
|
* Retrieves a list of events by their IDs.
|
|
@@ -2436,7 +2436,7 @@ interface ListEventsSignature {
|
|
|
2436
2436
|
*/
|
|
2437
2437
|
(eventIds: string[], options?: ListEventsOptions | undefined): Promise<ListEventsResponse & ListEventsResponseNonNullableFields>;
|
|
2438
2438
|
}
|
|
2439
|
-
declare function queryEvents$1(httpClient: HttpClient
|
|
2439
|
+
declare function queryEvents$1(httpClient: HttpClient): QueryEventsSignature;
|
|
2440
2440
|
interface QueryEventsSignature {
|
|
2441
2441
|
/**
|
|
2442
2442
|
* Query events given the provided time range, filters and paging.
|
|
@@ -2446,7 +2446,7 @@ interface QueryEventsSignature {
|
|
|
2446
2446
|
*/
|
|
2447
2447
|
(options?: QueryEventsOptions | undefined): EventsQueryBuilder;
|
|
2448
2448
|
}
|
|
2449
|
-
declare function createEvent$1(httpClient: HttpClient
|
|
2449
|
+
declare function createEvent$1(httpClient: HttpClient): CreateEventSignature;
|
|
2450
2450
|
interface CreateEventSignature {
|
|
2451
2451
|
/**
|
|
2452
2452
|
* Creates an event.
|
|
@@ -2455,7 +2455,7 @@ interface CreateEventSignature {
|
|
|
2455
2455
|
*/
|
|
2456
2456
|
(event: Event$1, options?: CreateEventOptions | undefined): Promise<Event$1 & EventNonNullableFields>;
|
|
2457
2457
|
}
|
|
2458
|
-
declare function bulkCreateEvent$1(httpClient: HttpClient
|
|
2458
|
+
declare function bulkCreateEvent$1(httpClient: HttpClient): BulkCreateEventSignature;
|
|
2459
2459
|
interface BulkCreateEventSignature {
|
|
2460
2460
|
/**
|
|
2461
2461
|
* Creates multiple events in bulk.
|
|
@@ -2463,7 +2463,7 @@ interface BulkCreateEventSignature {
|
|
|
2463
2463
|
*/
|
|
2464
2464
|
(events: MaskedEvent[], options?: BulkCreateEventOptions | undefined): Promise<BulkCreateEventResponse & BulkCreateEventResponseNonNullableFields>;
|
|
2465
2465
|
}
|
|
2466
|
-
declare function updateEvent$1(httpClient: HttpClient
|
|
2466
|
+
declare function updateEvent$1(httpClient: HttpClient): UpdateEventSignature;
|
|
2467
2467
|
interface UpdateEventSignature {
|
|
2468
2468
|
/**
|
|
2469
2469
|
* Updates an event.
|
|
@@ -2472,7 +2472,7 @@ interface UpdateEventSignature {
|
|
|
2472
2472
|
*/
|
|
2473
2473
|
(_id: string | null, event: UpdateEvent, options?: UpdateEventOptions | undefined): Promise<Event$1 & EventNonNullableFields>;
|
|
2474
2474
|
}
|
|
2475
|
-
declare function bulkUpdateEvent$1(httpClient: HttpClient
|
|
2475
|
+
declare function bulkUpdateEvent$1(httpClient: HttpClient): BulkUpdateEventSignature;
|
|
2476
2476
|
interface BulkUpdateEventSignature {
|
|
2477
2477
|
/**
|
|
2478
2478
|
* Updates multiple events in bulk.
|
|
@@ -2480,7 +2480,7 @@ interface BulkUpdateEventSignature {
|
|
|
2480
2480
|
*/
|
|
2481
2481
|
(events: BulkUpdateEventRequestMaskedEvent[], options?: BulkUpdateEventOptions | undefined): Promise<BulkUpdateEventResponse & BulkUpdateEventResponseNonNullableFields>;
|
|
2482
2482
|
}
|
|
2483
|
-
declare function restoreEventDefaults$1(httpClient: HttpClient
|
|
2483
|
+
declare function restoreEventDefaults$1(httpClient: HttpClient): RestoreEventDefaultsSignature;
|
|
2484
2484
|
interface RestoreEventDefaultsSignature {
|
|
2485
2485
|
/**
|
|
2486
2486
|
* Restore default event values from the schedule or the recurring event.
|
|
@@ -2489,7 +2489,7 @@ interface RestoreEventDefaultsSignature {
|
|
|
2489
2489
|
*/
|
|
2490
2490
|
(eventId: string | null, fields: Field$1[], options?: RestoreEventDefaultsOptions | undefined): Promise<RestoreEventDefaultsResponse & RestoreEventDefaultsResponseNonNullableFields>;
|
|
2491
2491
|
}
|
|
2492
|
-
declare function splitRecurringEvent$1(httpClient: HttpClient
|
|
2492
|
+
declare function splitRecurringEvent$1(httpClient: HttpClient): SplitRecurringEventSignature;
|
|
2493
2493
|
interface SplitRecurringEventSignature {
|
|
2494
2494
|
/**
|
|
2495
2495
|
* Splits a recurring event at a provided future date into two recurring events.
|
|
@@ -2509,7 +2509,7 @@ interface SplitRecurringEventSignature {
|
|
|
2509
2509
|
*/
|
|
2510
2510
|
(recurringEventId: string | null, splitLocalDate: string | null, options?: SplitRecurringEventOptions | undefined): Promise<SplitRecurringEventResponse & SplitRecurringEventResponseNonNullableFields>;
|
|
2511
2511
|
}
|
|
2512
|
-
declare function cancelEvent$1(httpClient: HttpClient
|
|
2512
|
+
declare function cancelEvent$1(httpClient: HttpClient): CancelEventSignature;
|
|
2513
2513
|
interface CancelEventSignature {
|
|
2514
2514
|
/**
|
|
2515
2515
|
* Cancels an event.
|
|
@@ -2517,7 +2517,7 @@ interface CancelEventSignature {
|
|
|
2517
2517
|
*/
|
|
2518
2518
|
(eventId: string | null, options?: CancelEventOptions | undefined): Promise<CancelEventResponse & CancelEventResponseNonNullableFields>;
|
|
2519
2519
|
}
|
|
2520
|
-
declare function bulkCancelEvent$1(httpClient: HttpClient
|
|
2520
|
+
declare function bulkCancelEvent$1(httpClient: HttpClient): BulkCancelEventSignature;
|
|
2521
2521
|
interface BulkCancelEventSignature {
|
|
2522
2522
|
/**
|
|
2523
2523
|
* Cancels multiple events in bulk.
|
|
@@ -2525,7 +2525,7 @@ interface BulkCancelEventSignature {
|
|
|
2525
2525
|
*/
|
|
2526
2526
|
(eventIds: string[], options?: BulkCancelEventOptions | undefined): Promise<BulkCancelEventResponse & BulkCancelEventResponseNonNullableFields>;
|
|
2527
2527
|
}
|
|
2528
|
-
declare function listEventsByContactId$1(httpClient: HttpClient
|
|
2528
|
+
declare function listEventsByContactId$1(httpClient: HttpClient): ListEventsByContactIdSignature;
|
|
2529
2529
|
interface ListEventsByContactIdSignature {
|
|
2530
2530
|
/**
|
|
2531
2531
|
* Retrieves a list of events by a participant's contact ID.
|
|
@@ -2537,7 +2537,7 @@ interface ListEventsByContactIdSignature {
|
|
|
2537
2537
|
*/
|
|
2538
2538
|
(contactId: string | null, options?: ListEventsByContactIdOptions | undefined): Promise<ListEventsByContactIdResponse & ListEventsByContactIdResponseNonNullableFields>;
|
|
2539
2539
|
}
|
|
2540
|
-
declare function listEventsByMemberId$1(httpClient: HttpClient
|
|
2540
|
+
declare function listEventsByMemberId$1(httpClient: HttpClient): ListEventsByMemberIdSignature;
|
|
2541
2541
|
interface ListEventsByMemberIdSignature {
|
|
2542
2542
|
/**
|
|
2543
2543
|
* Retrieves a list of events by a participant's member ID.
|
|
@@ -2553,26 +2553,26 @@ interface ListEventsByMemberIdSignature {
|
|
|
2553
2553
|
*/
|
|
2554
2554
|
(memberId: string | null, options?: ListEventsByMemberIdOptions | undefined): Promise<ListEventsByMemberIdResponse & ListEventsByMemberIdResponseNonNullableFields>;
|
|
2555
2555
|
}
|
|
2556
|
-
declare const onEventCreated$1: EventDefinition
|
|
2557
|
-
declare const onEventUpdated$1: EventDefinition
|
|
2558
|
-
declare const onEventRecurringSplit$1: EventDefinition
|
|
2559
|
-
declare const onEventCancelled$1: EventDefinition
|
|
2560
|
-
|
|
2561
|
-
declare function createEventModule$4<T extends EventDefinition
|
|
2562
|
-
|
|
2563
|
-
declare const getEvent: MaybeContext
|
|
2564
|
-
declare const listEvents: MaybeContext
|
|
2565
|
-
declare const queryEvents: MaybeContext
|
|
2566
|
-
declare const createEvent: MaybeContext
|
|
2567
|
-
declare const bulkCreateEvent: MaybeContext
|
|
2568
|
-
declare const updateEvent: MaybeContext
|
|
2569
|
-
declare const bulkUpdateEvent: MaybeContext
|
|
2570
|
-
declare const restoreEventDefaults: MaybeContext
|
|
2571
|
-
declare const splitRecurringEvent: MaybeContext
|
|
2572
|
-
declare const cancelEvent: MaybeContext
|
|
2573
|
-
declare const bulkCancelEvent: MaybeContext
|
|
2574
|
-
declare const listEventsByContactId: MaybeContext
|
|
2575
|
-
declare const listEventsByMemberId: MaybeContext
|
|
2556
|
+
declare const onEventCreated$1: EventDefinition<EventCreatedEnvelope, "wix.calendar.v3.event_created">;
|
|
2557
|
+
declare const onEventUpdated$1: EventDefinition<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
2558
|
+
declare const onEventRecurringSplit$1: EventDefinition<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
2559
|
+
declare const onEventCancelled$1: EventDefinition<EventCancelledEnvelope, "wix.calendar.v3.event_cancelled">;
|
|
2560
|
+
|
|
2561
|
+
declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2562
|
+
|
|
2563
|
+
declare const getEvent: MaybeContext<BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1>;
|
|
2564
|
+
declare const listEvents: MaybeContext<BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1>;
|
|
2565
|
+
declare const queryEvents: MaybeContext<BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1>;
|
|
2566
|
+
declare const createEvent: MaybeContext<BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1>;
|
|
2567
|
+
declare const bulkCreateEvent: MaybeContext<BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1>;
|
|
2568
|
+
declare const updateEvent: MaybeContext<BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1>;
|
|
2569
|
+
declare const bulkUpdateEvent: MaybeContext<BuildRESTFunction<typeof bulkUpdateEvent$1> & typeof bulkUpdateEvent$1>;
|
|
2570
|
+
declare const restoreEventDefaults: MaybeContext<BuildRESTFunction<typeof restoreEventDefaults$1> & typeof restoreEventDefaults$1>;
|
|
2571
|
+
declare const splitRecurringEvent: MaybeContext<BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1>;
|
|
2572
|
+
declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
|
|
2573
|
+
declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
|
|
2574
|
+
declare const listEventsByContactId: MaybeContext<BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1>;
|
|
2575
|
+
declare const listEventsByMemberId: MaybeContext<BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1>;
|
|
2576
2576
|
|
|
2577
2577
|
type _publicOnEventCreatedType = typeof onEventCreated$1;
|
|
2578
2578
|
/** */
|
|
@@ -2696,503 +2696,25 @@ declare namespace context$4 {
|
|
|
2696
2696
|
export { type ActionEvent$4 as ActionEvent, type Address$2 as Address, type AddressHint$2 as AddressHint, type context$4_ApplicationError as ApplicationError, type BaseEventMetadata$4 as BaseEventMetadata, type context$4_BulkActionMetadata as BulkActionMetadata, type context$4_BulkCancelEventOptions as BulkCancelEventOptions, type context$4_BulkCancelEventRequest as BulkCancelEventRequest, type context$4_BulkCancelEventResponse as BulkCancelEventResponse, type context$4_BulkCancelEventResponseNonNullableFields as BulkCancelEventResponseNonNullableFields, type context$4_BulkCreateEventOptions as BulkCreateEventOptions, type context$4_BulkCreateEventRequest as BulkCreateEventRequest, type context$4_BulkCreateEventResponse as BulkCreateEventResponse, type context$4_BulkCreateEventResponseNonNullableFields as BulkCreateEventResponseNonNullableFields, type context$4_BulkEventResult as BulkEventResult, type context$4_BulkUpdateEventOptions as BulkUpdateEventOptions, type context$4_BulkUpdateEventRequest as BulkUpdateEventRequest, type context$4_BulkUpdateEventRequestMaskedEvent as BulkUpdateEventRequestMaskedEvent, type context$4_BulkUpdateEventResponse as BulkUpdateEventResponse, type context$4_BulkUpdateEventResponseNonNullableFields as BulkUpdateEventResponseNonNullableFields, type BusinessSchedule$2 as BusinessSchedule, type context$4_CancelEventOptions as CancelEventOptions, type context$4_CancelEventRequest as CancelEventRequest, type context$4_CancelEventResponse as CancelEventResponse, type context$4_CancelEventResponseNonNullableFields as CancelEventResponseNonNullableFields, type Categories$2 as Categories, type ChangeContext$2 as ChangeContext, type ChangeContextPayloadOneOf$2 as ChangeContextPayloadOneOf, type context$4_CommonCursorPaging as CommonCursorPaging, type context$4_CommonCursorPagingMetadata as CommonCursorPagingMetadata, type context$4_CommonCursors as CommonCursors, type CommonIdentificationData$2 as CommonIdentificationData, type CommonIdentificationDataIdOneOf$2 as CommonIdentificationDataIdOneOf, type ConferencingDetails$2 as ConferencingDetails, type ConsentPolicy$2 as ConsentPolicy, type context$4_CreateEventOptions as CreateEventOptions, type context$4_CreateEventRequest as CreateEventRequest, type context$4_CreateEventResponse as CreateEventResponse, type context$4_CreateEventResponseNonNullableFields as CreateEventResponseNonNullableFields, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type CursorQuery$2 as CursorQuery, type CursorQueryPagingMethodOneOf$2 as CursorQueryPagingMethodOneOf, type Cursors$2 as Cursors, Day$1 as Day, DayOfWeek$2 as DayOfWeek, type context$4_DeleteTargetsRequest as DeleteTargetsRequest, type context$4_DeleteTargetsResponse as DeleteTargetsResponse, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type Empty$4 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type Event$1 as Event, type context$4_EventCancelled as EventCancelled, type context$4_EventCancelledEnvelope as EventCancelledEnvelope, type context$4_EventCreatedEnvelope as EventCreatedEnvelope, type EventMetadata$4 as EventMetadata, type context$4_EventNonNullableFields as EventNonNullableFields, type context$4_EventRecurringSplitEnvelope as EventRecurringSplitEnvelope, type context$4_EventUpdatedEnvelope as EventUpdatedEnvelope, type context$4_EventUpdatedWithMetadata as EventUpdatedWithMetadata, type context$4_EventsQueryBuilder as EventsQueryBuilder, type context$4_EventsQueryResult as EventsQueryResult, type ExtendedFields$3 as ExtendedFields, Field$1 as Field, Frequency$1 as Frequency, type GeoCoordinates$2 as GeoCoordinates, type context$4_GetEventOptions as GetEventOptions, type context$4_GetEventRequest as GetEventRequest, type context$4_GetEventResponse as GetEventResponse, type context$4_GetEventResponseNonNullableFields as GetEventResponseNonNullableFields, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, IdentityType$2 as IdentityType, type context$4_ItemMetadata as ItemMetadata, type context$4_ListEventsByContactIdOptions as ListEventsByContactIdOptions, type context$4_ListEventsByContactIdRequest as ListEventsByContactIdRequest, type context$4_ListEventsByContactIdResponse as ListEventsByContactIdResponse, type context$4_ListEventsByContactIdResponseNonNullableFields as ListEventsByContactIdResponseNonNullableFields, type context$4_ListEventsByMemberIdOptions as ListEventsByMemberIdOptions, type context$4_ListEventsByMemberIdRequest as ListEventsByMemberIdRequest, type context$4_ListEventsByMemberIdResponse as ListEventsByMemberIdResponse, type context$4_ListEventsByMemberIdResponseNonNullableFields as ListEventsByMemberIdResponseNonNullableFields, type context$4_ListEventsOptions as ListEventsOptions, type context$4_ListEventsRequest as ListEventsRequest, type context$4_ListEventsResponse as ListEventsResponse, type context$4_ListEventsResponseNonNullableFields as ListEventsResponseNonNullableFields, type context$4_ListRecurringEventInstancesHistoryRequest as ListRecurringEventInstancesHistoryRequest, type context$4_ListRecurringEventInstancesHistoryResponse as ListRecurringEventInstancesHistoryResponse, type Locale$2 as Locale, type Location$2 as Location, LocationType$2 as LocationType, type context$4_MaskedEvent as MaskedEvent, type MessageEnvelope$4 as MessageEnvelope, type Multilingual$2 as Multilingual, type Participant$2 as Participant, type ParticipantNotification$1 as ParticipantNotification, type Participants$1 as Participants, ParticipantsStatus$1 as ParticipantsStatus, type Permission$2 as Permission, PlacementType$2 as PlacementType, type Properties$2 as Properties, type PropertiesChange$2 as PropertiesChange, type context$4_QueryEventsOptions as QueryEventsOptions, type context$4_QueryEventsRequest as QueryEventsRequest, type context$4_QueryEventsResponse as QueryEventsResponse, type context$4_QueryEventsResponseNonNullableFields as QueryEventsResponseNonNullableFields, type RecurrenceRule$1 as RecurrenceRule, RecurrenceType$1 as RecurrenceType, type context$4_RecurringEventSplit as RecurringEventSplit, RequestedFields$1 as RequestedFields, ResolutionMethod$2 as ResolutionMethod, type Resource$1 as Resource, type context$4_RestoreEventDefaultsOptions as RestoreEventDefaultsOptions, type context$4_RestoreEventDefaultsRequest as RestoreEventDefaultsRequest, type context$4_RestoreEventDefaultsResponse as RestoreEventDefaultsResponse, type context$4_RestoreEventDefaultsResponseNonNullableFields as RestoreEventDefaultsResponseNonNullableFields, type RestoreInfo$4 as RestoreInfo, Role$2 as Role, type SiteCloned$2 as SiteCloned, type SiteCreated$2 as SiteCreated, type SitePropertiesEvent$2 as SitePropertiesEvent, type SitePropertiesNotification$2 as SitePropertiesNotification, context$4_SortOrder as SortOrder, type context$4_Sorting as Sorting, type SpecialHourPeriod$2 as SpecialHourPeriod, type context$4_SplitRecurringEventOptions as SplitRecurringEventOptions, type context$4_SplitRecurringEventRequest as SplitRecurringEventRequest, type context$4_SplitRecurringEventResponse as SplitRecurringEventResponse, type context$4_SplitRecurringEventResponseNonNullableFields as SplitRecurringEventResponseNonNullableFields, Status$4 as Status, type SupportedLanguage$2 as SupportedLanguage, type TimePeriod$2 as TimePeriod, type Translation$2 as Translation, Transparency$1 as Transparency, Type$2 as Type, type context$4_UpdateEvent as UpdateEvent, type context$4_UpdateEventOptions as UpdateEventOptions, type context$4_UpdateEventParticipantsRequest as UpdateEventParticipantsRequest, type context$4_UpdateEventParticipantsResponse as UpdateEventParticipantsResponse, type context$4_UpdateEventRequest as UpdateEventRequest, type context$4_UpdateEventResponse as UpdateEventResponse, type context$4_UpdateEventResponseNonNullableFields as UpdateEventResponseNonNullableFields, WebhookIdentityType$4 as WebhookIdentityType, type ZonedDate$2 as ZonedDate, type context$4__publicOnEventCancelledType as _publicOnEventCancelledType, type context$4__publicOnEventCreatedType as _publicOnEventCreatedType, type context$4__publicOnEventRecurringSplitType as _publicOnEventRecurringSplitType, type context$4__publicOnEventUpdatedType as _publicOnEventUpdatedType, context$4_bulkCancelEvent as bulkCancelEvent, context$4_bulkCreateEvent as bulkCreateEvent, context$4_bulkUpdateEvent as bulkUpdateEvent, context$4_cancelEvent as cancelEvent, context$4_createEvent as createEvent, context$4_getEvent as getEvent, context$4_listEvents as listEvents, context$4_listEventsByContactId as listEventsByContactId, context$4_listEventsByMemberId as listEventsByMemberId, context$4_onEventCancelled as onEventCancelled, context$4_onEventCreated as onEventCreated, context$4_onEventRecurringSplit as onEventRecurringSplit, context$4_onEventUpdated as onEventUpdated, onEventCancelled$1 as publicOnEventCancelled, onEventCreated$1 as publicOnEventCreated, onEventRecurringSplit$1 as publicOnEventRecurringSplit, onEventUpdated$1 as publicOnEventUpdated, context$4_queryEvents as queryEvents, context$4_restoreEventDefaults as restoreEventDefaults, context$4_splitRecurringEvent as splitRecurringEvent, context$4_updateEvent as updateEvent };
|
|
2697
2697
|
}
|
|
2698
2698
|
|
|
2699
|
-
|
|
2700
|
-
__type: 'host';
|
|
2701
|
-
create(host: H): T;
|
|
2702
|
-
};
|
|
2703
|
-
type HostModuleAPI$3<T extends HostModule$3<any, any>> = T extends HostModule$3<infer U, any> ? U : never;
|
|
2704
|
-
type Host$3<Environment = unknown> = {
|
|
2705
|
-
channel: {
|
|
2706
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
2707
|
-
disconnect: () => void;
|
|
2708
|
-
} | Promise<{
|
|
2709
|
-
disconnect: () => void;
|
|
2710
|
-
}>;
|
|
2711
|
-
};
|
|
2712
|
-
environment?: Environment;
|
|
2713
|
-
/**
|
|
2714
|
-
* Optional name of the environment, use for logging
|
|
2715
|
-
*/
|
|
2716
|
-
name?: string;
|
|
2699
|
+
interface EventsView {
|
|
2717
2700
|
/**
|
|
2718
|
-
*
|
|
2701
|
+
* The view end date.
|
|
2702
|
+
* @readonly
|
|
2719
2703
|
*/
|
|
2720
|
-
|
|
2704
|
+
endDate?: Date;
|
|
2721
2705
|
/**
|
|
2722
|
-
*
|
|
2723
|
-
*
|
|
2706
|
+
* The number of days the view lasts into the future.
|
|
2707
|
+
* @readonly
|
|
2724
2708
|
*/
|
|
2725
|
-
|
|
2726
|
-
/**
|
|
2727
|
-
* The language of the currently viewed session
|
|
2728
|
-
*/
|
|
2729
|
-
language?: string;
|
|
2730
|
-
/**
|
|
2731
|
-
* The locale of the currently viewed session
|
|
2732
|
-
*/
|
|
2733
|
-
locale?: string;
|
|
2734
|
-
/**
|
|
2735
|
-
* Any headers that should be passed through to the API requests
|
|
2736
|
-
*/
|
|
2737
|
-
passThroughHeaders?: Record<string, string>;
|
|
2738
|
-
};
|
|
2739
|
-
};
|
|
2740
|
-
|
|
2741
|
-
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
2742
|
-
interface HttpClient$3 {
|
|
2743
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
2744
|
-
fetchWithAuth: typeof fetch;
|
|
2745
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2746
|
-
getActiveToken?: () => string | undefined;
|
|
2709
|
+
futureDurationInDays?: number | null;
|
|
2747
2710
|
}
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
};
|
|
2756
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
2757
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2758
|
-
url: string;
|
|
2759
|
-
data?: Data;
|
|
2760
|
-
params?: URLSearchParams;
|
|
2761
|
-
} & APIMetadata$3;
|
|
2762
|
-
type APIMetadata$3 = {
|
|
2763
|
-
methodFqn?: string;
|
|
2764
|
-
entityFqdn?: string;
|
|
2765
|
-
packageName?: string;
|
|
2766
|
-
};
|
|
2767
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
2768
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2769
|
-
__type: 'event-definition';
|
|
2770
|
-
type: Type;
|
|
2771
|
-
isDomainEvent?: boolean;
|
|
2772
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2773
|
-
__payload: Payload;
|
|
2774
|
-
};
|
|
2775
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2776
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2777
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
2778
|
-
|
|
2779
|
-
type ServicePluginMethodInput$3 = {
|
|
2780
|
-
request: any;
|
|
2781
|
-
metadata: any;
|
|
2782
|
-
};
|
|
2783
|
-
type ServicePluginContract$3 = Record<string, (payload: ServicePluginMethodInput$3) => unknown | Promise<unknown>>;
|
|
2784
|
-
type ServicePluginMethodMetadata$3 = {
|
|
2785
|
-
name: string;
|
|
2786
|
-
primaryHttpMappingPath: string;
|
|
2787
|
-
transformations: {
|
|
2788
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$3;
|
|
2789
|
-
toREST: (...args: unknown[]) => unknown;
|
|
2790
|
-
};
|
|
2791
|
-
};
|
|
2792
|
-
type ServicePluginDefinition$3<Contract extends ServicePluginContract$3> = {
|
|
2793
|
-
__type: 'service-plugin-definition';
|
|
2794
|
-
componentType: string;
|
|
2795
|
-
methods: ServicePluginMethodMetadata$3[];
|
|
2796
|
-
__contract: Contract;
|
|
2797
|
-
};
|
|
2798
|
-
declare function ServicePluginDefinition$3<Contract extends ServicePluginContract$3>(componentType: string, methods: ServicePluginMethodMetadata$3[]): ServicePluginDefinition$3<Contract>;
|
|
2799
|
-
type BuildServicePluginDefinition$3<T extends ServicePluginDefinition$3<any>> = (implementation: T['__contract']) => void;
|
|
2800
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$3 = "wix_spi_error";
|
|
2801
|
-
|
|
2802
|
-
type RequestContext$3 = {
|
|
2803
|
-
isSSR: boolean;
|
|
2804
|
-
host: string;
|
|
2805
|
-
protocol?: string;
|
|
2806
|
-
};
|
|
2807
|
-
type ResponseTransformer$3 = (data: any, headers?: any) => any;
|
|
2808
|
-
/**
|
|
2809
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
2810
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
2811
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
2812
|
-
*/
|
|
2813
|
-
type Method$3 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
2814
|
-
type AmbassadorRequestOptions$3<T = any> = {
|
|
2815
|
-
_?: T;
|
|
2816
|
-
url?: string;
|
|
2817
|
-
method?: Method$3;
|
|
2818
|
-
params?: any;
|
|
2819
|
-
data?: any;
|
|
2820
|
-
transformResponse?: ResponseTransformer$3 | ResponseTransformer$3[];
|
|
2821
|
-
};
|
|
2822
|
-
type AmbassadorFactory$3<Request, Response> = (payload: Request) => ((context: RequestContext$3) => AmbassadorRequestOptions$3<Response>) & {
|
|
2823
|
-
__isAmbassador: boolean;
|
|
2824
|
-
};
|
|
2825
|
-
type AmbassadorFunctionDescriptor$3<Request = any, Response = any> = AmbassadorFactory$3<Request, Response>;
|
|
2826
|
-
type BuildAmbassadorFunction$3<T extends AmbassadorFunctionDescriptor$3> = T extends AmbassadorFunctionDescriptor$3<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
2827
|
-
|
|
2828
|
-
declare global {
|
|
2829
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2830
|
-
interface SymbolConstructor {
|
|
2831
|
-
readonly observable: symbol;
|
|
2832
|
-
}
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
declare const emptyObjectSymbol$3: unique symbol;
|
|
2836
|
-
|
|
2837
|
-
/**
|
|
2838
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
2839
|
-
|
|
2840
|
-
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)).
|
|
2841
|
-
|
|
2842
|
-
@example
|
|
2843
|
-
```
|
|
2844
|
-
import type {EmptyObject} from 'type-fest';
|
|
2845
|
-
|
|
2846
|
-
// The following illustrates the problem with `{}`.
|
|
2847
|
-
const foo1: {} = {}; // Pass
|
|
2848
|
-
const foo2: {} = []; // Pass
|
|
2849
|
-
const foo3: {} = 42; // Pass
|
|
2850
|
-
const foo4: {} = {a: 1}; // Pass
|
|
2851
|
-
|
|
2852
|
-
// With `EmptyObject` only the first case is valid.
|
|
2853
|
-
const bar1: EmptyObject = {}; // Pass
|
|
2854
|
-
const bar2: EmptyObject = 42; // Fail
|
|
2855
|
-
const bar3: EmptyObject = []; // Fail
|
|
2856
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
2857
|
-
```
|
|
2858
|
-
|
|
2859
|
-
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}.
|
|
2860
|
-
|
|
2861
|
-
@category Object
|
|
2862
|
-
*/
|
|
2863
|
-
type EmptyObject$3 = {[emptyObjectSymbol$3]?: never};
|
|
2864
|
-
|
|
2865
|
-
/**
|
|
2866
|
-
Returns a boolean for whether the two given types are equal.
|
|
2867
|
-
|
|
2868
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
2869
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
2870
|
-
|
|
2871
|
-
Use-cases:
|
|
2872
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
2873
|
-
|
|
2874
|
-
@example
|
|
2875
|
-
```
|
|
2876
|
-
import type {IsEqual} from 'type-fest';
|
|
2877
|
-
|
|
2878
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
2879
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
2880
|
-
type Includes<Value extends readonly any[], Item> =
|
|
2881
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
2882
|
-
? IsEqual<Value[0], Item> extends true
|
|
2883
|
-
? true
|
|
2884
|
-
: Includes<rest, Item>
|
|
2885
|
-
: false;
|
|
2886
|
-
```
|
|
2887
|
-
|
|
2888
|
-
@category Type Guard
|
|
2889
|
-
@category Utilities
|
|
2890
|
-
*/
|
|
2891
|
-
type IsEqual$3<A, B> =
|
|
2892
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
2893
|
-
(<G>() => G extends B ? 1 : 2)
|
|
2894
|
-
? true
|
|
2895
|
-
: false;
|
|
2896
|
-
|
|
2897
|
-
/**
|
|
2898
|
-
Filter out keys from an object.
|
|
2899
|
-
|
|
2900
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
2901
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
2902
|
-
Returns `Key` otherwise.
|
|
2903
|
-
|
|
2904
|
-
@example
|
|
2905
|
-
```
|
|
2906
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
2907
|
-
//=> never
|
|
2908
|
-
```
|
|
2909
|
-
|
|
2910
|
-
@example
|
|
2911
|
-
```
|
|
2912
|
-
type Filtered = Filter<'bar', string>;
|
|
2913
|
-
//=> never
|
|
2914
|
-
```
|
|
2915
|
-
|
|
2916
|
-
@example
|
|
2917
|
-
```
|
|
2918
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
2919
|
-
//=> 'bar'
|
|
2920
|
-
```
|
|
2921
|
-
|
|
2922
|
-
@see {Except}
|
|
2923
|
-
*/
|
|
2924
|
-
type Filter$3<KeyType, ExcludeType> = IsEqual$3<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
2925
|
-
|
|
2926
|
-
type ExceptOptions$3 = {
|
|
2927
|
-
/**
|
|
2928
|
-
Disallow assigning non-specified properties.
|
|
2929
|
-
|
|
2930
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
2931
|
-
|
|
2932
|
-
@default false
|
|
2933
|
-
*/
|
|
2934
|
-
requireExactProps?: boolean;
|
|
2935
|
-
};
|
|
2936
|
-
|
|
2937
|
-
/**
|
|
2938
|
-
Create a type from an object type without certain keys.
|
|
2939
|
-
|
|
2940
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
2941
|
-
|
|
2942
|
-
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.
|
|
2943
|
-
|
|
2944
|
-
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)).
|
|
2945
|
-
|
|
2946
|
-
@example
|
|
2947
|
-
```
|
|
2948
|
-
import type {Except} from 'type-fest';
|
|
2949
|
-
|
|
2950
|
-
type Foo = {
|
|
2951
|
-
a: number;
|
|
2952
|
-
b: string;
|
|
2953
|
-
};
|
|
2954
|
-
|
|
2955
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
2956
|
-
//=> {b: string}
|
|
2957
|
-
|
|
2958
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
2959
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
2960
|
-
|
|
2961
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
2962
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
2963
|
-
|
|
2964
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
2965
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
2966
|
-
```
|
|
2967
|
-
|
|
2968
|
-
@category Object
|
|
2969
|
-
*/
|
|
2970
|
-
type Except$3<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$3 = {requireExactProps: false}> = {
|
|
2971
|
-
[KeyType in keyof ObjectType as Filter$3<KeyType, KeysType>]: ObjectType[KeyType];
|
|
2972
|
-
} & (Options['requireExactProps'] extends true
|
|
2973
|
-
? Partial<Record<KeysType, never>>
|
|
2974
|
-
: {});
|
|
2975
|
-
|
|
2976
|
-
/**
|
|
2977
|
-
Returns a boolean for whether the given type is `never`.
|
|
2978
|
-
|
|
2979
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
2980
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
2981
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
2982
|
-
|
|
2983
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
2984
|
-
|
|
2985
|
-
@example
|
|
2986
|
-
```
|
|
2987
|
-
import type {IsNever, And} from 'type-fest';
|
|
2988
|
-
|
|
2989
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
2990
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
2991
|
-
And<
|
|
2992
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
2993
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
2994
|
-
>;
|
|
2995
|
-
|
|
2996
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
2997
|
-
AreStringsEqual<I, O> extends true
|
|
2998
|
-
? never
|
|
2999
|
-
: void;
|
|
3000
|
-
|
|
3001
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
3002
|
-
if (input === output) {
|
|
3003
|
-
process.exit(0);
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
endIfEqual('abc', 'abc');
|
|
3008
|
-
//=> never
|
|
3009
|
-
|
|
3010
|
-
endIfEqual('abc', '123');
|
|
3011
|
-
//=> void
|
|
3012
|
-
```
|
|
3013
|
-
|
|
3014
|
-
@category Type Guard
|
|
3015
|
-
@category Utilities
|
|
3016
|
-
*/
|
|
3017
|
-
type IsNever$3<T> = [T] extends [never] ? true : false;
|
|
3018
|
-
|
|
3019
|
-
/**
|
|
3020
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
3021
|
-
|
|
3022
|
-
@see {@link IsNever}
|
|
3023
|
-
|
|
3024
|
-
@example
|
|
3025
|
-
```
|
|
3026
|
-
import type {IfNever} from 'type-fest';
|
|
3027
|
-
|
|
3028
|
-
type ShouldBeTrue = IfNever<never>;
|
|
3029
|
-
//=> true
|
|
3030
|
-
|
|
3031
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
3032
|
-
//=> 'bar'
|
|
3033
|
-
```
|
|
3034
|
-
|
|
3035
|
-
@category Type Guard
|
|
3036
|
-
@category Utilities
|
|
3037
|
-
*/
|
|
3038
|
-
type IfNever$3<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
3039
|
-
IsNever$3<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
3040
|
-
);
|
|
3041
|
-
|
|
3042
|
-
/**
|
|
3043
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
3044
|
-
|
|
3045
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
3046
|
-
|
|
3047
|
-
@example
|
|
3048
|
-
```
|
|
3049
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
3050
|
-
|
|
3051
|
-
interface Example {
|
|
3052
|
-
a: string;
|
|
3053
|
-
b: string | number;
|
|
3054
|
-
c?: string;
|
|
3055
|
-
d: {};
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
3059
|
-
//=> 'a'
|
|
3060
|
-
```
|
|
3061
|
-
|
|
3062
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
3063
|
-
|
|
3064
|
-
@example
|
|
3065
|
-
```
|
|
3066
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
3067
|
-
|
|
3068
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
3069
|
-
//=> 'a' | 'c'
|
|
3070
|
-
```
|
|
3071
|
-
|
|
3072
|
-
@category Object
|
|
3073
|
-
*/
|
|
3074
|
-
type ConditionalKeys$3<Base, Condition> =
|
|
3075
|
-
{
|
|
3076
|
-
// Map through all the keys of the given base type.
|
|
3077
|
-
[Key in keyof Base]-?:
|
|
3078
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
3079
|
-
Base[Key] extends Condition
|
|
3080
|
-
// Retain this key
|
|
3081
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
3082
|
-
? IfNever$3<Base[Key], IfNever$3<Condition, Key, never>, Key>
|
|
3083
|
-
// Discard this key since the condition fails.
|
|
3084
|
-
: never;
|
|
3085
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
3086
|
-
}[keyof Base];
|
|
3087
|
-
|
|
3088
|
-
/**
|
|
3089
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
3090
|
-
|
|
3091
|
-
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.
|
|
3092
|
-
|
|
3093
|
-
@example
|
|
3094
|
-
```
|
|
3095
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
3096
|
-
|
|
3097
|
-
class Awesome {
|
|
3098
|
-
name: string;
|
|
3099
|
-
successes: number;
|
|
3100
|
-
failures: bigint;
|
|
3101
|
-
|
|
3102
|
-
run() {}
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
3106
|
-
//=> {run: () => void}
|
|
3107
|
-
```
|
|
3108
|
-
|
|
3109
|
-
@example
|
|
3110
|
-
```
|
|
3111
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
3112
|
-
|
|
3113
|
-
interface Example {
|
|
3114
|
-
a: string;
|
|
3115
|
-
b: string | number;
|
|
3116
|
-
c: () => void;
|
|
3117
|
-
d: {};
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
3121
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
3122
|
-
```
|
|
3123
|
-
|
|
3124
|
-
@category Object
|
|
3125
|
-
*/
|
|
3126
|
-
type ConditionalExcept$3<Base, Condition> = Except$3<
|
|
3127
|
-
Base,
|
|
3128
|
-
ConditionalKeys$3<Base, Condition>
|
|
3129
|
-
>;
|
|
3130
|
-
|
|
3131
|
-
/**
|
|
3132
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
3133
|
-
* can either be a REST module or a host module.
|
|
3134
|
-
* This type is recursive, so it can describe nested modules.
|
|
3135
|
-
*/
|
|
3136
|
-
type Descriptors$3 = RESTFunctionDescriptor$3 | AmbassadorFunctionDescriptor$3 | HostModule$3<any, any> | EventDefinition$3<any> | ServicePluginDefinition$3<any> | {
|
|
3137
|
-
[key: string]: Descriptors$3 | PublicMetadata$3 | any;
|
|
3138
|
-
};
|
|
3139
|
-
/**
|
|
3140
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
3141
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
3142
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
3143
|
-
* do not match the given host (as they will not work with the given host).
|
|
3144
|
-
*/
|
|
3145
|
-
type BuildDescriptors$3<T extends Descriptors$3, H extends Host$3<any> | undefined, Depth extends number = 5> = {
|
|
3146
|
-
done: T;
|
|
3147
|
-
recurse: T extends {
|
|
3148
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$3;
|
|
3149
|
-
} ? never : T extends AmbassadorFunctionDescriptor$3 ? BuildAmbassadorFunction$3<T> : T extends RESTFunctionDescriptor$3 ? BuildRESTFunction$3<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition$3<any> ? BuildServicePluginDefinition$3<T> : T extends HostModule$3<any, any> ? HostModuleAPI$3<T> : ConditionalExcept$3<{
|
|
3150
|
-
[Key in keyof T]: T[Key] extends Descriptors$3 ? BuildDescriptors$3<T[Key], H, [
|
|
3151
|
-
-1,
|
|
3152
|
-
0,
|
|
3153
|
-
1,
|
|
3154
|
-
2,
|
|
3155
|
-
3,
|
|
3156
|
-
4,
|
|
3157
|
-
5
|
|
3158
|
-
][Depth]> : never;
|
|
3159
|
-
}, EmptyObject$3>;
|
|
3160
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
3161
|
-
type PublicMetadata$3 = {
|
|
3162
|
-
PACKAGE_NAME?: string;
|
|
3163
|
-
};
|
|
3164
|
-
|
|
3165
|
-
declare global {
|
|
3166
|
-
interface ContextualClient {
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3169
|
-
/**
|
|
3170
|
-
* A type used to create concerete types from SDK descriptors in
|
|
3171
|
-
* case a contextual client is available.
|
|
3172
|
-
*/
|
|
3173
|
-
type MaybeContext$3<T extends Descriptors$3> = globalThis.ContextualClient extends {
|
|
3174
|
-
host: Host$3;
|
|
3175
|
-
} ? BuildDescriptors$3<T, globalThis.ContextualClient['host']> : T;
|
|
3176
|
-
|
|
3177
|
-
interface EventsView {
|
|
3178
|
-
/**
|
|
3179
|
-
* The view end date.
|
|
3180
|
-
* @readonly
|
|
3181
|
-
*/
|
|
3182
|
-
endDate?: Date;
|
|
3183
|
-
/**
|
|
3184
|
-
* The number of days the view lasts into the future.
|
|
3185
|
-
* @readonly
|
|
3186
|
-
*/
|
|
3187
|
-
futureDurationInDays?: number | null;
|
|
3188
|
-
}
|
|
3189
|
-
interface EventsViewProjectionUpdated extends EventsViewProjectionUpdatedTypeOneOf {
|
|
3190
|
-
/** Event has been added or updated within the view. */
|
|
3191
|
-
eventAddedOrUpdated?: EventAddedOrUpdated;
|
|
3192
|
-
/** Event has been removed from the view. */
|
|
3193
|
-
eventRemoved?: EventRemoved;
|
|
3194
|
-
/** ID of the Wix app owning the event */
|
|
3195
|
-
appId?: string | null;
|
|
2711
|
+
interface EventsViewProjectionUpdated extends EventsViewProjectionUpdatedTypeOneOf {
|
|
2712
|
+
/** Event has been added or updated within the view. */
|
|
2713
|
+
eventAddedOrUpdated?: EventAddedOrUpdated;
|
|
2714
|
+
/** Event has been removed from the view. */
|
|
2715
|
+
eventRemoved?: EventRemoved;
|
|
2716
|
+
/** ID of the Wix app owning the event */
|
|
2717
|
+
appId?: string | null;
|
|
3196
2718
|
}
|
|
3197
2719
|
/** @oneof */
|
|
3198
2720
|
interface EventsViewProjectionUpdatedTypeOneOf {
|
|
@@ -3839,7 +3361,7 @@ interface EventsViewExtendedEnvelope {
|
|
|
3839
3361
|
metadata: EventMetadata$3;
|
|
3840
3362
|
}
|
|
3841
3363
|
|
|
3842
|
-
declare function getEventsView$1(httpClient: HttpClient
|
|
3364
|
+
declare function getEventsView$1(httpClient: HttpClient): GetEventsViewSignature;
|
|
3843
3365
|
interface GetEventsViewSignature {
|
|
3844
3366
|
/**
|
|
3845
3367
|
* Retrieves the events view information.
|
|
@@ -3847,12 +3369,12 @@ interface GetEventsViewSignature {
|
|
|
3847
3369
|
*/
|
|
3848
3370
|
(): Promise<GetEventsViewResponse>;
|
|
3849
3371
|
}
|
|
3850
|
-
declare const onEventsViewProjectionUpdated$1: EventDefinition
|
|
3851
|
-
declare const onEventsViewExtended$1: EventDefinition
|
|
3372
|
+
declare const onEventsViewProjectionUpdated$1: EventDefinition<EventsViewProjectionUpdatedEnvelope, "wix.calendar.v3.events_view_projection_updated">;
|
|
3373
|
+
declare const onEventsViewExtended$1: EventDefinition<EventsViewExtendedEnvelope, "wix.calendar.v3.events_view_extended">;
|
|
3852
3374
|
|
|
3853
|
-
declare function createEventModule$3<T extends EventDefinition
|
|
3375
|
+
declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
3854
3376
|
|
|
3855
|
-
declare const getEventsView: MaybeContext
|
|
3377
|
+
declare const getEventsView: MaybeContext<BuildRESTFunction<typeof getEventsView$1> & typeof getEventsView$1>;
|
|
3856
3378
|
|
|
3857
3379
|
type _publicOnEventsViewProjectionUpdatedType = typeof onEventsViewProjectionUpdated$1;
|
|
3858
3380
|
/** */
|
|
@@ -3899,537 +3421,59 @@ declare namespace context$3 {
|
|
|
3899
3421
|
export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$3 as BaseEventMetadata, type CommonIdentificationData$1 as CommonIdentificationData, type CommonIdentificationDataIdOneOf$1 as CommonIdentificationDataIdOneOf, type ConferencingDetails$1 as ConferencingDetails, context$3_Day as Day, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$3 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type context$3_Event as Event, type context$3_EventAddedOrUpdated as EventAddedOrUpdated, type EventMetadata$3 as EventMetadata, type context$3_EventRemoved as EventRemoved, type context$3_EventsView as EventsView, type context$3_EventsViewExtended as EventsViewExtended, type context$3_EventsViewExtendedEnvelope as EventsViewExtendedEnvelope, type context$3_EventsViewProjectionUpdated as EventsViewProjectionUpdated, type context$3_EventsViewProjectionUpdatedEnvelope as EventsViewProjectionUpdatedEnvelope, type context$3_EventsViewProjectionUpdatedTypeOneOf as EventsViewProjectionUpdatedTypeOneOf, type context$3_ExtendEventsViewRequest as ExtendEventsViewRequest, type context$3_ExtendEventsViewResponse as ExtendEventsViewResponse, type ExtendedFields$2 as ExtendedFields, context$3_Field as Field, context$3_Frequency as Frequency, type context$3_GetEventsViewRequest as GetEventsViewRequest, type context$3_GetEventsViewResponse as GetEventsViewResponse, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, IdentityType$1 as IdentityType, type Location$1 as Location, LocationType$1 as LocationType, type MessageEnvelope$3 as MessageEnvelope, type Participant$1 as Participant, type context$3_Participants as Participants, context$3_ParticipantsStatus as ParticipantsStatus, type Permission$1 as Permission, type context$3_RecurrenceRule as RecurrenceRule, context$3_RecurrenceType as RecurrenceType, type context$3_Resource as Resource, type RestoreInfo$3 as RestoreInfo, Role$1 as Role, Status$3 as Status, context$3_Transparency as Transparency, Type$1 as Type, WebhookIdentityType$3 as WebhookIdentityType, type ZonedDate$1 as ZonedDate, type context$3__publicOnEventsViewExtendedType as _publicOnEventsViewExtendedType, type context$3__publicOnEventsViewProjectionUpdatedType as _publicOnEventsViewProjectionUpdatedType, context$3_getEventsView as getEventsView, context$3_onEventsViewExtended as onEventsViewExtended, context$3_onEventsViewProjectionUpdated as onEventsViewProjectionUpdated, onEventsViewExtended$1 as publicOnEventsViewExtended, onEventsViewProjectionUpdated$1 as publicOnEventsViewProjectionUpdated };
|
|
3900
3422
|
}
|
|
3901
3423
|
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
type Host$2<Environment = unknown> = {
|
|
3908
|
-
channel: {
|
|
3909
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
3910
|
-
disconnect: () => void;
|
|
3911
|
-
} | Promise<{
|
|
3912
|
-
disconnect: () => void;
|
|
3913
|
-
}>;
|
|
3914
|
-
};
|
|
3915
|
-
environment?: Environment;
|
|
3424
|
+
interface Participation extends ParticipationParticipatedItemOneOf {
|
|
3425
|
+
/** The ID of the schedule that the participant is participating in. */
|
|
3426
|
+
scheduleId?: string | null;
|
|
3427
|
+
/** The ID of the specific event that the participant is participating in. */
|
|
3428
|
+
eventId?: string | null;
|
|
3916
3429
|
/**
|
|
3917
|
-
*
|
|
3430
|
+
* The participation ID.
|
|
3431
|
+
* @readonly
|
|
3918
3432
|
*/
|
|
3919
|
-
|
|
3433
|
+
_id?: string | null;
|
|
3434
|
+
/** Optional external ID. */
|
|
3435
|
+
externalId?: string | null;
|
|
3436
|
+
/** The participant info. */
|
|
3437
|
+
participant?: Participant;
|
|
3438
|
+
/** Party size of the individual or group. */
|
|
3439
|
+
partySize?: number | null;
|
|
3920
3440
|
/**
|
|
3921
|
-
*
|
|
3441
|
+
* Participation status. Required.
|
|
3442
|
+
* One of:
|
|
3443
|
+
* - `"CONFIRMED"` Participation is confirmed. Default value.
|
|
3444
|
+
* - `"PENDING_CONFIRMATION"` Participation is pending confirmation.
|
|
3922
3445
|
*/
|
|
3923
|
-
|
|
3446
|
+
status?: Status$2;
|
|
3924
3447
|
/**
|
|
3925
|
-
*
|
|
3926
|
-
*
|
|
3448
|
+
* Optional ID of the Wix app owning the participation, as derived from the schedule.
|
|
3449
|
+
* @readonly
|
|
3927
3450
|
*/
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
fetchWithAuth: typeof fetch;
|
|
3948
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3949
|
-
getActiveToken?: () => string | undefined;
|
|
3451
|
+
appId?: string | null;
|
|
3452
|
+
/**
|
|
3453
|
+
* The participation revision number, which incremented on updates.
|
|
3454
|
+
* The current revision should be provided on updates to prevent conflicting changes.
|
|
3455
|
+
* @readonly
|
|
3456
|
+
*/
|
|
3457
|
+
revision?: string | null;
|
|
3458
|
+
/**
|
|
3459
|
+
* Date the participation was created.
|
|
3460
|
+
* @readonly
|
|
3461
|
+
*/
|
|
3462
|
+
_createdDate?: Date;
|
|
3463
|
+
/**
|
|
3464
|
+
* Date the participation was last updated.
|
|
3465
|
+
* @readonly
|
|
3466
|
+
*/
|
|
3467
|
+
_updatedDate?: Date;
|
|
3468
|
+
/** Extensions enabling applications or users to save custom data. */
|
|
3469
|
+
extendedFields?: ExtendedFields$1;
|
|
3950
3470
|
}
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
request?: any;
|
|
3958
|
-
};
|
|
3959
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
3960
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3961
|
-
url: string;
|
|
3962
|
-
data?: Data;
|
|
3963
|
-
params?: URLSearchParams;
|
|
3964
|
-
} & APIMetadata$2;
|
|
3965
|
-
type APIMetadata$2 = {
|
|
3966
|
-
methodFqn?: string;
|
|
3967
|
-
entityFqdn?: string;
|
|
3968
|
-
packageName?: string;
|
|
3969
|
-
};
|
|
3970
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
3971
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3972
|
-
__type: 'event-definition';
|
|
3973
|
-
type: Type;
|
|
3974
|
-
isDomainEvent?: boolean;
|
|
3975
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3976
|
-
__payload: Payload;
|
|
3977
|
-
};
|
|
3978
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3979
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
3980
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
3981
|
-
|
|
3982
|
-
type ServicePluginMethodInput$2 = {
|
|
3983
|
-
request: any;
|
|
3984
|
-
metadata: any;
|
|
3985
|
-
};
|
|
3986
|
-
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
3987
|
-
type ServicePluginMethodMetadata$2 = {
|
|
3988
|
-
name: string;
|
|
3989
|
-
primaryHttpMappingPath: string;
|
|
3990
|
-
transformations: {
|
|
3991
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
3992
|
-
toREST: (...args: unknown[]) => unknown;
|
|
3993
|
-
};
|
|
3994
|
-
};
|
|
3995
|
-
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
3996
|
-
__type: 'service-plugin-definition';
|
|
3997
|
-
componentType: string;
|
|
3998
|
-
methods: ServicePluginMethodMetadata$2[];
|
|
3999
|
-
__contract: Contract;
|
|
4000
|
-
};
|
|
4001
|
-
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
4002
|
-
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
4003
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$2 = "wix_spi_error";
|
|
4004
|
-
|
|
4005
|
-
type RequestContext$2 = {
|
|
4006
|
-
isSSR: boolean;
|
|
4007
|
-
host: string;
|
|
4008
|
-
protocol?: string;
|
|
4009
|
-
};
|
|
4010
|
-
type ResponseTransformer$2 = (data: any, headers?: any) => any;
|
|
4011
|
-
/**
|
|
4012
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
4013
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
4014
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
4015
|
-
*/
|
|
4016
|
-
type Method$2 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
4017
|
-
type AmbassadorRequestOptions$2<T = any> = {
|
|
4018
|
-
_?: T;
|
|
4019
|
-
url?: string;
|
|
4020
|
-
method?: Method$2;
|
|
4021
|
-
params?: any;
|
|
4022
|
-
data?: any;
|
|
4023
|
-
transformResponse?: ResponseTransformer$2 | ResponseTransformer$2[];
|
|
4024
|
-
};
|
|
4025
|
-
type AmbassadorFactory$2<Request, Response> = (payload: Request) => ((context: RequestContext$2) => AmbassadorRequestOptions$2<Response>) & {
|
|
4026
|
-
__isAmbassador: boolean;
|
|
4027
|
-
};
|
|
4028
|
-
type AmbassadorFunctionDescriptor$2<Request = any, Response = any> = AmbassadorFactory$2<Request, Response>;
|
|
4029
|
-
type BuildAmbassadorFunction$2<T extends AmbassadorFunctionDescriptor$2> = T extends AmbassadorFunctionDescriptor$2<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
4030
|
-
|
|
4031
|
-
declare global {
|
|
4032
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4033
|
-
interface SymbolConstructor {
|
|
4034
|
-
readonly observable: symbol;
|
|
4035
|
-
}
|
|
4036
|
-
}
|
|
4037
|
-
|
|
4038
|
-
declare const emptyObjectSymbol$2: unique symbol;
|
|
4039
|
-
|
|
4040
|
-
/**
|
|
4041
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
4042
|
-
|
|
4043
|
-
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)).
|
|
4044
|
-
|
|
4045
|
-
@example
|
|
4046
|
-
```
|
|
4047
|
-
import type {EmptyObject} from 'type-fest';
|
|
4048
|
-
|
|
4049
|
-
// The following illustrates the problem with `{}`.
|
|
4050
|
-
const foo1: {} = {}; // Pass
|
|
4051
|
-
const foo2: {} = []; // Pass
|
|
4052
|
-
const foo3: {} = 42; // Pass
|
|
4053
|
-
const foo4: {} = {a: 1}; // Pass
|
|
4054
|
-
|
|
4055
|
-
// With `EmptyObject` only the first case is valid.
|
|
4056
|
-
const bar1: EmptyObject = {}; // Pass
|
|
4057
|
-
const bar2: EmptyObject = 42; // Fail
|
|
4058
|
-
const bar3: EmptyObject = []; // Fail
|
|
4059
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
4060
|
-
```
|
|
4061
|
-
|
|
4062
|
-
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}.
|
|
4063
|
-
|
|
4064
|
-
@category Object
|
|
4065
|
-
*/
|
|
4066
|
-
type EmptyObject$2 = {[emptyObjectSymbol$2]?: never};
|
|
4067
|
-
|
|
4068
|
-
/**
|
|
4069
|
-
Returns a boolean for whether the two given types are equal.
|
|
4070
|
-
|
|
4071
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
4072
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
4073
|
-
|
|
4074
|
-
Use-cases:
|
|
4075
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
4076
|
-
|
|
4077
|
-
@example
|
|
4078
|
-
```
|
|
4079
|
-
import type {IsEqual} from 'type-fest';
|
|
4080
|
-
|
|
4081
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
4082
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
4083
|
-
type Includes<Value extends readonly any[], Item> =
|
|
4084
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
4085
|
-
? IsEqual<Value[0], Item> extends true
|
|
4086
|
-
? true
|
|
4087
|
-
: Includes<rest, Item>
|
|
4088
|
-
: false;
|
|
4089
|
-
```
|
|
4090
|
-
|
|
4091
|
-
@category Type Guard
|
|
4092
|
-
@category Utilities
|
|
4093
|
-
*/
|
|
4094
|
-
type IsEqual$2<A, B> =
|
|
4095
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
4096
|
-
(<G>() => G extends B ? 1 : 2)
|
|
4097
|
-
? true
|
|
4098
|
-
: false;
|
|
4099
|
-
|
|
4100
|
-
/**
|
|
4101
|
-
Filter out keys from an object.
|
|
4102
|
-
|
|
4103
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
4104
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
4105
|
-
Returns `Key` otherwise.
|
|
4106
|
-
|
|
4107
|
-
@example
|
|
4108
|
-
```
|
|
4109
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
4110
|
-
//=> never
|
|
4111
|
-
```
|
|
4112
|
-
|
|
4113
|
-
@example
|
|
4114
|
-
```
|
|
4115
|
-
type Filtered = Filter<'bar', string>;
|
|
4116
|
-
//=> never
|
|
4117
|
-
```
|
|
4118
|
-
|
|
4119
|
-
@example
|
|
4120
|
-
```
|
|
4121
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
4122
|
-
//=> 'bar'
|
|
4123
|
-
```
|
|
4124
|
-
|
|
4125
|
-
@see {Except}
|
|
4126
|
-
*/
|
|
4127
|
-
type Filter$2<KeyType, ExcludeType> = IsEqual$2<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
4128
|
-
|
|
4129
|
-
type ExceptOptions$2 = {
|
|
4130
|
-
/**
|
|
4131
|
-
Disallow assigning non-specified properties.
|
|
4132
|
-
|
|
4133
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
4134
|
-
|
|
4135
|
-
@default false
|
|
4136
|
-
*/
|
|
4137
|
-
requireExactProps?: boolean;
|
|
4138
|
-
};
|
|
4139
|
-
|
|
4140
|
-
/**
|
|
4141
|
-
Create a type from an object type without certain keys.
|
|
4142
|
-
|
|
4143
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
4144
|
-
|
|
4145
|
-
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.
|
|
4146
|
-
|
|
4147
|
-
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)).
|
|
4148
|
-
|
|
4149
|
-
@example
|
|
4150
|
-
```
|
|
4151
|
-
import type {Except} from 'type-fest';
|
|
4152
|
-
|
|
4153
|
-
type Foo = {
|
|
4154
|
-
a: number;
|
|
4155
|
-
b: string;
|
|
4156
|
-
};
|
|
4157
|
-
|
|
4158
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
4159
|
-
//=> {b: string}
|
|
4160
|
-
|
|
4161
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
4162
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
4163
|
-
|
|
4164
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
4165
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
4166
|
-
|
|
4167
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
4168
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
4169
|
-
```
|
|
4170
|
-
|
|
4171
|
-
@category Object
|
|
4172
|
-
*/
|
|
4173
|
-
type Except$2<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$2 = {requireExactProps: false}> = {
|
|
4174
|
-
[KeyType in keyof ObjectType as Filter$2<KeyType, KeysType>]: ObjectType[KeyType];
|
|
4175
|
-
} & (Options['requireExactProps'] extends true
|
|
4176
|
-
? Partial<Record<KeysType, never>>
|
|
4177
|
-
: {});
|
|
4178
|
-
|
|
4179
|
-
/**
|
|
4180
|
-
Returns a boolean for whether the given type is `never`.
|
|
4181
|
-
|
|
4182
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
4183
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
4184
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
4185
|
-
|
|
4186
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
4187
|
-
|
|
4188
|
-
@example
|
|
4189
|
-
```
|
|
4190
|
-
import type {IsNever, And} from 'type-fest';
|
|
4191
|
-
|
|
4192
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
4193
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
4194
|
-
And<
|
|
4195
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
4196
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
4197
|
-
>;
|
|
4198
|
-
|
|
4199
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
4200
|
-
AreStringsEqual<I, O> extends true
|
|
4201
|
-
? never
|
|
4202
|
-
: void;
|
|
4203
|
-
|
|
4204
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
4205
|
-
if (input === output) {
|
|
4206
|
-
process.exit(0);
|
|
4207
|
-
}
|
|
4208
|
-
}
|
|
4209
|
-
|
|
4210
|
-
endIfEqual('abc', 'abc');
|
|
4211
|
-
//=> never
|
|
4212
|
-
|
|
4213
|
-
endIfEqual('abc', '123');
|
|
4214
|
-
//=> void
|
|
4215
|
-
```
|
|
4216
|
-
|
|
4217
|
-
@category Type Guard
|
|
4218
|
-
@category Utilities
|
|
4219
|
-
*/
|
|
4220
|
-
type IsNever$2<T> = [T] extends [never] ? true : false;
|
|
4221
|
-
|
|
4222
|
-
/**
|
|
4223
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
4224
|
-
|
|
4225
|
-
@see {@link IsNever}
|
|
4226
|
-
|
|
4227
|
-
@example
|
|
4228
|
-
```
|
|
4229
|
-
import type {IfNever} from 'type-fest';
|
|
4230
|
-
|
|
4231
|
-
type ShouldBeTrue = IfNever<never>;
|
|
4232
|
-
//=> true
|
|
4233
|
-
|
|
4234
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
4235
|
-
//=> 'bar'
|
|
4236
|
-
```
|
|
4237
|
-
|
|
4238
|
-
@category Type Guard
|
|
4239
|
-
@category Utilities
|
|
4240
|
-
*/
|
|
4241
|
-
type IfNever$2<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
4242
|
-
IsNever$2<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
4243
|
-
);
|
|
4244
|
-
|
|
4245
|
-
/**
|
|
4246
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
4247
|
-
|
|
4248
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
4249
|
-
|
|
4250
|
-
@example
|
|
4251
|
-
```
|
|
4252
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
4253
|
-
|
|
4254
|
-
interface Example {
|
|
4255
|
-
a: string;
|
|
4256
|
-
b: string | number;
|
|
4257
|
-
c?: string;
|
|
4258
|
-
d: {};
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
4262
|
-
//=> 'a'
|
|
4263
|
-
```
|
|
4264
|
-
|
|
4265
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
4266
|
-
|
|
4267
|
-
@example
|
|
4268
|
-
```
|
|
4269
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
4270
|
-
|
|
4271
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
4272
|
-
//=> 'a' | 'c'
|
|
4273
|
-
```
|
|
4274
|
-
|
|
4275
|
-
@category Object
|
|
4276
|
-
*/
|
|
4277
|
-
type ConditionalKeys$2<Base, Condition> =
|
|
4278
|
-
{
|
|
4279
|
-
// Map through all the keys of the given base type.
|
|
4280
|
-
[Key in keyof Base]-?:
|
|
4281
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
4282
|
-
Base[Key] extends Condition
|
|
4283
|
-
// Retain this key
|
|
4284
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
4285
|
-
? IfNever$2<Base[Key], IfNever$2<Condition, Key, never>, Key>
|
|
4286
|
-
// Discard this key since the condition fails.
|
|
4287
|
-
: never;
|
|
4288
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
4289
|
-
}[keyof Base];
|
|
4290
|
-
|
|
4291
|
-
/**
|
|
4292
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
4293
|
-
|
|
4294
|
-
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.
|
|
4295
|
-
|
|
4296
|
-
@example
|
|
4297
|
-
```
|
|
4298
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
4299
|
-
|
|
4300
|
-
class Awesome {
|
|
4301
|
-
name: string;
|
|
4302
|
-
successes: number;
|
|
4303
|
-
failures: bigint;
|
|
4304
|
-
|
|
4305
|
-
run() {}
|
|
4306
|
-
}
|
|
4307
|
-
|
|
4308
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
4309
|
-
//=> {run: () => void}
|
|
4310
|
-
```
|
|
4311
|
-
|
|
4312
|
-
@example
|
|
4313
|
-
```
|
|
4314
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
4315
|
-
|
|
4316
|
-
interface Example {
|
|
4317
|
-
a: string;
|
|
4318
|
-
b: string | number;
|
|
4319
|
-
c: () => void;
|
|
4320
|
-
d: {};
|
|
4321
|
-
}
|
|
4322
|
-
|
|
4323
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
4324
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
4325
|
-
```
|
|
4326
|
-
|
|
4327
|
-
@category Object
|
|
4328
|
-
*/
|
|
4329
|
-
type ConditionalExcept$2<Base, Condition> = Except$2<
|
|
4330
|
-
Base,
|
|
4331
|
-
ConditionalKeys$2<Base, Condition>
|
|
4332
|
-
>;
|
|
4333
|
-
|
|
4334
|
-
/**
|
|
4335
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
4336
|
-
* can either be a REST module or a host module.
|
|
4337
|
-
* This type is recursive, so it can describe nested modules.
|
|
4338
|
-
*/
|
|
4339
|
-
type Descriptors$2 = RESTFunctionDescriptor$2 | AmbassadorFunctionDescriptor$2 | HostModule$2<any, any> | EventDefinition$2<any> | ServicePluginDefinition$2<any> | {
|
|
4340
|
-
[key: string]: Descriptors$2 | PublicMetadata$2 | any;
|
|
4341
|
-
};
|
|
4342
|
-
/**
|
|
4343
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
4344
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
4345
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
4346
|
-
* do not match the given host (as they will not work with the given host).
|
|
4347
|
-
*/
|
|
4348
|
-
type BuildDescriptors$2<T extends Descriptors$2, H extends Host$2<any> | undefined, Depth extends number = 5> = {
|
|
4349
|
-
done: T;
|
|
4350
|
-
recurse: T extends {
|
|
4351
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$2;
|
|
4352
|
-
} ? never : T extends AmbassadorFunctionDescriptor$2 ? BuildAmbassadorFunction$2<T> : T extends RESTFunctionDescriptor$2 ? BuildRESTFunction$2<T> : T extends EventDefinition$2<any> ? BuildEventDefinition$2<T> : T extends ServicePluginDefinition$2<any> ? BuildServicePluginDefinition$2<T> : T extends HostModule$2<any, any> ? HostModuleAPI$2<T> : ConditionalExcept$2<{
|
|
4353
|
-
[Key in keyof T]: T[Key] extends Descriptors$2 ? BuildDescriptors$2<T[Key], H, [
|
|
4354
|
-
-1,
|
|
4355
|
-
0,
|
|
4356
|
-
1,
|
|
4357
|
-
2,
|
|
4358
|
-
3,
|
|
4359
|
-
4,
|
|
4360
|
-
5
|
|
4361
|
-
][Depth]> : never;
|
|
4362
|
-
}, EmptyObject$2>;
|
|
4363
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
4364
|
-
type PublicMetadata$2 = {
|
|
4365
|
-
PACKAGE_NAME?: string;
|
|
4366
|
-
};
|
|
4367
|
-
|
|
4368
|
-
declare global {
|
|
4369
|
-
interface ContextualClient {
|
|
4370
|
-
}
|
|
4371
|
-
}
|
|
4372
|
-
/**
|
|
4373
|
-
* A type used to create concerete types from SDK descriptors in
|
|
4374
|
-
* case a contextual client is available.
|
|
4375
|
-
*/
|
|
4376
|
-
type MaybeContext$2<T extends Descriptors$2> = globalThis.ContextualClient extends {
|
|
4377
|
-
host: Host$2;
|
|
4378
|
-
} ? BuildDescriptors$2<T, globalThis.ContextualClient['host']> : T;
|
|
4379
|
-
|
|
4380
|
-
interface Participation extends ParticipationParticipatedItemOneOf {
|
|
4381
|
-
/** The ID of the schedule that the participant is participating in. */
|
|
4382
|
-
scheduleId?: string | null;
|
|
4383
|
-
/** The ID of the specific event that the participant is participating in. */
|
|
4384
|
-
eventId?: string | null;
|
|
4385
|
-
/**
|
|
4386
|
-
* The participation ID.
|
|
4387
|
-
* @readonly
|
|
4388
|
-
*/
|
|
4389
|
-
_id?: string | null;
|
|
4390
|
-
/** Optional external ID. */
|
|
4391
|
-
externalId?: string | null;
|
|
4392
|
-
/** The participant info. */
|
|
4393
|
-
participant?: Participant;
|
|
4394
|
-
/** Party size of the individual or group. */
|
|
4395
|
-
partySize?: number | null;
|
|
4396
|
-
/**
|
|
4397
|
-
* Participation status. Required.
|
|
4398
|
-
* One of:
|
|
4399
|
-
* - `"CONFIRMED"` Participation is confirmed. Default value.
|
|
4400
|
-
* - `"PENDING_CONFIRMATION"` Participation is pending confirmation.
|
|
4401
|
-
*/
|
|
4402
|
-
status?: Status$2;
|
|
4403
|
-
/**
|
|
4404
|
-
* Optional ID of the Wix app owning the participation, as derived from the schedule.
|
|
4405
|
-
* @readonly
|
|
4406
|
-
*/
|
|
4407
|
-
appId?: string | null;
|
|
4408
|
-
/**
|
|
4409
|
-
* The participation revision number, which incremented on updates.
|
|
4410
|
-
* The current revision should be provided on updates to prevent conflicting changes.
|
|
4411
|
-
* @readonly
|
|
4412
|
-
*/
|
|
4413
|
-
revision?: string | null;
|
|
4414
|
-
/**
|
|
4415
|
-
* Date the participation was created.
|
|
4416
|
-
* @readonly
|
|
4417
|
-
*/
|
|
4418
|
-
_createdDate?: Date;
|
|
4419
|
-
/**
|
|
4420
|
-
* Date the participation was last updated.
|
|
4421
|
-
* @readonly
|
|
4422
|
-
*/
|
|
4423
|
-
_updatedDate?: Date;
|
|
4424
|
-
/** Extensions enabling applications or users to save custom data. */
|
|
4425
|
-
extendedFields?: ExtendedFields$1;
|
|
4426
|
-
}
|
|
4427
|
-
/** @oneof */
|
|
4428
|
-
interface ParticipationParticipatedItemOneOf {
|
|
4429
|
-
/** The ID of the schedule that the participant is participating in. */
|
|
4430
|
-
scheduleId?: string | null;
|
|
4431
|
-
/** The ID of the specific event that the participant is participating in. */
|
|
4432
|
-
eventId?: string | null;
|
|
3471
|
+
/** @oneof */
|
|
3472
|
+
interface ParticipationParticipatedItemOneOf {
|
|
3473
|
+
/** The ID of the schedule that the participant is participating in. */
|
|
3474
|
+
scheduleId?: string | null;
|
|
3475
|
+
/** The ID of the specific event that the participant is participating in. */
|
|
3476
|
+
eventId?: string | null;
|
|
4433
3477
|
}
|
|
4434
3478
|
interface Participant {
|
|
4435
3479
|
/** The participant's name. */
|
|
@@ -4835,7 +3879,7 @@ interface UpdateParticipation {
|
|
|
4835
3879
|
extendedFields?: ExtendedFields$1;
|
|
4836
3880
|
}
|
|
4837
3881
|
|
|
4838
|
-
declare function getParticipation$1(httpClient: HttpClient
|
|
3882
|
+
declare function getParticipation$1(httpClient: HttpClient): GetParticipationSignature;
|
|
4839
3883
|
interface GetParticipationSignature {
|
|
4840
3884
|
/**
|
|
4841
3885
|
* Retrieves a participation by ID.
|
|
@@ -4844,7 +3888,7 @@ interface GetParticipationSignature {
|
|
|
4844
3888
|
*/
|
|
4845
3889
|
(participationId: string | null): Promise<Participation & ParticipationNonNullableFields>;
|
|
4846
3890
|
}
|
|
4847
|
-
declare function queryParticipations$1(httpClient: HttpClient
|
|
3891
|
+
declare function queryParticipations$1(httpClient: HttpClient): QueryParticipationsSignature;
|
|
4848
3892
|
interface QueryParticipationsSignature {
|
|
4849
3893
|
/**
|
|
4850
3894
|
* Retrieves a list of participations, given the provided filters and paging.
|
|
@@ -4853,7 +3897,7 @@ interface QueryParticipationsSignature {
|
|
|
4853
3897
|
*/
|
|
4854
3898
|
(): ParticipationsQueryBuilder;
|
|
4855
3899
|
}
|
|
4856
|
-
declare function createParticipation$1(httpClient: HttpClient
|
|
3900
|
+
declare function createParticipation$1(httpClient: HttpClient): CreateParticipationSignature;
|
|
4857
3901
|
interface CreateParticipationSignature {
|
|
4858
3902
|
/**
|
|
4859
3903
|
* Creates a schedule or event participation.
|
|
@@ -4862,7 +3906,7 @@ interface CreateParticipationSignature {
|
|
|
4862
3906
|
*/
|
|
4863
3907
|
(participation: Participation, options?: CreateParticipationOptions | undefined): Promise<Participation & ParticipationNonNullableFields>;
|
|
4864
3908
|
}
|
|
4865
|
-
declare function updateParticipation$1(httpClient: HttpClient
|
|
3909
|
+
declare function updateParticipation$1(httpClient: HttpClient): UpdateParticipationSignature;
|
|
4866
3910
|
interface UpdateParticipationSignature {
|
|
4867
3911
|
/**
|
|
4868
3912
|
* Updates a participation.
|
|
@@ -4871,7 +3915,7 @@ interface UpdateParticipationSignature {
|
|
|
4871
3915
|
*/
|
|
4872
3916
|
(_id: string | null, participation: UpdateParticipation): Promise<Participation & ParticipationNonNullableFields>;
|
|
4873
3917
|
}
|
|
4874
|
-
declare function deleteParticipation$1(httpClient: HttpClient
|
|
3918
|
+
declare function deleteParticipation$1(httpClient: HttpClient): DeleteParticipationSignature;
|
|
4875
3919
|
interface DeleteParticipationSignature {
|
|
4876
3920
|
/**
|
|
4877
3921
|
* Deletes a participation.
|
|
@@ -4879,17 +3923,17 @@ interface DeleteParticipationSignature {
|
|
|
4879
3923
|
*/
|
|
4880
3924
|
(participationId: string | null): Promise<void>;
|
|
4881
3925
|
}
|
|
4882
|
-
declare const onParticipationCreated$1: EventDefinition
|
|
4883
|
-
declare const onParticipationUpdated$1: EventDefinition
|
|
4884
|
-
declare const onParticipationDeleted$1: EventDefinition
|
|
3926
|
+
declare const onParticipationCreated$1: EventDefinition<ParticipationCreatedEnvelope, "wix.calendar.v3.participation_created">;
|
|
3927
|
+
declare const onParticipationUpdated$1: EventDefinition<ParticipationUpdatedEnvelope, "wix.calendar.v3.participation_updated">;
|
|
3928
|
+
declare const onParticipationDeleted$1: EventDefinition<ParticipationDeletedEnvelope, "wix.calendar.v3.participation_deleted">;
|
|
4885
3929
|
|
|
4886
|
-
declare function createEventModule$2<T extends EventDefinition
|
|
3930
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4887
3931
|
|
|
4888
|
-
declare const getParticipation: MaybeContext
|
|
4889
|
-
declare const queryParticipations: MaybeContext
|
|
4890
|
-
declare const createParticipation: MaybeContext
|
|
4891
|
-
declare const updateParticipation: MaybeContext
|
|
4892
|
-
declare const deleteParticipation: MaybeContext
|
|
3932
|
+
declare const getParticipation: MaybeContext<BuildRESTFunction<typeof getParticipation$1> & typeof getParticipation$1>;
|
|
3933
|
+
declare const queryParticipations: MaybeContext<BuildRESTFunction<typeof queryParticipations$1> & typeof queryParticipations$1>;
|
|
3934
|
+
declare const createParticipation: MaybeContext<BuildRESTFunction<typeof createParticipation$1> & typeof createParticipation$1>;
|
|
3935
|
+
declare const updateParticipation: MaybeContext<BuildRESTFunction<typeof updateParticipation$1> & typeof updateParticipation$1>;
|
|
3936
|
+
declare const deleteParticipation: MaybeContext<BuildRESTFunction<typeof deleteParticipation$1> & typeof deleteParticipation$1>;
|
|
4893
3937
|
|
|
4894
3938
|
type _publicOnParticipationCreatedType = typeof onParticipationCreated$1;
|
|
4895
3939
|
/** */
|
|
@@ -4947,592 +3991,114 @@ declare namespace context$2 {
|
|
|
4947
3991
|
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type context$2_CreateParticipationOptions as CreateParticipationOptions, type context$2_CreateParticipationRequest as CreateParticipationRequest, type context$2_CreateParticipationResponse as CreateParticipationResponse, type context$2_CreateParticipationResponseNonNullableFields as CreateParticipationResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type CursorQuery$1 as CursorQuery, type CursorQueryPagingMethodOneOf$1 as CursorQueryPagingMethodOneOf, type Cursors$1 as Cursors, type context$2_DeleteParticipationRequest as DeleteParticipationRequest, type context$2_DeleteParticipationResponse as DeleteParticipationResponse, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type ExtendedFields$1 as ExtendedFields, type context$2_GetParticipationRequest as GetParticipationRequest, type context$2_GetParticipationResponse as GetParticipationResponse, type context$2_GetParticipationResponseNonNullableFields as GetParticipationResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type MessageEnvelope$2 as MessageEnvelope, type context$2_Participant as Participant, type context$2_Participation as Participation, type context$2_ParticipationCreatedEnvelope as ParticipationCreatedEnvelope, type context$2_ParticipationDeletedEnvelope as ParticipationDeletedEnvelope, type context$2_ParticipationNonNullableFields as ParticipationNonNullableFields, type context$2_ParticipationParticipatedItemOneOf as ParticipationParticipatedItemOneOf, type context$2_ParticipationUpdatedEnvelope as ParticipationUpdatedEnvelope, type context$2_ParticipationUpdatedWithMetadata as ParticipationUpdatedWithMetadata, type context$2_ParticipationsQueryBuilder as ParticipationsQueryBuilder, type context$2_ParticipationsQueryResult as ParticipationsQueryResult, type context$2_PartySizeSumByScheduleId as PartySizeSumByScheduleId, type context$2_QueryParticipationsRequest as QueryParticipationsRequest, type context$2_QueryParticipationsResponse as QueryParticipationsResponse, type context$2_QueryParticipationsResponseNonNullableFields as QueryParticipationsResponseNonNullableFields, type RestoreInfo$2 as RestoreInfo, Status$2 as Status, type context$2_SumParticipationsPartySizeByScheduleIdRequest as SumParticipationsPartySizeByScheduleIdRequest, type context$2_SumParticipationsPartySizeByScheduleIdResponse as SumParticipationsPartySizeByScheduleIdResponse, type context$2_UpdateParticipation as UpdateParticipation, type context$2_UpdateParticipationRequest as UpdateParticipationRequest, type context$2_UpdateParticipationResponse as UpdateParticipationResponse, type context$2_UpdateParticipationResponseNonNullableFields as UpdateParticipationResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, type context$2__publicOnParticipationCreatedType as _publicOnParticipationCreatedType, type context$2__publicOnParticipationDeletedType as _publicOnParticipationDeletedType, type context$2__publicOnParticipationUpdatedType as _publicOnParticipationUpdatedType, context$2_createParticipation as createParticipation, context$2_deleteParticipation as deleteParticipation, context$2_getParticipation as getParticipation, context$2_onParticipationCreated as onParticipationCreated, context$2_onParticipationDeleted as onParticipationDeleted, context$2_onParticipationUpdated as onParticipationUpdated, onParticipationCreated$1 as publicOnParticipationCreated, onParticipationDeleted$1 as publicOnParticipationDeleted, onParticipationUpdated$1 as publicOnParticipationUpdated, context$2_queryParticipations as queryParticipations, context$2_updateParticipation as updateParticipation };
|
|
4948
3992
|
}
|
|
4949
3993
|
|
|
4950
|
-
|
|
4951
|
-
__type: 'host';
|
|
4952
|
-
create(host: H): T;
|
|
4953
|
-
};
|
|
4954
|
-
type HostModuleAPI$1<T extends HostModule$1<any, any>> = T extends HostModule$1<infer U, any> ? U : never;
|
|
4955
|
-
type Host$1<Environment = unknown> = {
|
|
4956
|
-
channel: {
|
|
4957
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
4958
|
-
disconnect: () => void;
|
|
4959
|
-
} | Promise<{
|
|
4960
|
-
disconnect: () => void;
|
|
4961
|
-
}>;
|
|
4962
|
-
};
|
|
4963
|
-
environment?: Environment;
|
|
3994
|
+
interface Schedule {
|
|
4964
3995
|
/**
|
|
4965
|
-
*
|
|
3996
|
+
* The schedule ID.
|
|
3997
|
+
* @readonly
|
|
4966
3998
|
*/
|
|
4967
|
-
|
|
3999
|
+
_id?: string | null;
|
|
4968
4000
|
/**
|
|
4969
|
-
* Optional
|
|
4001
|
+
* Optional external ID. Cannot change.
|
|
4002
|
+
*
|
|
4003
|
+
* For instance, might be the ID of the Bookings Resource or Service.
|
|
4970
4004
|
*/
|
|
4971
|
-
|
|
4005
|
+
externalId?: string | null;
|
|
4972
4006
|
/**
|
|
4973
|
-
*
|
|
4974
|
-
*
|
|
4007
|
+
* The name of the schedule.
|
|
4008
|
+
*
|
|
4009
|
+
* For instance, might be the name of the Bookings Resource or Service.
|
|
4975
4010
|
*/
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4011
|
+
name?: string | null;
|
|
4012
|
+
/**
|
|
4013
|
+
* The schedule status.
|
|
4014
|
+
*
|
|
4015
|
+
* The possible values are:
|
|
4016
|
+
* - `"ACTIVE"` Schedule is active. Default value.
|
|
4017
|
+
* - `"CANCELLED"` Schedule has been cancelled.
|
|
4018
|
+
* @readonly
|
|
4019
|
+
*/
|
|
4020
|
+
status?: Status$1;
|
|
4021
|
+
/**
|
|
4022
|
+
* The schedule time zone, formatted according to the IANA time zone format.
|
|
4023
|
+
* Must be a regional time zone (Area/Location) or UTC.
|
|
4024
|
+
*
|
|
4025
|
+
* By default the time zone is derived from the Wix Business, and can be overridden by setting `businessTimeZoneEnabled` to false.
|
|
4026
|
+
*/
|
|
4027
|
+
timeZone?: string | null;
|
|
4028
|
+
/**
|
|
4029
|
+
* Whether to use the time zone of the Wix Business.
|
|
4030
|
+
* Default is true.
|
|
4031
|
+
*/
|
|
4032
|
+
businessTimeZoneEnabled?: boolean | null;
|
|
4033
|
+
/** Default title for the schedule's events. */
|
|
4034
|
+
defaultTitle?: string | null;
|
|
4035
|
+
/** Default location for the schedule's events. */
|
|
4036
|
+
defaultLocation?: Location;
|
|
4037
|
+
/**
|
|
4038
|
+
* Default capacity for the schedule's events.
|
|
4039
|
+
*
|
|
4040
|
+
* The capacity of an event is the max number of participants that can participate in an event.
|
|
4041
|
+
*/
|
|
4042
|
+
defaultCapacity?: number | null;
|
|
4043
|
+
/** Default conferencing details for the schedule's events. */
|
|
4044
|
+
defaultConferencingDetails?: ConferencingDetails;
|
|
4045
|
+
/**
|
|
4046
|
+
* Optional ID of the Wix app owning the schedule.
|
|
4047
|
+
* Cannot change once set.
|
|
4048
|
+
*
|
|
4049
|
+
* For example, to create a schedule in the Wix Bookings App Calendar, provide `13d21c63-b5ec-5912-8397-c3a5ddb27a97`.
|
|
4050
|
+
*/
|
|
4051
|
+
appId?: string | null;
|
|
4052
|
+
/**
|
|
4053
|
+
* List of granted permissions for this schedule.
|
|
4054
|
+
*
|
|
4055
|
+
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
4056
|
+
*/
|
|
4057
|
+
permissions?: Permission[];
|
|
4058
|
+
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
4059
|
+
extendedFields?: ExtendedFields;
|
|
4060
|
+
/**
|
|
4061
|
+
* The schedule revision number, which incremented on updates.
|
|
4062
|
+
*
|
|
4063
|
+
* The current revision should be provided on updates to prevent conflicting changes.
|
|
4064
|
+
* @readonly
|
|
4065
|
+
*/
|
|
4066
|
+
revision?: string | null;
|
|
4067
|
+
/**
|
|
4068
|
+
* Date the schedule was created.
|
|
4069
|
+
* @readonly
|
|
4070
|
+
*/
|
|
4071
|
+
_createdDate?: Date;
|
|
4072
|
+
/**
|
|
4073
|
+
* Date the schedule was last updated.
|
|
4074
|
+
* @readonly
|
|
4075
|
+
*/
|
|
4076
|
+
_updatedDate?: Date;
|
|
4998
4077
|
}
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
request?: any;
|
|
5006
|
-
};
|
|
5007
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
5008
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5009
|
-
url: string;
|
|
5010
|
-
data?: Data;
|
|
5011
|
-
params?: URLSearchParams;
|
|
5012
|
-
} & APIMetadata$1;
|
|
5013
|
-
type APIMetadata$1 = {
|
|
5014
|
-
methodFqn?: string;
|
|
5015
|
-
entityFqdn?: string;
|
|
5016
|
-
packageName?: string;
|
|
5017
|
-
};
|
|
5018
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
5019
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
5020
|
-
__type: 'event-definition';
|
|
5021
|
-
type: Type;
|
|
5022
|
-
isDomainEvent?: boolean;
|
|
5023
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5024
|
-
__payload: Payload;
|
|
5025
|
-
};
|
|
5026
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
5027
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
5028
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
5029
|
-
|
|
5030
|
-
type ServicePluginMethodInput$1 = {
|
|
5031
|
-
request: any;
|
|
5032
|
-
metadata: any;
|
|
5033
|
-
};
|
|
5034
|
-
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
5035
|
-
type ServicePluginMethodMetadata$1 = {
|
|
5036
|
-
name: string;
|
|
5037
|
-
primaryHttpMappingPath: string;
|
|
5038
|
-
transformations: {
|
|
5039
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
5040
|
-
toREST: (...args: unknown[]) => unknown;
|
|
5041
|
-
};
|
|
5042
|
-
};
|
|
5043
|
-
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
5044
|
-
__type: 'service-plugin-definition';
|
|
5045
|
-
componentType: string;
|
|
5046
|
-
methods: ServicePluginMethodMetadata$1[];
|
|
5047
|
-
__contract: Contract;
|
|
5048
|
-
};
|
|
5049
|
-
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
5050
|
-
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$1<any>> = (implementation: T['__contract']) => void;
|
|
5051
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$1 = "wix_spi_error";
|
|
5052
|
-
|
|
5053
|
-
type RequestContext$1 = {
|
|
5054
|
-
isSSR: boolean;
|
|
5055
|
-
host: string;
|
|
5056
|
-
protocol?: string;
|
|
5057
|
-
};
|
|
5058
|
-
type ResponseTransformer$1 = (data: any, headers?: any) => any;
|
|
5059
|
-
/**
|
|
5060
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
5061
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
5062
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
5063
|
-
*/
|
|
5064
|
-
type Method$1 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
5065
|
-
type AmbassadorRequestOptions$1<T = any> = {
|
|
5066
|
-
_?: T;
|
|
5067
|
-
url?: string;
|
|
5068
|
-
method?: Method$1;
|
|
5069
|
-
params?: any;
|
|
5070
|
-
data?: any;
|
|
5071
|
-
transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
|
|
5072
|
-
};
|
|
5073
|
-
type AmbassadorFactory$1<Request, Response> = (payload: Request) => ((context: RequestContext$1) => AmbassadorRequestOptions$1<Response>) & {
|
|
5074
|
-
__isAmbassador: boolean;
|
|
5075
|
-
};
|
|
5076
|
-
type AmbassadorFunctionDescriptor$1<Request = any, Response = any> = AmbassadorFactory$1<Request, Response>;
|
|
5077
|
-
type BuildAmbassadorFunction$1<T extends AmbassadorFunctionDescriptor$1> = T extends AmbassadorFunctionDescriptor$1<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
5078
|
-
|
|
5079
|
-
declare global {
|
|
5080
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5081
|
-
interface SymbolConstructor {
|
|
5082
|
-
readonly observable: symbol;
|
|
5083
|
-
}
|
|
4078
|
+
declare enum Status$1 {
|
|
4079
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
4080
|
+
/** Schedule is active. Default value. */
|
|
4081
|
+
ACTIVE = "ACTIVE",
|
|
4082
|
+
/** Schedule has been cancelled. */
|
|
4083
|
+
CANCELLED = "CANCELLED"
|
|
5084
4084
|
}
|
|
5085
|
-
|
|
5086
|
-
declare const emptyObjectSymbol$1: unique symbol;
|
|
5087
|
-
|
|
5088
|
-
/**
|
|
5089
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
5090
|
-
|
|
5091
|
-
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)).
|
|
5092
|
-
|
|
5093
|
-
@example
|
|
5094
|
-
```
|
|
5095
|
-
import type {EmptyObject} from 'type-fest';
|
|
5096
|
-
|
|
5097
|
-
// The following illustrates the problem with `{}`.
|
|
5098
|
-
const foo1: {} = {}; // Pass
|
|
5099
|
-
const foo2: {} = []; // Pass
|
|
5100
|
-
const foo3: {} = 42; // Pass
|
|
5101
|
-
const foo4: {} = {a: 1}; // Pass
|
|
5102
|
-
|
|
5103
|
-
// With `EmptyObject` only the first case is valid.
|
|
5104
|
-
const bar1: EmptyObject = {}; // Pass
|
|
5105
|
-
const bar2: EmptyObject = 42; // Fail
|
|
5106
|
-
const bar3: EmptyObject = []; // Fail
|
|
5107
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
5108
|
-
```
|
|
5109
|
-
|
|
5110
|
-
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}.
|
|
5111
|
-
|
|
5112
|
-
@category Object
|
|
5113
|
-
*/
|
|
5114
|
-
type EmptyObject$1 = {[emptyObjectSymbol$1]?: never};
|
|
5115
|
-
|
|
5116
|
-
/**
|
|
5117
|
-
Returns a boolean for whether the two given types are equal.
|
|
5118
|
-
|
|
5119
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
5120
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
5121
|
-
|
|
5122
|
-
Use-cases:
|
|
5123
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
5124
|
-
|
|
5125
|
-
@example
|
|
5126
|
-
```
|
|
5127
|
-
import type {IsEqual} from 'type-fest';
|
|
5128
|
-
|
|
5129
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
5130
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
5131
|
-
type Includes<Value extends readonly any[], Item> =
|
|
5132
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
5133
|
-
? IsEqual<Value[0], Item> extends true
|
|
5134
|
-
? true
|
|
5135
|
-
: Includes<rest, Item>
|
|
5136
|
-
: false;
|
|
5137
|
-
```
|
|
5138
|
-
|
|
5139
|
-
@category Type Guard
|
|
5140
|
-
@category Utilities
|
|
5141
|
-
*/
|
|
5142
|
-
type IsEqual$1<A, B> =
|
|
5143
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
5144
|
-
(<G>() => G extends B ? 1 : 2)
|
|
5145
|
-
? true
|
|
5146
|
-
: false;
|
|
5147
|
-
|
|
5148
|
-
/**
|
|
5149
|
-
Filter out keys from an object.
|
|
5150
|
-
|
|
5151
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
5152
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
5153
|
-
Returns `Key` otherwise.
|
|
5154
|
-
|
|
5155
|
-
@example
|
|
5156
|
-
```
|
|
5157
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
5158
|
-
//=> never
|
|
5159
|
-
```
|
|
5160
|
-
|
|
5161
|
-
@example
|
|
5162
|
-
```
|
|
5163
|
-
type Filtered = Filter<'bar', string>;
|
|
5164
|
-
//=> never
|
|
5165
|
-
```
|
|
5166
|
-
|
|
5167
|
-
@example
|
|
5168
|
-
```
|
|
5169
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
5170
|
-
//=> 'bar'
|
|
5171
|
-
```
|
|
5172
|
-
|
|
5173
|
-
@see {Except}
|
|
5174
|
-
*/
|
|
5175
|
-
type Filter$1<KeyType, ExcludeType> = IsEqual$1<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
5176
|
-
|
|
5177
|
-
type ExceptOptions$1 = {
|
|
5178
|
-
/**
|
|
5179
|
-
Disallow assigning non-specified properties.
|
|
5180
|
-
|
|
5181
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
5182
|
-
|
|
5183
|
-
@default false
|
|
5184
|
-
*/
|
|
5185
|
-
requireExactProps?: boolean;
|
|
5186
|
-
};
|
|
5187
|
-
|
|
5188
|
-
/**
|
|
5189
|
-
Create a type from an object type without certain keys.
|
|
5190
|
-
|
|
5191
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
5192
|
-
|
|
5193
|
-
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.
|
|
5194
|
-
|
|
5195
|
-
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)).
|
|
5196
|
-
|
|
5197
|
-
@example
|
|
5198
|
-
```
|
|
5199
|
-
import type {Except} from 'type-fest';
|
|
5200
|
-
|
|
5201
|
-
type Foo = {
|
|
5202
|
-
a: number;
|
|
5203
|
-
b: string;
|
|
5204
|
-
};
|
|
5205
|
-
|
|
5206
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
5207
|
-
//=> {b: string}
|
|
5208
|
-
|
|
5209
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
5210
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
5211
|
-
|
|
5212
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
5213
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
5214
|
-
|
|
5215
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
5216
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
5217
|
-
```
|
|
5218
|
-
|
|
5219
|
-
@category Object
|
|
5220
|
-
*/
|
|
5221
|
-
type Except$1<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$1 = {requireExactProps: false}> = {
|
|
5222
|
-
[KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType];
|
|
5223
|
-
} & (Options['requireExactProps'] extends true
|
|
5224
|
-
? Partial<Record<KeysType, never>>
|
|
5225
|
-
: {});
|
|
5226
|
-
|
|
5227
|
-
/**
|
|
5228
|
-
Returns a boolean for whether the given type is `never`.
|
|
5229
|
-
|
|
5230
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
5231
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
5232
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
5233
|
-
|
|
5234
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
5235
|
-
|
|
5236
|
-
@example
|
|
5237
|
-
```
|
|
5238
|
-
import type {IsNever, And} from 'type-fest';
|
|
5239
|
-
|
|
5240
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
5241
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
5242
|
-
And<
|
|
5243
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
5244
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
5245
|
-
>;
|
|
5246
|
-
|
|
5247
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
5248
|
-
AreStringsEqual<I, O> extends true
|
|
5249
|
-
? never
|
|
5250
|
-
: void;
|
|
5251
|
-
|
|
5252
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
5253
|
-
if (input === output) {
|
|
5254
|
-
process.exit(0);
|
|
5255
|
-
}
|
|
5256
|
-
}
|
|
5257
|
-
|
|
5258
|
-
endIfEqual('abc', 'abc');
|
|
5259
|
-
//=> never
|
|
5260
|
-
|
|
5261
|
-
endIfEqual('abc', '123');
|
|
5262
|
-
//=> void
|
|
5263
|
-
```
|
|
5264
|
-
|
|
5265
|
-
@category Type Guard
|
|
5266
|
-
@category Utilities
|
|
5267
|
-
*/
|
|
5268
|
-
type IsNever$1<T> = [T] extends [never] ? true : false;
|
|
5269
|
-
|
|
5270
|
-
/**
|
|
5271
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
5272
|
-
|
|
5273
|
-
@see {@link IsNever}
|
|
5274
|
-
|
|
5275
|
-
@example
|
|
5276
|
-
```
|
|
5277
|
-
import type {IfNever} from 'type-fest';
|
|
5278
|
-
|
|
5279
|
-
type ShouldBeTrue = IfNever<never>;
|
|
5280
|
-
//=> true
|
|
5281
|
-
|
|
5282
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
5283
|
-
//=> 'bar'
|
|
5284
|
-
```
|
|
5285
|
-
|
|
5286
|
-
@category Type Guard
|
|
5287
|
-
@category Utilities
|
|
5288
|
-
*/
|
|
5289
|
-
type IfNever$1<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
5290
|
-
IsNever$1<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
5291
|
-
);
|
|
5292
|
-
|
|
5293
|
-
/**
|
|
5294
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
5295
|
-
|
|
5296
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
5297
|
-
|
|
5298
|
-
@example
|
|
5299
|
-
```
|
|
5300
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
5301
|
-
|
|
5302
|
-
interface Example {
|
|
5303
|
-
a: string;
|
|
5304
|
-
b: string | number;
|
|
5305
|
-
c?: string;
|
|
5306
|
-
d: {};
|
|
5307
|
-
}
|
|
5308
|
-
|
|
5309
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
5310
|
-
//=> 'a'
|
|
5311
|
-
```
|
|
5312
|
-
|
|
5313
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
5314
|
-
|
|
5315
|
-
@example
|
|
5316
|
-
```
|
|
5317
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
5318
|
-
|
|
5319
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
5320
|
-
//=> 'a' | 'c'
|
|
5321
|
-
```
|
|
5322
|
-
|
|
5323
|
-
@category Object
|
|
5324
|
-
*/
|
|
5325
|
-
type ConditionalKeys$1<Base, Condition> =
|
|
5326
|
-
{
|
|
5327
|
-
// Map through all the keys of the given base type.
|
|
5328
|
-
[Key in keyof Base]-?:
|
|
5329
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
5330
|
-
Base[Key] extends Condition
|
|
5331
|
-
// Retain this key
|
|
5332
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
5333
|
-
? IfNever$1<Base[Key], IfNever$1<Condition, Key, never>, Key>
|
|
5334
|
-
// Discard this key since the condition fails.
|
|
5335
|
-
: never;
|
|
5336
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
5337
|
-
}[keyof Base];
|
|
5338
|
-
|
|
5339
|
-
/**
|
|
5340
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
5341
|
-
|
|
5342
|
-
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.
|
|
5343
|
-
|
|
5344
|
-
@example
|
|
5345
|
-
```
|
|
5346
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
5347
|
-
|
|
5348
|
-
class Awesome {
|
|
5349
|
-
name: string;
|
|
5350
|
-
successes: number;
|
|
5351
|
-
failures: bigint;
|
|
5352
|
-
|
|
5353
|
-
run() {}
|
|
5354
|
-
}
|
|
5355
|
-
|
|
5356
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
5357
|
-
//=> {run: () => void}
|
|
5358
|
-
```
|
|
5359
|
-
|
|
5360
|
-
@example
|
|
5361
|
-
```
|
|
5362
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
5363
|
-
|
|
5364
|
-
interface Example {
|
|
5365
|
-
a: string;
|
|
5366
|
-
b: string | number;
|
|
5367
|
-
c: () => void;
|
|
5368
|
-
d: {};
|
|
5369
|
-
}
|
|
5370
|
-
|
|
5371
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
5372
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
5373
|
-
```
|
|
5374
|
-
|
|
5375
|
-
@category Object
|
|
5376
|
-
*/
|
|
5377
|
-
type ConditionalExcept$1<Base, Condition> = Except$1<
|
|
5378
|
-
Base,
|
|
5379
|
-
ConditionalKeys$1<Base, Condition>
|
|
5380
|
-
>;
|
|
5381
|
-
|
|
5382
|
-
/**
|
|
5383
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
5384
|
-
* can either be a REST module or a host module.
|
|
5385
|
-
* This type is recursive, so it can describe nested modules.
|
|
5386
|
-
*/
|
|
5387
|
-
type Descriptors$1 = RESTFunctionDescriptor$1 | AmbassadorFunctionDescriptor$1 | HostModule$1<any, any> | EventDefinition$1<any> | ServicePluginDefinition$1<any> | {
|
|
5388
|
-
[key: string]: Descriptors$1 | PublicMetadata$1 | any;
|
|
5389
|
-
};
|
|
5390
|
-
/**
|
|
5391
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
5392
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
5393
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
5394
|
-
* do not match the given host (as they will not work with the given host).
|
|
5395
|
-
*/
|
|
5396
|
-
type BuildDescriptors$1<T extends Descriptors$1, H extends Host$1<any> | undefined, Depth extends number = 5> = {
|
|
5397
|
-
done: T;
|
|
5398
|
-
recurse: T extends {
|
|
5399
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$1;
|
|
5400
|
-
} ? never : T extends AmbassadorFunctionDescriptor$1 ? BuildAmbassadorFunction$1<T> : T extends RESTFunctionDescriptor$1 ? BuildRESTFunction$1<T> : T extends EventDefinition$1<any> ? BuildEventDefinition$1<T> : T extends ServicePluginDefinition$1<any> ? BuildServicePluginDefinition$1<T> : T extends HostModule$1<any, any> ? HostModuleAPI$1<T> : ConditionalExcept$1<{
|
|
5401
|
-
[Key in keyof T]: T[Key] extends Descriptors$1 ? BuildDescriptors$1<T[Key], H, [
|
|
5402
|
-
-1,
|
|
5403
|
-
0,
|
|
5404
|
-
1,
|
|
5405
|
-
2,
|
|
5406
|
-
3,
|
|
5407
|
-
4,
|
|
5408
|
-
5
|
|
5409
|
-
][Depth]> : never;
|
|
5410
|
-
}, EmptyObject$1>;
|
|
5411
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
5412
|
-
type PublicMetadata$1 = {
|
|
5413
|
-
PACKAGE_NAME?: string;
|
|
5414
|
-
};
|
|
5415
|
-
|
|
5416
|
-
declare global {
|
|
5417
|
-
interface ContextualClient {
|
|
5418
|
-
}
|
|
5419
|
-
}
|
|
5420
|
-
/**
|
|
5421
|
-
* A type used to create concerete types from SDK descriptors in
|
|
5422
|
-
* case a contextual client is available.
|
|
5423
|
-
*/
|
|
5424
|
-
type MaybeContext$1<T extends Descriptors$1> = globalThis.ContextualClient extends {
|
|
5425
|
-
host: Host$1;
|
|
5426
|
-
} ? BuildDescriptors$1<T, globalThis.ContextualClient['host']> : T;
|
|
5427
|
-
|
|
5428
|
-
interface Schedule {
|
|
4085
|
+
interface Location {
|
|
5429
4086
|
/**
|
|
5430
|
-
* The
|
|
5431
|
-
*
|
|
4087
|
+
* The location ID. Optional.
|
|
4088
|
+
* Currently only supported for locations of type `BUSINESS`, and used to reference the Wix Business Location.
|
|
5432
4089
|
*/
|
|
5433
4090
|
_id?: string | null;
|
|
5434
4091
|
/**
|
|
5435
|
-
*
|
|
5436
|
-
*
|
|
5437
|
-
*
|
|
4092
|
+
* The location type.
|
|
4093
|
+
* The possible values are:
|
|
4094
|
+
* - `"BUSINESS"` event takes place at the business location.
|
|
4095
|
+
* - `"CUSTOMER"` event takes place at the customer location.
|
|
4096
|
+
* - `"CUSTOM"` event takes place at the custom location.
|
|
5438
4097
|
*/
|
|
5439
|
-
|
|
4098
|
+
type?: LocationType;
|
|
5440
4099
|
/**
|
|
5441
|
-
* The name
|
|
5442
|
-
*
|
|
5443
|
-
* For instance, might be the name of the Bookings Resource or Service.
|
|
5444
|
-
*/
|
|
5445
|
-
name?: string | null;
|
|
5446
|
-
/**
|
|
5447
|
-
* The schedule status.
|
|
5448
|
-
*
|
|
5449
|
-
* The possible values are:
|
|
5450
|
-
* - `"ACTIVE"` Schedule is active. Default value.
|
|
5451
|
-
* - `"CANCELLED"` Schedule has been cancelled.
|
|
5452
|
-
* @readonly
|
|
5453
|
-
*/
|
|
5454
|
-
status?: Status$1;
|
|
5455
|
-
/**
|
|
5456
|
-
* The schedule time zone, formatted according to the IANA time zone format.
|
|
5457
|
-
* Must be a regional time zone (Area/Location) or UTC.
|
|
5458
|
-
*
|
|
5459
|
-
* By default the time zone is derived from the Wix Business, and can be overridden by setting `businessTimeZoneEnabled` to false.
|
|
5460
|
-
*/
|
|
5461
|
-
timeZone?: string | null;
|
|
5462
|
-
/**
|
|
5463
|
-
* Whether to use the time zone of the Wix Business.
|
|
5464
|
-
* Default is true.
|
|
5465
|
-
*/
|
|
5466
|
-
businessTimeZoneEnabled?: boolean | null;
|
|
5467
|
-
/** Default title for the schedule's events. */
|
|
5468
|
-
defaultTitle?: string | null;
|
|
5469
|
-
/** Default location for the schedule's events. */
|
|
5470
|
-
defaultLocation?: Location;
|
|
5471
|
-
/**
|
|
5472
|
-
* Default capacity for the schedule's events.
|
|
5473
|
-
*
|
|
5474
|
-
* The capacity of an event is the max number of participants that can participate in an event.
|
|
5475
|
-
*/
|
|
5476
|
-
defaultCapacity?: number | null;
|
|
5477
|
-
/** Default conferencing details for the schedule's events. */
|
|
5478
|
-
defaultConferencingDetails?: ConferencingDetails;
|
|
5479
|
-
/**
|
|
5480
|
-
* Optional ID of the Wix app owning the schedule.
|
|
5481
|
-
* Cannot change once set.
|
|
5482
|
-
*
|
|
5483
|
-
* For example, to create a schedule in the Wix Bookings App Calendar, provide `13d21c63-b5ec-5912-8397-c3a5ddb27a97`.
|
|
5484
|
-
*/
|
|
5485
|
-
appId?: string | null;
|
|
5486
|
-
/**
|
|
5487
|
-
* List of granted permissions for this schedule.
|
|
5488
|
-
*
|
|
5489
|
-
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
5490
|
-
*/
|
|
5491
|
-
permissions?: Permission[];
|
|
5492
|
-
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
5493
|
-
extendedFields?: ExtendedFields;
|
|
5494
|
-
/**
|
|
5495
|
-
* The schedule revision number, which incremented on updates.
|
|
5496
|
-
*
|
|
5497
|
-
* The current revision should be provided on updates to prevent conflicting changes.
|
|
5498
|
-
* @readonly
|
|
5499
|
-
*/
|
|
5500
|
-
revision?: string | null;
|
|
5501
|
-
/**
|
|
5502
|
-
* Date the schedule was created.
|
|
5503
|
-
* @readonly
|
|
5504
|
-
*/
|
|
5505
|
-
_createdDate?: Date;
|
|
5506
|
-
/**
|
|
5507
|
-
* Date the schedule was last updated.
|
|
5508
|
-
* @readonly
|
|
5509
|
-
*/
|
|
5510
|
-
_updatedDate?: Date;
|
|
5511
|
-
}
|
|
5512
|
-
declare enum Status$1 {
|
|
5513
|
-
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
5514
|
-
/** Schedule is active. Default value. */
|
|
5515
|
-
ACTIVE = "ACTIVE",
|
|
5516
|
-
/** Schedule has been cancelled. */
|
|
5517
|
-
CANCELLED = "CANCELLED"
|
|
5518
|
-
}
|
|
5519
|
-
interface Location {
|
|
5520
|
-
/**
|
|
5521
|
-
* The location ID. Optional.
|
|
5522
|
-
* Currently only supported for locations of type `BUSINESS`, and used to reference the Wix Business Location.
|
|
5523
|
-
*/
|
|
5524
|
-
_id?: string | null;
|
|
5525
|
-
/**
|
|
5526
|
-
* The location type.
|
|
5527
|
-
* The possible values are:
|
|
5528
|
-
* - `"BUSINESS"` event takes place at the business location.
|
|
5529
|
-
* - `"CUSTOMER"` event takes place at the customer location.
|
|
5530
|
-
* - `"CUSTOM"` event takes place at the custom location.
|
|
5531
|
-
*/
|
|
5532
|
-
type?: LocationType;
|
|
5533
|
-
/**
|
|
5534
|
-
* The location name. Optional.
|
|
5535
|
-
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
4100
|
+
* The location name. Optional.
|
|
4101
|
+
* Derived from the Wix Business Location if the location is of type `BUSINESS`.
|
|
5536
4102
|
*/
|
|
5537
4103
|
name?: string | null;
|
|
5538
4104
|
/**
|
|
@@ -6641,702 +5207,224 @@ interface UpdateSchedule {
|
|
|
6641
5207
|
*/
|
|
6642
5208
|
appId?: string | null;
|
|
6643
5209
|
/**
|
|
6644
|
-
* List of granted permissions for this schedule.
|
|
6645
|
-
*
|
|
6646
|
-
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
6647
|
-
*/
|
|
6648
|
-
permissions?: Permission[];
|
|
6649
|
-
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
6650
|
-
extendedFields?: ExtendedFields;
|
|
6651
|
-
/**
|
|
6652
|
-
* The schedule revision number, which incremented on updates.
|
|
6653
|
-
*
|
|
6654
|
-
* The current revision should be provided on updates to prevent conflicting changes.
|
|
6655
|
-
* @readonly
|
|
6656
|
-
*/
|
|
6657
|
-
revision?: string | null;
|
|
6658
|
-
/**
|
|
6659
|
-
* Date the schedule was created.
|
|
6660
|
-
* @readonly
|
|
6661
|
-
*/
|
|
6662
|
-
_createdDate?: Date;
|
|
6663
|
-
/**
|
|
6664
|
-
* Date the schedule was last updated.
|
|
6665
|
-
* @readonly
|
|
6666
|
-
*/
|
|
6667
|
-
_updatedDate?: Date;
|
|
6668
|
-
}
|
|
6669
|
-
interface UpdateScheduleOptions {
|
|
6670
|
-
/** Whether to notify participants regarding the changes. */
|
|
6671
|
-
participantNotification?: ParticipantNotification;
|
|
6672
|
-
}
|
|
6673
|
-
interface CancelScheduleOptions {
|
|
6674
|
-
/**
|
|
6675
|
-
* Whether to preserve future events with participants.
|
|
6676
|
-
* Default is false.
|
|
6677
|
-
*/
|
|
6678
|
-
preserveFutureEventsWithParticipants?: boolean | null;
|
|
6679
|
-
/** Whether to notify participants regarding the changes. */
|
|
6680
|
-
participantNotification?: ParticipantNotification;
|
|
6681
|
-
}
|
|
6682
|
-
|
|
6683
|
-
declare function getSchedule$1(httpClient: HttpClient$1): GetScheduleSignature;
|
|
6684
|
-
interface GetScheduleSignature {
|
|
6685
|
-
/**
|
|
6686
|
-
* Retrieves a schedule by ID.
|
|
6687
|
-
* @param - The ID of the schedule to retrieve.
|
|
6688
|
-
* @returns The schedule.
|
|
6689
|
-
*/
|
|
6690
|
-
(scheduleId: string | null, options?: GetScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
6691
|
-
}
|
|
6692
|
-
declare function querySchedules$1(httpClient: HttpClient$1): QuerySchedulesSignature;
|
|
6693
|
-
interface QuerySchedulesSignature {
|
|
6694
|
-
/**
|
|
6695
|
-
* Query for schedules given the provided filters and paging.
|
|
6696
|
-
*
|
|
6697
|
-
* By default only active schedules are returned, unless a `status` filter is provided.
|
|
6698
|
-
*/
|
|
6699
|
-
(options?: QuerySchedulesOptions | undefined): SchedulesQueryBuilder;
|
|
6700
|
-
}
|
|
6701
|
-
declare function createSchedule$1(httpClient: HttpClient$1): CreateScheduleSignature;
|
|
6702
|
-
interface CreateScheduleSignature {
|
|
6703
|
-
/**
|
|
6704
|
-
* Creates a schedule.
|
|
6705
|
-
* @param - The schedule to create.
|
|
6706
|
-
* @returns The created schedule.
|
|
6707
|
-
*/
|
|
6708
|
-
(schedule: Schedule, options?: CreateScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
6709
|
-
}
|
|
6710
|
-
declare function updateSchedule$1(httpClient: HttpClient$1): UpdateScheduleSignature;
|
|
6711
|
-
interface UpdateScheduleSignature {
|
|
6712
|
-
/**
|
|
6713
|
-
* Updates a schedule.
|
|
6714
|
-
* @param - The schedule ID.
|
|
6715
|
-
* @returns The updated schedule.
|
|
6716
|
-
*/
|
|
6717
|
-
(_id: string | null, schedule: UpdateSchedule, options?: UpdateScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
6718
|
-
}
|
|
6719
|
-
declare function cancelSchedule$1(httpClient: HttpClient$1): CancelScheduleSignature;
|
|
6720
|
-
interface CancelScheduleSignature {
|
|
6721
|
-
/**
|
|
6722
|
-
* Cancels a schedule.
|
|
6723
|
-
* @param - The ID of the schedule to cancel.
|
|
6724
|
-
*/
|
|
6725
|
-
(scheduleId: string | null, options?: CancelScheduleOptions | undefined): Promise<CancelScheduleResponse & CancelScheduleResponseNonNullableFields>;
|
|
6726
|
-
}
|
|
6727
|
-
declare const onScheduleCreated$1: EventDefinition$1<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
6728
|
-
declare const onScheduleUpdated$1: EventDefinition$1<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
6729
|
-
declare const onScheduleCloned$1: EventDefinition$1<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
6730
|
-
declare const onScheduleCancelled$1: EventDefinition$1<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
6731
|
-
|
|
6732
|
-
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
6733
|
-
|
|
6734
|
-
declare const getSchedule: MaybeContext$1<BuildRESTFunction$1<typeof getSchedule$1> & typeof getSchedule$1>;
|
|
6735
|
-
declare const querySchedules: MaybeContext$1<BuildRESTFunction$1<typeof querySchedules$1> & typeof querySchedules$1>;
|
|
6736
|
-
declare const createSchedule: MaybeContext$1<BuildRESTFunction$1<typeof createSchedule$1> & typeof createSchedule$1>;
|
|
6737
|
-
declare const updateSchedule: MaybeContext$1<BuildRESTFunction$1<typeof updateSchedule$1> & typeof updateSchedule$1>;
|
|
6738
|
-
declare const cancelSchedule: MaybeContext$1<BuildRESTFunction$1<typeof cancelSchedule$1> & typeof cancelSchedule$1>;
|
|
6739
|
-
|
|
6740
|
-
type _publicOnScheduleCreatedType = typeof onScheduleCreated$1;
|
|
6741
|
-
/**
|
|
6742
|
-
* Restore once implemented.
|
|
6743
|
-
* option (google.api.http) = {
|
|
6744
|
-
* post: "/v3/schedules/{schedule_id}/clone";
|
|
6745
|
-
* };
|
|
6746
|
-
*/
|
|
6747
|
-
declare const onScheduleCreated: ReturnType<typeof createEventModule$1<_publicOnScheduleCreatedType>>;
|
|
6748
|
-
|
|
6749
|
-
type _publicOnScheduleUpdatedType = typeof onScheduleUpdated$1;
|
|
6750
|
-
/** */
|
|
6751
|
-
declare const onScheduleUpdated: ReturnType<typeof createEventModule$1<_publicOnScheduleUpdatedType>>;
|
|
6752
|
-
|
|
6753
|
-
type _publicOnScheduleClonedType = typeof onScheduleCloned$1;
|
|
6754
|
-
/** */
|
|
6755
|
-
declare const onScheduleCloned: ReturnType<typeof createEventModule$1<_publicOnScheduleClonedType>>;
|
|
6756
|
-
|
|
6757
|
-
type _publicOnScheduleCancelledType = typeof onScheduleCancelled$1;
|
|
6758
|
-
/** */
|
|
6759
|
-
declare const onScheduleCancelled: ReturnType<typeof createEventModule$1<_publicOnScheduleCancelledType>>;
|
|
6760
|
-
|
|
6761
|
-
type context$1_Asset = Asset;
|
|
6762
|
-
type context$1_CancelScheduleOptions = CancelScheduleOptions;
|
|
6763
|
-
type context$1_CancelScheduleRequest = CancelScheduleRequest;
|
|
6764
|
-
type context$1_CancelScheduleResponse = CancelScheduleResponse;
|
|
6765
|
-
type context$1_CancelScheduleResponseNonNullableFields = CancelScheduleResponseNonNullableFields;
|
|
6766
|
-
type context$1_CloneScheduleRequest = CloneScheduleRequest;
|
|
6767
|
-
type context$1_CloneScheduleResponse = CloneScheduleResponse;
|
|
6768
|
-
type context$1_CommonIdentificationData = CommonIdentificationData;
|
|
6769
|
-
type context$1_CommonIdentificationDataIdOneOf = CommonIdentificationDataIdOneOf;
|
|
6770
|
-
type context$1_ConferencingDetails = ConferencingDetails;
|
|
6771
|
-
type context$1_CreateScheduleOptions = CreateScheduleOptions;
|
|
6772
|
-
type context$1_CreateScheduleRequest = CreateScheduleRequest;
|
|
6773
|
-
type context$1_CreateScheduleResponse = CreateScheduleResponse;
|
|
6774
|
-
type context$1_CreateScheduleResponseNonNullableFields = CreateScheduleResponseNonNullableFields;
|
|
6775
|
-
type context$1_CursorPaging = CursorPaging;
|
|
6776
|
-
type context$1_CursorPagingMetadata = CursorPagingMetadata;
|
|
6777
|
-
type context$1_CursorQuery = CursorQuery;
|
|
6778
|
-
type context$1_CursorQueryPagingMethodOneOf = CursorQueryPagingMethodOneOf;
|
|
6779
|
-
type context$1_Cursors = Cursors;
|
|
6780
|
-
type context$1_DeleteContext = DeleteContext;
|
|
6781
|
-
type context$1_DeleteStatus = DeleteStatus;
|
|
6782
|
-
declare const context$1_DeleteStatus: typeof DeleteStatus;
|
|
6783
|
-
type context$1_ExtendedFields = ExtendedFields;
|
|
6784
|
-
type context$1_GetScheduleOptions = GetScheduleOptions;
|
|
6785
|
-
type context$1_GetScheduleRequest = GetScheduleRequest;
|
|
6786
|
-
type context$1_GetScheduleResponse = GetScheduleResponse;
|
|
6787
|
-
type context$1_GetScheduleResponseNonNullableFields = GetScheduleResponseNonNullableFields;
|
|
6788
|
-
type context$1_IdentityType = IdentityType;
|
|
6789
|
-
declare const context$1_IdentityType: typeof IdentityType;
|
|
6790
|
-
type context$1_Location = Location;
|
|
6791
|
-
type context$1_LocationType = LocationType;
|
|
6792
|
-
declare const context$1_LocationType: typeof LocationType;
|
|
6793
|
-
type context$1_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
|
|
6794
|
-
type context$1_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
|
|
6795
|
-
type context$1_Namespace = Namespace;
|
|
6796
|
-
declare const context$1_Namespace: typeof Namespace;
|
|
6797
|
-
type context$1_NamespaceChanged = NamespaceChanged;
|
|
6798
|
-
type context$1_ParticipantNotification = ParticipantNotification;
|
|
6799
|
-
type context$1_Permission = Permission;
|
|
6800
|
-
type context$1_QuerySchedulesOptions = QuerySchedulesOptions;
|
|
6801
|
-
type context$1_QuerySchedulesRequest = QuerySchedulesRequest;
|
|
6802
|
-
type context$1_QuerySchedulesResponse = QuerySchedulesResponse;
|
|
6803
|
-
type context$1_QuerySchedulesResponseNonNullableFields = QuerySchedulesResponseNonNullableFields;
|
|
6804
|
-
type context$1_RequestedFields = RequestedFields;
|
|
6805
|
-
declare const context$1_RequestedFields: typeof RequestedFields;
|
|
6806
|
-
type context$1_Role = Role;
|
|
6807
|
-
declare const context$1_Role: typeof Role;
|
|
6808
|
-
type context$1_Schedule = Schedule;
|
|
6809
|
-
type context$1_ScheduleCancelled = ScheduleCancelled;
|
|
6810
|
-
type context$1_ScheduleCancelledEnvelope = ScheduleCancelledEnvelope;
|
|
6811
|
-
type context$1_ScheduleCloned = ScheduleCloned;
|
|
6812
|
-
type context$1_ScheduleClonedEnvelope = ScheduleClonedEnvelope;
|
|
6813
|
-
type context$1_ScheduleCreatedEnvelope = ScheduleCreatedEnvelope;
|
|
6814
|
-
type context$1_ScheduleNonNullableFields = ScheduleNonNullableFields;
|
|
6815
|
-
type context$1_ScheduleUpdatedEnvelope = ScheduleUpdatedEnvelope;
|
|
6816
|
-
type context$1_ScheduleUpdatedWithMetadata = ScheduleUpdatedWithMetadata;
|
|
6817
|
-
type context$1_SchedulesQueryBuilder = SchedulesQueryBuilder;
|
|
6818
|
-
type context$1_SchedulesQueryResult = SchedulesQueryResult;
|
|
6819
|
-
type context$1_ServiceProvisioned = ServiceProvisioned;
|
|
6820
|
-
type context$1_ServiceRemoved = ServiceRemoved;
|
|
6821
|
-
type context$1_SiteCreatedContext = SiteCreatedContext;
|
|
6822
|
-
declare const context$1_SiteCreatedContext: typeof SiteCreatedContext;
|
|
6823
|
-
type context$1_SiteDeleted = SiteDeleted;
|
|
6824
|
-
type context$1_SiteHardDeleted = SiteHardDeleted;
|
|
6825
|
-
type context$1_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
|
|
6826
|
-
type context$1_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
|
|
6827
|
-
type context$1_SitePublished = SitePublished;
|
|
6828
|
-
type context$1_SiteRenamed = SiteRenamed;
|
|
6829
|
-
type context$1_SiteTransferred = SiteTransferred;
|
|
6830
|
-
type context$1_SiteUndeleted = SiteUndeleted;
|
|
6831
|
-
type context$1_SiteUnpublished = SiteUnpublished;
|
|
6832
|
-
type context$1_State = State;
|
|
6833
|
-
declare const context$1_State: typeof State;
|
|
6834
|
-
type context$1_StudioAssigned = StudioAssigned;
|
|
6835
|
-
type context$1_StudioUnassigned = StudioUnassigned;
|
|
6836
|
-
type context$1_Trigger = Trigger;
|
|
6837
|
-
declare const context$1_Trigger: typeof Trigger;
|
|
6838
|
-
type context$1_Type = Type;
|
|
6839
|
-
declare const context$1_Type: typeof Type;
|
|
6840
|
-
type context$1_UpdateSchedule = UpdateSchedule;
|
|
6841
|
-
type context$1_UpdateScheduleOptions = UpdateScheduleOptions;
|
|
6842
|
-
type context$1_UpdateScheduleRequest = UpdateScheduleRequest;
|
|
6843
|
-
type context$1_UpdateScheduleResponse = UpdateScheduleResponse;
|
|
6844
|
-
type context$1_UpdateScheduleResponseNonNullableFields = UpdateScheduleResponseNonNullableFields;
|
|
6845
|
-
type context$1_V4SiteCreated = V4SiteCreated;
|
|
6846
|
-
type context$1__publicOnScheduleCancelledType = _publicOnScheduleCancelledType;
|
|
6847
|
-
type context$1__publicOnScheduleClonedType = _publicOnScheduleClonedType;
|
|
6848
|
-
type context$1__publicOnScheduleCreatedType = _publicOnScheduleCreatedType;
|
|
6849
|
-
type context$1__publicOnScheduleUpdatedType = _publicOnScheduleUpdatedType;
|
|
6850
|
-
declare const context$1_cancelSchedule: typeof cancelSchedule;
|
|
6851
|
-
declare const context$1_createSchedule: typeof createSchedule;
|
|
6852
|
-
declare const context$1_getSchedule: typeof getSchedule;
|
|
6853
|
-
declare const context$1_onScheduleCancelled: typeof onScheduleCancelled;
|
|
6854
|
-
declare const context$1_onScheduleCloned: typeof onScheduleCloned;
|
|
6855
|
-
declare const context$1_onScheduleCreated: typeof onScheduleCreated;
|
|
6856
|
-
declare const context$1_onScheduleUpdated: typeof onScheduleUpdated;
|
|
6857
|
-
declare const context$1_querySchedules: typeof querySchedules;
|
|
6858
|
-
declare const context$1_updateSchedule: typeof updateSchedule;
|
|
6859
|
-
declare namespace context$1 {
|
|
6860
|
-
export { type ActionEvent$1 as ActionEvent, type Address$1 as Address, type AddressHint$1 as AddressHint, type context$1_Asset as Asset, type BaseEventMetadata$1 as BaseEventMetadata, type BusinessSchedule$1 as BusinessSchedule, type context$1_CancelScheduleOptions as CancelScheduleOptions, type context$1_CancelScheduleRequest as CancelScheduleRequest, type context$1_CancelScheduleResponse as CancelScheduleResponse, type context$1_CancelScheduleResponseNonNullableFields as CancelScheduleResponseNonNullableFields, type Categories$1 as Categories, type ChangeContext$1 as ChangeContext, type ChangeContextPayloadOneOf$1 as ChangeContextPayloadOneOf, type context$1_CloneScheduleRequest as CloneScheduleRequest, type context$1_CloneScheduleResponse as CloneScheduleResponse, type context$1_CommonIdentificationData as CommonIdentificationData, type context$1_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, type context$1_ConferencingDetails as ConferencingDetails, type ConsentPolicy$1 as ConsentPolicy, type context$1_CreateScheduleOptions as CreateScheduleOptions, type context$1_CreateScheduleRequest as CreateScheduleRequest, type context$1_CreateScheduleResponse as CreateScheduleResponse, type context$1_CreateScheduleResponseNonNullableFields as CreateScheduleResponseNonNullableFields, type context$1_CursorPaging as CursorPaging, type context$1_CursorPagingMetadata as CursorPagingMetadata, type context$1_CursorQuery as CursorQuery, type context$1_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context$1_Cursors as Cursors, DayOfWeek$1 as DayOfWeek, type context$1_DeleteContext as DeleteContext, context$1_DeleteStatus as DeleteStatus, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_ExtendedFields as ExtendedFields, type GeoCoordinates$1 as GeoCoordinates, type context$1_GetScheduleOptions as GetScheduleOptions, type context$1_GetScheduleRequest as GetScheduleRequest, type context$1_GetScheduleResponse as GetScheduleResponse, type context$1_GetScheduleResponseNonNullableFields as GetScheduleResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, context$1_IdentityType as IdentityType, type Locale$1 as Locale, type context$1_Location as Location, context$1_LocationType as LocationType, type MessageEnvelope$1 as MessageEnvelope, type context$1_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context$1_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, type Multilingual$1 as Multilingual, context$1_Namespace as Namespace, type context$1_NamespaceChanged as NamespaceChanged, type context$1_ParticipantNotification as ParticipantNotification, type context$1_Permission as Permission, PlacementType$1 as PlacementType, type Properties$1 as Properties, type PropertiesChange$1 as PropertiesChange, type context$1_QuerySchedulesOptions as QuerySchedulesOptions, type context$1_QuerySchedulesRequest as QuerySchedulesRequest, type context$1_QuerySchedulesResponse as QuerySchedulesResponse, type context$1_QuerySchedulesResponseNonNullableFields as QuerySchedulesResponseNonNullableFields, context$1_RequestedFields as RequestedFields, ResolutionMethod$1 as ResolutionMethod, type RestoreInfo$1 as RestoreInfo, context$1_Role as Role, type context$1_Schedule as Schedule, type context$1_ScheduleCancelled as ScheduleCancelled, type context$1_ScheduleCancelledEnvelope as ScheduleCancelledEnvelope, type context$1_ScheduleCloned as ScheduleCloned, type context$1_ScheduleClonedEnvelope as ScheduleClonedEnvelope, type context$1_ScheduleCreatedEnvelope as ScheduleCreatedEnvelope, type context$1_ScheduleNonNullableFields as ScheduleNonNullableFields, type context$1_ScheduleUpdatedEnvelope as ScheduleUpdatedEnvelope, type context$1_ScheduleUpdatedWithMetadata as ScheduleUpdatedWithMetadata, type context$1_SchedulesQueryBuilder as SchedulesQueryBuilder, type context$1_SchedulesQueryResult as SchedulesQueryResult, type context$1_ServiceProvisioned as ServiceProvisioned, type context$1_ServiceRemoved as ServiceRemoved, type SiteCloned$1 as SiteCloned, type SiteCreated$1 as SiteCreated, context$1_SiteCreatedContext as SiteCreatedContext, type context$1_SiteDeleted as SiteDeleted, type context$1_SiteHardDeleted as SiteHardDeleted, type context$1_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context$1_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type SitePropertiesEvent$1 as SitePropertiesEvent, type SitePropertiesNotification$1 as SitePropertiesNotification, type context$1_SitePublished as SitePublished, type context$1_SiteRenamed as SiteRenamed, type context$1_SiteTransferred as SiteTransferred, type context$1_SiteUndeleted as SiteUndeleted, type context$1_SiteUnpublished as SiteUnpublished, type SpecialHourPeriod$1 as SpecialHourPeriod, context$1_State as State, Status$1 as Status, type context$1_StudioAssigned as StudioAssigned, type context$1_StudioUnassigned as StudioUnassigned, type SupportedLanguage$1 as SupportedLanguage, type TimePeriod$1 as TimePeriod, type Translation$1 as Translation, context$1_Trigger as Trigger, context$1_Type as Type, type context$1_UpdateSchedule as UpdateSchedule, type context$1_UpdateScheduleOptions as UpdateScheduleOptions, type context$1_UpdateScheduleRequest as UpdateScheduleRequest, type context$1_UpdateScheduleResponse as UpdateScheduleResponse, type context$1_UpdateScheduleResponseNonNullableFields as UpdateScheduleResponseNonNullableFields, type context$1_V4SiteCreated as V4SiteCreated, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnScheduleCancelledType as _publicOnScheduleCancelledType, type context$1__publicOnScheduleClonedType as _publicOnScheduleClonedType, type context$1__publicOnScheduleCreatedType as _publicOnScheduleCreatedType, type context$1__publicOnScheduleUpdatedType as _publicOnScheduleUpdatedType, context$1_cancelSchedule as cancelSchedule, context$1_createSchedule as createSchedule, context$1_getSchedule as getSchedule, context$1_onScheduleCancelled as onScheduleCancelled, context$1_onScheduleCloned as onScheduleCloned, context$1_onScheduleCreated as onScheduleCreated, context$1_onScheduleUpdated as onScheduleUpdated, onScheduleCancelled$1 as publicOnScheduleCancelled, onScheduleCloned$1 as publicOnScheduleCloned, onScheduleCreated$1 as publicOnScheduleCreated, onScheduleUpdated$1 as publicOnScheduleUpdated, context$1_querySchedules as querySchedules, context$1_updateSchedule as updateSchedule };
|
|
6861
|
-
}
|
|
6862
|
-
|
|
6863
|
-
type HostModule<T, H extends Host> = {
|
|
6864
|
-
__type: 'host';
|
|
6865
|
-
create(host: H): T;
|
|
6866
|
-
};
|
|
6867
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6868
|
-
type Host<Environment = unknown> = {
|
|
6869
|
-
channel: {
|
|
6870
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
6871
|
-
disconnect: () => void;
|
|
6872
|
-
} | Promise<{
|
|
6873
|
-
disconnect: () => void;
|
|
6874
|
-
}>;
|
|
6875
|
-
};
|
|
6876
|
-
environment?: Environment;
|
|
6877
|
-
/**
|
|
6878
|
-
* Optional name of the environment, use for logging
|
|
6879
|
-
*/
|
|
6880
|
-
name?: string;
|
|
6881
|
-
/**
|
|
6882
|
-
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
6883
|
-
*/
|
|
6884
|
-
apiBaseUrl?: string;
|
|
6885
|
-
/**
|
|
6886
|
-
* Possible data to be provided by every host, for cross cutting concerns
|
|
6887
|
-
* like internationalization, billing, etc.
|
|
6888
|
-
*/
|
|
6889
|
-
essentials?: {
|
|
6890
|
-
/**
|
|
6891
|
-
* The language of the currently viewed session
|
|
6892
|
-
*/
|
|
6893
|
-
language?: string;
|
|
6894
|
-
/**
|
|
6895
|
-
* The locale of the currently viewed session
|
|
6896
|
-
*/
|
|
6897
|
-
locale?: string;
|
|
6898
|
-
/**
|
|
6899
|
-
* Any headers that should be passed through to the API requests
|
|
6900
|
-
*/
|
|
6901
|
-
passThroughHeaders?: Record<string, string>;
|
|
6902
|
-
};
|
|
6903
|
-
};
|
|
6904
|
-
|
|
6905
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
6906
|
-
interface HttpClient {
|
|
6907
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
6908
|
-
fetchWithAuth: typeof fetch;
|
|
6909
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6910
|
-
getActiveToken?: () => string | undefined;
|
|
6911
|
-
}
|
|
6912
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
6913
|
-
type HttpResponse<T = any> = {
|
|
6914
|
-
data: T;
|
|
6915
|
-
status: number;
|
|
6916
|
-
statusText: string;
|
|
6917
|
-
headers: any;
|
|
6918
|
-
request?: any;
|
|
6919
|
-
};
|
|
6920
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
6921
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
6922
|
-
url: string;
|
|
6923
|
-
data?: Data;
|
|
6924
|
-
params?: URLSearchParams;
|
|
6925
|
-
} & APIMetadata;
|
|
6926
|
-
type APIMetadata = {
|
|
6927
|
-
methodFqn?: string;
|
|
6928
|
-
entityFqdn?: string;
|
|
6929
|
-
packageName?: string;
|
|
6930
|
-
};
|
|
6931
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
6932
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
6933
|
-
__type: 'event-definition';
|
|
6934
|
-
type: Type;
|
|
6935
|
-
isDomainEvent?: boolean;
|
|
6936
|
-
transformations?: (envelope: unknown) => Payload;
|
|
6937
|
-
__payload: Payload;
|
|
6938
|
-
};
|
|
6939
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
6940
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
6941
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6942
|
-
|
|
6943
|
-
type ServicePluginMethodInput = {
|
|
6944
|
-
request: any;
|
|
6945
|
-
metadata: any;
|
|
6946
|
-
};
|
|
6947
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
6948
|
-
type ServicePluginMethodMetadata = {
|
|
6949
|
-
name: string;
|
|
6950
|
-
primaryHttpMappingPath: string;
|
|
6951
|
-
transformations: {
|
|
6952
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
6953
|
-
toREST: (...args: unknown[]) => unknown;
|
|
6954
|
-
};
|
|
6955
|
-
};
|
|
6956
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
6957
|
-
__type: 'service-plugin-definition';
|
|
6958
|
-
componentType: string;
|
|
6959
|
-
methods: ServicePluginMethodMetadata[];
|
|
6960
|
-
__contract: Contract;
|
|
6961
|
-
};
|
|
6962
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
6963
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
6964
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
6965
|
-
|
|
6966
|
-
type RequestContext = {
|
|
6967
|
-
isSSR: boolean;
|
|
6968
|
-
host: string;
|
|
6969
|
-
protocol?: string;
|
|
6970
|
-
};
|
|
6971
|
-
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
6972
|
-
/**
|
|
6973
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
6974
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
6975
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
6976
|
-
*/
|
|
6977
|
-
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
6978
|
-
type AmbassadorRequestOptions<T = any> = {
|
|
6979
|
-
_?: T;
|
|
6980
|
-
url?: string;
|
|
6981
|
-
method?: Method;
|
|
6982
|
-
params?: any;
|
|
6983
|
-
data?: any;
|
|
6984
|
-
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
6985
|
-
};
|
|
6986
|
-
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
6987
|
-
__isAmbassador: boolean;
|
|
6988
|
-
};
|
|
6989
|
-
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
6990
|
-
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
6991
|
-
|
|
6992
|
-
declare global {
|
|
6993
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6994
|
-
interface SymbolConstructor {
|
|
6995
|
-
readonly observable: symbol;
|
|
6996
|
-
}
|
|
6997
|
-
}
|
|
6998
|
-
|
|
6999
|
-
declare const emptyObjectSymbol: unique symbol;
|
|
7000
|
-
|
|
7001
|
-
/**
|
|
7002
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
7003
|
-
|
|
7004
|
-
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)).
|
|
7005
|
-
|
|
7006
|
-
@example
|
|
7007
|
-
```
|
|
7008
|
-
import type {EmptyObject} from 'type-fest';
|
|
7009
|
-
|
|
7010
|
-
// The following illustrates the problem with `{}`.
|
|
7011
|
-
const foo1: {} = {}; // Pass
|
|
7012
|
-
const foo2: {} = []; // Pass
|
|
7013
|
-
const foo3: {} = 42; // Pass
|
|
7014
|
-
const foo4: {} = {a: 1}; // Pass
|
|
7015
|
-
|
|
7016
|
-
// With `EmptyObject` only the first case is valid.
|
|
7017
|
-
const bar1: EmptyObject = {}; // Pass
|
|
7018
|
-
const bar2: EmptyObject = 42; // Fail
|
|
7019
|
-
const bar3: EmptyObject = []; // Fail
|
|
7020
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
7021
|
-
```
|
|
7022
|
-
|
|
7023
|
-
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}.
|
|
7024
|
-
|
|
7025
|
-
@category Object
|
|
7026
|
-
*/
|
|
7027
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
7028
|
-
|
|
7029
|
-
/**
|
|
7030
|
-
Returns a boolean for whether the two given types are equal.
|
|
7031
|
-
|
|
7032
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
7033
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
7034
|
-
|
|
7035
|
-
Use-cases:
|
|
7036
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
7037
|
-
|
|
7038
|
-
@example
|
|
7039
|
-
```
|
|
7040
|
-
import type {IsEqual} from 'type-fest';
|
|
7041
|
-
|
|
7042
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
7043
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
7044
|
-
type Includes<Value extends readonly any[], Item> =
|
|
7045
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
7046
|
-
? IsEqual<Value[0], Item> extends true
|
|
7047
|
-
? true
|
|
7048
|
-
: Includes<rest, Item>
|
|
7049
|
-
: false;
|
|
7050
|
-
```
|
|
7051
|
-
|
|
7052
|
-
@category Type Guard
|
|
7053
|
-
@category Utilities
|
|
7054
|
-
*/
|
|
7055
|
-
type IsEqual<A, B> =
|
|
7056
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
7057
|
-
(<G>() => G extends B ? 1 : 2)
|
|
7058
|
-
? true
|
|
7059
|
-
: false;
|
|
7060
|
-
|
|
7061
|
-
/**
|
|
7062
|
-
Filter out keys from an object.
|
|
7063
|
-
|
|
7064
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
7065
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
7066
|
-
Returns `Key` otherwise.
|
|
7067
|
-
|
|
7068
|
-
@example
|
|
7069
|
-
```
|
|
7070
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
7071
|
-
//=> never
|
|
7072
|
-
```
|
|
7073
|
-
|
|
7074
|
-
@example
|
|
7075
|
-
```
|
|
7076
|
-
type Filtered = Filter<'bar', string>;
|
|
7077
|
-
//=> never
|
|
7078
|
-
```
|
|
7079
|
-
|
|
7080
|
-
@example
|
|
7081
|
-
```
|
|
7082
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
7083
|
-
//=> 'bar'
|
|
7084
|
-
```
|
|
7085
|
-
|
|
7086
|
-
@see {Except}
|
|
7087
|
-
*/
|
|
7088
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
7089
|
-
|
|
7090
|
-
type ExceptOptions = {
|
|
7091
|
-
/**
|
|
7092
|
-
Disallow assigning non-specified properties.
|
|
7093
|
-
|
|
7094
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
7095
|
-
|
|
7096
|
-
@default false
|
|
7097
|
-
*/
|
|
7098
|
-
requireExactProps?: boolean;
|
|
7099
|
-
};
|
|
7100
|
-
|
|
7101
|
-
/**
|
|
7102
|
-
Create a type from an object type without certain keys.
|
|
7103
|
-
|
|
7104
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
7105
|
-
|
|
7106
|
-
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.
|
|
7107
|
-
|
|
7108
|
-
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)).
|
|
7109
|
-
|
|
7110
|
-
@example
|
|
7111
|
-
```
|
|
7112
|
-
import type {Except} from 'type-fest';
|
|
7113
|
-
|
|
7114
|
-
type Foo = {
|
|
7115
|
-
a: number;
|
|
7116
|
-
b: string;
|
|
7117
|
-
};
|
|
7118
|
-
|
|
7119
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
7120
|
-
//=> {b: string}
|
|
7121
|
-
|
|
7122
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
7123
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
7124
|
-
|
|
7125
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
7126
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
7127
|
-
|
|
7128
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
7129
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
7130
|
-
```
|
|
7131
|
-
|
|
7132
|
-
@category Object
|
|
7133
|
-
*/
|
|
7134
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
7135
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
7136
|
-
} & (Options['requireExactProps'] extends true
|
|
7137
|
-
? Partial<Record<KeysType, never>>
|
|
7138
|
-
: {});
|
|
7139
|
-
|
|
7140
|
-
/**
|
|
7141
|
-
Returns a boolean for whether the given type is `never`.
|
|
7142
|
-
|
|
7143
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
7144
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
7145
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
7146
|
-
|
|
7147
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
7148
|
-
|
|
7149
|
-
@example
|
|
7150
|
-
```
|
|
7151
|
-
import type {IsNever, And} from 'type-fest';
|
|
7152
|
-
|
|
7153
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
7154
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
7155
|
-
And<
|
|
7156
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
7157
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
7158
|
-
>;
|
|
7159
|
-
|
|
7160
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
7161
|
-
AreStringsEqual<I, O> extends true
|
|
7162
|
-
? never
|
|
7163
|
-
: void;
|
|
7164
|
-
|
|
7165
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
7166
|
-
if (input === output) {
|
|
7167
|
-
process.exit(0);
|
|
7168
|
-
}
|
|
7169
|
-
}
|
|
7170
|
-
|
|
7171
|
-
endIfEqual('abc', 'abc');
|
|
7172
|
-
//=> never
|
|
7173
|
-
|
|
7174
|
-
endIfEqual('abc', '123');
|
|
7175
|
-
//=> void
|
|
7176
|
-
```
|
|
7177
|
-
|
|
7178
|
-
@category Type Guard
|
|
7179
|
-
@category Utilities
|
|
7180
|
-
*/
|
|
7181
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
7182
|
-
|
|
7183
|
-
/**
|
|
7184
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
7185
|
-
|
|
7186
|
-
@see {@link IsNever}
|
|
7187
|
-
|
|
7188
|
-
@example
|
|
7189
|
-
```
|
|
7190
|
-
import type {IfNever} from 'type-fest';
|
|
7191
|
-
|
|
7192
|
-
type ShouldBeTrue = IfNever<never>;
|
|
7193
|
-
//=> true
|
|
7194
|
-
|
|
7195
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
7196
|
-
//=> 'bar'
|
|
7197
|
-
```
|
|
7198
|
-
|
|
7199
|
-
@category Type Guard
|
|
7200
|
-
@category Utilities
|
|
7201
|
-
*/
|
|
7202
|
-
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
7203
|
-
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
7204
|
-
);
|
|
7205
|
-
|
|
7206
|
-
/**
|
|
7207
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
7208
|
-
|
|
7209
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
7210
|
-
|
|
7211
|
-
@example
|
|
7212
|
-
```
|
|
7213
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
7214
|
-
|
|
7215
|
-
interface Example {
|
|
7216
|
-
a: string;
|
|
7217
|
-
b: string | number;
|
|
7218
|
-
c?: string;
|
|
7219
|
-
d: {};
|
|
7220
|
-
}
|
|
7221
|
-
|
|
7222
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
7223
|
-
//=> 'a'
|
|
7224
|
-
```
|
|
7225
|
-
|
|
7226
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
7227
|
-
|
|
7228
|
-
@example
|
|
7229
|
-
```
|
|
7230
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
7231
|
-
|
|
7232
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
7233
|
-
//=> 'a' | 'c'
|
|
7234
|
-
```
|
|
7235
|
-
|
|
7236
|
-
@category Object
|
|
7237
|
-
*/
|
|
7238
|
-
type ConditionalKeys<Base, Condition> =
|
|
7239
|
-
{
|
|
7240
|
-
// Map through all the keys of the given base type.
|
|
7241
|
-
[Key in keyof Base]-?:
|
|
7242
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
7243
|
-
Base[Key] extends Condition
|
|
7244
|
-
// Retain this key
|
|
7245
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
7246
|
-
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
7247
|
-
// Discard this key since the condition fails.
|
|
7248
|
-
: never;
|
|
7249
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
7250
|
-
}[keyof Base];
|
|
7251
|
-
|
|
7252
|
-
/**
|
|
7253
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
7254
|
-
|
|
7255
|
-
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.
|
|
7256
|
-
|
|
7257
|
-
@example
|
|
7258
|
-
```
|
|
7259
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
7260
|
-
|
|
7261
|
-
class Awesome {
|
|
7262
|
-
name: string;
|
|
7263
|
-
successes: number;
|
|
7264
|
-
failures: bigint;
|
|
7265
|
-
|
|
7266
|
-
run() {}
|
|
5210
|
+
* List of granted permissions for this schedule.
|
|
5211
|
+
*
|
|
5212
|
+
* E.g, a Bookings Staff Member has full write access to its schedule and limited access to events it provides.
|
|
5213
|
+
*/
|
|
5214
|
+
permissions?: Permission[];
|
|
5215
|
+
/** Extensions enabling applications or users to save custom data related to the schedule. */
|
|
5216
|
+
extendedFields?: ExtendedFields;
|
|
5217
|
+
/**
|
|
5218
|
+
* The schedule revision number, which incremented on updates.
|
|
5219
|
+
*
|
|
5220
|
+
* The current revision should be provided on updates to prevent conflicting changes.
|
|
5221
|
+
* @readonly
|
|
5222
|
+
*/
|
|
5223
|
+
revision?: string | null;
|
|
5224
|
+
/**
|
|
5225
|
+
* Date the schedule was created.
|
|
5226
|
+
* @readonly
|
|
5227
|
+
*/
|
|
5228
|
+
_createdDate?: Date;
|
|
5229
|
+
/**
|
|
5230
|
+
* Date the schedule was last updated.
|
|
5231
|
+
* @readonly
|
|
5232
|
+
*/
|
|
5233
|
+
_updatedDate?: Date;
|
|
5234
|
+
}
|
|
5235
|
+
interface UpdateScheduleOptions {
|
|
5236
|
+
/** Whether to notify participants regarding the changes. */
|
|
5237
|
+
participantNotification?: ParticipantNotification;
|
|
5238
|
+
}
|
|
5239
|
+
interface CancelScheduleOptions {
|
|
5240
|
+
/**
|
|
5241
|
+
* Whether to preserve future events with participants.
|
|
5242
|
+
* Default is false.
|
|
5243
|
+
*/
|
|
5244
|
+
preserveFutureEventsWithParticipants?: boolean | null;
|
|
5245
|
+
/** Whether to notify participants regarding the changes. */
|
|
5246
|
+
participantNotification?: ParticipantNotification;
|
|
7267
5247
|
}
|
|
7268
5248
|
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
@
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
5249
|
+
declare function getSchedule$1(httpClient: HttpClient): GetScheduleSignature;
|
|
5250
|
+
interface GetScheduleSignature {
|
|
5251
|
+
/**
|
|
5252
|
+
* Retrieves a schedule by ID.
|
|
5253
|
+
* @param - The ID of the schedule to retrieve.
|
|
5254
|
+
* @returns The schedule.
|
|
5255
|
+
*/
|
|
5256
|
+
(scheduleId: string | null, options?: GetScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
5257
|
+
}
|
|
5258
|
+
declare function querySchedules$1(httpClient: HttpClient): QuerySchedulesSignature;
|
|
5259
|
+
interface QuerySchedulesSignature {
|
|
5260
|
+
/**
|
|
5261
|
+
* Query for schedules given the provided filters and paging.
|
|
5262
|
+
*
|
|
5263
|
+
* By default only active schedules are returned, unless a `status` filter is provided.
|
|
5264
|
+
*/
|
|
5265
|
+
(options?: QuerySchedulesOptions | undefined): SchedulesQueryBuilder;
|
|
5266
|
+
}
|
|
5267
|
+
declare function createSchedule$1(httpClient: HttpClient): CreateScheduleSignature;
|
|
5268
|
+
interface CreateScheduleSignature {
|
|
5269
|
+
/**
|
|
5270
|
+
* Creates a schedule.
|
|
5271
|
+
* @param - The schedule to create.
|
|
5272
|
+
* @returns The created schedule.
|
|
5273
|
+
*/
|
|
5274
|
+
(schedule: Schedule, options?: CreateScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
5275
|
+
}
|
|
5276
|
+
declare function updateSchedule$1(httpClient: HttpClient): UpdateScheduleSignature;
|
|
5277
|
+
interface UpdateScheduleSignature {
|
|
5278
|
+
/**
|
|
5279
|
+
* Updates a schedule.
|
|
5280
|
+
* @param - The schedule ID.
|
|
5281
|
+
* @returns The updated schedule.
|
|
5282
|
+
*/
|
|
5283
|
+
(_id: string | null, schedule: UpdateSchedule, options?: UpdateScheduleOptions | undefined): Promise<Schedule & ScheduleNonNullableFields>;
|
|
5284
|
+
}
|
|
5285
|
+
declare function cancelSchedule$1(httpClient: HttpClient): CancelScheduleSignature;
|
|
5286
|
+
interface CancelScheduleSignature {
|
|
5287
|
+
/**
|
|
5288
|
+
* Cancels a schedule.
|
|
5289
|
+
* @param - The ID of the schedule to cancel.
|
|
5290
|
+
*/
|
|
5291
|
+
(scheduleId: string | null, options?: CancelScheduleOptions | undefined): Promise<CancelScheduleResponse & CancelScheduleResponseNonNullableFields>;
|
|
7282
5292
|
}
|
|
5293
|
+
declare const onScheduleCreated$1: EventDefinition<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
5294
|
+
declare const onScheduleUpdated$1: EventDefinition<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
5295
|
+
declare const onScheduleCloned$1: EventDefinition<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
5296
|
+
declare const onScheduleCancelled$1: EventDefinition<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
7283
5297
|
|
|
7284
|
-
|
|
7285
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
7286
|
-
```
|
|
5298
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
7287
5299
|
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
>;
|
|
5300
|
+
declare const getSchedule: MaybeContext<BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1>;
|
|
5301
|
+
declare const querySchedules: MaybeContext<BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1>;
|
|
5302
|
+
declare const createSchedule: MaybeContext<BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1>;
|
|
5303
|
+
declare const updateSchedule: MaybeContext<BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1>;
|
|
5304
|
+
declare const cancelSchedule: MaybeContext<BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1>;
|
|
7294
5305
|
|
|
5306
|
+
type _publicOnScheduleCreatedType = typeof onScheduleCreated$1;
|
|
7295
5307
|
/**
|
|
7296
|
-
*
|
|
7297
|
-
*
|
|
7298
|
-
*
|
|
7299
|
-
|
|
7300
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
7301
|
-
[key: string]: Descriptors | PublicMetadata | any;
|
|
7302
|
-
};
|
|
7303
|
-
/**
|
|
7304
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
7305
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
7306
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
7307
|
-
* do not match the given host (as they will not work with the given host).
|
|
5308
|
+
* Restore once implemented.
|
|
5309
|
+
* option (google.api.http) = {
|
|
5310
|
+
* post: "/v3/schedules/{schedule_id}/clone";
|
|
5311
|
+
* };
|
|
7308
5312
|
*/
|
|
7309
|
-
|
|
7310
|
-
done: T;
|
|
7311
|
-
recurse: T extends {
|
|
7312
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
7313
|
-
} ? 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<{
|
|
7314
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
7315
|
-
-1,
|
|
7316
|
-
0,
|
|
7317
|
-
1,
|
|
7318
|
-
2,
|
|
7319
|
-
3,
|
|
7320
|
-
4,
|
|
7321
|
-
5
|
|
7322
|
-
][Depth]> : never;
|
|
7323
|
-
}, EmptyObject>;
|
|
7324
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
7325
|
-
type PublicMetadata = {
|
|
7326
|
-
PACKAGE_NAME?: string;
|
|
7327
|
-
};
|
|
5313
|
+
declare const onScheduleCreated: ReturnType<typeof createEventModule$1<_publicOnScheduleCreatedType>>;
|
|
7328
5314
|
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
5315
|
+
type _publicOnScheduleUpdatedType = typeof onScheduleUpdated$1;
|
|
5316
|
+
/** */
|
|
5317
|
+
declare const onScheduleUpdated: ReturnType<typeof createEventModule$1<_publicOnScheduleUpdatedType>>;
|
|
5318
|
+
|
|
5319
|
+
type _publicOnScheduleClonedType = typeof onScheduleCloned$1;
|
|
5320
|
+
/** */
|
|
5321
|
+
declare const onScheduleCloned: ReturnType<typeof createEventModule$1<_publicOnScheduleClonedType>>;
|
|
5322
|
+
|
|
5323
|
+
type _publicOnScheduleCancelledType = typeof onScheduleCancelled$1;
|
|
5324
|
+
/** */
|
|
5325
|
+
declare const onScheduleCancelled: ReturnType<typeof createEventModule$1<_publicOnScheduleCancelledType>>;
|
|
5326
|
+
|
|
5327
|
+
type context$1_Asset = Asset;
|
|
5328
|
+
type context$1_CancelScheduleOptions = CancelScheduleOptions;
|
|
5329
|
+
type context$1_CancelScheduleRequest = CancelScheduleRequest;
|
|
5330
|
+
type context$1_CancelScheduleResponse = CancelScheduleResponse;
|
|
5331
|
+
type context$1_CancelScheduleResponseNonNullableFields = CancelScheduleResponseNonNullableFields;
|
|
5332
|
+
type context$1_CloneScheduleRequest = CloneScheduleRequest;
|
|
5333
|
+
type context$1_CloneScheduleResponse = CloneScheduleResponse;
|
|
5334
|
+
type context$1_CommonIdentificationData = CommonIdentificationData;
|
|
5335
|
+
type context$1_CommonIdentificationDataIdOneOf = CommonIdentificationDataIdOneOf;
|
|
5336
|
+
type context$1_ConferencingDetails = ConferencingDetails;
|
|
5337
|
+
type context$1_CreateScheduleOptions = CreateScheduleOptions;
|
|
5338
|
+
type context$1_CreateScheduleRequest = CreateScheduleRequest;
|
|
5339
|
+
type context$1_CreateScheduleResponse = CreateScheduleResponse;
|
|
5340
|
+
type context$1_CreateScheduleResponseNonNullableFields = CreateScheduleResponseNonNullableFields;
|
|
5341
|
+
type context$1_CursorPaging = CursorPaging;
|
|
5342
|
+
type context$1_CursorPagingMetadata = CursorPagingMetadata;
|
|
5343
|
+
type context$1_CursorQuery = CursorQuery;
|
|
5344
|
+
type context$1_CursorQueryPagingMethodOneOf = CursorQueryPagingMethodOneOf;
|
|
5345
|
+
type context$1_Cursors = Cursors;
|
|
5346
|
+
type context$1_DeleteContext = DeleteContext;
|
|
5347
|
+
type context$1_DeleteStatus = DeleteStatus;
|
|
5348
|
+
declare const context$1_DeleteStatus: typeof DeleteStatus;
|
|
5349
|
+
type context$1_ExtendedFields = ExtendedFields;
|
|
5350
|
+
type context$1_GetScheduleOptions = GetScheduleOptions;
|
|
5351
|
+
type context$1_GetScheduleRequest = GetScheduleRequest;
|
|
5352
|
+
type context$1_GetScheduleResponse = GetScheduleResponse;
|
|
5353
|
+
type context$1_GetScheduleResponseNonNullableFields = GetScheduleResponseNonNullableFields;
|
|
5354
|
+
type context$1_IdentityType = IdentityType;
|
|
5355
|
+
declare const context$1_IdentityType: typeof IdentityType;
|
|
5356
|
+
type context$1_Location = Location;
|
|
5357
|
+
type context$1_LocationType = LocationType;
|
|
5358
|
+
declare const context$1_LocationType: typeof LocationType;
|
|
5359
|
+
type context$1_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
|
|
5360
|
+
type context$1_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
|
|
5361
|
+
type context$1_Namespace = Namespace;
|
|
5362
|
+
declare const context$1_Namespace: typeof Namespace;
|
|
5363
|
+
type context$1_NamespaceChanged = NamespaceChanged;
|
|
5364
|
+
type context$1_ParticipantNotification = ParticipantNotification;
|
|
5365
|
+
type context$1_Permission = Permission;
|
|
5366
|
+
type context$1_QuerySchedulesOptions = QuerySchedulesOptions;
|
|
5367
|
+
type context$1_QuerySchedulesRequest = QuerySchedulesRequest;
|
|
5368
|
+
type context$1_QuerySchedulesResponse = QuerySchedulesResponse;
|
|
5369
|
+
type context$1_QuerySchedulesResponseNonNullableFields = QuerySchedulesResponseNonNullableFields;
|
|
5370
|
+
type context$1_RequestedFields = RequestedFields;
|
|
5371
|
+
declare const context$1_RequestedFields: typeof RequestedFields;
|
|
5372
|
+
type context$1_Role = Role;
|
|
5373
|
+
declare const context$1_Role: typeof Role;
|
|
5374
|
+
type context$1_Schedule = Schedule;
|
|
5375
|
+
type context$1_ScheduleCancelled = ScheduleCancelled;
|
|
5376
|
+
type context$1_ScheduleCancelledEnvelope = ScheduleCancelledEnvelope;
|
|
5377
|
+
type context$1_ScheduleCloned = ScheduleCloned;
|
|
5378
|
+
type context$1_ScheduleClonedEnvelope = ScheduleClonedEnvelope;
|
|
5379
|
+
type context$1_ScheduleCreatedEnvelope = ScheduleCreatedEnvelope;
|
|
5380
|
+
type context$1_ScheduleNonNullableFields = ScheduleNonNullableFields;
|
|
5381
|
+
type context$1_ScheduleUpdatedEnvelope = ScheduleUpdatedEnvelope;
|
|
5382
|
+
type context$1_ScheduleUpdatedWithMetadata = ScheduleUpdatedWithMetadata;
|
|
5383
|
+
type context$1_SchedulesQueryBuilder = SchedulesQueryBuilder;
|
|
5384
|
+
type context$1_SchedulesQueryResult = SchedulesQueryResult;
|
|
5385
|
+
type context$1_ServiceProvisioned = ServiceProvisioned;
|
|
5386
|
+
type context$1_ServiceRemoved = ServiceRemoved;
|
|
5387
|
+
type context$1_SiteCreatedContext = SiteCreatedContext;
|
|
5388
|
+
declare const context$1_SiteCreatedContext: typeof SiteCreatedContext;
|
|
5389
|
+
type context$1_SiteDeleted = SiteDeleted;
|
|
5390
|
+
type context$1_SiteHardDeleted = SiteHardDeleted;
|
|
5391
|
+
type context$1_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
|
|
5392
|
+
type context$1_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
|
|
5393
|
+
type context$1_SitePublished = SitePublished;
|
|
5394
|
+
type context$1_SiteRenamed = SiteRenamed;
|
|
5395
|
+
type context$1_SiteTransferred = SiteTransferred;
|
|
5396
|
+
type context$1_SiteUndeleted = SiteUndeleted;
|
|
5397
|
+
type context$1_SiteUnpublished = SiteUnpublished;
|
|
5398
|
+
type context$1_State = State;
|
|
5399
|
+
declare const context$1_State: typeof State;
|
|
5400
|
+
type context$1_StudioAssigned = StudioAssigned;
|
|
5401
|
+
type context$1_StudioUnassigned = StudioUnassigned;
|
|
5402
|
+
type context$1_Trigger = Trigger;
|
|
5403
|
+
declare const context$1_Trigger: typeof Trigger;
|
|
5404
|
+
type context$1_Type = Type;
|
|
5405
|
+
declare const context$1_Type: typeof Type;
|
|
5406
|
+
type context$1_UpdateSchedule = UpdateSchedule;
|
|
5407
|
+
type context$1_UpdateScheduleOptions = UpdateScheduleOptions;
|
|
5408
|
+
type context$1_UpdateScheduleRequest = UpdateScheduleRequest;
|
|
5409
|
+
type context$1_UpdateScheduleResponse = UpdateScheduleResponse;
|
|
5410
|
+
type context$1_UpdateScheduleResponseNonNullableFields = UpdateScheduleResponseNonNullableFields;
|
|
5411
|
+
type context$1_V4SiteCreated = V4SiteCreated;
|
|
5412
|
+
type context$1__publicOnScheduleCancelledType = _publicOnScheduleCancelledType;
|
|
5413
|
+
type context$1__publicOnScheduleClonedType = _publicOnScheduleClonedType;
|
|
5414
|
+
type context$1__publicOnScheduleCreatedType = _publicOnScheduleCreatedType;
|
|
5415
|
+
type context$1__publicOnScheduleUpdatedType = _publicOnScheduleUpdatedType;
|
|
5416
|
+
declare const context$1_cancelSchedule: typeof cancelSchedule;
|
|
5417
|
+
declare const context$1_createSchedule: typeof createSchedule;
|
|
5418
|
+
declare const context$1_getSchedule: typeof getSchedule;
|
|
5419
|
+
declare const context$1_onScheduleCancelled: typeof onScheduleCancelled;
|
|
5420
|
+
declare const context$1_onScheduleCloned: typeof onScheduleCloned;
|
|
5421
|
+
declare const context$1_onScheduleCreated: typeof onScheduleCreated;
|
|
5422
|
+
declare const context$1_onScheduleUpdated: typeof onScheduleUpdated;
|
|
5423
|
+
declare const context$1_querySchedules: typeof querySchedules;
|
|
5424
|
+
declare const context$1_updateSchedule: typeof updateSchedule;
|
|
5425
|
+
declare namespace context$1 {
|
|
5426
|
+
export { type ActionEvent$1 as ActionEvent, type Address$1 as Address, type AddressHint$1 as AddressHint, type context$1_Asset as Asset, type BaseEventMetadata$1 as BaseEventMetadata, type BusinessSchedule$1 as BusinessSchedule, type context$1_CancelScheduleOptions as CancelScheduleOptions, type context$1_CancelScheduleRequest as CancelScheduleRequest, type context$1_CancelScheduleResponse as CancelScheduleResponse, type context$1_CancelScheduleResponseNonNullableFields as CancelScheduleResponseNonNullableFields, type Categories$1 as Categories, type ChangeContext$1 as ChangeContext, type ChangeContextPayloadOneOf$1 as ChangeContextPayloadOneOf, type context$1_CloneScheduleRequest as CloneScheduleRequest, type context$1_CloneScheduleResponse as CloneScheduleResponse, type context$1_CommonIdentificationData as CommonIdentificationData, type context$1_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, type context$1_ConferencingDetails as ConferencingDetails, type ConsentPolicy$1 as ConsentPolicy, type context$1_CreateScheduleOptions as CreateScheduleOptions, type context$1_CreateScheduleRequest as CreateScheduleRequest, type context$1_CreateScheduleResponse as CreateScheduleResponse, type context$1_CreateScheduleResponseNonNullableFields as CreateScheduleResponseNonNullableFields, type context$1_CursorPaging as CursorPaging, type context$1_CursorPagingMetadata as CursorPagingMetadata, type context$1_CursorQuery as CursorQuery, type context$1_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context$1_Cursors as Cursors, DayOfWeek$1 as DayOfWeek, type context$1_DeleteContext as DeleteContext, context$1_DeleteStatus as DeleteStatus, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_ExtendedFields as ExtendedFields, type GeoCoordinates$1 as GeoCoordinates, type context$1_GetScheduleOptions as GetScheduleOptions, type context$1_GetScheduleRequest as GetScheduleRequest, type context$1_GetScheduleResponse as GetScheduleResponse, type context$1_GetScheduleResponseNonNullableFields as GetScheduleResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, context$1_IdentityType as IdentityType, type Locale$1 as Locale, type context$1_Location as Location, context$1_LocationType as LocationType, type MessageEnvelope$1 as MessageEnvelope, type context$1_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context$1_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, type Multilingual$1 as Multilingual, context$1_Namespace as Namespace, type context$1_NamespaceChanged as NamespaceChanged, type context$1_ParticipantNotification as ParticipantNotification, type context$1_Permission as Permission, PlacementType$1 as PlacementType, type Properties$1 as Properties, type PropertiesChange$1 as PropertiesChange, type context$1_QuerySchedulesOptions as QuerySchedulesOptions, type context$1_QuerySchedulesRequest as QuerySchedulesRequest, type context$1_QuerySchedulesResponse as QuerySchedulesResponse, type context$1_QuerySchedulesResponseNonNullableFields as QuerySchedulesResponseNonNullableFields, context$1_RequestedFields as RequestedFields, ResolutionMethod$1 as ResolutionMethod, type RestoreInfo$1 as RestoreInfo, context$1_Role as Role, type context$1_Schedule as Schedule, type context$1_ScheduleCancelled as ScheduleCancelled, type context$1_ScheduleCancelledEnvelope as ScheduleCancelledEnvelope, type context$1_ScheduleCloned as ScheduleCloned, type context$1_ScheduleClonedEnvelope as ScheduleClonedEnvelope, type context$1_ScheduleCreatedEnvelope as ScheduleCreatedEnvelope, type context$1_ScheduleNonNullableFields as ScheduleNonNullableFields, type context$1_ScheduleUpdatedEnvelope as ScheduleUpdatedEnvelope, type context$1_ScheduleUpdatedWithMetadata as ScheduleUpdatedWithMetadata, type context$1_SchedulesQueryBuilder as SchedulesQueryBuilder, type context$1_SchedulesQueryResult as SchedulesQueryResult, type context$1_ServiceProvisioned as ServiceProvisioned, type context$1_ServiceRemoved as ServiceRemoved, type SiteCloned$1 as SiteCloned, type SiteCreated$1 as SiteCreated, context$1_SiteCreatedContext as SiteCreatedContext, type context$1_SiteDeleted as SiteDeleted, type context$1_SiteHardDeleted as SiteHardDeleted, type context$1_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context$1_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type SitePropertiesEvent$1 as SitePropertiesEvent, type SitePropertiesNotification$1 as SitePropertiesNotification, type context$1_SitePublished as SitePublished, type context$1_SiteRenamed as SiteRenamed, type context$1_SiteTransferred as SiteTransferred, type context$1_SiteUndeleted as SiteUndeleted, type context$1_SiteUnpublished as SiteUnpublished, type SpecialHourPeriod$1 as SpecialHourPeriod, context$1_State as State, Status$1 as Status, type context$1_StudioAssigned as StudioAssigned, type context$1_StudioUnassigned as StudioUnassigned, type SupportedLanguage$1 as SupportedLanguage, type TimePeriod$1 as TimePeriod, type Translation$1 as Translation, context$1_Trigger as Trigger, context$1_Type as Type, type context$1_UpdateSchedule as UpdateSchedule, type context$1_UpdateScheduleOptions as UpdateScheduleOptions, type context$1_UpdateScheduleRequest as UpdateScheduleRequest, type context$1_UpdateScheduleResponse as UpdateScheduleResponse, type context$1_UpdateScheduleResponseNonNullableFields as UpdateScheduleResponseNonNullableFields, type context$1_V4SiteCreated as V4SiteCreated, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnScheduleCancelledType as _publicOnScheduleCancelledType, type context$1__publicOnScheduleClonedType as _publicOnScheduleClonedType, type context$1__publicOnScheduleCreatedType as _publicOnScheduleCreatedType, type context$1__publicOnScheduleUpdatedType as _publicOnScheduleUpdatedType, context$1_cancelSchedule as cancelSchedule, context$1_createSchedule as createSchedule, context$1_getSchedule as getSchedule, context$1_onScheduleCancelled as onScheduleCancelled, context$1_onScheduleCloned as onScheduleCloned, context$1_onScheduleCreated as onScheduleCreated, context$1_onScheduleUpdated as onScheduleUpdated, onScheduleCancelled$1 as publicOnScheduleCancelled, onScheduleCloned$1 as publicOnScheduleCloned, onScheduleCreated$1 as publicOnScheduleCreated, onScheduleUpdated$1 as publicOnScheduleUpdated, context$1_querySchedules as querySchedules, context$1_updateSchedule as updateSchedule };
|
|
7332
5427
|
}
|
|
7333
|
-
/**
|
|
7334
|
-
* A type used to create concerete types from SDK descriptors in
|
|
7335
|
-
* case a contextual client is available.
|
|
7336
|
-
*/
|
|
7337
|
-
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
7338
|
-
host: Host;
|
|
7339
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
7340
5428
|
|
|
7341
5429
|
interface ScheduleTimeFrame {
|
|
7342
5430
|
/**
|