@wix/seatings 1.0.7 → 1.0.9

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.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/seatings_seating-plan": "1.0.7",
21
+ "@wix/seatings_seating-plan": "1.0.8",
22
22
  "@wix/seatings_seating-reservation": "1.0.6"
23
23
  },
24
24
  "devDependencies": {
@@ -43,5 +43,5 @@
43
43
  "fqdn": ""
44
44
  }
45
45
  },
46
- "falconPackageHash": "83892f074986dec02616826f97564c822be70a75e0bb07bc42c395a4"
46
+ "falconPackageHash": "e494a3b7b21aca7b069bb215ed4aa3a9c39be84877037966f590902f"
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;
@@ -1141,6 +1141,7 @@ interface SeatingPlanUpdatedEnvelope {
1141
1141
  metadata: EventMetadata$1;
1142
1142
  }
1143
1143
  interface SeatingPlanDeletedEnvelope {
1144
+ entity: SeatingPlan$1;
1144
1145
  metadata: EventMetadata$1;
1145
1146
  }
1146
1147
  interface UpdateSeatingPlanOptions {
@@ -1211,38 +1212,38 @@ interface FindSeatingPlanOptions {
1211
1212
  seatingPlanMask?: SeatingPlanMask;
1212
1213
  }
1213
1214
 
1214
- interface HttpClient$1 {
1215
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1215
+ interface HttpClient {
1216
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1216
1217
  fetchWithAuth: typeof fetch;
1217
1218
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1218
1219
  }
1219
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1220
- type HttpResponse$1<T = any> = {
1220
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1221
+ type HttpResponse<T = any> = {
1221
1222
  data: T;
1222
1223
  status: number;
1223
1224
  statusText: string;
1224
1225
  headers: any;
1225
1226
  request?: any;
1226
1227
  };
1227
- type RequestOptions$1<_TResponse = any, Data = any> = {
1228
+ type RequestOptions<_TResponse = any, Data = any> = {
1228
1229
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1229
1230
  url: string;
1230
1231
  data?: Data;
1231
1232
  params?: URLSearchParams;
1232
- } & APIMetadata$1;
1233
- type APIMetadata$1 = {
1233
+ } & APIMetadata;
1234
+ type APIMetadata = {
1234
1235
  methodFqn?: string;
1235
1236
  entityFqdn?: string;
1236
1237
  packageName?: string;
1237
1238
  };
1238
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
1239
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
1239
1240
  __type: 'event-definition';
1240
1241
  type: Type;
1241
1242
  isDomainEvent?: boolean;
1242
1243
  transformations?: (envelope: unknown) => Payload;
1243
1244
  __payload: Payload;
1244
1245
  };
1245
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
1246
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1246
1247
 
1247
1248
  declare global {
1248
1249
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -1254,7 +1255,7 @@ declare global {
1254
1255
  declare const __metadata$1: {
1255
1256
  PACKAGE_NAME: string;
1256
1257
  };
1257
- declare function createSeatingPlan(httpClient: HttpClient$1): (plan: SeatingPlan$1) => Promise<SeatingPlan$1 & {
1258
+ declare function createSeatingPlan(httpClient: HttpClient): (plan: SeatingPlan$1) => Promise<SeatingPlan$1 & {
1258
1259
  sections: {
1259
1260
  _id: number;
1260
1261
  elements: {
@@ -1307,7 +1308,7 @@ declare function createSeatingPlan(httpClient: HttpClient$1): (plan: SeatingPlan
1307
1308
  elementType: Type$1;
1308
1309
  }[];
1309
1310
  }>;
1310
- declare function updateSeatingPlan(httpClient: HttpClient$1): (options?: UpdateSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1311
+ declare function updateSeatingPlan(httpClient: HttpClient): (options?: UpdateSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1311
1312
  sections: {
1312
1313
  _id: number;
1313
1314
  elements: {
@@ -1360,9 +1361,9 @@ declare function updateSeatingPlan(httpClient: HttpClient$1): (options?: UpdateS
1360
1361
  elementType: Type$1;
1361
1362
  }[];
1362
1363
  }>;
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 & {
1364
+ declare function copySeatingPlan(httpClient: HttpClient): (_id: string | null, options: CopySeatingPlanOptions) => Promise<CopySeatingPlanResponse & CopySeatingPlanResponseNonNullableFields>;
1365
+ declare function querySeatingPlan(httpClient: HttpClient): (options?: QuerySeatingPlanOptions) => PlansQueryBuilder;
1366
+ declare function getSeatingPlan(httpClient: HttpClient): (_id: string | null, options?: GetSeatingPlanOptions) => Promise<SeatingPlan$1 & {
1366
1367
  sections: {
1367
1368
  _id: number;
1368
1369
  elements: {
@@ -1415,13 +1416,13 @@ declare function getSeatingPlan(httpClient: HttpClient$1): (_id: string | null,
1415
1416
  elementType: Type$1;
1416
1417
  }[];
1417
1418
  }>;
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">;
1419
+ declare function findSeatingPlan(httpClient: HttpClient): (filter: Record<string, any> | null, options?: FindSeatingPlanOptions) => Promise<FindSeatingPlanResponse & FindSeatingPlanResponseNonNullableFields>;
1420
+ declare function deleteSeatingPlan(httpClient: HttpClient): (_id: string | null) => Promise<DeleteSeatingPlanResponse & DeleteSeatingPlanResponseNonNullableFields>;
1421
+ declare function updateSeatingPlanThumbnail(httpClient: HttpClient): (thumbnail: SeatingPlanThumbnail) => Promise<UpdateSeatingPlanThumbnailResponse>;
1422
+ declare function getSeatingPlanThumbnail(httpClient: HttpClient): (_id: string | null) => Promise<GetSeatingPlanThumbnailResponse>;
1423
+ declare const onSeatingPlanCreated: EventDefinition<SeatingPlanCreatedEnvelope, "wix.seating.v1.seating_plan_created">;
1424
+ declare const onSeatingPlanUpdated: EventDefinition<SeatingPlanUpdatedEnvelope, "wix.seating.v1.seating_plan_updated">;
1425
+ declare const onSeatingPlanDeleted: EventDefinition<SeatingPlanDeletedEnvelope, "wix.seating.v1.seating_plan_deleted">;
1425
1426
 
1426
1427
  type index_d$1_CapacityExceededViolation = CapacityExceededViolation;
1427
1428
  type index_d$1_CopySeatingPlanOptions = CopySeatingPlanOptions;
@@ -2451,46 +2452,6 @@ interface GetSeatingCategoriesSummaryOptions {
2451
2452
  externalId?: string[];
2452
2453
  }
2453
2454
 
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
2455
  declare const __metadata: {
2495
2456
  PACKAGE_NAME: string;
2496
2457
  };