@wix/motion 1.0.39 → 1.0.41

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/motion",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
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/motion_alarms": "1.0.8",
21
+ "@wix/motion_alarms": "1.0.9",
22
22
  "@wix/motion_metroinspector": "1.0.5",
23
23
  "@wix/motion_products": "1.0.8"
24
24
  },
@@ -45,5 +45,5 @@
45
45
  "fqdn": ""
46
46
  }
47
47
  },
48
- "falconPackageHash": "618c0372961d899242c8295b4f95a23c77914c34c8283af99e1684d9"
48
+ "falconPackageHash": "ecc873ee56f9e003eb4cd2e076abaf81dce97d3c187d84bccaf28ab0"
49
49
  }
@@ -118,52 +118,104 @@ interface UpdateAlarm {
118
118
  seconds?: number;
119
119
  }
120
120
 
121
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
122
- interface HttpClient {
123
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
121
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
122
+ interface HttpClient$2 {
123
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
124
124
  }
125
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
126
- type HttpResponse<T = any> = {
125
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
126
+ type HttpResponse$2<T = any> = {
127
127
  data: T;
128
128
  status: number;
129
129
  statusText: string;
130
130
  headers: any;
131
131
  request?: any;
132
132
  };
133
- type RequestOptions<_TResponse = any, Data = any> = {
133
+ type RequestOptions$2<_TResponse = any, Data = any> = {
134
134
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
135
135
  url: string;
136
136
  data?: Data;
137
137
  params?: URLSearchParams;
138
- } & APIMetadata;
139
- type APIMetadata = {
138
+ } & APIMetadata$2;
139
+ type APIMetadata$2 = {
140
140
  methodFqn?: string;
141
141
  entityFqdn?: string;
142
142
  packageName?: string;
143
143
  };
144
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
145
- type EventDefinition<Payload = unknown, Type extends string = string> = {
144
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
145
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
146
146
  __type: 'event-definition';
147
147
  type: Type;
148
148
  isDomainEvent?: boolean;
149
149
  transformations?: unknown;
150
150
  __payload: Payload;
151
151
  };
152
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
153
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
154
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
152
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
153
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
154
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
155
155
 
156
- declare function alarm$1(httpClient: HttpClient): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
157
- declare function updateAlarm$1(httpClient: HttpClient): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
158
- declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
159
- declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
160
- declare const onAlarmDeleted$1: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
156
+ /**
157
+ * Creates a booking.
158
+ *
159
+ *
160
+ * To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.
161
+ *
162
+ * To create a booking for the entire course, pass a booking with the relevant `schedule`.
163
+ * You can use Query Availability to check the availability beforehand.
164
+ *
165
+ * If you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.
166
+ * Then, any specified slot details are calculated.
167
+ *
168
+ * If you create a booking for a new session, we recommend to call Query Availability first.
169
+ * Then, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.
170
+ *
171
+ * Bookings are created with a status of `CREATED`.
172
+ * `CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.
173
+ *
174
+ * To create a booking with a given status, pass a booking with the wanted status.
175
+ * This is only permitted for site Owners.
176
+ *
177
+ * You can pass a `participantNotification.message` to notify the customer of the booking with a message.
178
+ * It's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.
179
+ *
180
+ * You can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
181
+ *
182
+ * When creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the
183
+ * provided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.
184
+ *
185
+ * When creating a booking, you can pass `selectedPaymentOption`.
186
+ * This specifies which payment method the customer plans to use.
187
+ * But it's possible for them to later use another supported payment method.
188
+ *
189
+ * You can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the
190
+ * Wix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout.
191
+ * @param booking - The booking to create.
192
+ * @public
193
+ * @documentationMaturity preview
194
+ * @requiredField booking
195
+ * @requiredField booking.additionalFields._id
196
+ * @requiredField booking.bookedEntity
197
+ * @permissionScope Manage Bookings
198
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
199
+ * @permissionScope Manage Bookings - all permissions
200
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
201
+ * @applicableIdentity APP
202
+ * @applicableIdentity MEMBER
203
+ * @applicableIdentity VISITOR
204
+ */
205
+ declare function alarm$1(httpClient: HttpClient$2): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
206
+ /**
207
+ * Another thing
208
+ */
209
+ declare function updateAlarm$1(httpClient: HttpClient$2): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
210
+ declare const onAlarmTriggered$1: EventDefinition$1<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
211
+ declare const onAlarmSnoozed$1: EventDefinition$1<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
212
+ declare const onAlarmDeleted$1: EventDefinition$1<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
161
213
 
162
- declare const alarm: BuildRESTFunction<typeof alarm$1>;
163
- declare const updateAlarm: BuildRESTFunction<typeof updateAlarm$1>;
164
- declare const onAlarmTriggered: BuildEventDefinition<typeof onAlarmTriggered$1>;
165
- declare const onAlarmSnoozed: BuildEventDefinition<typeof onAlarmSnoozed$1>;
166
- declare const onAlarmDeleted: BuildEventDefinition<typeof onAlarmDeleted$1>;
214
+ declare const alarm: BuildRESTFunction$2<typeof alarm$1>;
215
+ declare const updateAlarm: BuildRESTFunction$2<typeof updateAlarm$1>;
216
+ declare const onAlarmTriggered: BuildEventDefinition$1<typeof onAlarmTriggered$1>;
217
+ declare const onAlarmSnoozed: BuildEventDefinition$1<typeof onAlarmSnoozed$1>;
218
+ declare const onAlarmDeleted: BuildEventDefinition$1<typeof onAlarmDeleted$1>;
167
219
 
168
220
  declare const context$2_alarm: typeof alarm;
169
221
  declare const context$2_onAlarmDeleted: typeof onAlarmDeleted;
@@ -174,6 +226,41 @@ declare namespace context$2 {
174
226
  export { context$2_alarm as alarm, context$2_onAlarmDeleted as onAlarmDeleted, context$2_onAlarmSnoozed as onAlarmSnoozed, context$2_onAlarmTriggered as onAlarmTriggered, context$2_updateAlarm as updateAlarm };
175
227
  }
176
228
 
229
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
230
+ interface HttpClient$1 {
231
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
232
+ }
233
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
234
+ type HttpResponse$1<T = any> = {
235
+ data: T;
236
+ status: number;
237
+ statusText: string;
238
+ headers: any;
239
+ request?: any;
240
+ };
241
+ type RequestOptions$1<_TResponse = any, Data = any> = {
242
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
243
+ url: string;
244
+ data?: Data;
245
+ params?: URLSearchParams;
246
+ } & APIMetadata$1;
247
+ type APIMetadata$1 = {
248
+ methodFqn?: string;
249
+ entityFqdn?: string;
250
+ packageName?: string;
251
+ };
252
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
253
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
254
+ __type: 'event-definition';
255
+ type: Type;
256
+ isDomainEvent?: boolean;
257
+ transformations?: unknown;
258
+ __payload: Payload;
259
+ };
260
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
261
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
262
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
263
+
177
264
  interface Dispatched {
178
265
  /** the message someone says */
179
266
  echo?: EchoMessage;
@@ -271,10 +358,10 @@ interface EchoOptions {
271
358
  someDate?: Date;
272
359
  }
273
360
 
274
- declare function echo$1(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
361
+ declare function echo$1(httpClient: HttpClient$1): (arg1: string, options?: EchoOptions) => Promise<string>;
275
362
  declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
276
363
 
277
- declare const echo: BuildRESTFunction<typeof echo$1>;
364
+ declare const echo: BuildRESTFunction$1<typeof echo$1>;
278
365
  declare const onEchoDispatched: BuildEventDefinition<typeof onEchoDispatched$1>;
279
366
 
280
367
  declare const context$1_echo: typeof echo;
@@ -651,6 +738,31 @@ interface BulkUpdateProductsOptions {
651
738
  returnEntity?: boolean;
652
739
  }
653
740
 
741
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
742
+ interface HttpClient {
743
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
744
+ }
745
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
746
+ type HttpResponse<T = any> = {
747
+ data: T;
748
+ status: number;
749
+ statusText: string;
750
+ headers: any;
751
+ request?: any;
752
+ };
753
+ type RequestOptions<_TResponse = any, Data = any> = {
754
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
755
+ url: string;
756
+ data?: Data;
757
+ params?: URLSearchParams;
758
+ } & APIMetadata;
759
+ type APIMetadata = {
760
+ methodFqn?: string;
761
+ entityFqdn?: string;
762
+ packageName?: string;
763
+ };
764
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
765
+
654
766
  declare function createProduct$1(httpClient: HttpClient): (options?: CreateProductOptions & CreateProductOptionsRequiredFields) => Promise<Product & {
655
767
  _id: string;
656
768
  collectionId: string;
@@ -212,45 +212,97 @@ interface UpdateAlarm {
212
212
  seconds?: number;
213
213
  }
214
214
 
215
- interface HttpClient {
216
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
215
+ interface HttpClient$2 {
216
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
217
217
  }
218
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
219
- type HttpResponse<T = any> = {
218
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
219
+ type HttpResponse$2<T = any> = {
220
220
  data: T;
221
221
  status: number;
222
222
  statusText: string;
223
223
  headers: any;
224
224
  request?: any;
225
225
  };
226
- type RequestOptions<_TResponse = any, Data = any> = {
226
+ type RequestOptions$2<_TResponse = any, Data = any> = {
227
227
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
228
228
  url: string;
229
229
  data?: Data;
230
230
  params?: URLSearchParams;
231
- } & APIMetadata;
232
- type APIMetadata = {
231
+ } & APIMetadata$2;
232
+ type APIMetadata$2 = {
233
233
  methodFqn?: string;
234
234
  entityFqdn?: string;
235
235
  packageName?: string;
236
236
  };
237
- type EventDefinition<Payload = unknown, Type extends string = string> = {
237
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
238
238
  __type: 'event-definition';
239
239
  type: Type;
240
240
  isDomainEvent?: boolean;
241
241
  transformations?: unknown;
242
242
  __payload: Payload;
243
243
  };
244
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
244
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
245
245
 
246
246
  declare const __metadata$2: {
247
247
  PACKAGE_NAME: string;
248
248
  };
249
- declare function alarm(httpClient: HttpClient): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
250
- declare function updateAlarm(httpClient: HttpClient): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
251
- declare const onAlarmTriggered: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
252
- declare const onAlarmSnoozed: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
253
- declare const onAlarmDeleted: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
249
+ /**
250
+ * Creates a booking.
251
+ *
252
+ *
253
+ * To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.
254
+ *
255
+ * To create a booking for the entire course, pass a booking with the relevant `schedule`.
256
+ * You can use Query Availability to check the availability beforehand.
257
+ *
258
+ * If you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.
259
+ * Then, any specified slot details are calculated.
260
+ *
261
+ * If you create a booking for a new session, we recommend to call Query Availability first.
262
+ * Then, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.
263
+ *
264
+ * Bookings are created with a status of `CREATED`.
265
+ * `CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.
266
+ *
267
+ * To create a booking with a given status, pass a booking with the wanted status.
268
+ * This is only permitted for site Owners.
269
+ *
270
+ * You can pass a `participantNotification.message` to notify the customer of the booking with a message.
271
+ * It's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.
272
+ *
273
+ * You can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.
274
+ *
275
+ * When creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the
276
+ * provided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.
277
+ *
278
+ * When creating a booking, you can pass `selectedPaymentOption`.
279
+ * This specifies which payment method the customer plans to use.
280
+ * But it's possible for them to later use another supported payment method.
281
+ *
282
+ * You can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the
283
+ * Wix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout.
284
+ * @param booking - The booking to create.
285
+ * @public
286
+ * @documentationMaturity preview
287
+ * @requiredField booking
288
+ * @requiredField booking.additionalFields._id
289
+ * @requiredField booking.bookedEntity
290
+ * @permissionScope Manage Bookings
291
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
292
+ * @permissionScope Manage Bookings - all permissions
293
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
294
+ * @applicableIdentity APP
295
+ * @applicableIdentity MEMBER
296
+ * @applicableIdentity VISITOR
297
+ */
298
+ declare function alarm(httpClient: HttpClient$2): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
299
+ /**
300
+ * Another thing
301
+ */
302
+ declare function updateAlarm(httpClient: HttpClient$2): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
303
+ declare const onAlarmTriggered: EventDefinition$1<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
304
+ declare const onAlarmSnoozed: EventDefinition$1<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
305
+ declare const onAlarmDeleted: EventDefinition$1<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
254
306
 
255
307
  type index_d$2_AlarmDeleted = AlarmDeleted;
256
308
  type index_d$2_AlarmDeletedEnvelope = AlarmDeletedEnvelope;
@@ -277,6 +329,37 @@ declare namespace index_d$2 {
277
329
  export { type ActionEvent$2 as ActionEvent, type index_d$2_AlarmDeleted as AlarmDeleted, type index_d$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type index_d$2_AlarmMessage as AlarmMessage, type index_d$2_AlarmOptions as AlarmOptions, type index_d$2_AlarmRequest as AlarmRequest, type index_d$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type index_d$2_AlarmResponse as AlarmResponse, type index_d$2_AlarmSnoozed as AlarmSnoozed, type index_d$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type index_d$2_AlarmTriggered as AlarmTriggered, type index_d$2_AlarmTriggeredEnvelope as AlarmTriggeredEnvelope, type BaseEventMetadata$1 as BaseEventMetadata, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type MessageEnvelope$2 as MessageEnvelope, type index_d$2_UpdateAlarm as UpdateAlarm, type index_d$2_UpdateAlarmRequest as UpdateAlarmRequest, type index_d$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type index_d$2_UpdateAlarmResponse as UpdateAlarmResponse, type index_d$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, __metadata$2 as __metadata, index_d$2_alarm as alarm, index_d$2_onAlarmDeleted as onAlarmDeleted, index_d$2_onAlarmSnoozed as onAlarmSnoozed, index_d$2_onAlarmTriggered as onAlarmTriggered, index_d$2_updateAlarm as updateAlarm };
278
330
  }
279
331
 
332
+ interface HttpClient$1 {
333
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
334
+ }
335
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
336
+ type HttpResponse$1<T = any> = {
337
+ data: T;
338
+ status: number;
339
+ statusText: string;
340
+ headers: any;
341
+ request?: any;
342
+ };
343
+ type RequestOptions$1<_TResponse = any, Data = any> = {
344
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
345
+ url: string;
346
+ data?: Data;
347
+ params?: URLSearchParams;
348
+ } & APIMetadata$1;
349
+ type APIMetadata$1 = {
350
+ methodFqn?: string;
351
+ entityFqdn?: string;
352
+ packageName?: string;
353
+ };
354
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
355
+ __type: 'event-definition';
356
+ type: Type;
357
+ isDomainEvent?: boolean;
358
+ transformations?: unknown;
359
+ __payload: Payload;
360
+ };
361
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
362
+
280
363
  interface MessageItem {
281
364
  /** inner_message comment from EchoMessage proto def */
282
365
  innerMessage?: string;
@@ -487,7 +570,7 @@ interface EchoOptions {
487
570
  declare const __metadata$1: {
488
571
  PACKAGE_NAME: string;
489
572
  };
490
- declare function echo(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
573
+ declare function echo(httpClient: HttpClient$1): (arg1: string, options?: EchoOptions) => Promise<string>;
491
574
  declare const onEchoDispatched: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
492
575
 
493
576
  type index_d$1_BaseEventMetadata = BaseEventMetadata;
@@ -1281,6 +1364,29 @@ interface BulkUpdateProductsOptions {
1281
1364
  returnEntity?: boolean;
1282
1365
  }
1283
1366
 
1367
+ interface HttpClient {
1368
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1369
+ }
1370
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1371
+ type HttpResponse<T = any> = {
1372
+ data: T;
1373
+ status: number;
1374
+ statusText: string;
1375
+ headers: any;
1376
+ request?: any;
1377
+ };
1378
+ type RequestOptions<_TResponse = any, Data = any> = {
1379
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1380
+ url: string;
1381
+ data?: Data;
1382
+ params?: URLSearchParams;
1383
+ } & APIMetadata;
1384
+ type APIMetadata = {
1385
+ methodFqn?: string;
1386
+ entityFqdn?: string;
1387
+ packageName?: string;
1388
+ };
1389
+
1284
1390
  declare const __metadata: {
1285
1391
  PACKAGE_NAME: string;
1286
1392
  };