@wix/seatings 1.0.7 → 1.0.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/seatings",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -43,5 +43,5 @@
43
43
  "fqdn": ""
44
44
  }
45
45
  },
46
- "falconPackageHash": "83892f074986dec02616826f97564c822be70a75e0bb07bc42c395a4"
46
+ "falconPackageHash": "9c6ffd9793a5dbd47b0cc4a3b6b39c82bacb578fa8355573e6daecef"
47
47
  }
@@ -1,39 +1,39 @@
1
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
2
- interface HttpClient$1 {
3
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
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$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
8
- type HttpResponse$1<T = any> = {
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$1<_TResponse = any, Data = any> = {
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$1;
21
- type APIMetadata$1 = {
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
22
  methodFqn?: string;
23
23
  entityFqdn?: string;
24
24
  packageName?: string;
25
25
  };
26
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
27
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
28
  __type: 'event-definition';
29
29
  type: Type;
30
30
  isDomainEvent?: boolean;
31
31
  transformations?: (envelope: unknown) => Payload;
32
32
  __payload: Payload;
33
33
  };
34
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
35
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
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;
37
37
 
38
38
  declare global {
39
39
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -42,9 +42,9 @@ declare global {
42
42
  }
43
43
  }
44
44
 
45
- declare function createRESTModule$1<T extends RESTFunctionDescriptor$1>(descriptor: T, elevated?: boolean): BuildRESTFunction$1<T> & T;
45
+ declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
46
46
 
47
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
47
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
48
48
 
49
49
  declare const createSeatingPlan: ReturnType<typeof createRESTModule$1<typeof publicCreateSeatingPlan>>;
50
50
  declare const updateSeatingPlan: ReturnType<typeof createRESTModule$1<typeof publicUpdateSeatingPlan>>;
@@ -75,50 +75,6 @@ declare namespace context$1 {
75
75
  export { context$1_copySeatingPlan as copySeatingPlan, context$1_createSeatingPlan as createSeatingPlan, context$1_deleteSeatingPlan as deleteSeatingPlan, context$1_findSeatingPlan as findSeatingPlan, context$1_getSeatingPlan as getSeatingPlan, context$1_getSeatingPlanThumbnail as getSeatingPlanThumbnail, context$1_onSeatingPlanCreated as onSeatingPlanCreated, context$1_onSeatingPlanDeleted as onSeatingPlanDeleted, context$1_onSeatingPlanUpdated as onSeatingPlanUpdated, context$1_querySeatingPlan as querySeatingPlan, context$1_updateSeatingPlan as updateSeatingPlan, context$1_updateSeatingPlanThumbnail as updateSeatingPlanThumbnail };
76
76
  }
77
77
 
78
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
79
- interface HttpClient {
80
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
81
- fetchWithAuth: typeof fetch;
82
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
83
- }
84
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
85
- type HttpResponse<T = any> = {
86
- data: T;
87
- status: number;
88
- statusText: string;
89
- headers: any;
90
- request?: any;
91
- };
92
- type RequestOptions<_TResponse = any, Data = any> = {
93
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
94
- url: string;
95
- data?: Data;
96
- params?: URLSearchParams;
97
- } & APIMetadata;
98
- type APIMetadata = {
99
- methodFqn?: string;
100
- entityFqdn?: string;
101
- packageName?: string;
102
- };
103
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
104
- type EventDefinition<Payload = unknown, Type extends string = string> = {
105
- __type: 'event-definition';
106
- type: Type;
107
- isDomainEvent?: boolean;
108
- transformations?: (envelope: unknown) => Payload;
109
- __payload: Payload;
110
- };
111
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
112
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
113
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
114
-
115
- declare global {
116
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
117
- interface SymbolConstructor {
118
- readonly observable: symbol;
119
- }
120
- }
121
-
122
78
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
123
79
 
124
80
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
@@ -1211,38 +1211,38 @@ interface FindSeatingPlanOptions {
1211
1211
  seatingPlanMask?: SeatingPlanMask;
1212
1212
  }
1213
1213
 
1214
- interface HttpClient$1 {
1215
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1214
+ interface HttpClient {
1215
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1216
1216
  fetchWithAuth: typeof fetch;
1217
1217
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1218
1218
  }
1219
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1220
- type HttpResponse$1<T = any> = {
1219
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1220
+ type HttpResponse<T = any> = {
1221
1221
  data: T;
1222
1222
  status: number;
1223
1223
  statusText: string;
1224
1224
  headers: any;
1225
1225
  request?: any;
1226
1226
  };
1227
- type RequestOptions$1<_TResponse = any, Data = any> = {
1227
+ type RequestOptions<_TResponse = any, Data = any> = {
1228
1228
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1229
1229
  url: string;
1230
1230
  data?: Data;
1231
1231
  params?: URLSearchParams;
1232
- } & APIMetadata$1;
1233
- type APIMetadata$1 = {
1232
+ } & APIMetadata;
1233
+ type APIMetadata = {
1234
1234
  methodFqn?: string;
1235
1235
  entityFqdn?: string;
1236
1236
  packageName?: string;
1237
1237
  };
1238
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
1238
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
1239
1239
  __type: 'event-definition';
1240
1240
  type: Type;
1241
1241
  isDomainEvent?: boolean;
1242
1242
  transformations?: (envelope: unknown) => Payload;
1243
1243
  __payload: Payload;
1244
1244
  };
1245
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
1245
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1246
1246
 
1247
1247
  declare global {
1248
1248
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1254,7 +1254,7 @@ declare global {
1254
1254
  declare const __metadata$1: {
1255
1255
  PACKAGE_NAME: string;
1256
1256
  };
1257
- declare function createSeatingPlan(httpClient: HttpClient$1): (plan: SeatingPlan$1) => Promise<SeatingPlan$1 & {
1257
+ declare function createSeatingPlan(httpClient: HttpClient): (plan: SeatingPlan$1) => Promise<SeatingPlan$1 & {
1258
1258
  sections: {
1259
1259
  _id: number;
1260
1260
  elements: {
@@ -1307,7 +1307,7 @@ declare function createSeatingPlan(httpClient: HttpClient$1): (plan: SeatingPlan
1307
1307
  elementType: Type$1;
1308
1308
  }[];
1309
1309
  }>;
1310
- declare function updateSeatingPlan(httpClient: HttpClient$1): (options?: UpdateSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1310
+ declare function updateSeatingPlan(httpClient: HttpClient): (options?: UpdateSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1311
1311
  sections: {
1312
1312
  _id: number;
1313
1313
  elements: {
@@ -1360,9 +1360,9 @@ declare function updateSeatingPlan(httpClient: HttpClient$1): (options?: UpdateS
1360
1360
  elementType: Type$1;
1361
1361
  }[];
1362
1362
  }>;
1363
- declare function copySeatingPlan(httpClient: HttpClient$1): (_id: string | null, options: CopySeatingPlanOptions) => Promise<CopySeatingPlanResponse & CopySeatingPlanResponseNonNullableFields>;
1364
- declare function querySeatingPlan(httpClient: HttpClient$1): (options?: QuerySeatingPlanOptions) => PlansQueryBuilder;
1365
- declare function getSeatingPlan(httpClient: HttpClient$1): (_id: string | null, options?: GetSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1363
+ declare function copySeatingPlan(httpClient: HttpClient): (_id: string | null, options: CopySeatingPlanOptions) => Promise<CopySeatingPlanResponse & CopySeatingPlanResponseNonNullableFields>;
1364
+ declare function querySeatingPlan(httpClient: HttpClient): (options?: QuerySeatingPlanOptions) => PlansQueryBuilder;
1365
+ declare function getSeatingPlan(httpClient: HttpClient): (_id: string | null, options?: GetSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1366
1366
  sections: {
1367
1367
  _id: number;
1368
1368
  elements: {
@@ -1415,13 +1415,13 @@ declare function getSeatingPlan(httpClient: HttpClient$1): (_id: string | null,
1415
1415
  elementType: Type$1;
1416
1416
  }[];
1417
1417
  }>;
1418
- declare function findSeatingPlan(httpClient: HttpClient$1): (filter: Record<string, any> | null, options?: FindSeatingPlanOptions) => Promise<FindSeatingPlanResponse & FindSeatingPlanResponseNonNullableFields>;
1419
- declare function deleteSeatingPlan(httpClient: HttpClient$1): (_id: string | null) => Promise<DeleteSeatingPlanResponse & DeleteSeatingPlanResponseNonNullableFields>;
1420
- declare function updateSeatingPlanThumbnail(httpClient: HttpClient$1): (thumbnail: SeatingPlanThumbnail) => Promise<UpdateSeatingPlanThumbnailResponse>;
1421
- declare function getSeatingPlanThumbnail(httpClient: HttpClient$1): (_id: string | null) => Promise<GetSeatingPlanThumbnailResponse>;
1422
- declare const onSeatingPlanCreated: EventDefinition$1<SeatingPlanCreatedEnvelope, "wix.seating.v1.seating_plan_created">;
1423
- declare const onSeatingPlanUpdated: EventDefinition$1<SeatingPlanUpdatedEnvelope, "wix.seating.v1.seating_plan_updated">;
1424
- declare const onSeatingPlanDeleted: EventDefinition$1<SeatingPlanDeletedEnvelope, "wix.seating.v1.seating_plan_deleted">;
1418
+ declare function findSeatingPlan(httpClient: HttpClient): (filter: Record<string, any> | null, options?: FindSeatingPlanOptions) => Promise<FindSeatingPlanResponse & FindSeatingPlanResponseNonNullableFields>;
1419
+ declare function deleteSeatingPlan(httpClient: HttpClient): (_id: string | null) => Promise<DeleteSeatingPlanResponse & DeleteSeatingPlanResponseNonNullableFields>;
1420
+ declare function updateSeatingPlanThumbnail(httpClient: HttpClient): (thumbnail: SeatingPlanThumbnail) => Promise<UpdateSeatingPlanThumbnailResponse>;
1421
+ declare function getSeatingPlanThumbnail(httpClient: HttpClient): (_id: string | null) => Promise<GetSeatingPlanThumbnailResponse>;
1422
+ declare const onSeatingPlanCreated: EventDefinition<SeatingPlanCreatedEnvelope, "wix.seating.v1.seating_plan_created">;
1423
+ declare const onSeatingPlanUpdated: EventDefinition<SeatingPlanUpdatedEnvelope, "wix.seating.v1.seating_plan_updated">;
1424
+ declare const onSeatingPlanDeleted: EventDefinition<SeatingPlanDeletedEnvelope, "wix.seating.v1.seating_plan_deleted">;
1425
1425
 
1426
1426
  type index_d$1_CapacityExceededViolation = CapacityExceededViolation;
1427
1427
  type index_d$1_CopySeatingPlanOptions = CopySeatingPlanOptions;
@@ -2451,46 +2451,6 @@ interface GetSeatingCategoriesSummaryOptions {
2451
2451
  externalId?: string[];
2452
2452
  }
2453
2453
 
2454
- interface HttpClient {
2455
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2456
- fetchWithAuth: typeof fetch;
2457
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
2458
- }
2459
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2460
- type HttpResponse<T = any> = {
2461
- data: T;
2462
- status: number;
2463
- statusText: string;
2464
- headers: any;
2465
- request?: any;
2466
- };
2467
- type RequestOptions<_TResponse = any, Data = any> = {
2468
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2469
- url: string;
2470
- data?: Data;
2471
- params?: URLSearchParams;
2472
- } & APIMetadata;
2473
- type APIMetadata = {
2474
- methodFqn?: string;
2475
- entityFqdn?: string;
2476
- packageName?: string;
2477
- };
2478
- type EventDefinition<Payload = unknown, Type extends string = string> = {
2479
- __type: 'event-definition';
2480
- type: Type;
2481
- isDomainEvent?: boolean;
2482
- transformations?: (envelope: unknown) => Payload;
2483
- __payload: Payload;
2484
- };
2485
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
2486
-
2487
- declare global {
2488
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2489
- interface SymbolConstructor {
2490
- readonly observable: symbol;
2491
- }
2492
- }
2493
-
2494
2454
  declare const __metadata: {
2495
2455
  PACKAGE_NAME: string;
2496
2456
  };