@wix/calendar 1.0.13 → 1.0.14
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/build/cjs/context.js +1 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -0
- package/package.json +5 -5
- package/type-bundles/context.bundle.d.ts +457 -60
- package/type-bundles/index.bundle.d.ts +457 -60
package/build/cjs/context.js
CHANGED
|
@@ -27,3 +27,4 @@ exports.scheduleTimeFrames = exports.schedules = exports.events = void 0;
|
|
|
27
27
|
exports.events = __importStar(require("@wix/calendar_events/context"));
|
|
28
28
|
exports.schedules = __importStar(require("@wix/calendar_schedules/context"));
|
|
29
29
|
exports.scheduleTimeFrames = __importStar(require("@wix/calendar_schedule-time-frames/context"));
|
|
30
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAuD;AACvD,6EAA6D;AAC7D,iGAAiF"}
|
package/build/cjs/index.js
CHANGED
|
@@ -30,3 +30,4 @@ const schedules = __importStar(require("@wix/calendar_schedules"));
|
|
|
30
30
|
exports.schedules = schedules;
|
|
31
31
|
const scheduleTimeFrames = __importStar(require("@wix/calendar_schedule-time-frames"));
|
|
32
32
|
exports.scheduleTimeFrames = scheduleTimeFrames;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA+C;AAItC,wBAAM;AAHf,mEAAqD;AAGpC,8BAAS;AAF1B,uFAAyE;AAE7C,gDAAkB"}
|
package/build/cjs/meta.js
CHANGED
|
@@ -27,3 +27,4 @@ exports.scheduleTimeFrames = exports.schedules = exports.events = void 0;
|
|
|
27
27
|
exports.events = __importStar(require("@wix/calendar_events/meta"));
|
|
28
28
|
exports.schedules = __importStar(require("@wix/calendar_schedules/meta"));
|
|
29
29
|
exports.scheduleTimeFrames = __importStar(require("@wix/calendar_schedule-time-frames/meta"));
|
|
30
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAoD;AACpD,0EAA0D;AAC1D,8FAA8E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/calendar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/calendar_events": "1.0.
|
|
22
|
-
"@wix/calendar_schedule-time-frames": "1.0.
|
|
23
|
-
"@wix/calendar_schedules": "1.0.
|
|
21
|
+
"@wix/calendar_events": "1.0.9",
|
|
22
|
+
"@wix/calendar_schedule-time-frames": "1.0.7",
|
|
23
|
+
"@wix/calendar_schedules": "1.0.10"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"glob": "^10.4.1",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"fqdn": ""
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "6d8ef2313cf9248305dbc7ad7078345b4496f56a75b6c431e63bee2f"
|
|
49
49
|
}
|
|
@@ -1,8 +1,47 @@
|
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
|
+
__type: 'host';
|
|
3
|
+
create(host: H): T;
|
|
4
|
+
};
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
|
+
channel: {
|
|
8
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
|
+
disconnect: () => void;
|
|
10
|
+
} | Promise<{
|
|
11
|
+
disconnect: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
|
+
*/
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
21
|
+
* like internationalization, billing, etc.
|
|
22
|
+
*/
|
|
23
|
+
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
27
|
+
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
1
39
|
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
40
|
interface HttpClient {
|
|
3
41
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
42
|
fetchWithAuth: typeof fetch;
|
|
5
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
|
+
getActiveToken?: () => string | undefined;
|
|
6
45
|
}
|
|
7
46
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
47
|
type HttpResponse<T = any> = {
|
|
@@ -24,16 +63,65 @@ type APIMetadata = {
|
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
65
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
66
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
28
67
|
__type: 'event-definition';
|
|
29
68
|
type: Type;
|
|
30
69
|
isDomainEvent?: boolean;
|
|
31
70
|
transformations?: (envelope: unknown) => Payload;
|
|
32
71
|
__payload: Payload;
|
|
33
72
|
};
|
|
34
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
73
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
74
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
76
|
+
|
|
77
|
+
type ServicePluginMethodInput = {
|
|
78
|
+
request: any;
|
|
79
|
+
metadata: any;
|
|
80
|
+
};
|
|
81
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata = {
|
|
83
|
+
name: string;
|
|
84
|
+
primaryHttpMappingPath: string;
|
|
85
|
+
transformations: {
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
|
+
toREST: (...args: unknown[]) => unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
|
+
__type: 'service-plugin-definition';
|
|
92
|
+
componentType: string;
|
|
93
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
|
+
__contract: Contract;
|
|
95
|
+
};
|
|
96
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
97
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
98
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
99
|
+
|
|
100
|
+
type RequestContext = {
|
|
101
|
+
isSSR: boolean;
|
|
102
|
+
host: string;
|
|
103
|
+
protocol?: string;
|
|
104
|
+
};
|
|
105
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
|
+
/**
|
|
107
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
|
+
*/
|
|
111
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
113
|
+
_?: T;
|
|
114
|
+
url?: string;
|
|
115
|
+
method?: Method;
|
|
116
|
+
params?: any;
|
|
117
|
+
data?: any;
|
|
118
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
|
+
};
|
|
120
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
|
+
__isAmbassador: boolean;
|
|
122
|
+
};
|
|
123
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
124
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
37
125
|
|
|
38
126
|
declare global {
|
|
39
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -42,6 +130,284 @@ declare global {
|
|
|
42
130
|
}
|
|
43
131
|
}
|
|
44
132
|
|
|
133
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
137
|
+
|
|
138
|
+
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)).
|
|
139
|
+
|
|
140
|
+
@example
|
|
141
|
+
```
|
|
142
|
+
import type {EmptyObject} from 'type-fest';
|
|
143
|
+
|
|
144
|
+
// The following illustrates the problem with `{}`.
|
|
145
|
+
const foo1: {} = {}; // Pass
|
|
146
|
+
const foo2: {} = []; // Pass
|
|
147
|
+
const foo3: {} = 42; // Pass
|
|
148
|
+
const foo4: {} = {a: 1}; // Pass
|
|
149
|
+
|
|
150
|
+
// With `EmptyObject` only the first case is valid.
|
|
151
|
+
const bar1: EmptyObject = {}; // Pass
|
|
152
|
+
const bar2: EmptyObject = 42; // Fail
|
|
153
|
+
const bar3: EmptyObject = []; // Fail
|
|
154
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
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}.
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
Returns a boolean for whether the two given types are equal.
|
|
165
|
+
|
|
166
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
167
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
168
|
+
|
|
169
|
+
Use-cases:
|
|
170
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
171
|
+
|
|
172
|
+
@example
|
|
173
|
+
```
|
|
174
|
+
import type {IsEqual} from 'type-fest';
|
|
175
|
+
|
|
176
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
177
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
178
|
+
type Includes<Value extends readonly any[], Item> =
|
|
179
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
180
|
+
? IsEqual<Value[0], Item> extends true
|
|
181
|
+
? true
|
|
182
|
+
: Includes<rest, Item>
|
|
183
|
+
: false;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
@category Type Guard
|
|
187
|
+
@category Utilities
|
|
188
|
+
*/
|
|
189
|
+
type IsEqual<A, B> =
|
|
190
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
191
|
+
(<G>() => G extends B ? 1 : 2)
|
|
192
|
+
? true
|
|
193
|
+
: false;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Filter out keys from an object.
|
|
197
|
+
|
|
198
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
199
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
200
|
+
Returns `Key` otherwise.
|
|
201
|
+
|
|
202
|
+
@example
|
|
203
|
+
```
|
|
204
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
205
|
+
//=> never
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
@example
|
|
209
|
+
```
|
|
210
|
+
type Filtered = Filter<'bar', string>;
|
|
211
|
+
//=> never
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
@example
|
|
215
|
+
```
|
|
216
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
217
|
+
//=> 'bar'
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
@see {Except}
|
|
221
|
+
*/
|
|
222
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
|
+
|
|
224
|
+
type ExceptOptions = {
|
|
225
|
+
/**
|
|
226
|
+
Disallow assigning non-specified properties.
|
|
227
|
+
|
|
228
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
229
|
+
|
|
230
|
+
@default false
|
|
231
|
+
*/
|
|
232
|
+
requireExactProps?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Create a type from an object type without certain keys.
|
|
237
|
+
|
|
238
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
239
|
+
|
|
240
|
+
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.
|
|
241
|
+
|
|
242
|
+
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)).
|
|
243
|
+
|
|
244
|
+
@example
|
|
245
|
+
```
|
|
246
|
+
import type {Except} from 'type-fest';
|
|
247
|
+
|
|
248
|
+
type Foo = {
|
|
249
|
+
a: number;
|
|
250
|
+
b: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
254
|
+
//=> {b: string}
|
|
255
|
+
|
|
256
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
257
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
258
|
+
|
|
259
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
260
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
261
|
+
|
|
262
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
263
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
@category Object
|
|
267
|
+
*/
|
|
268
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
|
+
} & (Options['requireExactProps'] extends true
|
|
271
|
+
? Partial<Record<KeysType, never>>
|
|
272
|
+
: {});
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
|
+
|
|
277
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
278
|
+
|
|
279
|
+
@example
|
|
280
|
+
```
|
|
281
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
282
|
+
|
|
283
|
+
interface Example {
|
|
284
|
+
a: string;
|
|
285
|
+
b: string | number;
|
|
286
|
+
c?: string;
|
|
287
|
+
d: {};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
291
|
+
//=> 'a'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
295
|
+
|
|
296
|
+
@example
|
|
297
|
+
```
|
|
298
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
299
|
+
|
|
300
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
301
|
+
//=> 'a' | 'c'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
@category Object
|
|
305
|
+
*/
|
|
306
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
307
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
|
+
{
|
|
309
|
+
// Map through all the keys of the given base type.
|
|
310
|
+
[Key in keyof Base]:
|
|
311
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
312
|
+
Base[Key] extends Condition
|
|
313
|
+
// Retain this key since the condition passes.
|
|
314
|
+
? Key
|
|
315
|
+
// Discard this key since the condition fails.
|
|
316
|
+
: never;
|
|
317
|
+
|
|
318
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
+
}[keyof Base]
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
324
|
+
|
|
325
|
+
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.
|
|
326
|
+
|
|
327
|
+
@example
|
|
328
|
+
```
|
|
329
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
330
|
+
|
|
331
|
+
class Awesome {
|
|
332
|
+
name: string;
|
|
333
|
+
successes: number;
|
|
334
|
+
failures: bigint;
|
|
335
|
+
|
|
336
|
+
run() {}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
340
|
+
//=> {run: () => void}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
```
|
|
345
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
346
|
+
|
|
347
|
+
interface Example {
|
|
348
|
+
a: string;
|
|
349
|
+
b: string | number;
|
|
350
|
+
c: () => void;
|
|
351
|
+
d: {};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
355
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
@category Object
|
|
359
|
+
*/
|
|
360
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
|
+
Base,
|
|
362
|
+
ConditionalKeys<Base, Condition>
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
367
|
+
* can either be a REST module or a host module.
|
|
368
|
+
* This type is recursive, so it can describe nested modules.
|
|
369
|
+
*/
|
|
370
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$3<any> | ServicePluginDefinition<any> | {
|
|
371
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
375
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
376
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
|
+
* do not match the given host (as they will not work with the given host).
|
|
378
|
+
*/
|
|
379
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
|
+
done: T;
|
|
381
|
+
recurse: T extends {
|
|
382
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
|
+
-1,
|
|
386
|
+
0,
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
4,
|
|
391
|
+
5
|
|
392
|
+
][Depth]> : never;
|
|
393
|
+
}, EmptyObject>;
|
|
394
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
+
type PublicMetadata = {
|
|
396
|
+
PACKAGE_NAME?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
declare global {
|
|
400
|
+
interface ContextualClient {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A type used to create concerete types from SDK descriptors in
|
|
405
|
+
* case a contextual client is available.
|
|
406
|
+
*/
|
|
407
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host;
|
|
409
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
|
+
|
|
45
411
|
interface Event {
|
|
46
412
|
/**
|
|
47
413
|
* The event ID.
|
|
@@ -2119,26 +2485,44 @@ interface ListEventsByMemberIdSignature {
|
|
|
2119
2485
|
*/
|
|
2120
2486
|
(memberId: string | null, options?: ListEventsByMemberIdOptions | undefined): Promise<ListEventsByMemberIdResponse & ListEventsByMemberIdResponseNonNullableFields>;
|
|
2121
2487
|
}
|
|
2122
|
-
declare const onEventCreated$1: EventDefinition<EventCreatedEnvelope, "wix.calendar.v3.event_created">;
|
|
2123
|
-
declare const onEventUpdated$1: EventDefinition<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
2124
|
-
declare const onEventRecurringSplit$1: EventDefinition<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
2125
|
-
declare const onEventCancelled$1: EventDefinition<EventCancelledEnvelope, "wix.calendar.v3.event_cancelled">;
|
|
2488
|
+
declare const onEventCreated$1: EventDefinition$3<EventCreatedEnvelope, "wix.calendar.v3.event_created">;
|
|
2489
|
+
declare const onEventUpdated$1: EventDefinition$3<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
2490
|
+
declare const onEventRecurringSplit$1: EventDefinition$3<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
2491
|
+
declare const onEventCancelled$1: EventDefinition$3<EventCancelledEnvelope, "wix.calendar.v3.event_cancelled">;
|
|
2126
2492
|
|
|
2127
|
-
|
|
2493
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2494
|
+
__type: 'event-definition';
|
|
2495
|
+
type: Type;
|
|
2496
|
+
isDomainEvent?: boolean;
|
|
2497
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2498
|
+
__payload: Payload;
|
|
2499
|
+
};
|
|
2500
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2501
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
2502
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
2503
|
+
|
|
2504
|
+
declare global {
|
|
2505
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2506
|
+
interface SymbolConstructor {
|
|
2507
|
+
readonly observable: symbol;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
2128
2512
|
|
|
2129
|
-
declare const getEvent: BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1
|
|
2130
|
-
declare const listEvents: BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1
|
|
2131
|
-
declare const queryEvents: BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1
|
|
2132
|
-
declare const createEvent: BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1
|
|
2133
|
-
declare const bulkCreateEvent: BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1
|
|
2134
|
-
declare const updateEvent: BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1
|
|
2135
|
-
declare const bulkUpdateEvent: BuildRESTFunction<typeof bulkUpdateEvent$1> & typeof bulkUpdateEvent$1
|
|
2136
|
-
declare const restoreEventDefaults: BuildRESTFunction<typeof restoreEventDefaults$1> & typeof restoreEventDefaults$1
|
|
2137
|
-
declare const splitRecurringEvent: BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1
|
|
2138
|
-
declare const cancelEvent: BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1
|
|
2139
|
-
declare const bulkCancelEvent: BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1
|
|
2140
|
-
declare const listEventsByContactId: BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1
|
|
2141
|
-
declare const listEventsByMemberId: BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1
|
|
2513
|
+
declare const getEvent: MaybeContext<BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1>;
|
|
2514
|
+
declare const listEvents: MaybeContext<BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1>;
|
|
2515
|
+
declare const queryEvents: MaybeContext<BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1>;
|
|
2516
|
+
declare const createEvent: MaybeContext<BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1>;
|
|
2517
|
+
declare const bulkCreateEvent: MaybeContext<BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1>;
|
|
2518
|
+
declare const updateEvent: MaybeContext<BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1>;
|
|
2519
|
+
declare const bulkUpdateEvent: MaybeContext<BuildRESTFunction<typeof bulkUpdateEvent$1> & typeof bulkUpdateEvent$1>;
|
|
2520
|
+
declare const restoreEventDefaults: MaybeContext<BuildRESTFunction<typeof restoreEventDefaults$1> & typeof restoreEventDefaults$1>;
|
|
2521
|
+
declare const splitRecurringEvent: MaybeContext<BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1>;
|
|
2522
|
+
declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
|
|
2523
|
+
declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
|
|
2524
|
+
declare const listEventsByContactId: MaybeContext<BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1>;
|
|
2525
|
+
declare const listEventsByMemberId: MaybeContext<BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1>;
|
|
2142
2526
|
|
|
2143
2527
|
type _publicOnEventCreatedType = typeof onEventCreated$1;
|
|
2144
2528
|
/** */
|
|
@@ -3593,19 +3977,37 @@ interface CancelScheduleSignature {
|
|
|
3593
3977
|
*/
|
|
3594
3978
|
(scheduleId: string | null, options?: CancelScheduleOptions | undefined): Promise<CancelScheduleResponse & CancelScheduleResponseNonNullableFields>;
|
|
3595
3979
|
}
|
|
3596
|
-
declare const onScheduleCreated$1: EventDefinition<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
3597
|
-
declare const onScheduleUpdated$1: EventDefinition<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
3598
|
-
declare const onScheduleCloned$1: EventDefinition<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
3599
|
-
declare const onScheduleCancelled$1: EventDefinition<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
3980
|
+
declare const onScheduleCreated$1: EventDefinition$3<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
3981
|
+
declare const onScheduleUpdated$1: EventDefinition$3<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
3982
|
+
declare const onScheduleCloned$1: EventDefinition$3<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
3983
|
+
declare const onScheduleCancelled$1: EventDefinition$3<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
3984
|
+
|
|
3985
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3986
|
+
__type: 'event-definition';
|
|
3987
|
+
type: Type;
|
|
3988
|
+
isDomainEvent?: boolean;
|
|
3989
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3990
|
+
__payload: Payload;
|
|
3991
|
+
};
|
|
3992
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3993
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3994
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3995
|
+
|
|
3996
|
+
declare global {
|
|
3997
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3998
|
+
interface SymbolConstructor {
|
|
3999
|
+
readonly observable: symbol;
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
3600
4002
|
|
|
3601
|
-
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4003
|
+
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
3602
4004
|
|
|
3603
|
-
declare const getSchedule: BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1
|
|
3604
|
-
declare const querySchedules: BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1
|
|
3605
|
-
declare const createSchedule: BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1
|
|
3606
|
-
declare const updateSchedule: BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1
|
|
3607
|
-
declare const cloneSchedule: BuildRESTFunction<typeof cloneSchedule$1> & typeof cloneSchedule$1
|
|
3608
|
-
declare const cancelSchedule: BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1
|
|
4005
|
+
declare const getSchedule: MaybeContext<BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1>;
|
|
4006
|
+
declare const querySchedules: MaybeContext<BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1>;
|
|
4007
|
+
declare const createSchedule: MaybeContext<BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1>;
|
|
4008
|
+
declare const updateSchedule: MaybeContext<BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1>;
|
|
4009
|
+
declare const cloneSchedule: MaybeContext<BuildRESTFunction<typeof cloneSchedule$1> & typeof cloneSchedule$1>;
|
|
4010
|
+
declare const cancelSchedule: MaybeContext<BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1>;
|
|
3609
4011
|
|
|
3610
4012
|
type _publicOnScheduleCreatedType = typeof onScheduleCreated$1;
|
|
3611
4013
|
/** */
|
|
@@ -4260,13 +4662,6 @@ interface ScheduleTimeFrameUpdatedEnvelope {
|
|
|
4260
4662
|
entity: ScheduleTimeFrame;
|
|
4261
4663
|
metadata: EventMetadata;
|
|
4262
4664
|
}
|
|
4263
|
-
interface ScheduleTimeFrameCreatedEnvelope {
|
|
4264
|
-
entity: ScheduleTimeFrame;
|
|
4265
|
-
metadata: EventMetadata;
|
|
4266
|
-
}
|
|
4267
|
-
interface ScheduleTimeFrameDeletedEnvelope {
|
|
4268
|
-
metadata: EventMetadata;
|
|
4269
|
-
}
|
|
4270
4665
|
interface GetScheduleTimeFrameOptions {
|
|
4271
4666
|
/**
|
|
4272
4667
|
* Optional time zone used to adjust the returned time.
|
|
@@ -4299,27 +4694,35 @@ interface ListScheduleTimeFramesSignature {
|
|
|
4299
4694
|
*/
|
|
4300
4695
|
(ids: string[], options?: ListScheduleTimeFramesOptions | undefined): Promise<ListScheduleTimeFramesResponse & ListScheduleTimeFramesResponseNonNullableFields>;
|
|
4301
4696
|
}
|
|
4302
|
-
declare const onScheduleTimeFrameUpdated$1: EventDefinition<ScheduleTimeFrameUpdatedEnvelope, "wix.calendar.v3.schedule_time_frame_updated">;
|
|
4303
|
-
|
|
4304
|
-
|
|
4697
|
+
declare const onScheduleTimeFrameUpdated$1: EventDefinition$3<ScheduleTimeFrameUpdatedEnvelope, "wix.calendar.v3.schedule_time_frame_updated">;
|
|
4698
|
+
|
|
4699
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4700
|
+
__type: 'event-definition';
|
|
4701
|
+
type: Type;
|
|
4702
|
+
isDomainEvent?: boolean;
|
|
4703
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4704
|
+
__payload: Payload;
|
|
4705
|
+
};
|
|
4706
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4707
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4708
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4709
|
+
|
|
4710
|
+
declare global {
|
|
4711
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4712
|
+
interface SymbolConstructor {
|
|
4713
|
+
readonly observable: symbol;
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4305
4716
|
|
|
4306
4717
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4307
4718
|
|
|
4308
|
-
declare const getScheduleTimeFrame: BuildRESTFunction<typeof getScheduleTimeFrame$1> & typeof getScheduleTimeFrame$1
|
|
4309
|
-
declare const listScheduleTimeFrames: BuildRESTFunction<typeof listScheduleTimeFrames$1> & typeof listScheduleTimeFrames$1
|
|
4719
|
+
declare const getScheduleTimeFrame: MaybeContext<BuildRESTFunction<typeof getScheduleTimeFrame$1> & typeof getScheduleTimeFrame$1>;
|
|
4720
|
+
declare const listScheduleTimeFrames: MaybeContext<BuildRESTFunction<typeof listScheduleTimeFrames$1> & typeof listScheduleTimeFrames$1>;
|
|
4310
4721
|
|
|
4311
4722
|
type _publicOnScheduleTimeFrameUpdatedType = typeof onScheduleTimeFrameUpdated$1;
|
|
4312
4723
|
/** */
|
|
4313
4724
|
declare const onScheduleTimeFrameUpdated: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameUpdatedType>>;
|
|
4314
4725
|
|
|
4315
|
-
type _publicOnScheduleTimeFrameCreatedType = typeof onScheduleTimeFrameCreated$1;
|
|
4316
|
-
/** */
|
|
4317
|
-
declare const onScheduleTimeFrameCreated: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameCreatedType>>;
|
|
4318
|
-
|
|
4319
|
-
type _publicOnScheduleTimeFrameDeletedType = typeof onScheduleTimeFrameDeleted$1;
|
|
4320
|
-
/** */
|
|
4321
|
-
declare const onScheduleTimeFrameDeleted: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameDeletedType>>;
|
|
4322
|
-
|
|
4323
4726
|
type context_ActionEvent = ActionEvent;
|
|
4324
4727
|
type context_Address = Address;
|
|
4325
4728
|
type context_AddressHint = AddressHint;
|
|
@@ -4360,8 +4763,6 @@ type context_ResolutionMethod = ResolutionMethod;
|
|
|
4360
4763
|
declare const context_ResolutionMethod: typeof ResolutionMethod;
|
|
4361
4764
|
type context_RestoreInfo = RestoreInfo;
|
|
4362
4765
|
type context_ScheduleTimeFrame = ScheduleTimeFrame;
|
|
4363
|
-
type context_ScheduleTimeFrameCreatedEnvelope = ScheduleTimeFrameCreatedEnvelope;
|
|
4364
|
-
type context_ScheduleTimeFrameDeletedEnvelope = ScheduleTimeFrameDeletedEnvelope;
|
|
4365
4766
|
type context_ScheduleTimeFrameNonNullableFields = ScheduleTimeFrameNonNullableFields;
|
|
4366
4767
|
type context_ScheduleTimeFrameUpdatedEnvelope = ScheduleTimeFrameUpdatedEnvelope;
|
|
4367
4768
|
type context_ScheduleTimeFrameUpdatedWithMetadata = ScheduleTimeFrameUpdatedWithMetadata;
|
|
@@ -4378,16 +4779,12 @@ type context_Translation = Translation;
|
|
|
4378
4779
|
type context_WebhookIdentityType = WebhookIdentityType;
|
|
4379
4780
|
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
4380
4781
|
type context_ZonedDate = ZonedDate;
|
|
4381
|
-
type context__publicOnScheduleTimeFrameCreatedType = _publicOnScheduleTimeFrameCreatedType;
|
|
4382
|
-
type context__publicOnScheduleTimeFrameDeletedType = _publicOnScheduleTimeFrameDeletedType;
|
|
4383
4782
|
type context__publicOnScheduleTimeFrameUpdatedType = _publicOnScheduleTimeFrameUpdatedType;
|
|
4384
4783
|
declare const context_getScheduleTimeFrame: typeof getScheduleTimeFrame;
|
|
4385
4784
|
declare const context_listScheduleTimeFrames: typeof listScheduleTimeFrames;
|
|
4386
|
-
declare const context_onScheduleTimeFrameCreated: typeof onScheduleTimeFrameCreated;
|
|
4387
|
-
declare const context_onScheduleTimeFrameDeleted: typeof onScheduleTimeFrameDeleted;
|
|
4388
4785
|
declare const context_onScheduleTimeFrameUpdated: typeof onScheduleTimeFrameUpdated;
|
|
4389
4786
|
declare namespace context {
|
|
4390
|
-
export { type context_ActionEvent as ActionEvent, type context_Address as Address, type context_AddressHint as AddressHint, type context_BaseEventMetadata as BaseEventMetadata, type context_BusinessSchedule as BusinessSchedule, type context_Categories as Categories, type context_ChangeContext as ChangeContext, type context_ChangeContextPayloadOneOf as ChangeContextPayloadOneOf, type context_ConsentPolicy as ConsentPolicy, context_DayOfWeek as DayOfWeek, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_GeoCoordinates as GeoCoordinates, type context_GetScheduleTimeFrameOptions as GetScheduleTimeFrameOptions, type context_GetScheduleTimeFrameRequest as GetScheduleTimeFrameRequest, type context_GetScheduleTimeFrameResponse as GetScheduleTimeFrameResponse, type context_GetScheduleTimeFrameResponseNonNullableFields as GetScheduleTimeFrameResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_ListScheduleTimeFramesOptions as ListScheduleTimeFramesOptions, type context_ListScheduleTimeFramesRequest as ListScheduleTimeFramesRequest, type context_ListScheduleTimeFramesResponse as ListScheduleTimeFramesResponse, type context_ListScheduleTimeFramesResponseNonNullableFields as ListScheduleTimeFramesResponseNonNullableFields, type context_Locale as Locale, type context_MessageEnvelope as MessageEnvelope, type context_Multilingual as Multilingual, context_PlacementType as PlacementType, type context_Properties as Properties, type context_PropertiesChange as PropertiesChange, context_ResolutionMethod as ResolutionMethod, type context_RestoreInfo as RestoreInfo, type context_ScheduleTimeFrame as ScheduleTimeFrame, type
|
|
4787
|
+
export { type context_ActionEvent as ActionEvent, type context_Address as Address, type context_AddressHint as AddressHint, type context_BaseEventMetadata as BaseEventMetadata, type context_BusinessSchedule as BusinessSchedule, type context_Categories as Categories, type context_ChangeContext as ChangeContext, type context_ChangeContextPayloadOneOf as ChangeContextPayloadOneOf, type context_ConsentPolicy as ConsentPolicy, context_DayOfWeek as DayOfWeek, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_GeoCoordinates as GeoCoordinates, type context_GetScheduleTimeFrameOptions as GetScheduleTimeFrameOptions, type context_GetScheduleTimeFrameRequest as GetScheduleTimeFrameRequest, type context_GetScheduleTimeFrameResponse as GetScheduleTimeFrameResponse, type context_GetScheduleTimeFrameResponseNonNullableFields as GetScheduleTimeFrameResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_ListScheduleTimeFramesOptions as ListScheduleTimeFramesOptions, type context_ListScheduleTimeFramesRequest as ListScheduleTimeFramesRequest, type context_ListScheduleTimeFramesResponse as ListScheduleTimeFramesResponse, type context_ListScheduleTimeFramesResponseNonNullableFields as ListScheduleTimeFramesResponseNonNullableFields, type context_Locale as Locale, type context_MessageEnvelope as MessageEnvelope, type context_Multilingual as Multilingual, context_PlacementType as PlacementType, type context_Properties as Properties, type context_PropertiesChange as PropertiesChange, context_ResolutionMethod as ResolutionMethod, type context_RestoreInfo as RestoreInfo, type context_ScheduleTimeFrame as ScheduleTimeFrame, type context_ScheduleTimeFrameNonNullableFields as ScheduleTimeFrameNonNullableFields, type context_ScheduleTimeFrameUpdatedEnvelope as ScheduleTimeFrameUpdatedEnvelope, type context_ScheduleTimeFrameUpdatedWithMetadata as ScheduleTimeFrameUpdatedWithMetadata, type context_SiteCloned as SiteCloned, type context_SiteCreated as SiteCreated, type context_SitePropertiesEvent as SitePropertiesEvent, type context_SitePropertiesNotification as SitePropertiesNotification, type context_SpecialHourPeriod as SpecialHourPeriod, context_Status as Status, type context_SupportedLanguage as SupportedLanguage, type context_TimePeriod as TimePeriod, type context_Translation as Translation, context_WebhookIdentityType as WebhookIdentityType, type context_ZonedDate as ZonedDate, type context__publicOnScheduleTimeFrameUpdatedType as _publicOnScheduleTimeFrameUpdatedType, context_getScheduleTimeFrame as getScheduleTimeFrame, context_listScheduleTimeFrames as listScheduleTimeFrames, context_onScheduleTimeFrameUpdated as onScheduleTimeFrameUpdated, onScheduleTimeFrameUpdated$1 as publicOnScheduleTimeFrameUpdated };
|
|
4391
4788
|
}
|
|
4392
4789
|
|
|
4393
4790
|
export { context$2 as events, context as scheduleTimeFrames, context$1 as schedules };
|
|
@@ -1,8 +1,47 @@
|
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
|
+
__type: 'host';
|
|
3
|
+
create(host: H): T;
|
|
4
|
+
};
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
|
+
channel: {
|
|
8
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
|
+
disconnect: () => void;
|
|
10
|
+
} | Promise<{
|
|
11
|
+
disconnect: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
|
+
*/
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
21
|
+
* like internationalization, billing, etc.
|
|
22
|
+
*/
|
|
23
|
+
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
27
|
+
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
1
39
|
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
40
|
interface HttpClient {
|
|
3
41
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
42
|
fetchWithAuth: typeof fetch;
|
|
5
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
|
+
getActiveToken?: () => string | undefined;
|
|
6
45
|
}
|
|
7
46
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
47
|
type HttpResponse<T = any> = {
|
|
@@ -24,16 +63,65 @@ type APIMetadata = {
|
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
65
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
66
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
28
67
|
__type: 'event-definition';
|
|
29
68
|
type: Type;
|
|
30
69
|
isDomainEvent?: boolean;
|
|
31
70
|
transformations?: (envelope: unknown) => Payload;
|
|
32
71
|
__payload: Payload;
|
|
33
72
|
};
|
|
34
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
73
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
74
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
76
|
+
|
|
77
|
+
type ServicePluginMethodInput = {
|
|
78
|
+
request: any;
|
|
79
|
+
metadata: any;
|
|
80
|
+
};
|
|
81
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata = {
|
|
83
|
+
name: string;
|
|
84
|
+
primaryHttpMappingPath: string;
|
|
85
|
+
transformations: {
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
|
+
toREST: (...args: unknown[]) => unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
|
+
__type: 'service-plugin-definition';
|
|
92
|
+
componentType: string;
|
|
93
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
|
+
__contract: Contract;
|
|
95
|
+
};
|
|
96
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
97
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
98
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
99
|
+
|
|
100
|
+
type RequestContext = {
|
|
101
|
+
isSSR: boolean;
|
|
102
|
+
host: string;
|
|
103
|
+
protocol?: string;
|
|
104
|
+
};
|
|
105
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
|
+
/**
|
|
107
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
|
+
*/
|
|
111
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
113
|
+
_?: T;
|
|
114
|
+
url?: string;
|
|
115
|
+
method?: Method;
|
|
116
|
+
params?: any;
|
|
117
|
+
data?: any;
|
|
118
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
|
+
};
|
|
120
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
|
+
__isAmbassador: boolean;
|
|
122
|
+
};
|
|
123
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
124
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
37
125
|
|
|
38
126
|
declare global {
|
|
39
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -42,6 +130,284 @@ declare global {
|
|
|
42
130
|
}
|
|
43
131
|
}
|
|
44
132
|
|
|
133
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
137
|
+
|
|
138
|
+
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)).
|
|
139
|
+
|
|
140
|
+
@example
|
|
141
|
+
```
|
|
142
|
+
import type {EmptyObject} from 'type-fest';
|
|
143
|
+
|
|
144
|
+
// The following illustrates the problem with `{}`.
|
|
145
|
+
const foo1: {} = {}; // Pass
|
|
146
|
+
const foo2: {} = []; // Pass
|
|
147
|
+
const foo3: {} = 42; // Pass
|
|
148
|
+
const foo4: {} = {a: 1}; // Pass
|
|
149
|
+
|
|
150
|
+
// With `EmptyObject` only the first case is valid.
|
|
151
|
+
const bar1: EmptyObject = {}; // Pass
|
|
152
|
+
const bar2: EmptyObject = 42; // Fail
|
|
153
|
+
const bar3: EmptyObject = []; // Fail
|
|
154
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
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}.
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
Returns a boolean for whether the two given types are equal.
|
|
165
|
+
|
|
166
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
167
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
168
|
+
|
|
169
|
+
Use-cases:
|
|
170
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
171
|
+
|
|
172
|
+
@example
|
|
173
|
+
```
|
|
174
|
+
import type {IsEqual} from 'type-fest';
|
|
175
|
+
|
|
176
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
177
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
178
|
+
type Includes<Value extends readonly any[], Item> =
|
|
179
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
180
|
+
? IsEqual<Value[0], Item> extends true
|
|
181
|
+
? true
|
|
182
|
+
: Includes<rest, Item>
|
|
183
|
+
: false;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
@category Type Guard
|
|
187
|
+
@category Utilities
|
|
188
|
+
*/
|
|
189
|
+
type IsEqual<A, B> =
|
|
190
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
191
|
+
(<G>() => G extends B ? 1 : 2)
|
|
192
|
+
? true
|
|
193
|
+
: false;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Filter out keys from an object.
|
|
197
|
+
|
|
198
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
199
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
200
|
+
Returns `Key` otherwise.
|
|
201
|
+
|
|
202
|
+
@example
|
|
203
|
+
```
|
|
204
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
205
|
+
//=> never
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
@example
|
|
209
|
+
```
|
|
210
|
+
type Filtered = Filter<'bar', string>;
|
|
211
|
+
//=> never
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
@example
|
|
215
|
+
```
|
|
216
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
217
|
+
//=> 'bar'
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
@see {Except}
|
|
221
|
+
*/
|
|
222
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
|
+
|
|
224
|
+
type ExceptOptions = {
|
|
225
|
+
/**
|
|
226
|
+
Disallow assigning non-specified properties.
|
|
227
|
+
|
|
228
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
229
|
+
|
|
230
|
+
@default false
|
|
231
|
+
*/
|
|
232
|
+
requireExactProps?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Create a type from an object type without certain keys.
|
|
237
|
+
|
|
238
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
239
|
+
|
|
240
|
+
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.
|
|
241
|
+
|
|
242
|
+
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)).
|
|
243
|
+
|
|
244
|
+
@example
|
|
245
|
+
```
|
|
246
|
+
import type {Except} from 'type-fest';
|
|
247
|
+
|
|
248
|
+
type Foo = {
|
|
249
|
+
a: number;
|
|
250
|
+
b: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
254
|
+
//=> {b: string}
|
|
255
|
+
|
|
256
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
257
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
258
|
+
|
|
259
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
260
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
261
|
+
|
|
262
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
263
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
@category Object
|
|
267
|
+
*/
|
|
268
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
|
+
} & (Options['requireExactProps'] extends true
|
|
271
|
+
? Partial<Record<KeysType, never>>
|
|
272
|
+
: {});
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
|
+
|
|
277
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
278
|
+
|
|
279
|
+
@example
|
|
280
|
+
```
|
|
281
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
282
|
+
|
|
283
|
+
interface Example {
|
|
284
|
+
a: string;
|
|
285
|
+
b: string | number;
|
|
286
|
+
c?: string;
|
|
287
|
+
d: {};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
291
|
+
//=> 'a'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
295
|
+
|
|
296
|
+
@example
|
|
297
|
+
```
|
|
298
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
299
|
+
|
|
300
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
301
|
+
//=> 'a' | 'c'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
@category Object
|
|
305
|
+
*/
|
|
306
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
307
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
|
+
{
|
|
309
|
+
// Map through all the keys of the given base type.
|
|
310
|
+
[Key in keyof Base]:
|
|
311
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
312
|
+
Base[Key] extends Condition
|
|
313
|
+
// Retain this key since the condition passes.
|
|
314
|
+
? Key
|
|
315
|
+
// Discard this key since the condition fails.
|
|
316
|
+
: never;
|
|
317
|
+
|
|
318
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
+
}[keyof Base]
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
324
|
+
|
|
325
|
+
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.
|
|
326
|
+
|
|
327
|
+
@example
|
|
328
|
+
```
|
|
329
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
330
|
+
|
|
331
|
+
class Awesome {
|
|
332
|
+
name: string;
|
|
333
|
+
successes: number;
|
|
334
|
+
failures: bigint;
|
|
335
|
+
|
|
336
|
+
run() {}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
340
|
+
//=> {run: () => void}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
```
|
|
345
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
346
|
+
|
|
347
|
+
interface Example {
|
|
348
|
+
a: string;
|
|
349
|
+
b: string | number;
|
|
350
|
+
c: () => void;
|
|
351
|
+
d: {};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
355
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
@category Object
|
|
359
|
+
*/
|
|
360
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
|
+
Base,
|
|
362
|
+
ConditionalKeys<Base, Condition>
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
367
|
+
* can either be a REST module or a host module.
|
|
368
|
+
* This type is recursive, so it can describe nested modules.
|
|
369
|
+
*/
|
|
370
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$3<any> | ServicePluginDefinition<any> | {
|
|
371
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
375
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
376
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
|
+
* do not match the given host (as they will not work with the given host).
|
|
378
|
+
*/
|
|
379
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
|
+
done: T;
|
|
381
|
+
recurse: T extends {
|
|
382
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
|
+
-1,
|
|
386
|
+
0,
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
4,
|
|
391
|
+
5
|
|
392
|
+
][Depth]> : never;
|
|
393
|
+
}, EmptyObject>;
|
|
394
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
+
type PublicMetadata = {
|
|
396
|
+
PACKAGE_NAME?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
declare global {
|
|
400
|
+
interface ContextualClient {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A type used to create concerete types from SDK descriptors in
|
|
405
|
+
* case a contextual client is available.
|
|
406
|
+
*/
|
|
407
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host;
|
|
409
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
|
+
|
|
45
411
|
interface Event {
|
|
46
412
|
/**
|
|
47
413
|
* The event ID.
|
|
@@ -2119,26 +2485,44 @@ interface ListEventsByMemberIdSignature {
|
|
|
2119
2485
|
*/
|
|
2120
2486
|
(memberId: string | null, options?: ListEventsByMemberIdOptions | undefined): Promise<ListEventsByMemberIdResponse & ListEventsByMemberIdResponseNonNullableFields>;
|
|
2121
2487
|
}
|
|
2122
|
-
declare const onEventCreated$1: EventDefinition<EventCreatedEnvelope, "wix.calendar.v3.event_created">;
|
|
2123
|
-
declare const onEventUpdated$1: EventDefinition<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
2124
|
-
declare const onEventRecurringSplit$1: EventDefinition<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
2125
|
-
declare const onEventCancelled$1: EventDefinition<EventCancelledEnvelope, "wix.calendar.v3.event_cancelled">;
|
|
2488
|
+
declare const onEventCreated$1: EventDefinition$3<EventCreatedEnvelope, "wix.calendar.v3.event_created">;
|
|
2489
|
+
declare const onEventUpdated$1: EventDefinition$3<EventUpdatedEnvelope, "wix.calendar.v3.event_updated">;
|
|
2490
|
+
declare const onEventRecurringSplit$1: EventDefinition$3<EventRecurringSplitEnvelope, "wix.calendar.v3.event_recurring_split">;
|
|
2491
|
+
declare const onEventCancelled$1: EventDefinition$3<EventCancelledEnvelope, "wix.calendar.v3.event_cancelled">;
|
|
2126
2492
|
|
|
2127
|
-
|
|
2493
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2494
|
+
__type: 'event-definition';
|
|
2495
|
+
type: Type;
|
|
2496
|
+
isDomainEvent?: boolean;
|
|
2497
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2498
|
+
__payload: Payload;
|
|
2499
|
+
};
|
|
2500
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2501
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
2502
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
2503
|
+
|
|
2504
|
+
declare global {
|
|
2505
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2506
|
+
interface SymbolConstructor {
|
|
2507
|
+
readonly observable: symbol;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
2128
2512
|
|
|
2129
|
-
declare const getEvent: BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1
|
|
2130
|
-
declare const listEvents: BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1
|
|
2131
|
-
declare const queryEvents: BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1
|
|
2132
|
-
declare const createEvent: BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1
|
|
2133
|
-
declare const bulkCreateEvent: BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1
|
|
2134
|
-
declare const updateEvent: BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1
|
|
2135
|
-
declare const bulkUpdateEvent: BuildRESTFunction<typeof bulkUpdateEvent$1> & typeof bulkUpdateEvent$1
|
|
2136
|
-
declare const restoreEventDefaults: BuildRESTFunction<typeof restoreEventDefaults$1> & typeof restoreEventDefaults$1
|
|
2137
|
-
declare const splitRecurringEvent: BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1
|
|
2138
|
-
declare const cancelEvent: BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1
|
|
2139
|
-
declare const bulkCancelEvent: BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1
|
|
2140
|
-
declare const listEventsByContactId: BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1
|
|
2141
|
-
declare const listEventsByMemberId: BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1
|
|
2513
|
+
declare const getEvent: MaybeContext<BuildRESTFunction<typeof getEvent$1> & typeof getEvent$1>;
|
|
2514
|
+
declare const listEvents: MaybeContext<BuildRESTFunction<typeof listEvents$1> & typeof listEvents$1>;
|
|
2515
|
+
declare const queryEvents: MaybeContext<BuildRESTFunction<typeof queryEvents$1> & typeof queryEvents$1>;
|
|
2516
|
+
declare const createEvent: MaybeContext<BuildRESTFunction<typeof createEvent$1> & typeof createEvent$1>;
|
|
2517
|
+
declare const bulkCreateEvent: MaybeContext<BuildRESTFunction<typeof bulkCreateEvent$1> & typeof bulkCreateEvent$1>;
|
|
2518
|
+
declare const updateEvent: MaybeContext<BuildRESTFunction<typeof updateEvent$1> & typeof updateEvent$1>;
|
|
2519
|
+
declare const bulkUpdateEvent: MaybeContext<BuildRESTFunction<typeof bulkUpdateEvent$1> & typeof bulkUpdateEvent$1>;
|
|
2520
|
+
declare const restoreEventDefaults: MaybeContext<BuildRESTFunction<typeof restoreEventDefaults$1> & typeof restoreEventDefaults$1>;
|
|
2521
|
+
declare const splitRecurringEvent: MaybeContext<BuildRESTFunction<typeof splitRecurringEvent$1> & typeof splitRecurringEvent$1>;
|
|
2522
|
+
declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
|
|
2523
|
+
declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
|
|
2524
|
+
declare const listEventsByContactId: MaybeContext<BuildRESTFunction<typeof listEventsByContactId$1> & typeof listEventsByContactId$1>;
|
|
2525
|
+
declare const listEventsByMemberId: MaybeContext<BuildRESTFunction<typeof listEventsByMemberId$1> & typeof listEventsByMemberId$1>;
|
|
2142
2526
|
|
|
2143
2527
|
type _publicOnEventCreatedType = typeof onEventCreated$1;
|
|
2144
2528
|
/** */
|
|
@@ -3593,19 +3977,37 @@ interface CancelScheduleSignature {
|
|
|
3593
3977
|
*/
|
|
3594
3978
|
(scheduleId: string | null, options?: CancelScheduleOptions | undefined): Promise<CancelScheduleResponse & CancelScheduleResponseNonNullableFields>;
|
|
3595
3979
|
}
|
|
3596
|
-
declare const onScheduleCreated$1: EventDefinition<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
3597
|
-
declare const onScheduleUpdated$1: EventDefinition<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
3598
|
-
declare const onScheduleCloned$1: EventDefinition<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
3599
|
-
declare const onScheduleCancelled$1: EventDefinition<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
3980
|
+
declare const onScheduleCreated$1: EventDefinition$3<ScheduleCreatedEnvelope, "wix.calendar.v3.schedule_created">;
|
|
3981
|
+
declare const onScheduleUpdated$1: EventDefinition$3<ScheduleUpdatedEnvelope, "wix.calendar.v3.schedule_updated">;
|
|
3982
|
+
declare const onScheduleCloned$1: EventDefinition$3<ScheduleClonedEnvelope, "wix.calendar.v3.schedule_cloned">;
|
|
3983
|
+
declare const onScheduleCancelled$1: EventDefinition$3<ScheduleCancelledEnvelope, "wix.calendar.v3.schedule_cancelled">;
|
|
3984
|
+
|
|
3985
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3986
|
+
__type: 'event-definition';
|
|
3987
|
+
type: Type;
|
|
3988
|
+
isDomainEvent?: boolean;
|
|
3989
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3990
|
+
__payload: Payload;
|
|
3991
|
+
};
|
|
3992
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3993
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3994
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3995
|
+
|
|
3996
|
+
declare global {
|
|
3997
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3998
|
+
interface SymbolConstructor {
|
|
3999
|
+
readonly observable: symbol;
|
|
4000
|
+
}
|
|
4001
|
+
}
|
|
3600
4002
|
|
|
3601
|
-
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4003
|
+
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
3602
4004
|
|
|
3603
|
-
declare const getSchedule: BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1
|
|
3604
|
-
declare const querySchedules: BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1
|
|
3605
|
-
declare const createSchedule: BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1
|
|
3606
|
-
declare const updateSchedule: BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1
|
|
3607
|
-
declare const cloneSchedule: BuildRESTFunction<typeof cloneSchedule$1> & typeof cloneSchedule$1
|
|
3608
|
-
declare const cancelSchedule: BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1
|
|
4005
|
+
declare const getSchedule: MaybeContext<BuildRESTFunction<typeof getSchedule$1> & typeof getSchedule$1>;
|
|
4006
|
+
declare const querySchedules: MaybeContext<BuildRESTFunction<typeof querySchedules$1> & typeof querySchedules$1>;
|
|
4007
|
+
declare const createSchedule: MaybeContext<BuildRESTFunction<typeof createSchedule$1> & typeof createSchedule$1>;
|
|
4008
|
+
declare const updateSchedule: MaybeContext<BuildRESTFunction<typeof updateSchedule$1> & typeof updateSchedule$1>;
|
|
4009
|
+
declare const cloneSchedule: MaybeContext<BuildRESTFunction<typeof cloneSchedule$1> & typeof cloneSchedule$1>;
|
|
4010
|
+
declare const cancelSchedule: MaybeContext<BuildRESTFunction<typeof cancelSchedule$1> & typeof cancelSchedule$1>;
|
|
3609
4011
|
|
|
3610
4012
|
type _publicOnScheduleCreatedType = typeof onScheduleCreated$1;
|
|
3611
4013
|
/** */
|
|
@@ -4260,13 +4662,6 @@ interface ScheduleTimeFrameUpdatedEnvelope {
|
|
|
4260
4662
|
entity: ScheduleTimeFrame;
|
|
4261
4663
|
metadata: EventMetadata;
|
|
4262
4664
|
}
|
|
4263
|
-
interface ScheduleTimeFrameCreatedEnvelope {
|
|
4264
|
-
entity: ScheduleTimeFrame;
|
|
4265
|
-
metadata: EventMetadata;
|
|
4266
|
-
}
|
|
4267
|
-
interface ScheduleTimeFrameDeletedEnvelope {
|
|
4268
|
-
metadata: EventMetadata;
|
|
4269
|
-
}
|
|
4270
4665
|
interface GetScheduleTimeFrameOptions {
|
|
4271
4666
|
/**
|
|
4272
4667
|
* Optional time zone used to adjust the returned time.
|
|
@@ -4299,27 +4694,35 @@ interface ListScheduleTimeFramesSignature {
|
|
|
4299
4694
|
*/
|
|
4300
4695
|
(ids: string[], options?: ListScheduleTimeFramesOptions | undefined): Promise<ListScheduleTimeFramesResponse & ListScheduleTimeFramesResponseNonNullableFields>;
|
|
4301
4696
|
}
|
|
4302
|
-
declare const onScheduleTimeFrameUpdated$1: EventDefinition<ScheduleTimeFrameUpdatedEnvelope, "wix.calendar.v3.schedule_time_frame_updated">;
|
|
4303
|
-
|
|
4304
|
-
|
|
4697
|
+
declare const onScheduleTimeFrameUpdated$1: EventDefinition$3<ScheduleTimeFrameUpdatedEnvelope, "wix.calendar.v3.schedule_time_frame_updated">;
|
|
4698
|
+
|
|
4699
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4700
|
+
__type: 'event-definition';
|
|
4701
|
+
type: Type;
|
|
4702
|
+
isDomainEvent?: boolean;
|
|
4703
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4704
|
+
__payload: Payload;
|
|
4705
|
+
};
|
|
4706
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4707
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4708
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4709
|
+
|
|
4710
|
+
declare global {
|
|
4711
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4712
|
+
interface SymbolConstructor {
|
|
4713
|
+
readonly observable: symbol;
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4305
4716
|
|
|
4306
4717
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4307
4718
|
|
|
4308
|
-
declare const getScheduleTimeFrame: BuildRESTFunction<typeof getScheduleTimeFrame$1> & typeof getScheduleTimeFrame$1
|
|
4309
|
-
declare const listScheduleTimeFrames: BuildRESTFunction<typeof listScheduleTimeFrames$1> & typeof listScheduleTimeFrames$1
|
|
4719
|
+
declare const getScheduleTimeFrame: MaybeContext<BuildRESTFunction<typeof getScheduleTimeFrame$1> & typeof getScheduleTimeFrame$1>;
|
|
4720
|
+
declare const listScheduleTimeFrames: MaybeContext<BuildRESTFunction<typeof listScheduleTimeFrames$1> & typeof listScheduleTimeFrames$1>;
|
|
4310
4721
|
|
|
4311
4722
|
type _publicOnScheduleTimeFrameUpdatedType = typeof onScheduleTimeFrameUpdated$1;
|
|
4312
4723
|
/** */
|
|
4313
4724
|
declare const onScheduleTimeFrameUpdated: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameUpdatedType>>;
|
|
4314
4725
|
|
|
4315
|
-
type _publicOnScheduleTimeFrameCreatedType = typeof onScheduleTimeFrameCreated$1;
|
|
4316
|
-
/** */
|
|
4317
|
-
declare const onScheduleTimeFrameCreated: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameCreatedType>>;
|
|
4318
|
-
|
|
4319
|
-
type _publicOnScheduleTimeFrameDeletedType = typeof onScheduleTimeFrameDeleted$1;
|
|
4320
|
-
/** */
|
|
4321
|
-
declare const onScheduleTimeFrameDeleted: ReturnType<typeof createEventModule<_publicOnScheduleTimeFrameDeletedType>>;
|
|
4322
|
-
|
|
4323
4726
|
type index_d_ActionEvent = ActionEvent;
|
|
4324
4727
|
type index_d_Address = Address;
|
|
4325
4728
|
type index_d_AddressHint = AddressHint;
|
|
@@ -4360,8 +4763,6 @@ type index_d_ResolutionMethod = ResolutionMethod;
|
|
|
4360
4763
|
declare const index_d_ResolutionMethod: typeof ResolutionMethod;
|
|
4361
4764
|
type index_d_RestoreInfo = RestoreInfo;
|
|
4362
4765
|
type index_d_ScheduleTimeFrame = ScheduleTimeFrame;
|
|
4363
|
-
type index_d_ScheduleTimeFrameCreatedEnvelope = ScheduleTimeFrameCreatedEnvelope;
|
|
4364
|
-
type index_d_ScheduleTimeFrameDeletedEnvelope = ScheduleTimeFrameDeletedEnvelope;
|
|
4365
4766
|
type index_d_ScheduleTimeFrameNonNullableFields = ScheduleTimeFrameNonNullableFields;
|
|
4366
4767
|
type index_d_ScheduleTimeFrameUpdatedEnvelope = ScheduleTimeFrameUpdatedEnvelope;
|
|
4367
4768
|
type index_d_ScheduleTimeFrameUpdatedWithMetadata = ScheduleTimeFrameUpdatedWithMetadata;
|
|
@@ -4378,16 +4779,12 @@ type index_d_Translation = Translation;
|
|
|
4378
4779
|
type index_d_WebhookIdentityType = WebhookIdentityType;
|
|
4379
4780
|
declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
|
|
4380
4781
|
type index_d_ZonedDate = ZonedDate;
|
|
4381
|
-
type index_d__publicOnScheduleTimeFrameCreatedType = _publicOnScheduleTimeFrameCreatedType;
|
|
4382
|
-
type index_d__publicOnScheduleTimeFrameDeletedType = _publicOnScheduleTimeFrameDeletedType;
|
|
4383
4782
|
type index_d__publicOnScheduleTimeFrameUpdatedType = _publicOnScheduleTimeFrameUpdatedType;
|
|
4384
4783
|
declare const index_d_getScheduleTimeFrame: typeof getScheduleTimeFrame;
|
|
4385
4784
|
declare const index_d_listScheduleTimeFrames: typeof listScheduleTimeFrames;
|
|
4386
|
-
declare const index_d_onScheduleTimeFrameCreated: typeof onScheduleTimeFrameCreated;
|
|
4387
|
-
declare const index_d_onScheduleTimeFrameDeleted: typeof onScheduleTimeFrameDeleted;
|
|
4388
4785
|
declare const index_d_onScheduleTimeFrameUpdated: typeof onScheduleTimeFrameUpdated;
|
|
4389
4786
|
declare namespace index_d {
|
|
4390
|
-
export { type index_d_ActionEvent as ActionEvent, type index_d_Address as Address, type index_d_AddressHint as AddressHint, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_BusinessSchedule as BusinessSchedule, type index_d_Categories as Categories, type index_d_ChangeContext as ChangeContext, type index_d_ChangeContextPayloadOneOf as ChangeContextPayloadOneOf, type index_d_ConsentPolicy as ConsentPolicy, index_d_DayOfWeek as DayOfWeek, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GeoCoordinates as GeoCoordinates, type index_d_GetScheduleTimeFrameOptions as GetScheduleTimeFrameOptions, type index_d_GetScheduleTimeFrameRequest as GetScheduleTimeFrameRequest, type index_d_GetScheduleTimeFrameResponse as GetScheduleTimeFrameResponse, type index_d_GetScheduleTimeFrameResponseNonNullableFields as GetScheduleTimeFrameResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ListScheduleTimeFramesOptions as ListScheduleTimeFramesOptions, type index_d_ListScheduleTimeFramesRequest as ListScheduleTimeFramesRequest, type index_d_ListScheduleTimeFramesResponse as ListScheduleTimeFramesResponse, type index_d_ListScheduleTimeFramesResponseNonNullableFields as ListScheduleTimeFramesResponseNonNullableFields, type index_d_Locale as Locale, type index_d_MessageEnvelope as MessageEnvelope, type index_d_Multilingual as Multilingual, index_d_PlacementType as PlacementType, type index_d_Properties as Properties, type index_d_PropertiesChange as PropertiesChange, index_d_ResolutionMethod as ResolutionMethod, type index_d_RestoreInfo as RestoreInfo, type index_d_ScheduleTimeFrame as ScheduleTimeFrame, type
|
|
4787
|
+
export { type index_d_ActionEvent as ActionEvent, type index_d_Address as Address, type index_d_AddressHint as AddressHint, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_BusinessSchedule as BusinessSchedule, type index_d_Categories as Categories, type index_d_ChangeContext as ChangeContext, type index_d_ChangeContextPayloadOneOf as ChangeContextPayloadOneOf, type index_d_ConsentPolicy as ConsentPolicy, index_d_DayOfWeek as DayOfWeek, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_GeoCoordinates as GeoCoordinates, type index_d_GetScheduleTimeFrameOptions as GetScheduleTimeFrameOptions, type index_d_GetScheduleTimeFrameRequest as GetScheduleTimeFrameRequest, type index_d_GetScheduleTimeFrameResponse as GetScheduleTimeFrameResponse, type index_d_GetScheduleTimeFrameResponseNonNullableFields as GetScheduleTimeFrameResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ListScheduleTimeFramesOptions as ListScheduleTimeFramesOptions, type index_d_ListScheduleTimeFramesRequest as ListScheduleTimeFramesRequest, type index_d_ListScheduleTimeFramesResponse as ListScheduleTimeFramesResponse, type index_d_ListScheduleTimeFramesResponseNonNullableFields as ListScheduleTimeFramesResponseNonNullableFields, type index_d_Locale as Locale, type index_d_MessageEnvelope as MessageEnvelope, type index_d_Multilingual as Multilingual, index_d_PlacementType as PlacementType, type index_d_Properties as Properties, type index_d_PropertiesChange as PropertiesChange, index_d_ResolutionMethod as ResolutionMethod, type index_d_RestoreInfo as RestoreInfo, type index_d_ScheduleTimeFrame as ScheduleTimeFrame, type index_d_ScheduleTimeFrameNonNullableFields as ScheduleTimeFrameNonNullableFields, type index_d_ScheduleTimeFrameUpdatedEnvelope as ScheduleTimeFrameUpdatedEnvelope, type index_d_ScheduleTimeFrameUpdatedWithMetadata as ScheduleTimeFrameUpdatedWithMetadata, type index_d_SiteCloned as SiteCloned, type index_d_SiteCreated as SiteCreated, type index_d_SitePropertiesEvent as SitePropertiesEvent, type index_d_SitePropertiesNotification as SitePropertiesNotification, type index_d_SpecialHourPeriod as SpecialHourPeriod, index_d_Status as Status, type index_d_SupportedLanguage as SupportedLanguage, type index_d_TimePeriod as TimePeriod, type index_d_Translation as Translation, index_d_WebhookIdentityType as WebhookIdentityType, type index_d_ZonedDate as ZonedDate, type index_d__publicOnScheduleTimeFrameUpdatedType as _publicOnScheduleTimeFrameUpdatedType, index_d_getScheduleTimeFrame as getScheduleTimeFrame, index_d_listScheduleTimeFrames as listScheduleTimeFrames, index_d_onScheduleTimeFrameUpdated as onScheduleTimeFrameUpdated, onScheduleTimeFrameUpdated$1 as publicOnScheduleTimeFrameUpdated };
|
|
4391
4788
|
}
|
|
4392
4789
|
|
|
4393
4790
|
export { index_d$2 as events, index_d as scheduleTimeFrames, index_d$1 as schedules };
|