@wix/auto_sdk_crm_contacts 1.0.399 → 1.0.401

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,7 +1,8 @@
1
- import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
2
  import { ContactInfo, CreateContactOptions, CreateContactResponse, CreateContactApplicationErrors, UpdateContactOptions, UpdateContactResponse, UpdateContactApplicationErrors, MergeContactsOptions, MergeContactsResponse, MergeContactsApplicationErrors, DeleteContactApplicationErrors, LabelContactResponse, LabelContactApplicationErrors, UnlabelContactResponse, UnlabelContactApplicationErrors, QueryContactsOptions, ContactsQueryBuilder, GetContactOptions, Contact, GetContactApplicationErrors, ContactCreatedEnvelope, ContactDeletedEnvelope, ContactMergedEnvelope, ContactUpdatedEnvelope } from './index.typings.js';
3
3
  export { Action, ActionEvent, ActivityIcon, Address, AddressLocation, AddressStreetOneOf, AddressTag, ApplicationError, AssigneesWrapper, BaseEventMetadata, BulkActionMetadata, BulkAddSegmentToContactsRequest, BulkAddSegmentToContactsResponse, BulkDeleteContactsRequest, BulkDeleteContactsResponse, BulkLabelAndUnlabelContactsRequest, BulkLabelAndUnlabelContactsResponse, BulkRemoveSegmentFromContactsRequest, BulkRemoveSegmentFromContactsResponse, BulkUpdateContactsRequest, BulkUpdateContactsResponse, BulkUpsertContactsRequest, BulkUpsertContactsResponse, BulkUpsertContactsResponseMetadata, ContactActivity, ContactActivityType, ContactAddedToSegment, ContactAddress, ContactAddressesWrapper, ContactChanged, ContactEmail, ContactEmailSubscriptionUpdated, ContactEmailsWrapper, ContactFieldSet, ContactMerged, ContactName, ContactPhone, ContactPhoneSubscriptionUpdated, ContactPhonesWrapper, ContactPicture, ContactPrimaryInfoUpdated, ContactRemovedFromSegment, ContactSource, ContactSourceType, ContactSubmitted, ContactsFacet, ContactsFacetType, ContactsQueryResult, CountContactsRequest, CountContactsResponse, CreateContactRequest, CursorPaging, CursorPagingMetadata, Cursors, DeleteContactRequest, DeleteContactResponse, DomainEvent, DomainEventBodyOneOf, DuplicateContactExists, EmailDeliverabilityStatus, EmailTag, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Error, EventMetadata, ExtendedFieldsWrapper, GeneratePictureUploadUrlRequest, GeneratePictureUploadUrlResponse, GetContactRequest, GetContactResponse, GetContactResponseType, GroupInfo, IdentificationData, IdentificationDataIdOneOf, ImageProvider, Item, ItemMetadata, LabelAndUnlabelContactRequest, LabelAndUnlabelContactResponse, LabelContactRequest, LabelsWrapper, LastActivityUpdate, ListContactIdsBySegmentRequest, ListContactIdsBySegmentResponse, ListContactsRequest, ListContactsResponse, ListFacetsRequest, ListFacetsResponse, LocationsWrapper, MemberInfo, MemberStatus, MergeContactsRequest, MessageEnvelope, Metadata, Mode, Paging, PagingMetadata, PhoneDeliverabilityStatus, PhoneTag, PreviewMergeContactsRequest, PreviewMergeContactsResponse, PrimaryContactInfo, PrimaryEmail, PrimaryPhone, PrimarySubscriptionStatus, PrivacyStatus, ProfileInfo, Query, QueryContactsRequest, QueryContactsResponse, QueryFacetsRequest, QueryFacetsResponse, RestoreInfo, Role, Search, SearchContactsRequest, SearchContactsResponse, SearchDetails, SearchPagingMethodOneOf, SegmentsWrapper, SessionInfo, SortOrder, Sorting, StreetAddress, Subdivision, SubdivisionType, SubmitOperation, SubscriptionStatus, SyncSubmitContactRequest, SyncSubmitContactResponse, UnlabelContactRequest, UpdateContactRequest, UpsertContactRequest, UpsertContactResponse, UpsertContactResponseAction, UserInfo, WebhookIdentityType } from './index.typings.js';
4
4
 
5
+ type ContactNonNullablePaths = `_id` | `revision` | `source.sourceType` | `lastActivity.activityType` | `info.emails.items` | `info.emails.items.${number}.tag` | `info.emails.items.${number}.email` | `info.phones.items` | `info.phones.items.${number}.tag` | `info.phones.items.${number}.phone` | `info.addresses.items` | `info.addresses.items.${number}.tag` | `info.addresses.items.${number}.address.streetAddress.number` | `info.addresses.items.${number}.address.streetAddress.name` | `info.labelKeys.items` | `primaryEmail.subscriptionStatus` | `primaryEmail.deliverabilityStatus` | `primaryPhone.subscriptionStatus`;
5
6
  declare function createContact$1(httpClient: HttpClient): CreateContactSignature;
