@wix/metro 1.0.89 → 1.0.91

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.
@@ -25,3 +25,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.products = void 0;
27
27
  exports.products = __importStar(require("@wix/metro_products/context"));
28
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAwD"}
@@ -26,3 +26,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.products = void 0;
27
27
  const products = __importStar(require("@wix/metro_products"));
28
28
  exports.products = products;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAgD;AAEvC,4BAAQ"}
package/build/cjs/meta.js CHANGED
@@ -25,3 +25,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.products = void 0;
27
27
  exports.products = __importStar(require("@wix/metro_products/meta"));
28
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAAqD"}
@@ -1 +1,2 @@
1
1
  export * as products from '@wix/metro_products/context';
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAC"}
package/build/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import * as products from '@wix/metro_products';
2
2
  export { products };
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/build/es/meta.js CHANGED
@@ -1 +1,2 @@
1
1
  export * as products from '@wix/metro_products/meta';
2
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/metro",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -21,7 +21,7 @@
21
21
  "type-bundles"
22
22
  ],
23
23
  "dependencies": {
24
- "@wix/metro_products": "1.0.14"
24
+ "@wix/metro_products": "1.0.16"
25
25
  },
26
26
  "devDependencies": {
27
27
  "glob": "^10.4.1",
@@ -46,5 +46,5 @@
46
46
  "fqdn": ""
47
47
  }
48
48
  },
49
- "falconPackageHash": "785aead8fb81116f8925450db5fdb187d14fb48e6920f0bfa3a61600"
49
+ "falconPackageHash": "532710eaad2b6f20c47d3952725f1247db3ee9510eece6f29d81a3a1"
50
50
  }
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
12
12
  }>;
13
13
  };
14
14
  environment?: Environment;
15
+ /**
16
+ * Optional name of the environment, use for logging
17
+ */
18
+ name?: string;
15
19
  /**
16
20
  * Optional bast url to use for API requests, for example `www.wixapis.com`
17
21
  */
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
271
275
  ? Partial<Record<KeysType, never>>
272
276
  : {});
273
277
 
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
274
344
  /**
275
345
  Extract the keys from a type where the value type of the key extends the given `Condition`.
276
346
 
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
303
373
 
304
374
  @category Object
305
375
  */
306
- type ConditionalKeys<Base, Condition> = NonNullable<
307
- // Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
376
+ type ConditionalKeys<Base, Condition> =
308
377
  {
309
378
  // Map through all the keys of the given base type.
310
- [Key in keyof Base]:
379
+ [Key in keyof Base]-?:
311
380
  // Pick only keys with types extending the given `Condition` type.
312
381
  Base[Key] extends Condition
313
- // Retain this key since the condition passes.
314
- ? Key
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
315
385
  // Discard this key since the condition fails.
316
386
  : never;
317
-
318
387
  // Convert the produced object into a union type of the keys which passed the conditional test.
319
- }[keyof Base]
320
- >;
388
+ }[keyof Base];
321
389
 
322
390
  /**
323
391
  Exclude keys from a shape that matches the given `Condition`.
@@ -408,6 +476,16 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
408
476
  host: Host;
409
477
  } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
410
478
 
479
+ interface Point {
480
+ /** X-coordinate of the focal point. */
481
+ x?: number;
482
+ /** Y-coordinate of the focal point. */
483
+ y?: number;
484
+ /** crop by height */
485
+ height?: number | null;
486
+ /** crop by width */
487
+ width?: number | null;
488
+ }
411
489
  /** Physical address */
