@wix/bookings 1.0.423 → 1.0.424
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 +2 -2
- package/type-bundles/context.bundle.d.ts +34 -448
- package/type-bundles/index.bundle.d.ts +81 -465
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/bookings",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.424",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"fqdn": ""
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"falconPackageHash": "
|
|
56
|
+
"falconPackageHash": "1233eb63454faf95f51d542b0aad81e008f71a1ab81ebdd5172f8976"
|
|
57
57
|
}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
type RESTFunctionDescriptor
|
|
2
|
-
interface HttpClient
|
|
3
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
4
|
fetchWithAuth: typeof fetch;
|
|
5
5
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
6
|
}
|
|
7
|
-
type RequestOptionsFactory
|
|
8
|
-
type HttpResponse
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
9
|
data: T;
|
|
10
10
|
status: number;
|
|
11
11
|
statusText: string;
|
|
12
12
|
headers: any;
|
|
13
13
|
request?: any;
|
|
14
14
|
};
|
|
15
|
-
type RequestOptions
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
16
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
17
|
url: string;
|
|
18
18
|
data?: Data;
|
|
19
19
|
params?: URLSearchParams;
|
|
20
|
-
} & APIMetadata
|
|
21
|
-
type APIMetadata
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
22
|
methodFqn?: string;
|
|
23
23
|
entityFqdn?: string;
|
|
24
24
|
packageName?: string;
|
|
25
25
|
};
|
|
26
|
-
type BuildRESTFunction
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
|
+
__type: 'event-definition';
|
|
29
|
+
type: Type;
|
|
30
|
+
isDomainEvent?: boolean;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
32
|
+
__payload: Payload;
|
|
33
|
+
};
|
|
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;
|
|
27
37
|
|
|
28
38
|
declare global {
|
|
29
39
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -32,7 +42,7 @@ declare global {
|
|
|
32
42
|
}
|
|
33
43
|
}
|
|
34
44
|
|
|
35
|
-
declare function createRESTModule$b<T extends RESTFunctionDescriptor
|
|
45
|
+
declare function createRESTModule$b<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
36
46
|
|
|
37
47
|
declare const queryAvailability: ReturnType<typeof createRESTModule$b<typeof publicQueryAvailability>>;
|
|
38
48
|
|
|
@@ -41,41 +51,7 @@ declare namespace context$b {
|
|
|
41
51
|
export { context$b_queryAvailability as queryAvailability };
|
|
42
52
|
}
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
interface HttpClient$a {
|
|
46
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$a<TResponse, TData>): Promise<HttpResponse$a<TResponse>>;
|
|
47
|
-
fetchWithAuth: typeof fetch;
|
|
48
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
49
|
-
}
|
|
50
|
-
type RequestOptionsFactory$a<TResponse = any, TData = any> = (context: any) => RequestOptions$a<TResponse, TData>;
|
|
51
|
-
type HttpResponse$a<T = any> = {
|
|
52
|
-
data: T;
|
|
53
|
-
status: number;
|
|
54
|
-
statusText: string;
|
|
55
|
-
headers: any;
|
|
56
|
-
request?: any;
|
|
57
|
-
};
|
|
58
|
-
type RequestOptions$a<_TResponse = any, Data = any> = {
|
|
59
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
60
|
-
url: string;
|
|
61
|
-
data?: Data;
|
|
62
|
-
params?: URLSearchParams;
|
|
63
|
-
} & APIMetadata$a;
|
|
64
|
-
type APIMetadata$a = {
|
|
65
|
-
methodFqn?: string;
|
|
66
|
-
entityFqdn?: string;
|
|
67
|
-
packageName?: string;
|
|
68
|
-
};
|
|
69
|
-
type BuildRESTFunction$a<T extends RESTFunctionDescriptor$a> = T extends RESTFunctionDescriptor$a<infer U> ? U : never;
|
|
70
|
-
|
|
71
|
-
declare global {
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
73
|
-
interface SymbolConstructor {
|
|
74
|
-
readonly observable: symbol;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
declare function createRESTModule$a<T extends RESTFunctionDescriptor$a>(descriptor: T, elevated?: boolean): BuildRESTFunction$a<T> & T;
|
|
54
|
+
declare function createRESTModule$a<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
79
55
|
|
|
80
56
|
declare const listAvailabilityTimeSlots: ReturnType<typeof createRESTModule$a<typeof publicListAvailabilityTimeSlots>>;
|
|
81
57
|
declare const getAvailabilityTimeSlot: ReturnType<typeof createRESTModule$a<typeof publicGetAvailabilityTimeSlot>>;
|
|
@@ -86,41 +62,7 @@ declare namespace context$a {
|
|
|
86
62
|
export { context$a_getAvailabilityTimeSlot as getAvailabilityTimeSlot, context$a_listAvailabilityTimeSlots as listAvailabilityTimeSlots };
|
|
87
63
|
}
|
|
88
64
|
|
|
89
|
-
|
|
90
|
-
interface HttpClient$9 {
|
|
91
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$9<TResponse, TData>): Promise<HttpResponse$9<TResponse>>;
|
|
92
|
-
fetchWithAuth: typeof fetch;
|
|
93
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
94
|
-
}
|
|
95
|
-
type RequestOptionsFactory$9<TResponse = any, TData = any> = (context: any) => RequestOptions$9<TResponse, TData>;
|
|
96
|
-
type HttpResponse$9<T = any> = {
|
|
97
|
-
data: T;
|
|
98
|
-
status: number;
|
|
99
|
-
statusText: string;
|
|
100
|
-
headers: any;
|
|
101
|
-
request?: any;
|
|
102
|
-
};
|
|
103
|
-
type RequestOptions$9<_TResponse = any, Data = any> = {
|
|
104
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
105
|
-
url: string;
|
|
106
|
-
data?: Data;
|
|
107
|
-
params?: URLSearchParams;
|
|
108
|
-
} & APIMetadata$9;
|
|
109
|
-
type APIMetadata$9 = {
|
|
110
|
-
methodFqn?: string;
|
|
111
|
-
entityFqdn?: string;
|
|
112
|
-
packageName?: string;
|
|
113
|
-
};
|
|
114
|
-
type BuildRESTFunction$9<T extends RESTFunctionDescriptor$9> = T extends RESTFunctionDescriptor$9<infer U> ? U : never;
|
|
115
|
-
|
|
116
|
-
declare global {
|
|
117
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
118
|
-
interface SymbolConstructor {
|
|
119
|
-
readonly observable: symbol;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
declare function createRESTModule$9<T extends RESTFunctionDescriptor$9>(descriptor: T, elevated?: boolean): BuildRESTFunction$9<T> & T;
|
|
65
|
+
declare function createRESTModule$9<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
124
66
|
|
|
125
67
|
declare const listMultiServiceAvailabilityTimeSlots: ReturnType<typeof createRESTModule$9<typeof publicListMultiServiceAvailabilityTimeSlots>>;
|
|
126
68
|
declare const getMultiServiceAvailabilityTimeSlot: ReturnType<typeof createRESTModule$9<typeof publicGetMultiServiceAvailabilityTimeSlot>>;
|
|
@@ -131,41 +73,7 @@ declare namespace context$9 {
|
|
|
131
73
|
export { context$9_getMultiServiceAvailabilityTimeSlot as getMultiServiceAvailabilityTimeSlot, context$9_listMultiServiceAvailabilityTimeSlots as listMultiServiceAvailabilityTimeSlots };
|
|
132
74
|
}
|
|
133
75
|
|
|
134
|
-
|
|
135
|
-
interface HttpClient$8 {
|
|
136
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$8<TResponse, TData>): Promise<HttpResponse$8<TResponse>>;
|
|
137
|
-
fetchWithAuth: typeof fetch;
|
|
138
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
139
|
-
}
|
|
140
|
-
type RequestOptionsFactory$8<TResponse = any, TData = any> = (context: any) => RequestOptions$8<TResponse, TData>;
|
|
141
|
-
type HttpResponse$8<T = any> = {
|
|
142
|
-
data: T;
|
|
143
|
-
status: number;
|
|
144
|
-
statusText: string;
|
|
145
|
-
headers: any;
|
|
146
|
-
request?: any;
|
|
147
|
-
};
|
|
148
|
-
type RequestOptions$8<_TResponse = any, Data = any> = {
|
|
149
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
150
|
-
url: string;
|
|
151
|
-
data?: Data;
|
|
152
|
-
params?: URLSearchParams;
|
|
153
|
-
} & APIMetadata$8;
|
|
154
|
-
type APIMetadata$8 = {
|
|
155
|
-
methodFqn?: string;
|
|
156
|
-
entityFqdn?: string;
|
|
157
|
-
packageName?: string;
|
|
158
|
-
};
|
|
159
|
-
type BuildRESTFunction$8<T extends RESTFunctionDescriptor$8> = T extends RESTFunctionDescriptor$8<infer U> ? U : never;
|
|
160
|
-
|
|
161
|
-
declare global {
|
|
162
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
163
|
-
interface SymbolConstructor {
|
|
164
|
-
readonly observable: symbol;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare function createRESTModule$8<T extends RESTFunctionDescriptor$8>(descriptor: T, elevated?: boolean): BuildRESTFunction$8<T> & T;
|
|
76
|
+
declare function createRESTModule$8<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
169
77
|
|
|
170
78
|
declare const listProviders: ReturnType<typeof createRESTModule$8<typeof publicListProviders>>;
|
|
171
79
|
declare const getConnection: ReturnType<typeof createRESTModule$8<typeof publicGetConnection>>;
|
|
@@ -190,53 +98,9 @@ declare namespace context$8 {
|
|
|
190
98
|
export { context$8_connectByCredentials as connectByCredentials, context$8_connectByOAuth as connectByOAuth, context$8_disconnect as disconnect, context$8_getConnection as getConnection, context$8_listCalendars as listCalendars, context$8_listConnections as listConnections, context$8_listEvents as listEvents, context$8_listProviders as listProviders, context$8_updateSyncConfig as updateSyncConfig };
|
|
191
99
|
}
|
|
192
100
|
|
|
193
|
-
|
|
194
|
-
interface HttpClient$7 {
|
|
195
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$7<TResponse, TData>): Promise<HttpResponse$7<TResponse>>;
|
|
196
|
-
fetchWithAuth: typeof fetch;
|
|
197
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
198
|
-
}
|
|
199
|
-
type RequestOptionsFactory$7<TResponse = any, TData = any> = (context: any) => RequestOptions$7<TResponse, TData>;
|
|
200
|
-
type HttpResponse$7<T = any> = {
|
|
201
|
-
data: T;
|
|
202
|
-
status: number;
|
|
203
|
-
statusText: string;
|
|
204
|
-
headers: any;
|
|
205
|
-
request?: any;
|
|
206
|
-
};
|
|
207
|
-
type RequestOptions$7<_TResponse = any, Data = any> = {
|
|
208
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
209
|
-
url: string;
|
|
210
|
-
data?: Data;
|
|
211
|
-
params?: URLSearchParams;
|
|
212
|
-
} & APIMetadata$7;
|
|
213
|
-
type APIMetadata$7 = {
|
|
214
|
-
methodFqn?: string;
|
|
215
|
-
entityFqdn?: string;
|
|
216
|
-
packageName?: string;
|
|
217
|
-
};
|
|
218
|
-
type BuildRESTFunction$7<T extends RESTFunctionDescriptor$7> = T extends RESTFunctionDescriptor$7<infer U> ? U : never;
|
|
219
|
-
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
220
|
-
__type: 'event-definition';
|
|
221
|
-
type: Type;
|
|
222
|
-
isDomainEvent?: boolean;
|
|
223
|
-
transformations?: (envelope: unknown) => Payload;
|
|
224
|
-
__payload: Payload;
|
|
225
|
-
};
|
|
226
|
-
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
227
|
-
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
228
|
-
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
229
|
-
|
|
230
|
-
declare global {
|
|
231
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
232
|
-
interface SymbolConstructor {
|
|
233
|
-
readonly observable: symbol;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
declare function createRESTModule$7<T extends RESTFunctionDescriptor$7>(descriptor: T, elevated?: boolean): BuildRESTFunction$7<T> & T;
|
|
101
|
+
declare function createRESTModule$7<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
238
102
|
|
|
239
|
-
declare function createEventModule$4<T extends EventDefinition
|
|
103
|
+
declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
240
104
|
|
|
241
105
|
declare const createResource: ReturnType<typeof createRESTModule$7<typeof publicCreateResource>>;
|
|
242
106
|
declare const updateResource: ReturnType<typeof createRESTModule$7<typeof publicUpdateResource>>;
|
|
@@ -253,53 +117,9 @@ declare namespace context$7 {
|
|
|
253
117
|
export { context$7_createResource as createResource, context$7_deleteResource as deleteResource, context$7_onResourceNotification as onResourceNotification, context$7_updateResource as updateResource, context$7_updateSchedule as updateSchedule };
|
|
254
118
|
}
|
|
255
119
|
|
|
256
|
-
|
|
257
|
-
interface HttpClient$6 {
|
|
258
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$6<TResponse, TData>): Promise<HttpResponse$6<TResponse>>;
|
|
259
|
-
fetchWithAuth: typeof fetch;
|
|
260
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
261
|
-
}
|
|
262
|
-
type RequestOptionsFactory$6<TResponse = any, TData = any> = (context: any) => RequestOptions$6<TResponse, TData>;
|
|
263
|
-
type HttpResponse$6<T = any> = {
|
|
264
|
-
data: T;
|
|
265
|
-
status: number;
|
|
266
|
-
statusText: string;
|
|
267
|
-
headers: any;
|
|
268
|
-
request?: any;
|
|
269
|
-
};
|
|
270
|
-
type RequestOptions$6<_TResponse = any, Data = any> = {
|
|
271
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
272
|
-
url: string;
|
|
273
|
-
data?: Data;
|
|
274
|
-
params?: URLSearchParams;
|
|
275
|
-
} & APIMetadata$6;
|
|
276
|
-
type APIMetadata$6 = {
|
|
277
|
-
methodFqn?: string;
|
|
278
|
-
entityFqdn?: string;
|
|
279
|
-
packageName?: string;
|
|
280
|
-
};
|
|
281
|
-
type BuildRESTFunction$6<T extends RESTFunctionDescriptor$6> = T extends RESTFunctionDescriptor$6<infer U> ? U : never;
|
|
282
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
283
|
-
__type: 'event-definition';
|
|
284
|
-
type: Type;
|
|
285
|
-
isDomainEvent?: boolean;
|
|
286
|
-
transformations?: (envelope: unknown) => Payload;
|
|
287
|
-
__payload: Payload;
|
|
288
|
-
};
|
|
289
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
290
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
291
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
292
|
-
|
|
293
|
-
declare global {
|
|
294
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
295
|
-
interface SymbolConstructor {
|
|
296
|
-
readonly observable: symbol;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
declare function createRESTModule$6<T extends RESTFunctionDescriptor$6>(descriptor: T, elevated?: boolean): BuildRESTFunction$6<T> & T;
|
|
120
|
+
declare function createRESTModule$6<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
301
121
|
|
|
302
|
-
declare function createEventModule$3<T extends EventDefinition
|
|
122
|
+
declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
303
123
|
|
|
304
124
|
declare const createServiceOptionsAndVariants: ReturnType<typeof createRESTModule$6<typeof publicCreateServiceOptionsAndVariants>>;
|
|
305
125
|
declare const cloneServiceOptionsAndVariants: ReturnType<typeof createRESTModule$6<typeof publicCloneServiceOptionsAndVariants>>;
|
|
@@ -326,41 +146,7 @@ declare namespace context$6 {
|
|
|
326
146
|
export { context$6_cloneServiceOptionsAndVariants as cloneServiceOptionsAndVariants, context$6_createServiceOptionsAndVariants as createServiceOptionsAndVariants, context$6_deleteServiceOptionsAndVariants as deleteServiceOptionsAndVariants, context$6_getServiceOptionsAndVariants as getServiceOptionsAndVariants, context$6_getServiceOptionsAndVariantsByServiceId as getServiceOptionsAndVariantsByServiceId, context$6_onServiceOptionsAndVariantsCreated as onServiceOptionsAndVariantsCreated, context$6_onServiceOptionsAndVariantsDeleted as onServiceOptionsAndVariantsDeleted, context$6_onServiceOptionsAndVariantsUpdated as onServiceOptionsAndVariantsUpdated, context$6_queryServiceOptionsAndVariants as queryServiceOptionsAndVariants, context$6_updateServiceOptionsAndVariants as updateServiceOptionsAndVariants };
|
|
327
147
|
}
|
|
328
148
|
|
|
329
|
-
|
|
330
|
-
interface HttpClient$5 {
|
|
331
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
|
|
332
|
-
fetchWithAuth: typeof fetch;
|
|
333
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
334
|
-
}
|
|
335
|
-
type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
|
|
336
|
-
type HttpResponse$5<T = any> = {
|
|
337
|
-
data: T;
|
|
338
|
-
status: number;
|
|
339
|
-
statusText: string;
|
|
340
|
-
headers: any;
|
|
341
|
-
request?: any;
|
|
342
|
-
};
|
|
343
|
-
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
344
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
345
|
-
url: string;
|
|
346
|
-
data?: Data;
|
|
347
|
-
params?: URLSearchParams;
|
|
348
|
-
} & APIMetadata$5;
|
|
349
|
-
type APIMetadata$5 = {
|
|
350
|
-
methodFqn?: string;
|
|
351
|
-
entityFqdn?: string;
|
|
352
|
-
packageName?: string;
|
|
353
|
-
};
|
|
354
|
-
type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
|
|
355
|
-
|
|
356
|
-
declare global {
|
|
357
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
358
|
-
interface SymbolConstructor {
|
|
359
|
-
readonly observable: symbol;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
declare function createRESTModule$5<T extends RESTFunctionDescriptor$5>(descriptor: T, elevated?: boolean): BuildRESTFunction$5<T> & T;
|
|
149
|
+
declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
364
150
|
|
|
365
151
|
declare const queryExtendedBookings: ReturnType<typeof createRESTModule$5<typeof publicQueryExtendedBookings>>;
|
|
366
152
|
|
|
@@ -369,53 +155,9 @@ declare namespace context$5 {
|
|
|
369
155
|
export { context$5_queryExtendedBookings as queryExtendedBookings };
|
|
370
156
|
}
|
|
371
157
|
|
|
372
|
-
|
|
373
|
-
interface HttpClient$4 {
|
|
374
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
375
|
-
fetchWithAuth: typeof fetch;
|
|
376
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
377
|
-
}
|
|
378
|
-
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
379
|
-
type HttpResponse$4<T = any> = {
|
|
380
|
-
data: T;
|
|
381
|
-
status: number;
|
|
382
|
-
statusText: string;
|
|
383
|
-
headers: any;
|
|
384
|
-
request?: any;
|
|
385
|
-
};
|
|
386
|
-
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
387
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
388
|
-
url: string;
|
|
389
|
-
data?: Data;
|
|
390
|
-
params?: URLSearchParams;
|
|
391
|
-
} & APIMetadata$4;
|
|
392
|
-
type APIMetadata$4 = {
|
|
393
|
-
methodFqn?: string;
|
|
394
|
-
entityFqdn?: string;
|
|
395
|
-
packageName?: string;
|
|
396
|
-
};
|
|
397
|
-
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
398
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
399
|
-
__type: 'event-definition';
|
|
400
|
-
type: Type;
|
|
401
|
-
isDomainEvent?: boolean;
|
|
402
|
-
transformations?: (envelope: unknown) => Payload;
|
|
403
|
-
__payload: Payload;
|
|
404
|
-
};
|
|
405
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
406
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
407
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
408
|
-
|
|
409
|
-
declare global {
|
|
410
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
411
|
-
interface SymbolConstructor {
|
|
412
|
-
readonly observable: symbol;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
declare function createRESTModule$4<T extends RESTFunctionDescriptor$4>(descriptor: T, elevated?: boolean): BuildRESTFunction$4<T> & T;
|
|
158
|
+
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
417
159
|
|
|
418
|
-
declare function createEventModule$2<T extends EventDefinition
|
|
160
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
419
161
|
|
|
420
162
|
declare const createService: ReturnType<typeof createRESTModule$4<typeof publicCreateService>>;
|
|
421
163
|
declare const getService: ReturnType<typeof createRESTModule$4<typeof publicGetService>>;
|
|
@@ -460,53 +202,9 @@ declare namespace context$4 {
|
|
|
460
202
|
export { context$4_bulkDeleteServices as bulkDeleteServices, context$4_bulkUpdateServices as bulkUpdateServices, context$4_cloneService as cloneService, context$4_countServices as countServices, context$4_createService as createService, context$4_deleteService as deleteService, context$4_disablePricingPlansForService as disablePricingPlansForService, context$4_enablePricingPlansForService as enablePricingPlansForService, context$4_getService as getService, context$4_onServiceCreated as onServiceCreated, context$4_onServiceDeleted as onServiceDeleted, context$4_onServiceUpdated as onServiceUpdated, context$4_queryPolicies as queryPolicies, context$4_queryServices as queryServices, context$4_searchServices as searchServices, context$4_setCustomSlug as setCustomSlug, context$4_setServiceLocations as setServiceLocations, context$4_updateService as updateService, context$4_validateSlug as validateSlug };
|
|
461
203
|
}
|
|
462
204
|
|
|
463
|
-
|
|
464
|
-
interface HttpClient$3 {
|
|
465
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
466
|
-
fetchWithAuth: typeof fetch;
|
|
467
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
468
|
-
}
|
|
469
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
470
|
-
type HttpResponse$3<T = any> = {
|
|
471
|
-
data: T;
|
|
472
|
-
status: number;
|
|
473
|
-
statusText: string;
|
|
474
|
-
headers: any;
|
|
475
|
-
request?: any;
|
|
476
|
-
};
|
|
477
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
478
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
479
|
-
url: string;
|
|
480
|
-
data?: Data;
|
|
481
|
-
params?: URLSearchParams;
|
|
482
|
-
} & APIMetadata$3;
|
|
483
|
-
type APIMetadata$3 = {
|
|
484
|
-
methodFqn?: string;
|
|
485
|
-
entityFqdn?: string;
|
|
486
|
-
packageName?: string;
|
|
487
|
-
};
|
|
488
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
489
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
490
|
-
__type: 'event-definition';
|
|
491
|
-
type: Type;
|
|
492
|
-
isDomainEvent?: boolean;
|
|
493
|
-
transformations?: (envelope: unknown) => Payload;
|
|
494
|
-
__payload: Payload;
|
|
495
|
-
};
|
|
496
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
497
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
498
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
499
|
-
|
|
500
|
-
declare global {
|
|
501
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
502
|
-
interface SymbolConstructor {
|
|
503
|
-
readonly observable: symbol;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
declare function createRESTModule$3<T extends RESTFunctionDescriptor$3>(descriptor: T, elevated?: boolean): BuildRESTFunction$3<T> & T;
|
|
205
|
+
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
508
206
|
|
|
509
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
207
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
510
208
|
|
|
511
209
|
declare const listCategories: ReturnType<typeof createRESTModule$3<typeof publicListCategories>>;
|
|
512
210
|
declare const createCategory: ReturnType<typeof createRESTModule$3<typeof publicCreateCategory>>;
|
|
@@ -523,41 +221,7 @@ declare namespace context$3 {
|
|
|
523
221
|
export { context$3_createCategory as createCategory, context$3_deleteCategory as deleteCategory, context$3_listCategories as listCategories, context$3_onCategoryNotification as onCategoryNotification, context$3_updateCategory as updateCategory };
|
|
524
222
|
}
|
|
525
223
|
|
|
526
|
-
|
|
527
|
-
interface HttpClient$2 {
|
|
528
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
529
|
-
fetchWithAuth: typeof fetch;
|
|
530
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
531
|
-
}
|
|
532
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
533
|
-
type HttpResponse$2<T = any> = {
|
|
534
|
-
data: T;
|
|
535
|
-
status: number;
|
|
536
|
-
statusText: string;
|
|
537
|
-
headers: any;
|
|
538
|
-
request?: any;
|
|
539
|
-
};
|
|
540
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
541
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
542
|
-
url: string;
|
|
543
|
-
data?: Data;
|
|
544
|
-
params?: URLSearchParams;
|
|
545
|
-
} & APIMetadata$2;
|
|
546
|
-
type APIMetadata$2 = {
|
|
547
|
-
methodFqn?: string;
|
|
548
|
-
entityFqdn?: string;
|
|
549
|
-
packageName?: string;
|
|
550
|
-
};
|
|
551
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
552
|
-
|
|
553
|
-
declare global {
|
|
554
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
555
|
-
interface SymbolConstructor {
|
|
556
|
-
readonly observable: symbol;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
declare function createRESTModule$2<T extends RESTFunctionDescriptor$2>(descriptor: T, elevated?: boolean): BuildRESTFunction$2<T> & T;
|
|
224
|
+
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
561
225
|
|
|
562
226
|
declare const getAttendance: ReturnType<typeof createRESTModule$2<typeof publicGetAttendance>>;
|
|
563
227
|
declare const setAttendance: ReturnType<typeof createRESTModule$2<typeof publicSetAttendance>>;
|
|
@@ -570,51 +234,7 @@ declare namespace context$2 {
|
|
|
570
234
|
export { context$2_getAttendance as getAttendance, context$2_queryAttendance as queryAttendance, context$2_setAttendance as setAttendance };
|
|
571
235
|
}
|
|
572
236
|
|
|
573
|
-
|
|
574
|
-
interface HttpClient$1 {
|
|
575
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
576
|
-
fetchWithAuth: typeof fetch;
|
|
577
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
578
|
-
}
|
|
579
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
580
|
-
type HttpResponse$1<T = any> = {
|
|
581
|
-
data: T;
|
|
582
|
-
status: number;
|
|
583
|
-
statusText: string;
|
|
584
|
-
headers: any;
|
|
585
|
-
request?: any;
|
|
586
|
-
};
|
|
587
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
588
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
589
|
-
url: string;
|
|
590
|
-
data?: Data;
|
|
591
|
-
params?: URLSearchParams;
|
|
592
|
-
} & APIMetadata$1;
|
|
593
|
-
type APIMetadata$1 = {
|
|
594
|
-
methodFqn?: string;
|
|
595
|
-
entityFqdn?: string;
|
|
596
|
-
packageName?: string;
|
|
597
|
-
};
|
|
598
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
599
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
600
|
-
__type: 'event-definition';
|
|
601
|
-
type: Type;
|
|
602
|
-
isDomainEvent?: boolean;
|
|
603
|
-
transformations?: (envelope: unknown) => Payload;
|
|
604
|
-
__payload: Payload;
|
|
605
|
-
};
|
|
606
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
607
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
608
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
609
|
-
|
|
610
|
-
declare global {
|
|
611
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
612
|
-
interface SymbolConstructor {
|
|
613
|
-
readonly observable: symbol;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
declare function createRESTModule$1<T extends RESTFunctionDescriptor$1>(descriptor: T, elevated?: boolean): BuildRESTFunction$1<T> & T;
|
|
237
|
+
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
618
238
|
|
|
619
239
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
620
240
|
|
|
@@ -655,40 +275,6 @@ declare namespace context$1 {
|
|
|
655
275
|
export { context$1_bulkCreateBooking as bulkCreateBooking, context$1_cancelBooking as cancelBooking, context$1_confirmBooking as confirmBooking, context$1_confirmOrDeclineBooking as confirmOrDeclineBooking, context$1_createBooking as createBooking, context$1_declineBooking as declineBooking, context$1_onBookingCanceled as onBookingCanceled, context$1_onBookingConfirmed as onBookingConfirmed, context$1_onBookingCreated as onBookingCreated, context$1_onBookingDeclined as onBookingDeclined, context$1_onBookingNumberOfParticipantsUpdated as onBookingNumberOfParticipantsUpdated, context$1_onBookingRescheduled as onBookingRescheduled, context$1_onBookingUpdated as onBookingUpdated, context$1_rescheduleBooking as rescheduleBooking, context$1_updateExtendedFields as updateExtendedFields, context$1_updateNumberOfParticipants as updateNumberOfParticipants };
|
|
656
276
|
}
|
|
657
277
|
|
|
658
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
659
|
-
interface HttpClient {
|
|
660
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
661
|
-
fetchWithAuth: typeof fetch;
|
|
662
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
663
|
-
}
|
|
664
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
665
|
-
type HttpResponse<T = any> = {
|
|
666
|
-
data: T;
|
|
667
|
-
status: number;
|
|
668
|
-
statusText: string;
|
|
669
|
-
headers: any;
|
|
670
|
-
request?: any;
|
|
671
|
-
};
|
|
672
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
673
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
674
|
-
url: string;
|
|
675
|
-
data?: Data;
|
|
676
|
-
params?: URLSearchParams;
|
|
677
|
-
} & APIMetadata;
|
|
678
|
-
type APIMetadata = {
|
|
679
|
-
methodFqn?: string;
|
|
680
|
-
entityFqdn?: string;
|
|
681
|
-
packageName?: string;
|
|
682
|
-
};
|
|
683
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
684
|
-
|
|
685
|
-
declare global {
|
|
686
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
687
|
-
interface SymbolConstructor {
|
|
688
|
-
readonly observable: symbol;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
|
|
692
278
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
693
279
|
|
|
694
280
|
declare const previewPrice: ReturnType<typeof createRESTModule<typeof publicPreviewPrice>>;
|