6
7
  interface CreateContactSignature {
7
8
  /**
@@ -18,8 +19,10 @@ interface CreateContactSignature {
18
19
  * @param - Create contact options.
19
20
  * @returns Contact.
20
21
  */
21
- (info: ContactInfo, options?: CreateContactOptions | undefined): Promise<CreateContactResponse & {
22
- __applicationErrorsType?: CreateContactApplicationErrors | undefined;
22
+ (info: ContactInfo, options?: CreateContactOptions): Promise<NonNullablePaths<CreateContactResponse, {
23
+ [P in ContactNonNullablePaths]: `contact.${P}`;
24
+ }[ContactNonNullablePaths]> & {
25
+ __applicationErrorsType?: CreateContactApplicationErrors;
23
26
  }>;
24
27
  }
25
28
  declare function updateContact$1(httpClient: HttpClient): UpdateContactSignature;
@@ -45,8 +48,10 @@ interface UpdateContactSignature {
45
48
  * @param - Contact update options.
46
49
  * @returns Updated contact.
47
50
  */
48
- (contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions | undefined): Promise<UpdateContactResponse & {
49
- __applicationErrorsType?: UpdateContactApplicationErrors | undefined;
51
+ (contactId: string, info: ContactInfo, revision: number, options?: UpdateContactOptions): Promise<NonNullablePaths<UpdateContactResponse, {
52
+ [P in ContactNonNullablePaths]: `contact.${P}`;
53
+ }[ContactNonNullablePaths]> & {
54
+ __applicationErrorsType?: UpdateContactApplicationErrors;
50
55
  }>;
51
56
  }
52
57
  declare function mergeContacts$1(httpClient: HttpClient): MergeContactsSignature;
@@ -88,8 +93,10 @@ interface MergeContactsSignature {
88
93
  * the target contact's current `revision` must be specified.
89
94
  * @param - Merge contacts options.
90
95
  */
91
- (targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions | undefined): Promise<MergeContactsResponse & {
92
- __applicationErrorsType?: MergeContactsApplicationErrors | undefined;
96
+ (targetContactId: string, targetContactRevision: number, options?: MergeContactsOptions): Promise<NonNullablePaths<MergeContactsResponse, {
97
+ [P in ContactNonNullablePaths]: `contact.${P}`;
98
+ }[ContactNonNullablePaths]> & {
99
+ __applicationErrorsType?: MergeContactsApplicationErrors;
93
100
  }>;
94
101
  }
95
102
  declare function deleteContact$1(httpClient: HttpClient): DeleteContactSignature;
@@ -107,7 +114,7 @@ interface DeleteContactSignature {
107
114
  * @param - ID of the contact to delete.
108
115
  */
109
116
  (contactId: string): Promise<void & {
110
- __applicationErrorsType?: DeleteContactApplicationErrors | undefined;
117
+ __applicationErrorsType?: DeleteContactApplicationErrors;
111
118
  }>;
112
119
  }
113
120
  declare function labelContact$1(httpClient: HttpClient): LabelContactSignature;
@@ -126,8 +133,10 @@ interface LabelContactSignature {
126
133
  * Use the Labels API to create or retrieve labels.
127
134
  * @returns Updated contact.
128
135
  */
129
- (contactId: string, labelKeys: string[]): Promise<LabelContactResponse & {
130
- __applicationErrorsType?: LabelContactApplicationErrors | undefined;
136
+ (contactId: string, labelKeys: string[]): Promise<NonNullablePaths<LabelContactResponse, {
137
+ [P in ContactNonNullablePaths]: `contact.${P}`;
138
+ }[ContactNonNullablePaths]> & {
139
+ __applicationErrorsType?: LabelContactApplicationErrors;
131
140
  }>;
132
141
  }
133
142
  declare function unlabelContact$1(httpClient: HttpClient): UnlabelContactSignature;
@@ -145,8 +154,10 @@ interface UnlabelContactSignature {
145
154
  * @param - List of label keys to remove from the contact.
146
155
  * @returns Updated contact.
147
156
  */
148
- (contactId: string, labelKeys: string[]): Promise<UnlabelContactResponse & {
149
- __applicationErrorsType?: UnlabelContactApplicationErrors | undefined;
157
+ (contactId: string, labelKeys: string[]): Promise<NonNullablePaths<UnlabelContactResponse, {
158
+ [P in ContactNonNullablePaths]: `contact.${P}`;
159
+ }[ContactNonNullablePaths]> & {
160
+ __applicationErrorsType?: UnlabelContactApplicationErrors;
150
161
  }>;
151
162
  }
152
163
  declare function queryContacts$1(httpClient: HttpClient): QueryContactsSignature;
@@ -169,7 +180,7 @@ interface QueryContactsSignature {
169
180
  * The functions that are chained to `queryContacts()` are applied in the order they are called. For example, if you apply `ascending('info.company')` and then `descending('info.name.last')`, the results are sorted first by the company name, and then, if there are multiple results with the same company, the items are sorted by last name.
170
181
  * @param - Query contact options.
171
182
  */
172
- (options?: QueryContactsOptions | undefined): ContactsQueryBuilder;
183
+ (options?: QueryContactsOptions): ContactsQueryBuilder;
173
184
  }
174
185
  declare function getContact$1(httpClient: HttpClient): GetContactSignature;
175
186
  interface GetContactSignature {
@@ -190,8 +201,8 @@ interface GetContactSignature {
190
201
  * @param - Get contact options.
191
202
  * @returns The requested contact.
192
203
  */
193
- (_id: string, options?: GetContactOptions | undefined): Promise<Contact & {
194
- __applicationErrorsType?: GetContactApplicationErrors | undefined;
204
+ (_id: string, options?: GetContactOptions): Promise<NonNullablePaths<Contact, ContactNonNullablePaths> & {
205
+ __applicationErrorsType?: GetContactApplicationErrors;
195
206
  }>;
196
207
  }
197
208
  declare const onContactCreated$1: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;