412
490
  interface Address extends AddressStreetOneOf {
413
491
  /** Street name and number. */
@@ -563,17 +641,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
563
641
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
564
642
  cursorPaging?: CursorPaging;
565
643
  /**
566
- * Filter object in the following format:
567
- * `"filter" : {
568
- * "fieldName1": "value1",
569
- * "fieldName2":{"$operator":"value2"}
570
- * }`
571
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
644
+ * Filter object.
645
+ *
646
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
572
647
  */
573
648
  filter?: Record<string, any> | null;
574
649
  /**
575
- * Sort object in the following format:
576
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
650
+ * Sort object.
651
+ *
652
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
577
653
  */
578
654
  sort?: Sorting[];
579
655
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -710,116 +786,6 @@ interface ResetProductsDbRequest {
710
786
  }
711
787
  interface ResetProductsDbResponse {
712
788
  }
713
- interface DomainEvent extends DomainEventBodyOneOf {
714
- createdEvent?: EntityCreatedEvent;
715
- updatedEvent?: EntityUpdatedEvent;
716
- deletedEvent?: EntityDeletedEvent;
717
- actionEvent?: ActionEvent;
718
- /**
719
- * Unique event ID.
720
- * Allows clients to ignore duplicate webhooks.
721
- */
722
- _id?: string;
723
- /**
724
- * Assumes actions are also always typed to an entity_type
725
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
726
- */
727
- entityFqdn?: string;
728
- /**
729
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
730
- * This is although the created/updated/deleted notion is duplication of the oneof types
731
- * Example: created/updated/deleted/started/completed/email_opened
732
- */
733
- slug?: string;
734
- /** ID of the entity associated with the event. */
735
- entityId?: string;
736
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
737
- eventTime?: Date;
738
- /**
739
- * Whether the event was triggered as a result of a privacy regulation application
740
- * (for example, GDPR).
741
- */
742
- triggeredByAnonymizeRequest?: boolean | null;
743
- /** If present, indicates the action that triggered the event. */
744
- originatedFrom?: string | null;
745
- /**
746
- * A sequence number defining the order of updates to the underlying entity.
747
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
748
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
749
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
750
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
751
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
752
- */
753
- entityEventSequence?: string | null;
754
- }
755
- /** @oneof */
756
- interface DomainEventBodyOneOf {
757
- createdEvent?: EntityCreatedEvent;
758
- updatedEvent?: EntityUpdatedEvent;
759
- deletedEvent?: EntityDeletedEvent;
760
- actionEvent?: ActionEvent;
761
- }
762
- interface EntityCreatedEvent {
763
- entity?: string;
764
- }
765
- interface RestoreInfo {
766
- deletedDate?: Date;
767
- }
768
- interface EntityUpdatedEvent {
769
- /**
770
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
771
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
772
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
773
- */
774
- currentEntity?: string;
775
- }
776
- interface EntityDeletedEvent {
777
- /** Entity that was deleted */
778
- deletedEntity?: string | null;
779
- }
780
- interface ActionEvent {
781
- body?: string;
782
- }
783
- interface MessageEnvelope {
784
- /** App instance ID. */
785
- instanceId?: string | null;
786
- /** Event type. */
787
- eventType?: string;
788
- /** The identification type and identity data. */
789
- identity?: IdentificationData;
790
- /** Stringify payload. */
791
- data?: string;
792
- }
793
- interface IdentificationData extends IdentificationDataIdOneOf {
794
- /** ID of a site visitor that has not logged in to the site. */
795
- anonymousVisitorId?: string;
796
- /** ID of a site visitor that has logged in to the site. */
797
- memberId?: string;
798
- /** ID of a Wix user (site owner, contributor, etc.). */
799
- wixUserId?: string;
800
- /** ID of an app. */
801
- appId?: string;
802
- /** @readonly */
803
- identityType?: WebhookIdentityType;
804
- }
805
- /** @oneof */
806
- interface IdentificationDataIdOneOf {
807
- /** ID of a site visitor that has not logged in to the site. */
808
- anonymousVisitorId?: string;
809
- /** ID of a site visitor that has logged in to the site. */
810
- memberId?: string;
811
- /** ID of a Wix user (site owner, contributor, etc.). */
812
- wixUserId?: string;
813
- /** ID of an app. */
814
- appId?: string;
815
- }
816
- declare enum WebhookIdentityType {
817
- UNKNOWN = "UNKNOWN",
818
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
819
- MEMBER = "MEMBER",
820
- WIX_USER = "WIX_USER",
821
- APP = "APP"
822
- }
823
789
  interface StreetAddressNonNullableFields {
824
790
  number: string;
825
791
  name: string;
@@ -910,8 +876,8 @@ interface Product {
910
876
  _id: string;
911
877
  name: string | null;
912
878
  collectionId: string;
913
- _createdDate: Date;
914
- modifiedDate: Date;
879
+ _createdDate: Date | null;
880
+ modifiedDate: Date | null;
915
881
  image: string;
916
882
  address: Address;
917
883
  document: string;
@@ -1078,7 +1044,6 @@ declare const bulkCreateProducts: MaybeContext<BuildRESTFunction<typeof bulkCrea
1078
1044
  declare const bulkUpdateProducts: MaybeContext<BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1>;
1079
1045
  declare const bulkDeleteProducts: MaybeContext<BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1>;
1080
1046
 
1081
- type context_ActionEvent = ActionEvent;
1082
1047
  type context_Address = Address;
1083
1048
  type context_AddressLocation = AddressLocation;
1084
1049
  type context_AddressStreetOneOf = AddressStreetOneOf;
@@ -1106,11 +1071,6 @@ type context_CursorPaging = CursorPaging;
1106
1071
  type context_Cursors = Cursors;
1107
1072
  type context_DeleteProductRequest = DeleteProductRequest;
1108
1073
  type context_DeleteProductResponse = DeleteProductResponse;
1109
- type context_DomainEvent = DomainEvent;
1110
- type context_DomainEventBodyOneOf = DomainEventBodyOneOf;
1111
- type context_EntityCreatedEvent = EntityCreatedEvent;
1112
- type context_EntityDeletedEvent = EntityDeletedEvent;
1113
- type context_EntityUpdatedEvent = EntityUpdatedEvent;
1114
1074
  type context_GetProductRequest = GetProductRequest;
1115
1075
  type context_GetProductResponse = GetProductResponse;
1116
1076
  type context_GetProductResponseNonNullableFields = GetProductResponseNonNullableFields;
@@ -1118,17 +1078,15 @@ type context_GetProductsStartWithOptions = GetProductsStartWithOptions;
1118
1078
  type context_GetProductsStartWithRequest = GetProductsStartWithRequest;
1119
1079
  type context_GetProductsStartWithResponse = GetProductsStartWithResponse;
1120
1080
  type context_GetProductsStartWithResponseNonNullableFields = GetProductsStartWithResponseNonNullableFields;
1121
- type context_IdentificationData = IdentificationData;
1122
- type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1123
1081
  type context_ItemMetadata = ItemMetadata;
1124
1082
  type context_LinkRel = LinkRel;
1125
1083
  declare const context_LinkRel: typeof LinkRel;
1126
1084
  type context_MaskedProduct = MaskedProduct;
1127
- type context_MessageEnvelope = MessageEnvelope;
1128
1085
  type context_MyAddress = MyAddress;
1129
1086
  type context_PageLink = PageLink;
1130
1087
  type context_Paging = Paging;
1131
1088
  type context_PagingMetadataV2 = PagingMetadataV2;
1089
+ type context_Point = Point;
1132
1090
  type context_Product = Product;
1133
1091
  type context_ProductNonNullableFields = ProductNonNullableFields;
1134
1092
  type context_ProductsQueryBuilder = ProductsQueryBuilder;
@@ -1141,7 +1099,6 @@ type context_QueryV2 = QueryV2;
1141
1099
  type context_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1142
1100
  type context_ResetProductsDbRequest = ResetProductsDbRequest;
1143
1101
  type context_ResetProductsDbResponse = ResetProductsDbResponse;
1144
- type context_RestoreInfo = RestoreInfo;
1145
1102
  type context_SortOrder = SortOrder;
1146
1103
  declare const context_SortOrder: typeof SortOrder;
1147
1104
  type context_Sorting = Sorting;
@@ -1156,8 +1113,6 @@ type context_UpdateProductResponse = UpdateProductResponse;
1156
1113
  type context_UpdateProductResponseNonNullableFields = UpdateProductResponseNonNullableFields;
1157
1114
  type context_Variant = Variant;
1158
1115
  type context_VideoResolution = VideoResolution;
1159
- type context_WebhookIdentityType = WebhookIdentityType;
1160
- declare const context_WebhookIdentityType: typeof WebhookIdentityType;
1161
1116
  declare const context_bulkCreateProducts: typeof bulkCreateProducts;
1162
1117
  declare const context_bulkDeleteProducts: typeof bulkDeleteProducts;
1163
1118
  declare const context_bulkUpdateProducts: typeof bulkUpdateProducts;
@@ -1168,7 +1123,7 @@ declare const context_getProductsStartWith: typeof getProductsStartWith;
1168
1123
  declare const context_queryProducts: typeof queryProducts;
1169
1124
  declare const context_updateProduct: typeof updateProduct;
1170
1125
  declare namespace context {
1171
- export { type context_ActionEvent as ActionEvent, type context_Address as Address, type context_AddressLocation as AddressLocation, type context_AddressStreetOneOf as AddressStreetOneOf, type context_ApplicationError as ApplicationError, type context_BulkActionMetadata as BulkActionMetadata, type context_BulkCreateProductsOptions as BulkCreateProductsOptions, type context_BulkCreateProductsRequest as BulkCreateProductsRequest, type context_BulkCreateProductsResponse as BulkCreateProductsResponse, type context_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type context_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type context_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type context_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type context_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type context_BulkProductResult as BulkProductResult, type context_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type context_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type context_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type context_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type context_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type context_CreateProductOptions as CreateProductOptions, type context_CreateProductRequest as CreateProductRequest, type context_CreateProductResponse as CreateProductResponse, type context_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_Cursors as Cursors, type context_DeleteProductRequest as DeleteProductRequest, type context_DeleteProductResponse as DeleteProductResponse, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_GetProductRequest as GetProductRequest, type context_GetProductResponse as GetProductResponse, type context_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type context_GetProductsStartWithOptions as GetProductsStartWithOptions, type context_GetProductsStartWithRequest as GetProductsStartWithRequest, type context_GetProductsStartWithResponse as GetProductsStartWithResponse, type context_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_ItemMetadata as ItemMetadata, context_LinkRel as LinkRel, type context_MaskedProduct as MaskedProduct, type context_MessageEnvelope as MessageEnvelope, type context_MyAddress as MyAddress, type context_PageLink as PageLink, type context_Paging as Paging, type context_PagingMetadataV2 as PagingMetadataV2, type context_Product as Product, type context_ProductNonNullableFields as ProductNonNullableFields, type context_ProductsQueryBuilder as ProductsQueryBuilder, type context_ProductsQueryResult as ProductsQueryResult, type context_QueryProductsOptions as QueryProductsOptions, type context_QueryProductsRequest as QueryProductsRequest, type context_QueryProductsResponse as QueryProductsResponse, type context_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type context_QueryV2 as QueryV2, type context_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context_ResetProductsDbRequest as ResetProductsDbRequest, type context_ResetProductsDbResponse as ResetProductsDbResponse, type context_RestoreInfo as RestoreInfo, context_SortOrder as SortOrder, type context_Sorting as Sorting, type context_StandardDetails as StandardDetails, type context_StreetAddress as StreetAddress, type context_Subdivision as Subdivision, context_SubdivisionType as SubdivisionType, type context_UpdateProductOptions as UpdateProductOptions, type context_UpdateProductRequest as UpdateProductRequest, type context_UpdateProductResponse as UpdateProductResponse, type context_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type context_Variant as Variant, type context_VideoResolution as VideoResolution, context_WebhookIdentityType as WebhookIdentityType, context_bulkCreateProducts as bulkCreateProducts, context_bulkDeleteProducts as bulkDeleteProducts, context_bulkUpdateProducts as bulkUpdateProducts, context_createProduct as createProduct, context_deleteProduct as deleteProduct, context_getProduct as getProduct, context_getProductsStartWith as getProductsStartWith, context_queryProducts as queryProducts, context_updateProduct as updateProduct };
1126
+ export { type context_Address as Address, type context_AddressLocation as AddressLocation, type context_AddressStreetOneOf as AddressStreetOneOf, type context_ApplicationError as ApplicationError, type context_BulkActionMetadata as BulkActionMetadata, type context_BulkCreateProductsOptions as BulkCreateProductsOptions, type context_BulkCreateProductsRequest as BulkCreateProductsRequest, type context_BulkCreateProductsResponse as BulkCreateProductsResponse, type context_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type context_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type context_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type context_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type context_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type context_BulkProductResult as BulkProductResult, type context_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type context_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type context_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type context_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type context_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type context_CreateProductOptions as CreateProductOptions, type context_CreateProductRequest as CreateProductRequest, type context_CreateProductResponse as CreateProductResponse, type context_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_Cursors as Cursors, type context_DeleteProductRequest as DeleteProductRequest, type context_DeleteProductResponse as DeleteProductResponse, type context_GetProductRequest as GetProductRequest, type context_GetProductResponse as GetProductResponse, type context_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type context_GetProductsStartWithOptions as GetProductsStartWithOptions, type context_GetProductsStartWithRequest as GetProductsStartWithRequest, type context_GetProductsStartWithResponse as GetProductsStartWithResponse, type context_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type context_ItemMetadata as ItemMetadata, context_LinkRel as LinkRel, type context_MaskedProduct as MaskedProduct, type context_MyAddress as MyAddress, type context_PageLink as PageLink, type context_Paging as Paging, type context_PagingMetadataV2 as PagingMetadataV2, type context_Point as Point, type context_Product as Product, type context_ProductNonNullableFields as ProductNonNullableFields, type context_ProductsQueryBuilder as ProductsQueryBuilder, type context_ProductsQueryResult as ProductsQueryResult, type context_QueryProductsOptions as QueryProductsOptions, type context_QueryProductsRequest as QueryProductsRequest, type context_QueryProductsResponse as QueryProductsResponse, type context_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type context_QueryV2 as QueryV2, type context_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context_ResetProductsDbRequest as ResetProductsDbRequest, type context_ResetProductsDbResponse as ResetProductsDbResponse, context_SortOrder as SortOrder, type context_Sorting as Sorting, type context_StandardDetails as StandardDetails, type context_StreetAddress as StreetAddress, type context_Subdivision as Subdivision, context_SubdivisionType as SubdivisionType, type context_UpdateProductOptions as UpdateProductOptions, type context_UpdateProductRequest as UpdateProductRequest, type context_UpdateProductResponse as UpdateProductResponse, type context_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type context_Variant as Variant, type context_VideoResolution as VideoResolution, context_bulkCreateProducts as bulkCreateProducts, context_bulkDeleteProducts as bulkDeleteProducts, context_bulkUpdateProducts as bulkUpdateProducts, context_createProduct as createProduct, context_deleteProduct as deleteProduct, context_getProduct as getProduct, context_getProductsStartWith as getProductsStartWith, context_queryProducts as queryProducts, context_updateProduct as updateProduct };
1172
1127
  }
1173
1128
 
1174
1129
  export { context as products };
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
12
12
  }>;
13
13
  };
14
14
  environment?: Environment;
15
+ /**
16
+ * Optional name of the environment, use for logging
17
+ */
18
+ name?: string;
15
19
  /**
16
20
  * Optional bast url to use for API requests, for example `www.wixapis.com`
17
21
  */
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
271
275
  ? Partial<Record<KeysType, never>>
272
276
  : {});
