@wix/motion 1.0.44 → 1.0.45

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.
@@ -1,3 +1,4 @@
1
- export * as alarms from '@wix/motion_alarms';
2
- export * as metroinspector from '@wix/motion_metroinspector';
3
- export * as products from '@wix/motion_products';
1
+ import * as alarms from '@wix/motion_alarms';
2
+ import * as metroinspector from '@wix/motion_metroinspector';
3
+ import * as products from '@wix/motion_products';
4
+ export { alarms, metroinspector, products };
@@ -24,7 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.products = exports.metroinspector = exports.alarms = void 0;
27
- exports.alarms = __importStar(require("@wix/motion_alarms"));
28
- exports.metroinspector = __importStar(require("@wix/motion_metroinspector"));
29
- exports.products = __importStar(require("@wix/motion_products"));
27
+ const alarms = __importStar(require("@wix/motion_alarms"));
28
+ exports.alarms = alarms;
29
+ const metroinspector = __importStar(require("@wix/motion_metroinspector"));
30
+ exports.metroinspector = metroinspector;
31
+ const products = __importStar(require("@wix/motion_products"));
32
+ exports.products = products;
30
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6C;AAC7C,6EAA6D;AAC7D,iEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA6C;AAIpC,wBAAM;AAHf,2EAA6D;AAG5C,wCAAc;AAF/B,+DAAiD;AAEhB,4BAAQ"}
@@ -1,3 +1,4 @@
1
- export * as alarms from '@wix/motion_alarms';
2
- export * as metroinspector from '@wix/motion_metroinspector';
3
- export * as products from '@wix/motion_products';
1
+ import * as alarms from '@wix/motion_alarms';
2
+ import * as metroinspector from '@wix/motion_metroinspector';
3
+ import * as products from '@wix/motion_products';
4
+ export { alarms, metroinspector, products };
package/build/es/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export * as alarms from '@wix/motion_alarms';
2
- export * as metroinspector from '@wix/motion_metroinspector';
3
- export * as products from '@wix/motion_products';
1
+ import * as alarms from '@wix/motion_alarms';
2
+ import * as metroinspector from '@wix/motion_metroinspector';
3
+ import * as products from '@wix/motion_products';
4
+ export { alarms, metroinspector, products };
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/motion",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,9 +18,9 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/motion_alarms": "1.0.12",
22
- "@wix/motion_metroinspector": "1.0.8",
23
- "@wix/motion_products": "1.0.11"
21
+ "@wix/motion_alarms": "1.0.13",
22
+ "@wix/motion_metroinspector": "1.0.9",
23
+ "@wix/motion_products": "1.0.12"
24
24
  },
25
25
  "devDependencies": {
26
26
  "glob": "^10.4.1",
@@ -29,8 +29,9 @@
29
29
  "typescript": "^5.3.2"
30
30
  },
31
31
  "scripts": {
32
- "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
32
+ "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
33
33
  "build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
34
+ "build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
34
35
  "test": ":"
35
36
  },
36
37
  "wix": {
@@ -44,5 +45,5 @@
44
45
  "fqdn": ""
45
46
  }
46
47
  },
47
- "falconPackageHash": "f3bf8da4a5a1366ce97af737b8490f6fe2dd84e0a3e4446de528b0b9"
48
+ "falconPackageHash": "aa68c9adbb1e49e41eeed5f6e80534ea8b49b33210fdc95d522c277d"
48
49
  }
