@wix/auto_sdk_crm_contacts 1.0.1035 → 1.0.1037

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,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query as Query$1, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  interface Contact {
4
4
  /**
@@ -2563,9 +2563,105 @@ interface ContactsQueryBuilder {
2563
2563
  * @requiredField query
2564
2564
  * @returns List of contacts.
2565
2565
  */
2566
- declare function typedQueryContacts(query: Query, options?: QueryContactsOptions): Promise<NonNullablePaths<QueryContactsResponse, `contacts` | `contacts.${number}._id` | `contacts.${number}.revision` | `contacts.${number}.source.sourceType` | `contacts.${number}.lastActivity.activityType` | `contacts.${number}.primaryEmail.subscriptionStatus` | `contacts.${number}.primaryEmail.deliverabilityStatus` | `contacts.${number}.primaryPhone.subscriptionStatus`, 5> & {
2566
+ declare function typedQueryContacts(query: ContactQuery, options?: QueryContactsOptions): Promise<NonNullablePaths<QueryContactsResponse, `contacts` | `contacts.${number}._id` | `contacts.${number}.revision` | `contacts.${number}.source.sourceType` | `contacts.${number}.lastActivity.activityType` | `contacts.${number}.primaryEmail.subscriptionStatus` | `contacts.${number}.primaryEmail.deliverabilityStatus` | `contacts.${number}.primaryPhone.subscriptionStatus`, 5> & {
2567
2567
  __applicationErrorsType?: QueryContactsApplicationErrors;
2568
2568
  }>;
2569
+ interface ContactQuerySpec extends QuerySpec {
2570
+ paging: 'offset';
2571
+ wql: [
2572
+ {
2573
+ fields: ['_id', 'info.locale'];
2574
+ operators: ['$eq', '$exists', '$in', '$ne'];
2575
+ sort: 'NONE';
2576
+ },
2577
+ {
2578
+ fields: ['_createdDate', 'info.birthdate', 'lastActivity.activityDate'];
2579
+ operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
2580
+ sort: 'BOTH';
2581
+ },
2582
+ {
2583
+ fields: ['_updatedDate'];
2584
+ operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
2585
+ sort: 'NONE';
2586
+ },
2587
+ {
2588
+ fields: [
2589
+ 'info.company',
2590
+ 'info.jobTitle',
2591
+ 'info.name.first',
2592
+ 'info.name.last',
2593
+ 'primaryInfo.email'
2594
+ ];
2595
+ operators: ['$begins', '$eq', '$exists', '$in', '$ne'];
2596
+ sort: 'BOTH';
2597
+ },
2598
+ {
2599
+ fields: ['primaryInfo.phone'];
2600
+ operators: ['$begins', '$eq', '$exists', '$in', '$ne'];
2601
+ sort: 'NONE';
2602
+ },
2603
+ {
2604
+ fields: ['info.labelKeys'];
2605
+ operators: ['$hasAll', '$hasSome'];
2606
+ sort: 'NONE';
2607
+ }
2608
+ ];
2609
+ }
2610
+ type CommonQueryWithEntityContext = Query$1<Contact, ContactQuerySpec>;
2611
+ type ContactQuery = {
2612
+ /**
2613
+ Filter object.
2614
+ See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
2615
+ for more information.
2616
+
2617
+ For a detailed list of supported filters, see
2618
+ [Supported Filters](https://dev.wix.com/api/rest/contacts/contacts/supported-filters).
2619
+ */
2620
+ filter?: CommonQueryWithEntityContext['filter'] | null;
2621
+ /**
2622
+ Sorting options.
2623
+ See [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination)
2624
+ for more information.
2625
+
2626
+ Max: 1 sort object
2627
+ @maxSize: 1
2628
+ */
2629
+ sort?: {
2630
+ /**
2631
+ Field to sort by.
2632
+
2633
+ Supported properties:
2634
+ `createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,
2635
+ `info.jobTitle`, `info.birthdate`
2636
+ @maxLength: 100
2637
+ */
2638
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
2639
+ /**
2640
+ Sort order.
2641
+ Use `ASC` for ascending order or `DESC` for descending order.
2642
+
2643
+ Defaults to `ASC`.
2644
+ */
2645
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
2646
+ }[];
2647
+ /**
2648
+ Pagination options.
2649
+ */
2650
+ paging?: {
2651
+ /**
2652
+ Number of items to return. Learn more about pagination in [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging).
2653
+
2654
+ Default: `50`. <br>
2655
+ Maximum: `1000`.
2656
+ @max: 1000
2657
+ */
2658
+ limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;
2659
+ /**
2660
+ Number of items to skip in the current sort order.
2661
+ */
2662
+ offset?: NonNullable<CommonQueryWithEntityContext['paging']>['offset'] | null;
2663
+ };
2664
+ };
2569
2665
  /**
2570
2666
  * Lists facets from the site’s contact list.
2571
2667
  * Facets include labels and subscription statuses.
@@ -2828,4 +2924,4 @@ interface GetContactOptions {
2828
2924
  fieldsets?: ContactFieldSetWithLiterals[];
2829
2925
  }
2830
2926
 
2831
- export { Action, type ActionEvent, type ActionWithLiterals, type ActivityIcon, type Address, type AddressLocation, type AddressStreetOneOf, AddressTag, type AddressTagWithLiterals, type ApplicationError, type AssigneesWrapper, type BaseEventMetadata, type BulkActionMetadata, type BulkAddSegmentToContactsRequest, type BulkAddSegmentToContactsResponse, type BulkDeleteContactsApplicationErrors, type BulkDeleteContactsOptions, type BulkDeleteContactsRequest, type BulkDeleteContactsResponse, type BulkLabelAndUnlabelContactsApplicationErrors, type BulkLabelAndUnlabelContactsOptions, type BulkLabelAndUnlabelContactsRequest, type BulkLabelAndUnlabelContactsResponse, type BulkRemoveSegmentFromContactsRequest, type BulkRemoveSegmentFromContactsResponse, type BulkUpdateContactsOptions, type BulkUpdateContactsRequest, type BulkUpdateContactsResponse, type BulkUpsertContactsRequest, type BulkUpsertContactsResponse, type BulkUpsertContactsResponseMetadata, type Contact, type ContactActivity, ContactActivityType, type ContactActivityTypeWithLiterals, type ContactAddedToSegment, type ContactAddress, type ContactAddressesWrapper, type ContactChanged, type ContactCreatedEnvelope, type ContactDeletedEnvelope, type ContactEmail, type ContactEmailSubscriptionUpdated, type ContactEmailsWrapper, ContactFieldSet, type ContactFieldSetWithLiterals, type ContactInfo, type ContactMerged, type ContactMergedEnvelope, type ContactName, type ContactPhone, type ContactPhoneSubscriptionUpdated, type ContactPhonesWrapper, type ContactPicture, type ContactPrimaryInfoUpdated, type ContactRemovedFromSegment, type ContactSource, ContactSourceType, type ContactSourceTypeWithLiterals, type ContactSubmitted, type ContactUpdatedEnvelope, type ContactsFacet, ContactsFacetType, type ContactsFacetTypeWithLiterals, type ContactsQueryBuilder, type ContactsQueryResult, type CountContactsRequest, type CountContactsResponse, type CreateContactApplicationErrors, type CreateContactOptions, type CreateContactRequest, type CreateContactResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteContactApplicationErrors, type DeleteContactRequest, type DeleteContactResponse, type DomainEvent, type DomainEventBodyOneOf, type DuplicateContactExists, EmailDeliverabilityStatus, type EmailDeliverabilityStatusWithLiterals, EmailTag, type EmailTagWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type Error, type EventMetadata, type ExtendedFieldsWrapper, type GeneratePictureUploadUrlRequest, type GeneratePictureUploadUrlResponse, type GetContactApplicationErrors, type GetContactOptions, type GetContactRequest, type GetContactResponse, GetContactResponseType, type GetContactResponseTypeWithLiterals, type GroupInfo, type IdentificationData, type IdentificationDataIdOneOf, ImageProvider, type ImageProviderWithLiterals, type Item, type ItemMetadata, type LabelAndUnlabelContactRequest, type LabelAndUnlabelContactResponse, type LabelContactApplicationErrors, type LabelContactRequest, type LabelContactResponse, type LabelsWrapper, type LastActivityUpdate, type ListContactIdsBySegmentRequest, type ListContactIdsBySegmentResponse, type ListContactsApplicationErrors, type ListContactsOptions, type ListContactsRequest, type ListContactsResponse, type ListFacetsOptions, type ListFacetsRequest, type ListFacetsResponse, type LocationsWrapper, type MemberInfo, MemberStatus, type MemberStatusWithLiterals, type MergeContactsApplicationErrors, type MergeContactsOptions, type MergeContactsRequest, type MergeContactsResponse, type MessageEnvelope, type Metadata, Mode, type ModeWithLiterals, type Paging, type PagingMetadata, PhoneDeliverabilityStatus, type PhoneDeliverabilityStatusWithLiterals, PhoneTag, type PhoneTagWithLiterals, type PreviewMergeContactsApplicationErrors, type PreviewMergeContactsOptions, type PreviewMergeContactsRequest, type PreviewMergeContactsResponse, type PrimaryContactInfo, type PrimaryEmail, type PrimaryPhone, type PrimarySubscriptionStatus, PrivacyStatus, type PrivacyStatusWithLiterals, type ProfileInfo, type Query, type QueryContactsApplicationErrors, type QueryContactsOptions, type QueryContactsRequest, type QueryContactsResponse, type QueryFacetsOptions, type QueryFacetsRequest, type QueryFacetsResponse, type RestoreInfo, Role, type RoleWithLiterals, type Search, type SearchContactsRequest, type SearchContactsResponse, type SearchDetails, type SearchPagingMethodOneOf, type SegmentsWrapper, type SessionInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, SubmitOperation, type SubmitOperationWithLiterals, SubscriptionStatus, type SubscriptionStatusWithLiterals, type SyncSubmitContactRequest, type SyncSubmitContactResponse, type UnlabelContactApplicationErrors, type UnlabelContactRequest, type UnlabelContactResponse, type UpdateContactApplicationErrors, type UpdateContactOptions, type UpdateContactRequest, type UpdateContactResponse, type UpsertContactRequest, type UpsertContactResponse, UpsertContactResponseAction, type UpsertContactResponseActionWithLiterals, type UserInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteContacts, bulkLabelAndUnlabelContacts, bulkUpdateContacts, createContact, deleteContact, getContact, labelContact, listContacts, listFacets, mergeContacts, onContactCreated, onContactDeleted, onContactMerged, onContactUpdated, previewMergeContacts, queryContacts, queryFacets, typedQueryContacts, unlabelContact, updateContact };
2927
+ export { Action, type ActionEvent, type ActionWithLiterals, type ActivityIcon, type Address, type AddressLocation, type AddressStreetOneOf, AddressTag, type AddressTagWithLiterals, type ApplicationError, type AssigneesWrapper, type BaseEventMetadata, type BulkActionMetadata, type BulkAddSegmentToContactsRequest, type BulkAddSegmentToContactsResponse, type BulkDeleteContactsApplicationErrors, type BulkDeleteContactsOptions, type BulkDeleteContactsRequest, type BulkDeleteContactsResponse, type BulkLabelAndUnlabelContactsApplicationErrors, type BulkLabelAndUnlabelContactsOptions, type BulkLabelAndUnlabelContactsRequest, type BulkLabelAndUnlabelContactsResponse, type BulkRemoveSegmentFromContactsRequest, type BulkRemoveSegmentFromContactsResponse, type BulkUpdateContactsOptions, type BulkUpdateContactsRequest, type BulkUpdateContactsResponse, type BulkUpsertContactsRequest, type BulkUpsertContactsResponse, type BulkUpsertContactsResponseMetadata, type CommonQueryWithEntityContext, type Contact, type ContactActivity, ContactActivityType, type ContactActivityTypeWithLiterals, type ContactAddedToSegment, type ContactAddress, type ContactAddressesWrapper, type ContactChanged, type ContactCreatedEnvelope, type ContactDeletedEnvelope, type ContactEmail, type ContactEmailSubscriptionUpdated, type ContactEmailsWrapper, ContactFieldSet, type ContactFieldSetWithLiterals, type ContactInfo, type ContactMerged, type ContactMergedEnvelope, type ContactName, type ContactPhone, type ContactPhoneSubscriptionUpdated, type ContactPhonesWrapper, type ContactPicture, type ContactPrimaryInfoUpdated, type ContactQuery, type ContactQuerySpec, type ContactRemovedFromSegment, type ContactSource, ContactSourceType, type ContactSourceTypeWithLiterals, type ContactSubmitted, type ContactUpdatedEnvelope, type ContactsFacet, ContactsFacetType, type ContactsFacetTypeWithLiterals, type ContactsQueryBuilder, type ContactsQueryResult, type CountContactsRequest, type CountContactsResponse, type CreateContactApplicationErrors, type CreateContactOptions, type CreateContactRequest, type CreateContactResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteContactApplicationErrors, type DeleteContactRequest, type DeleteContactResponse, type DomainEvent, type DomainEventBodyOneOf, type DuplicateContactExists, EmailDeliverabilityStatus, type EmailDeliverabilityStatusWithLiterals, EmailTag, type EmailTagWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type Error, type EventMetadata, type ExtendedFieldsWrapper, type GeneratePictureUploadUrlRequest, type GeneratePictureUploadUrlResponse, type GetContactApplicationErrors, type GetContactOptions, type GetContactRequest, type GetContactResponse, GetContactResponseType, type GetContactResponseTypeWithLiterals, type GroupInfo, type IdentificationData, type IdentificationDataIdOneOf, ImageProvider, type ImageProviderWithLiterals, type Item, type ItemMetadata, type LabelAndUnlabelContactRequest, type LabelAndUnlabelContactResponse, type LabelContactApplicationErrors, type LabelContactRequest, type LabelContactResponse, type LabelsWrapper, type LastActivityUpdate, type ListContactIdsBySegmentRequest, type ListContactIdsBySegmentResponse, type ListContactsApplicationErrors, type ListContactsOptions, type ListContactsRequest, type ListContactsResponse, type ListFacetsOptions, type ListFacetsRequest, type ListFacetsResponse, type LocationsWrapper, type MemberInfo, MemberStatus, type MemberStatusWithLiterals, type MergeContactsApplicationErrors, type MergeContactsOptions, type MergeContactsRequest, type MergeContactsResponse, type MessageEnvelope, type Metadata, Mode, type ModeWithLiterals, type Paging, type PagingMetadata, PhoneDeliverabilityStatus, type PhoneDeliverabilityStatusWithLiterals, PhoneTag, type PhoneTagWithLiterals, type PreviewMergeContactsApplicationErrors, type PreviewMergeContactsOptions, type PreviewMergeContactsRequest, type PreviewMergeContactsResponse, type PrimaryContactInfo, type PrimaryEmail, type PrimaryPhone, type PrimarySubscriptionStatus, PrivacyStatus, type PrivacyStatusWithLiterals, type ProfileInfo, type Query, type QueryContactsApplicationErrors, type QueryContactsOptions, type QueryContactsRequest, type QueryContactsResponse, type QueryFacetsOptions, type QueryFacetsRequest, type QueryFacetsResponse, type RestoreInfo, Role, type RoleWithLiterals, type Search, type SearchContactsRequest, type SearchContactsResponse, type SearchDetails, type SearchPagingMethodOneOf, type SegmentsWrapper, type SessionInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, SubmitOperation, type SubmitOperationWithLiterals, SubscriptionStatus, type SubscriptionStatusWithLiterals, type SyncSubmitContactRequest, type SyncSubmitContactResponse, type UnlabelContactApplicationErrors, type UnlabelContactRequest, type UnlabelContactResponse, type UpdateContactApplicationErrors, type UpdateContactOptions, type UpdateContactRequest, type UpdateContactResponse, type UpsertContactRequest, type UpsertContactResponse, UpsertContactResponseAction, type UpsertContactResponseActionWithLiterals, type UserInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteContacts, bulkLabelAndUnlabelContacts, bulkUpdateContacts, createContact, deleteContact, getContact, labelContact, listContacts, listFacets, mergeContacts, onContactCreated, onContactDeleted, onContactMerged, onContactUpdated, previewMergeContacts, queryContacts, queryFacets, typedQueryContacts, unlabelContact, updateContact };