273
277
 
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
274
344
  /**
275
345
  Extract the keys from a type where the value type of the key extends the given `Condition`.
276
346
 
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
303
373
 
304
374
  @category Object
305
375
  */
306
- type ConditionalKeys<Base, Condition> = NonNullable<
307
- // Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
376
+ type ConditionalKeys<Base, Condition> =
308
377
  {
309
378
  // Map through all the keys of the given base type.
310
- [Key in keyof Base]:
379
+ [Key in keyof Base]-?:
311
380
  // Pick only keys with types extending the given `Condition` type.
312
381
  Base[Key] extends Condition
313
- // Retain this key since the condition passes.
314
- ? Key
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
315
385
  // Discard this key since the condition fails.
316
386
  : never;
317
-
318
387
  // Convert the produced object into a union type of the keys which passed the conditional test.
319
- }[keyof Base]
320
- >;
388
+ }[keyof Base];
321
389
 
322
390
  /**
323
391
  Exclude keys from a shape that matches the given `Condition`.
@@ -408,6 +476,16 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
408
476
  host: Host;
409
477
  } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
410
478
 
479
+ interface Point {
480
+ /** X-coordinate of the focal point. */
481
+ x?: number;
482
+ /** Y-coordinate of the focal point. */
483
+ y?: number;
484
+ /** crop by height */
485
+ height?: number | null;
486
+ /** crop by width */
487
+ width?: number | null;
488
+ }
411
489
  /** Physical address */