@@ -1,3 +1,47 @@
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
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
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;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  interface AlarmMessage {
2
46
  _id?: string;
3
47
  seconds?: number;
@@ -216,59 +260,46 @@ interface UpdateAlarm {
216
260
  seconds?: number;
217
261
  }
218
262
 
219
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
220
- interface HttpClient {
221
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
222
- fetchWithAuth: typeof fetch;
223
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
263
+ declare function alarm$1(httpClient: HttpClient): AlarmSignature;
264
+ interface AlarmSignature {
265
+ /**
266
+ * sets up an alarm after {seconds}
267
+ */
268
+ (seconds: number, options?: AlarmOptions | undefined): Promise<AlarmResponse>;
224
269
  }
225
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
226
- type HttpResponse<T = any> = {
227
- data: T;
228
- status: number;
229
- statusText: string;
230
- headers: any;
231
- request?: any;
232
- };
233
- type RequestOptions<_TResponse = any, Data = any> = {
234
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
235
- url: string;
236
- data?: Data;
237
- params?: URLSearchParams;
238
- } & APIMetadata;
239
- type APIMetadata = {
240
- methodFqn?: string;
241
- entityFqdn?: string;
242
- packageName?: string;
243
- };
244
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
245
- type EventDefinition<Payload = unknown, Type extends string = string> = {
246
- __type: 'event-definition';
247
- type: Type;
248
- isDomainEvent?: boolean;
249
- transformations?: (envelope: unknown) => Payload;
250
- __payload: Payload;
251
- };
252
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
253
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
254
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
255
-
256
- declare global {
257
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
258
- interface SymbolConstructor {
259
- readonly observable: symbol;
260
- }
270
+ declare function updateAlarm$1(httpClient: HttpClient): UpdateAlarmSignature;
271
+ interface UpdateAlarmSignature {
272
+ /**
273
+ * sets up an existing alarm with id {id}
274
+ */
275
+ (_id: string, alarm: UpdateAlarm): Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
261
276
  }
262
-
263
- declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
277
+ declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
278
+ declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
279
+ declare const onAlarmDeleted$1: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
264
280
 
265
281
  declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
266
282
 
267
- declare const alarm: ReturnType<typeof createRESTModule$2<typeof publicAlarm>>;
268
- declare const updateAlarm: ReturnType<typeof createRESTModule$2<typeof publicUpdateAlarm>>;
269
- declare const onAlarmTriggered: ReturnType<typeof createEventModule$1<typeof publicOnAlarmTriggered>>;
270
- declare const onAlarmSnoozed: ReturnType<typeof createEventModule$1<typeof publicOnAlarmSnoozed>>;
271
- declare const onAlarmDeleted: ReturnType<typeof createEventModule$1<typeof publicOnAlarmDeleted>>;
283
+ declare const alarm: BuildRESTFunction<typeof alarm$1> & typeof alarm$1;
284
+ declare const updateAlarm: BuildRESTFunction<typeof updateAlarm$1> & typeof updateAlarm$1;
285
+
286
+ type _publicOnAlarmTriggeredType = typeof onAlarmTriggered$1;
287
+ /**
288
+ * alarm event that might be consumed when alarm is triggered
289
+ */
290
+ declare const onAlarmTriggered: ReturnType<typeof createEventModule$1<_publicOnAlarmTriggeredType>>;
291
+
292
+ type _publicOnAlarmSnoozedType = typeof onAlarmSnoozed$1;
293
+ /**
294
+ * alarm event that might be consumed when alarm is snoozed
295
+ */
296
+ declare const onAlarmSnoozed: ReturnType<typeof createEventModule$1<_publicOnAlarmSnoozedType>>;
297
+
298
+ type _publicOnAlarmDeletedType = typeof onAlarmDeleted$1;
299
+ /**
300
+ * alarm event that might be consumed when alarm is deleted
301
+ */
302
+ declare const onAlarmDeleted: ReturnType<typeof createEventModule$1<_publicOnAlarmDeletedType>>;
272
303
 
273
304
  type context$2_AlarmDeleted = AlarmDeleted;
274
305
  type context$2_AlarmDeletedEnvelope = AlarmDeletedEnvelope;
@@ -286,13 +317,16 @@ type context$2_UpdateAlarmRequest = UpdateAlarmRequest;
286
317
  type context$2_UpdateAlarmRequestRequiredFields = UpdateAlarmRequestRequiredFields;
287
318
  type context$2_UpdateAlarmResponse = UpdateAlarmResponse;
288
319
  type context$2_UpdateAlarmResponseNonNullableFields = UpdateAlarmResponseNonNullableFields;
320
+ type context$2__publicOnAlarmDeletedType = _publicOnAlarmDeletedType;
321
+ type context$2__publicOnAlarmSnoozedType = _publicOnAlarmSnoozedType;
322
+ type context$2__publicOnAlarmTriggeredType = _publicOnAlarmTriggeredType;
289
323
  declare const context$2_alarm: typeof alarm;
290
324
  declare const context$2_onAlarmDeleted: typeof onAlarmDeleted;
291
325
  declare const context$2_onAlarmSnoozed: typeof onAlarmSnoozed;
292
326
  declare const context$2_onAlarmTriggered: typeof onAlarmTriggered;
293
327
  declare const context$2_updateAlarm: typeof updateAlarm;
294
328
  declare namespace context$2 {
295
- export { type ActionEvent$2 as ActionEvent, type context$2_AlarmDeleted as AlarmDeleted, type context$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type context$2_AlarmMessage as AlarmMessage, type context$2_AlarmOptions as AlarmOptions, type context$2_AlarmRequest as AlarmRequest, type context$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type context$2_AlarmResponse as AlarmResponse, type context$2_AlarmSnoozed as AlarmSnoozed, type context$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type context$2_AlarmTriggered as AlarmTriggered, type context$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 RestoreInfo$2 as RestoreInfo, type context$2_UpdateAlarm as UpdateAlarm, type context$2_UpdateAlarmRequest as UpdateAlarmRequest, type context$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type context$2_UpdateAlarmResponse as UpdateAlarmResponse, type context$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, 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 };
329
+ export { type ActionEvent$2 as ActionEvent, type context$2_AlarmDeleted as AlarmDeleted, type context$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type context$2_AlarmMessage as AlarmMessage, type context$2_AlarmOptions as AlarmOptions, type context$2_AlarmRequest as AlarmRequest, type context$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type context$2_AlarmResponse as AlarmResponse, type context$2_AlarmSnoozed as AlarmSnoozed, type context$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type context$2_AlarmTriggered as AlarmTriggered, type context$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 RestoreInfo$2 as RestoreInfo, type context$2_UpdateAlarm as UpdateAlarm, type context$2_UpdateAlarmRequest as UpdateAlarmRequest, type context$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type context$2_UpdateAlarmResponse as UpdateAlarmResponse, type context$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, type context$2__publicOnAlarmDeletedType as _publicOnAlarmDeletedType, type context$2__publicOnAlarmSnoozedType as _publicOnAlarmSnoozedType, type context$2__publicOnAlarmTriggeredType as _publicOnAlarmTriggeredType, context$2_alarm as alarm, context$2_onAlarmDeleted as onAlarmDeleted, context$2_onAlarmSnoozed as onAlarmSnoozed, context$2_onAlarmTriggered as onAlarmTriggered, onAlarmDeleted$1 as publicOnAlarmDeleted, onAlarmSnoozed$1 as publicOnAlarmSnoozed, onAlarmTriggered$1 as publicOnAlarmTriggered, context$2_updateAlarm as updateAlarm };
296
330
  }
297
331
 
298
332
  interface MessageItem {
@@ -507,12 +541,27 @@ interface EchoOptions {
507
541
  someDate?: Date;
508
542
  }
509
543
 
510
- declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
544
+ declare function echo$1(httpClient: HttpClient): EchoSignature;
545
+ interface EchoSignature {
546
+ /**
547
+ * echo given arg1 and arg2
548
+ * @param - 1st part of the message
549
+ * @param - modified comment for arg2 el hovav
550
+ * @returns messge reseult as string
551
+ */
552
+ (arg1: string, options?: EchoOptions | undefined): Promise<string>;
553
+ }
554
+ declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
511
555
 
512
556
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
513
557
 
514
- declare const echo: ReturnType<typeof createRESTModule$1<typeof publicEcho>>;
515
- declare const onEchoDispatched: ReturnType<typeof createEventModule<typeof publicOnEchoDispatched>>;
558
+ declare const echo: BuildRESTFunction<typeof echo$1> & typeof echo$1;
559
+
560
+ type _publicOnEchoDispatchedType = typeof onEchoDispatched$1;
561
+ /**
562
+ * echo event that might be consumed when somone says something!
563
+ */
564
+ declare const onEchoDispatched: ReturnType<typeof createEventModule<_publicOnEchoDispatchedType>>;
516
565
 
517
566
  type context$1_BaseEventMetadata = BaseEventMetadata;
518
567
  type context$1_Dispatched = Dispatched;
@@ -525,10 +574,11 @@ type context$1_EchoResponse = EchoResponse;
525
574
  type context$1_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
526
575
  type context$1_EventMetadata = EventMetadata;
527
576
  type context$1_MessageItem = MessageItem;
577
+ type context$1__publicOnEchoDispatchedType = _publicOnEchoDispatchedType;
528
578
  declare const context$1_echo: typeof echo;
529
579
  declare const context$1_onEchoDispatched: typeof onEchoDispatched;
530
580
  declare namespace context$1 {
531
- export { type ActionEvent$1 as ActionEvent, type context$1_BaseEventMetadata as BaseEventMetadata, type context$1_Dispatched as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type context$1_EchoMessage as EchoMessage, type context$1_EchoOptions as EchoOptions, type context$1_EchoRequest as EchoRequest, type context$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type context$1_EchoResponse as EchoResponse, type context$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type context$1_EventMetadata as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$1_MessageItem as MessageItem, type RestoreInfo$1 as RestoreInfo, WebhookIdentityType$1 as WebhookIdentityType, context$1_echo as echo, context$1_onEchoDispatched as onEchoDispatched };
581
+ export { type ActionEvent$1 as ActionEvent, type context$1_BaseEventMetadata as BaseEventMetadata, type context$1_Dispatched as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type context$1_EchoMessage as EchoMessage, type context$1_EchoOptions as EchoOptions, type context$1_EchoRequest as EchoRequest, type context$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type context$1_EchoResponse as EchoResponse, type context$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type context$1_EventMetadata as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$1_MessageItem as MessageItem, type RestoreInfo$1 as RestoreInfo, WebhookIdentityType$1 as WebhookIdentityType, type context$1__publicOnEchoDispatchedType as _publicOnEchoDispatchedType, context$1_echo as echo, context$1_onEchoDispatched as onEchoDispatched, onEchoDispatched$1 as publicOnEchoDispatched };
532
582
  }
533
583
 
534
584
  /** Physical address */
@@ -1172,17 +1222,69 @@ interface BulkUpdateProductsOptions {
1172
1222
  returnEntity?: boolean;
1173
1223
  }
1174
1224
 
1175
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
1225
+ declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
1226
+ interface CreateProductSignature {
1227
+ /**
1228
+ * Creating a product
1229
+ */
1230
+ (options?: (CreateProductOptions & CreateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1231
+ }
1232
+ declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
1233
+ interface DeleteProductSignature {
1234
+ /** */
1235
+ (productId: string): Promise<void>;
1236
+ }
1237
+ declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
1238
+ interface UpdateProductSignature {
1239
+ /** */
1240
+ (productId: string, options?: (UpdateProductOptions & UpdateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1241
+ }
1242
+ declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
1243
+ interface GetProductSignature {
1244
+ /** */
1245
+ (productId: string): Promise<Product & ProductNonNullableFields>;
1246
+ }
1247
+ declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
1248
+ interface GetProductsStartWithSignature {
1249
+ /** */
1250
+ (title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
1251
+ }
1252
+ declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
1253
+ interface QueryProductsSignature {
1254
+ /** */
1255
+ (options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
1256
+ }
1257
+ declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
1258
+ interface BulkCreateProductsSignature {
1259
+ /**
1260
+ * create multiple products in a single request. Works synchronously
1261
+ */
1262
+ (products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
1263
+ }
1264
+ declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
1265
+ interface BulkUpdateProductsSignature {
1266
+ /**
1267
+ * update multiple products in a single request. Works synchronously.
1268
+ */
1269
+ (products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
1270
+ }
1271
+ declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
1272
+ interface BulkDeleteProductsSignature {
1273
+ /**
1274
+ * deletes multiple products in a single request. Works synchronously.
1275
+ */
1276
+ (productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
1277
+ }
1176
1278
 
1177
- declare const createProduct: ReturnType<typeof createRESTModule<typeof publicCreateProduct>>;
1178
- declare const deleteProduct: ReturnType<typeof createRESTModule<typeof publicDeleteProduct>>;
1179
- declare const updateProduct: ReturnType<typeof createRESTModule<typeof publicUpdateProduct>>;
1180
- declare const getProduct: ReturnType<typeof createRESTModule<typeof publicGetProduct>>;
1181
- declare const getProductsStartWith: ReturnType<typeof createRESTModule<typeof publicGetProductsStartWith>>;
1182
- declare const queryProducts: ReturnType<typeof createRESTModule<typeof publicQueryProducts>>;
1183
- declare const bulkCreateProducts: ReturnType<typeof createRESTModule<typeof publicBulkCreateProducts>>;
1184
- declare const bulkUpdateProducts: ReturnType<typeof createRESTModule<typeof publicBulkUpdateProducts>>;
1185
- declare const bulkDeleteProducts: ReturnType<typeof createRESTModule<typeof publicBulkDeleteProducts>>;
1279
+ declare const createProduct: BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1;
1280
+ declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1;
1281
+ declare const updateProduct: BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1;
1282
+ declare const getProduct: BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1;
1283
+ declare const getProductsStartWith: BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1;
1284
+ declare const queryProducts: BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1;
1285
+ declare const bulkCreateProducts: BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1;
1286
+ declare const bulkUpdateProducts: BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1;
1287
+ declare const bulkDeleteProducts: BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1;
1186
1288
 
1187
1289
  type context_ActionEvent = ActionEvent;
1188
1290
  type context_Address = Address;
@@ -1,3 +1,47 @@
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
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
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;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  interface AlarmMessage {
2
46
  _id?: string;
3
47
  seconds?: number;
@@ -216,59 +260,46 @@ interface UpdateAlarm {
216
260
  seconds?: number;
217
261
  }
218
262
 
219
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
220
- interface HttpClient {
221
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
222
- fetchWithAuth: typeof fetch;
223
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
263
+ declare function alarm$1(httpClient: HttpClient): AlarmSignature;
264
+ interface AlarmSignature {
265
+ /**
266
+ * sets up an alarm after {seconds}
267
+ */
268
+ (seconds: number, options?: AlarmOptions | undefined): Promise<AlarmResponse>;
224
269
  }
225
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
226
- type HttpResponse<T = any> = {
227
- data: T;
228
- status: number;
229
- statusText: string;
230
- headers: any;
231
- request?: any;
232
- };
233
- type RequestOptions<_TResponse = any, Data = any> = {
234
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
235
- url: string;
236
- data?: Data;
237
- params?: URLSearchParams;
238
- } & APIMetadata;
239
- type APIMetadata = {
240
- methodFqn?: string;
241
- entityFqdn?: string;
242
- packageName?: string;
243
- };
244
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
245
- type EventDefinition<Payload = unknown, Type extends string = string> = {
246
- __type: 'event-definition';
247
- type: Type;
248
- isDomainEvent?: boolean;
249
- transformations?: (envelope: unknown) => Payload;
250
- __payload: Payload;
251
- };
252
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
253
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
254
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
255
-
256
- declare global {
257
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
258
- interface SymbolConstructor {
259
- readonly observable: symbol;
260
- }
270
+ declare function updateAlarm$1(httpClient: HttpClient): UpdateAlarmSignature;
271
+ interface UpdateAlarmSignature {
272
+ /**
273
+ * sets up an existing alarm with id {id}
274
+ */
275
+ (_id: string, alarm: UpdateAlarm): Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
261
276
  }
262
-
263
- declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
277
+ declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
278
+ declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
279
+ declare const onAlarmDeleted$1: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
264
280
 
265
281
  declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
266
282
 
267
- declare const alarm: ReturnType<typeof createRESTModule$2<typeof publicAlarm>>;
268
- declare const updateAlarm: ReturnType<typeof createRESTModule$2<typeof publicUpdateAlarm>>;
269
- declare const onAlarmTriggered: ReturnType<typeof createEventModule$1<typeof publicOnAlarmTriggered>>;
270
- declare const onAlarmSnoozed: ReturnType<typeof createEventModule$1<typeof publicOnAlarmSnoozed>>;
271
- declare const onAlarmDeleted: ReturnType<typeof createEventModule$1<typeof publicOnAlarmDeleted>>;
283
+ declare const alarm: BuildRESTFunction<typeof alarm$1> & typeof alarm$1;
284
+ declare const updateAlarm: BuildRESTFunction<typeof updateAlarm$1> & typeof updateAlarm$1;
285
+
286
+ type _publicOnAlarmTriggeredType = typeof onAlarmTriggered$1;
287
+ /**
288
+ * alarm event that might be consumed when alarm is triggered
289
+ */
290
+ declare const onAlarmTriggered: ReturnType<typeof createEventModule$1<_publicOnAlarmTriggeredType>>;
291
+
292
+ type _publicOnAlarmSnoozedType = typeof onAlarmSnoozed$1;
293
+ /**
294
+ * alarm event that might be consumed when alarm is snoozed
295
+ */
296
+ declare const onAlarmSnoozed: ReturnType<typeof createEventModule$1<_publicOnAlarmSnoozedType>>;
297
+
298
+ type _publicOnAlarmDeletedType = typeof onAlarmDeleted$1;
299
+ /**
300
+ * alarm event that might be consumed when alarm is deleted
301
+ */
302
+ declare const onAlarmDeleted: ReturnType<typeof createEventModule$1<_publicOnAlarmDeletedType>>;
272
303
 
273
304
  type index_d$2_AlarmDeleted = AlarmDeleted;
274
305
  type index_d$2_AlarmDeletedEnvelope = AlarmDeletedEnvelope;
@@ -286,13 +317,16 @@ type index_d$2_UpdateAlarmRequest = UpdateAlarmRequest;
286
317
  type index_d$2_UpdateAlarmRequestRequiredFields = UpdateAlarmRequestRequiredFields;
287
318
  type index_d$2_UpdateAlarmResponse = UpdateAlarmResponse;
288
319
  type index_d$2_UpdateAlarmResponseNonNullableFields = UpdateAlarmResponseNonNullableFields;
320
+ type index_d$2__publicOnAlarmDeletedType = _publicOnAlarmDeletedType;
321
+ type index_d$2__publicOnAlarmSnoozedType = _publicOnAlarmSnoozedType;
322
+ type index_d$2__publicOnAlarmTriggeredType = _publicOnAlarmTriggeredType;
289
323
  declare const index_d$2_alarm: typeof alarm;
290
324
  declare const index_d$2_onAlarmDeleted: typeof onAlarmDeleted;
291
325
  declare const index_d$2_onAlarmSnoozed: typeof onAlarmSnoozed;
292
326
  declare const index_d$2_onAlarmTriggered: typeof onAlarmTriggered;
293
327
  declare const index_d$2_updateAlarm: typeof updateAlarm;
294
328
  declare namespace index_d$2 {
295
- 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 RestoreInfo$2 as RestoreInfo, 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, 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 };
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 RestoreInfo$2 as RestoreInfo, 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, type index_d$2__publicOnAlarmDeletedType as _publicOnAlarmDeletedType, type index_d$2__publicOnAlarmSnoozedType as _publicOnAlarmSnoozedType, type index_d$2__publicOnAlarmTriggeredType as _publicOnAlarmTriggeredType, index_d$2_alarm as alarm, index_d$2_onAlarmDeleted as onAlarmDeleted, index_d$2_onAlarmSnoozed as onAlarmSnoozed, index_d$2_onAlarmTriggered as onAlarmTriggered, onAlarmDeleted$1 as publicOnAlarmDeleted, onAlarmSnoozed$1 as publicOnAlarmSnoozed, onAlarmTriggered$1 as publicOnAlarmTriggered, index_d$2_updateAlarm as updateAlarm };
296
330
  }
297
331
 
298
332
  interface MessageItem {
@@ -507,12 +541,27 @@ interface EchoOptions {
507
541
  someDate?: Date;
508
542
  }
509
543
 
510
- declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
544
+ declare function echo$1(httpClient: HttpClient): EchoSignature;
545
+ interface EchoSignature {
546
+ /**
547
+ * echo given arg1 and arg2
548
+ * @param - 1st part of the message
549
+ * @param - modified comment for arg2 el hovav
550
+ * @returns messge reseult as string
551
+ */
552
+ (arg1: string, options?: EchoOptions | undefined): Promise<string>;
553
+ }
554
+ declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
511
555
 
512
556
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
513
557
 
514
- declare const echo: ReturnType<typeof createRESTModule$1<typeof publicEcho>>;
515
- declare const onEchoDispatched: ReturnType<typeof createEventModule<typeof publicOnEchoDispatched>>;
558
+ declare const echo: BuildRESTFunction<typeof echo$1> & typeof echo$1;
559
+
560
+ type _publicOnEchoDispatchedType = typeof onEchoDispatched$1;
561
+ /**
562
+ * echo event that might be consumed when somone says something!
563
+ */
564
+ declare const onEchoDispatched: ReturnType<typeof createEventModule<_publicOnEchoDispatchedType>>;
516
565
 
517
566
  type index_d$1_BaseEventMetadata = BaseEventMetadata;
518
567
  type index_d$1_Dispatched = Dispatched;
@@ -525,10 +574,11 @@ type index_d$1_EchoResponse = EchoResponse;
525
574
  type index_d$1_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
526
575
  type index_d$1_EventMetadata = EventMetadata;
527
576
  type index_d$1_MessageItem = MessageItem;
577
+ type index_d$1__publicOnEchoDispatchedType = _publicOnEchoDispatchedType;
528
578
  declare const index_d$1_echo: typeof echo;
529
579
  declare const index_d$1_onEchoDispatched: typeof onEchoDispatched;
530
580
  declare namespace index_d$1 {
531
- export { type ActionEvent$1 as ActionEvent, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_Dispatched as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d$1_EchoMessage as EchoMessage, type index_d$1_EchoOptions as EchoOptions, type index_d$1_EchoRequest as EchoRequest, type index_d$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type index_d$1_EchoResponse as EchoResponse, type index_d$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type index_d$1_EventMetadata as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_MessageItem as MessageItem, type RestoreInfo$1 as RestoreInfo, WebhookIdentityType$1 as WebhookIdentityType, index_d$1_echo as echo, index_d$1_onEchoDispatched as onEchoDispatched };
581
+ export { type ActionEvent$1 as ActionEvent, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_Dispatched as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d$1_EchoMessage as EchoMessage, type index_d$1_EchoOptions as EchoOptions, type index_d$1_EchoRequest as EchoRequest, type index_d$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type index_d$1_EchoResponse as EchoResponse, type index_d$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type index_d$1_EventMetadata as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_MessageItem as MessageItem, type RestoreInfo$1 as RestoreInfo, WebhookIdentityType$1 as WebhookIdentityType, type index_d$1__publicOnEchoDispatchedType as _publicOnEchoDispatchedType, index_d$1_echo as echo, index_d$1_onEchoDispatched as onEchoDispatched, onEchoDispatched$1 as publicOnEchoDispatched };
532
582
  }
533
583
 
534
584
  /** Physical address */
@@ -1172,17 +1222,69 @@ interface BulkUpdateProductsOptions {
1172
1222
  returnEntity?: boolean;
1173
1223
  }
1174
1224
 
1175
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
1225
+ declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
1226
+ interface CreateProductSignature {
1227
+ /**
1228
+ * Creating a product
1229
+ */
1230
+ (options?: (CreateProductOptions & CreateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1231
+ }
1232
+ declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
1233
+ interface DeleteProductSignature {
1234
+ /** */
1235
+ (productId: string): Promise<void>;
1236
+ }
1237
+ declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
1238
+ interface UpdateProductSignature {
1239
+ /** */
1240
+ (productId: string, options?: (UpdateProductOptions & UpdateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1241
+ }
1242
+ declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
1243
+ interface GetProductSignature {
1244
+ /** */
1245
+ (productId: string): Promise<Product & ProductNonNullableFields>;
1246
+ }
1247
+ declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
1248
+ interface GetProductsStartWithSignature {
1249
+ /** */
1250
+ (title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
1251
+ }
1252
+ declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
1253
+ interface QueryProductsSignature {
1254
+ /** */
1255
+ (options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
1256
+ }
1257
+ declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
1258
+ interface BulkCreateProductsSignature {
1259
+ /**
1260
+ * create multiple products in a single request. Works synchronously
1261
+ */
1262
+ (products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
1263
+ }
1264
+ declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
1265
+ interface BulkUpdateProductsSignature {
1266
+ /**
1267
+ * update multiple products in a single request. Works synchronously.
1268
+ */
1269
+ (products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
1270
+ }
1271
+ declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
1272
+ interface BulkDeleteProductsSignature {
1273
+ /**
1274
+ * deletes multiple products in a single request. Works synchronously.
1275
+ */
1276
+ (productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
1277
+ }
1176
1278
 
1177
- declare const createProduct: ReturnType<typeof createRESTModule<typeof publicCreateProduct>>;
1178
- declare const deleteProduct: ReturnType<typeof createRESTModule<typeof publicDeleteProduct>>;
1179
- declare const updateProduct: ReturnType<typeof createRESTModule<typeof publicUpdateProduct>>;
1180
- declare const getProduct: ReturnType<typeof createRESTModule<typeof publicGetProduct>>;
1181
- declare const getProductsStartWith: ReturnType<typeof createRESTModule<typeof publicGetProductsStartWith>>;
1182
- declare const queryProducts: ReturnType<typeof createRESTModule<typeof publicQueryProducts>>;
1183
- declare const bulkCreateProducts: ReturnType<typeof createRESTModule<typeof publicBulkCreateProducts>>;
1184
- declare const bulkUpdateProducts: ReturnType<typeof createRESTModule<typeof publicBulkUpdateProducts>>;
1185
- declare const bulkDeleteProducts: ReturnType<typeof createRESTModule<typeof publicBulkDeleteProducts>>;
1279
+ declare const createProduct: BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1;
1280
+ declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1;
1281
+ declare const updateProduct: BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1;
1282
+ declare const getProduct: BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1;
1283
+ declare const getProductsStartWith: BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1;
1284
+ declare const queryProducts: BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1;
1285
+ declare const bulkCreateProducts: BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1;
1286
+ declare const bulkUpdateProducts: BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1;
1287
+ declare const bulkDeleteProducts: BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1;
1186
1288
 
1187
1289
  type index_d_ActionEvent = ActionEvent;
1188
1290
  type index_d_Address = Address;