@wix/auto_sdk_crm_contacts 1.0.962 → 1.0.963
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +8 -25
- package/build/cjs/index.js +69 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +19 -4
- package/build/cjs/index.typings.js +50 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -25
- package/build/es/index.mjs +69 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +19 -4
- package/build/es/index.typings.mjs +49 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -25
- package/build/internal/cjs/index.js +69 -10
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +19 -4
- package/build/internal/cjs/index.typings.js +50 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -25
- package/build/internal/es/index.mjs +69 -10
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +19 -4
- package/build/internal/es/index.typings.mjs +49 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -2095,6 +2095,8 @@ interface ContactCreatedEnvelope {
|
|
|
2095
2095
|
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
2096
2096
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
2097
2097
|
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
2098
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2099
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2098
2100
|
* @permissionScope Manage Contacts
|
|
2099
2101
|
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
2100
2102
|
* @permissionScope Set Up Automations
|
|
@@ -2126,6 +2128,8 @@ interface ContactDeletedEnvelope {
|
|
|
2126
2128
|
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
2127
2129
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
2128
2130
|
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
2131
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2132
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2129
2133
|
* @permissionScope Manage Contacts
|
|
2130
2134
|
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
2131
2135
|
* @permissionScope Set Up Automations
|
|
@@ -2155,6 +2159,8 @@ interface ContactMergedEnvelope {
|
|
|
2155
2159
|
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
2156
2160
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
2157
2161
|
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
2162
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2163
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2158
2164
|
* @permissionScope Manage Contacts
|
|
2159
2165
|
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
2160
2166
|
* @permissionScope Set Up Automations
|
|
@@ -2184,6 +2190,8 @@ interface ContactUpdatedEnvelope {
|
|
|
2184
2190
|
* @permissionScopeId SCOPE.DC-CONTACTS.READ-CONTACTS
|
|
2185
2191
|
* @permissionScope Read Members and Contacts - all read permissions
|
|
2186
2192
|
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
2193
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2194
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2187
2195
|
* @permissionScope Manage Contacts
|
|
2188
2196
|
* @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-CONTACTS
|
|
2189
2197
|
* @permissionScope Set Up Automations
|
|
@@ -2485,14 +2493,12 @@ interface ListContactsOptions {
|
|
|
2485
2493
|
*
|
|
2486
2494
|
* 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.
|
|
2487
2495
|
* @public
|
|
2488
|
-
* @requiredField query
|
|
2489
2496
|
* @param options - Query contact options.
|
|
2490
|
-
* @param query - Query options.
|
|
2491
2497
|
* @permissionId CONTACTS.VIEW
|
|
2492
2498
|
* @applicableIdentity APP
|
|
2493
2499
|
* @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts
|
|
2494
2500
|
*/
|
|
2495
|
-
declare function queryContacts(
|
|
2501
|
+
declare function queryContacts(options?: QueryContactsOptions): ContactsQueryBuilder;
|
|
2496
2502
|
interface QueryContactsOptions {
|
|
2497
2503
|
}
|
|
2498
2504
|
interface QueryOffsetResult {
|
|
@@ -2559,6 +2565,15 @@ interface ContactsQueryBuilder {
|
|
|
2559
2565
|
skip: (skip: number) => ContactsQueryBuilder;
|
|
2560
2566
|
find: () => Promise<ContactsQueryResult>;
|
|
2561
2567
|
}
|
|
2568
|
+
/**
|
|
2569
|
+
* @hidden
|
|
2570
|
+
* @fqn com.wixpress.contacts.core.api.v4.ContactsServiceV4.QueryContacts
|
|
2571
|
+
* @requiredField query
|
|
2572
|
+
* @returns List of contacts.
|
|
2573
|
+
*/
|
|
2574
|
+
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> & {
|
|
2575
|
+
__applicationErrorsType?: QueryContactsApplicationErrors;
|
|
2576
|
+
}>;
|
|
2562
2577
|
/**
|
|
2563
2578
|
* Lists facets from the site’s contact list.
|
|
2564
2579
|
* Facets include labels and subscription statuses.
|
|
@@ -2821,4 +2836,4 @@ interface GetContactOptions {
|
|
|
2821
2836
|
fieldsets?: ContactFieldSetWithLiterals[];
|
|
2822
2837
|
}
|
|
2823
2838
|
|
|
2824
|
-
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, unlabelContact, updateContact };
|
|
2839
|
+
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 };
|
|
@@ -1271,14 +1271,13 @@ async function listContacts2(options) {
|
|
|
1271
1271
|
throw transformedError;
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
function queryContacts2(
|
|
1275
|
-
const { httpClient, sideEffects } = arguments[
|
|
1274
|
+
function queryContacts2(options) {
|
|
1275
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1276
1276
|
return queryBuilder({
|
|
1277
1277
|
func: async (payload) => {
|
|
1278
1278
|
const reqOpts = queryContacts({
|
|
1279
1279
|
...payload,
|
|
1280
|
-
...options ?? {}
|
|
1281
|
-
query
|
|
1280
|
+
...options ?? {}
|
|
1282
1281
|
});
|
|
1283
1282
|
sideEffects?.onSiteCall?.();
|
|
1284
1283
|
try {
|
|
@@ -1290,11 +1289,11 @@ function queryContacts2(query, options) {
|
|
|
1290
1289
|
throw err;
|
|
1291
1290
|
}
|
|
1292
1291
|
},
|
|
1293
|
-
requestTransformer: (
|
|
1294
|
-
const args = [
|
|
1292
|
+
requestTransformer: (query) => {
|
|
1293
|
+
const args = [query, options];
|
|
1295
1294
|
return renameKeysFromSDKRequestToRESTRequest({
|
|
1296
|
-
|
|
1297
|
-
|
|
1295
|
+
...args?.[1],
|
|
1296
|
+
query: args?.[0]
|
|
1298
1297
|
});
|
|
1299
1298
|
},
|
|
1300
1299
|
responseTransformer: ({ data }) => {
|
|
@@ -1331,6 +1330,47 @@ function queryContacts2(query, options) {
|
|
|
1331
1330
|
transformationPaths: {}
|
|
1332
1331
|
});
|
|
1333
1332
|
}
|
|
1333
|
+
async function typedQueryContacts(query, options) {
|
|
1334
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1335
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1336
|
+
query,
|
|
1337
|
+
...options
|
|
1338
|
+
});
|
|
1339
|
+
const reqOpts = queryContacts(payload);
|
|
1340
|
+
sideEffects?.onSiteCall?.();
|
|
1341
|
+
try {
|
|
1342
|
+
const result = await httpClient.request(reqOpts);
|
|
1343
|
+
sideEffects?.onSuccess?.(result);
|
|
1344
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1345
|
+
transformPaths2(result.data, [
|
|
1346
|
+
{
|
|
1347
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1348
|
+
paths: [
|
|
1349
|
+
{ path: "contacts.picture" },
|
|
1350
|
+
{ path: "contacts.info.picture.image" },
|
|
1351
|
+
{ path: "contacts.memberInfo.profileInfo.photo" }
|
|
1352
|
+
]
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
1356
|
+
paths: [{ path: "contacts.info.addresses.items.address" }]
|
|
1357
|
+
}
|
|
1358
|
+
])
|
|
1359
|
+
);
|
|
1360
|
+
} catch (err) {
|
|
1361
|
+
const transformedError = sdkTransformError(
|
|
1362
|
+
err,
|
|
1363
|
+
{
|
|
1364
|
+
spreadPathsToArguments: {},
|
|
1365
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1366
|
+
singleArgumentUnchanged: false
|
|
1367
|
+
},
|
|
1368
|
+
["query", "options"]
|
|
1369
|
+
);
|
|
1370
|
+
sideEffects?.onError?.(err);
|
|
1371
|
+
throw transformedError;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1334
1374
|
async function listFacets2(options) {
|
|
1335
1375
|
const { httpClient, sideEffects } = arguments[1];
|
|
1336
1376
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1578,6 +1618,7 @@ export {
|
|
|
1578
1618
|
previewMergeContacts2 as previewMergeContacts,
|
|
1579
1619
|
queryContacts2 as queryContacts,
|
|
1580
1620
|
queryFacets2 as queryFacets,
|
|
1621
|
+
typedQueryContacts,
|
|
1581
1622
|
unlabelContact2 as unlabelContact,
|
|
1582
1623
|
updateContact2 as updateContact
|
|
1583
1624
|
};
|