412
490
  interface Address extends AddressStreetOneOf {
413
491
  /** Street name and number. */
@@ -563,17 +641,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
563
641
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
564
642
  cursorPaging?: CursorPaging;
565
643
  /**
566
- * Filter object in the following format:
567
- * `"filter" : {
568
- * "fieldName1": "value1",
569
- * "fieldName2":{"$operator":"value2"}
570
- * }`
571
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
644
+ * Filter object.
645
+ *
646
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
572
647
  */
573
648
  filter?: Record<string, any> | null;
574
649
  /**
575
- * Sort object in the following format:
576
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
650
+ * Sort object.
651
+ *
652
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
577
653
  */
578
654
  sort?: Sorting[];
579
655
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -710,116 +786,6 @@ interface ResetProductsDbRequest {
710
786
  }
711
787
  interface ResetProductsDbResponse {
712
788
  }
713
- interface DomainEvent extends DomainEventBodyOneOf {
714
- createdEvent?: EntityCreatedEvent;
715
- updatedEvent?: EntityUpdatedEvent;
716
- deletedEvent?: EntityDeletedEvent;
717
- actionEvent?: ActionEvent;
718
- /**
719
- * Unique event ID.
720
- * Allows clients to ignore duplicate webhooks.
721
- */
722
- _id?: string;
723
- /**
724
- * Assumes actions are also always typed to an entity_type
725
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
726
- */
727
- entityFqdn?: string;
728
- /**
729
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
730
- * This is although the created/updated/deleted notion is duplication of the oneof types
731
- * Example: created/updated/deleted/started/completed/email_opened
732
- */
733
- slug?: string;
734
- /** ID of the entity associated with the event. */
735
- entityId?: string;
736
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
737
- eventTime?: Date;
738
- /**
739
- * Whether the event was triggered as a result of a privacy regulation application
740
- * (for example, GDPR).
741
- */
742
- triggeredByAnonymizeRequest?: boolean | null;
743
- /** If present, indicates the action that triggered the event. */
744
- originatedFrom?: string | null;
745
- /**
746
- * A sequence number defining the order of updates to the underlying entity.
747
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
748
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
749
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
750
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
751
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
752
- */
753
- entityEventSequence?: string | null;
754
- }
755
- /** @oneof */
756
- interface DomainEventBodyOneOf {
757
- createdEvent?: EntityCreatedEvent;
758
- updatedEvent?: EntityUpdatedEvent;
759
- deletedEvent?: EntityDeletedEvent;
760
- actionEvent?: ActionEvent;
761
- }
762
- interface EntityCreatedEvent {
763
- entity?: string;
764
- }
765
- interface RestoreInfo {
766
- deletedDate?: Date;
767
- }
768
- interface EntityUpdatedEvent {
769
- /**
770
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
771
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
772
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
773
- */
774
- currentEntity?: string;
775
- }
776
- interface EntityDeletedEvent {
777
- /** Entity that was deleted */
778
- deletedEntity?: string | null;
779
- }
780
- interface ActionEvent {
781
- body?: string;
782
- }
783
- interface MessageEnvelope {
784
- /** App instance ID. */
785
- instanceId?: string | null;
786
- /** Event type. */
787
- eventType?: string;
788
- /** The identification type and identity data. */
789
- identity?: IdentificationData;
790
- /** Stringify payload. */
791
- data?: string;
792
- }
793
- interface IdentificationData extends IdentificationDataIdOneOf {
794
- /** ID of a site visitor that has not logged in to the site. */
795
- anonymousVisitorId?: string;
796
- /** ID of a site visitor that has logged in to the site. */
797
- memberId?: string;
798
- /** ID of a Wix user (site owner, contributor, etc.). */
799
- wixUserId?: string;
800
- /** ID of an app. */
801
- appId?: string;
802
- /** @readonly */
803
- identityType?: WebhookIdentityType;
804
- }
805
- /** @oneof */
806
- interface IdentificationDataIdOneOf {
807
- /** ID of a site visitor that has not logged in to the site. */
808
- anonymousVisitorId?: string;
809
- /** ID of a site visitor that has logged in to the site. */
810
- memberId?: string;
811
- /** ID of a Wix user (site owner, contributor, etc.). */
812
- wixUserId?: string;
813
- /** ID of an app. */
814
- appId?: string;
815
- }
816
- declare enum WebhookIdentityType {
817
- UNKNOWN = "UNKNOWN",
818
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
819
- MEMBER = "MEMBER",
820
- WIX_USER = "WIX_USER",
821
- APP = "APP"
822
- }
823
789
  interface StreetAddressNonNullableFields {
824
790
  number: string;
825
791
  name: string;
@@ -910,8 +876,8 @@ interface Product {
910
876
  _id: string;
911
877
  name: string | null;
912
878
  collectionId: string;
913
- _createdDate: Date;
914
- modifiedDate: Date;
879
+ _createdDate: Date | null;
880
+ modifiedDate: Date | null;
915
881
  image: string;
916
882
  address: Address;
917
883
  document: string;
@@ -1078,7 +1044,6 @@ declare const bulkCreateProducts: MaybeContext<BuildRESTFunction<typeof bulkCrea
1078
1044
  declare const bulkUpdateProducts: MaybeContext<BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1>;
1079
1045
  declare const bulkDeleteProducts: MaybeContext<BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1>;
1080
1046
 
1081
- type index_d_ActionEvent = ActionEvent;
1082
1047
  type index_d_Address = Address;
1083
1048
  type index_d_AddressLocation = AddressLocation;
1084
1049
  type index_d_AddressStreetOneOf = AddressStreetOneOf;
@@ -1106,11 +1071,6 @@ type index_d_CursorPaging = CursorPaging;
1106
1071
  type index_d_Cursors = Cursors;
1107
1072
  type index_d_DeleteProductRequest = DeleteProductRequest;
1108
1073
  type index_d_DeleteProductResponse = DeleteProductResponse;
1109
- type index_d_DomainEvent = DomainEvent;
1110
- type index_d_DomainEventBodyOneOf = DomainEventBodyOneOf;
1111
- type index_d_EntityCreatedEvent = EntityCreatedEvent;
1112
- type index_d_EntityDeletedEvent = EntityDeletedEvent;
1113
- type index_d_EntityUpdatedEvent = EntityUpdatedEvent;
1114
1074
  type index_d_GetProductRequest = GetProductRequest;
1115
1075
  type index_d_GetProductResponse = GetProductResponse;
1116
1076
  type index_d_GetProductResponseNonNullableFields = GetProductResponseNonNullableFields;
@@ -1118,17 +1078,15 @@ type index_d_GetProductsStartWithOptions = GetProductsStartWithOptions;
1118
1078
  type index_d_GetProductsStartWithRequest = GetProductsStartWithRequest;
1119
1079
  type index_d_GetProductsStartWithResponse = GetProductsStartWithResponse;
1120
1080
  type index_d_GetProductsStartWithResponseNonNullableFields = GetProductsStartWithResponseNonNullableFields;
1121
- type index_d_IdentificationData = IdentificationData;
1122
- type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1123
1081
  type index_d_ItemMetadata = ItemMetadata;
1124
1082
  type index_d_LinkRel = LinkRel;
1125
1083
  declare const index_d_LinkRel: typeof LinkRel;
1126
1084
  type index_d_MaskedProduct = MaskedProduct;
1127
- type index_d_MessageEnvelope = MessageEnvelope;
1128
1085
  type index_d_MyAddress = MyAddress;
1129
1086
  type index_d_PageLink = PageLink;
1130
1087
  type index_d_Paging = Paging;
1131
1088
  type index_d_PagingMetadataV2 = PagingMetadataV2;
1089
+ type index_d_Point = Point;
1132
1090
  type index_d_Product = Product;
1133
1091
  type index_d_ProductNonNullableFields = ProductNonNullableFields;
1134
1092
  type index_d_ProductsQueryBuilder = ProductsQueryBuilder;
@@ -1141,7 +1099,6 @@ type index_d_QueryV2 = QueryV2;
1141
1099
  type index_d_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1142
1100
  type index_d_ResetProductsDbRequest = ResetProductsDbRequest;
1143
1101
  type index_d_ResetProductsDbResponse = ResetProductsDbResponse;
1144
- type index_d_RestoreInfo = RestoreInfo;
1145
1102
  type index_d_SortOrder = SortOrder;
1146
1103
  declare const index_d_SortOrder: typeof SortOrder;
1147
1104
  type index_d_Sorting = Sorting;
@@ -1156,8 +1113,6 @@ type index_d_UpdateProductResponse = UpdateProductResponse;
1156
1113
  type index_d_UpdateProductResponseNonNullableFields = UpdateProductResponseNonNullableFields;
1157
1114
  type index_d_Variant = Variant;
1158
1115
  type index_d_VideoResolution = VideoResolution;
1159
- type index_d_WebhookIdentityType = WebhookIdentityType;
1160
- declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
1161
1116
  declare const index_d_bulkCreateProducts: typeof bulkCreateProducts;
1162
1117
  declare const index_d_bulkDeleteProducts: typeof bulkDeleteProducts;
1163
1118
  declare const index_d_bulkUpdateProducts: typeof bulkUpdateProducts;
@@ -1168,7 +1123,7 @@ declare const index_d_getProductsStartWith: typeof getProductsStartWith;
1168
1123
  declare const index_d_queryProducts: typeof queryProducts;
1169
1124
  declare const index_d_updateProduct: typeof updateProduct;
1170
1125
  declare namespace index_d {
1171
- export { type index_d_ActionEvent as ActionEvent, type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressStreetOneOf as AddressStreetOneOf, type index_d_ApplicationError as ApplicationError, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkCreateProductsOptions as BulkCreateProductsOptions, type index_d_BulkCreateProductsRequest as BulkCreateProductsRequest, type index_d_BulkCreateProductsResponse as BulkCreateProductsResponse, type index_d_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type index_d_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type index_d_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type index_d_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type index_d_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type index_d_BulkProductResult as BulkProductResult, type index_d_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type index_d_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type index_d_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type index_d_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type index_d_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type index_d_CreateProductOptions as CreateProductOptions, type index_d_CreateProductRequest as CreateProductRequest, type index_d_CreateProductResponse as CreateProductResponse, type index_d_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteProductRequest as DeleteProductRequest, type index_d_DeleteProductResponse as DeleteProductResponse, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_GetProductRequest as GetProductRequest, type index_d_GetProductResponse as GetProductResponse, type index_d_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type index_d_GetProductsStartWithOptions as GetProductsStartWithOptions, type index_d_GetProductsStartWithRequest as GetProductsStartWithRequest, type index_d_GetProductsStartWithResponse as GetProductsStartWithResponse, type index_d_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ItemMetadata as ItemMetadata, index_d_LinkRel as LinkRel, type index_d_MaskedProduct as MaskedProduct, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MyAddress as MyAddress, type index_d_PageLink as PageLink, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_Product as Product, type index_d_ProductNonNullableFields as ProductNonNullableFields, type index_d_ProductsQueryBuilder as ProductsQueryBuilder, type index_d_ProductsQueryResult as ProductsQueryResult, type index_d_QueryProductsOptions as QueryProductsOptions, type index_d_QueryProductsRequest as QueryProductsRequest, type index_d_QueryProductsResponse as QueryProductsResponse, type index_d_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ResetProductsDbRequest as ResetProductsDbRequest, type index_d_ResetProductsDbResponse as ResetProductsDbResponse, type index_d_RestoreInfo as RestoreInfo, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_StandardDetails as StandardDetails, type index_d_StreetAddress as StreetAddress, type index_d_Subdivision as Subdivision, index_d_SubdivisionType as SubdivisionType, type index_d_UpdateProductOptions as UpdateProductOptions, type index_d_UpdateProductRequest as UpdateProductRequest, type index_d_UpdateProductResponse as UpdateProductResponse, type index_d_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type index_d_Variant as Variant, type index_d_VideoResolution as VideoResolution, index_d_WebhookIdentityType as WebhookIdentityType, index_d_bulkCreateProducts as bulkCreateProducts, index_d_bulkDeleteProducts as bulkDeleteProducts, index_d_bulkUpdateProducts as bulkUpdateProducts, index_d_createProduct as createProduct, index_d_deleteProduct as deleteProduct, index_d_getProduct as getProduct, index_d_getProductsStartWith as getProductsStartWith, index_d_queryProducts as queryProducts, index_d_updateProduct as updateProduct };
1126
+ export { type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressStreetOneOf as AddressStreetOneOf, type index_d_ApplicationError as ApplicationError, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkCreateProductsOptions as BulkCreateProductsOptions, type index_d_BulkCreateProductsRequest as BulkCreateProductsRequest, type index_d_BulkCreateProductsResponse as BulkCreateProductsResponse, type index_d_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type index_d_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type index_d_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type index_d_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type index_d_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type index_d_BulkProductResult as BulkProductResult, type index_d_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type index_d_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type index_d_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type index_d_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type index_d_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type index_d_CreateProductOptions as CreateProductOptions, type index_d_CreateProductRequest as CreateProductRequest, type index_d_CreateProductResponse as CreateProductResponse, type index_d_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteProductRequest as DeleteProductRequest, type index_d_DeleteProductResponse as DeleteProductResponse, type index_d_GetProductRequest as GetProductRequest, type index_d_GetProductResponse as GetProductResponse, type index_d_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type index_d_GetProductsStartWithOptions as GetProductsStartWithOptions, type index_d_GetProductsStartWithRequest as GetProductsStartWithRequest, type index_d_GetProductsStartWithResponse as GetProductsStartWithResponse, type index_d_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type index_d_ItemMetadata as ItemMetadata, index_d_LinkRel as LinkRel, type index_d_MaskedProduct as MaskedProduct, type index_d_MyAddress as MyAddress, type index_d_PageLink as PageLink, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_Point as Point, type index_d_Product as Product, type index_d_ProductNonNullableFields as ProductNonNullableFields, type index_d_ProductsQueryBuilder as ProductsQueryBuilder, type index_d_ProductsQueryResult as ProductsQueryResult, type index_d_QueryProductsOptions as QueryProductsOptions, type index_d_QueryProductsRequest as QueryProductsRequest, type index_d_QueryProductsResponse as QueryProductsResponse, type index_d_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ResetProductsDbRequest as ResetProductsDbRequest, type index_d_ResetProductsDbResponse as ResetProductsDbResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_StandardDetails as StandardDetails, type index_d_StreetAddress as StreetAddress, type index_d_Subdivision as Subdivision, index_d_SubdivisionType as SubdivisionType, type index_d_UpdateProductOptions as UpdateProductOptions, type index_d_UpdateProductRequest as UpdateProductRequest, type index_d_UpdateProductResponse as UpdateProductResponse, type index_d_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type index_d_Variant as Variant, type index_d_VideoResolution as VideoResolution, index_d_bulkCreateProducts as bulkCreateProducts, index_d_bulkDeleteProducts as bulkDeleteProducts, index_d_bulkUpdateProducts as bulkUpdateProducts, index_d_createProduct as createProduct, index_d_deleteProduct as deleteProduct, index_d_getProduct as getProduct, index_d_getProductsStartWith as getProductsStartWith, index_d_queryProducts as queryProducts, index_d_updateProduct as updateProduct };
1172
1127
  }
1173
1128
 
1174
1129
  export { index_d as products };
@@ -2,8 +2,8 @@ interface Product$1 {
2
2
  title?: string | null;
3
3
  id?: string;
4
4
  collectionId?: string;
5
- createdDate?: Date;
6
- modifiedDate?: Date;
5
+ createdDate?: Date | null;
6
+ modifiedDate?: Date | null;
7
7
  image?: Image;
8
8
  address?: Address$1;
9
9
  document?: Document;
@@ -214,17 +214,15 @@ interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
214
214
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
215
215
  cursorPaging?: CursorPaging$1;
216
216
  /**
217
- * Filter object in the following format:
218
- * `"filter" : {
219
- * "fieldName1": "value1",
220
- * "fieldName2":{"$operator":"value2"}
221
- * }`
222
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
217
+ * Filter object.
218
+ *
219
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
223
220
  */
224
221
  filter?: Record<string, any> | null;
225
222
  /**
226
- * Sort object in the following format:
227
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
223
+ * Sort object.
224
+ *
225
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
228
226
  */
229
227
  sort?: Sorting$1[];
230
228
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -357,11 +355,16 @@ interface BulkDeleteProductsResponse$1 {
357
355
  interface BulkDeleteProductsResponseBulkProductResult$1 {
358
356
  itemMetadata?: ItemMetadata$1;
359
357
  }
358
+ interface PointNonNullableFields {
359
+ x: number;
360
+ y: number;
361
+ }
360
362
  interface ImageNonNullableFields {
361
363
  id: string;
362
364
  url: string;
363
365
  height: number;
364
366
  width: number;
367
+ focalPoint?: PointNonNullableFields;
365
368
  }
366
369
  interface StreetAddressNonNullableFields$1 {
367
370
  number: string;
@@ -590,17 +593,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
590
593
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
591
594
  cursorPaging?: CursorPaging;
592
595
  /**
593
- * Filter object in the following format:
594
- * `"filter" : {
595
- * "fieldName1": "value1",
596
- * "fieldName2":{"$operator":"value2"}
597
- * }`
598
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
596
+ * Filter object.
597
+ *
598
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
599
599
  */
600
600
  filter?: Record<string, any> | null;
601
601
  /**
602
- * Sort object in the following format:
603
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
602
+ * Sort object.
603
+ *
604
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
604
605
  */
605
606
  sort?: Sorting[];
606
607
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -823,8 +824,8 @@ interface Product {
823
824
  _id: string;
824
825
  name: string | null;
825
826
  collectionId: string;
826
- _createdDate: Date;
827
- modifiedDate: Date;
827
+ _createdDate: Date | null;
828
+ modifiedDate: Date | null;
828
829
  image: string;
829
830
  address: Address;
830
831
  document: string;