@wix/crm 1.0.116 → 1.0.118
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/package.json +8 -8
- package/type-bundles/context.bundle.d.ts +273 -2429
- package/type-bundles/index.bundle.d.ts +270 -46
|
@@ -381,37 +381,38 @@ interface GetAttachmentIdentifiers {
|
|
|
381
381
|
attachmentId: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
interface HttpClient {
|
|
385
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
386
|
-
fetchWithAuth:
|
|
384
|
+
interface HttpClient$5 {
|
|
385
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
|
|
386
|
+
fetchWithAuth: typeof fetch;
|
|
387
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
387
388
|
}
|
|
388
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
389
|
-
type HttpResponse<T = any> = {
|
|
389
|
+
type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
|
|
390
|
+
type HttpResponse$5<T = any> = {
|
|
390
391
|
data: T;
|
|
391
392
|
status: number;
|
|
392
393
|
statusText: string;
|
|
393
394
|
headers: any;
|
|
394
395
|
request?: any;
|
|
395
396
|
};
|
|
396
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
397
|
+
type RequestOptions$5<_TResponse = any, Data = any> = {
|
|
397
398
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
398
399
|
url: string;
|
|
399
400
|
data?: Data;
|
|
400
401
|
params?: URLSearchParams;
|
|
401
|
-
} & APIMetadata;
|
|
402
|
-
type APIMetadata = {
|
|
402
|
+
} & APIMetadata$5;
|
|
403
|
+
type APIMetadata$5 = {
|
|
403
404
|
methodFqn?: string;
|
|
404
405
|
entityFqdn?: string;
|
|
405
406
|
packageName?: string;
|
|
406
407
|
};
|
|
407
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
408
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
408
409
|
__type: 'event-definition';
|
|
409
410
|
type: Type;
|
|
410
411
|
isDomainEvent?: boolean;
|
|
411
412
|
transformations?: (envelope: unknown) => Payload;
|
|
412
413
|
__payload: Payload;
|
|
413
414
|
};
|
|
414
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
415
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
415
416
|
|
|
416
417
|
declare global {
|
|
417
418
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -423,10 +424,10 @@ declare global {
|
|
|
423
424
|
declare const __metadata$5: {
|
|
424
425
|
PACKAGE_NAME: string;
|
|
425
426
|
};
|
|
426
|
-
declare function generateAttachmentUploadUrl(httpClient: HttpClient): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
427
|
-
declare function listAttachments(httpClient: HttpClient): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
428
|
-
declare function deleteAttachment(httpClient: HttpClient): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
429
|
-
declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
427
|
+
declare function generateAttachmentUploadUrl(httpClient: HttpClient$5): (contactId: string, fileName: string, options: GenerateAttachmentUploadUrlOptions) => Promise<GenerateAttachmentUploadUrlResponse & GenerateAttachmentUploadUrlResponseNonNullableFields>;
|
|
428
|
+
declare function listAttachments(httpClient: HttpClient$5): (contactId: string, options?: ListAttachmentsOptions) => Promise<ListAttachmentsResponse & ListAttachmentsResponseNonNullableFields>;
|
|
429
|
+
declare function deleteAttachment(httpClient: HttpClient$5): (identifiers: DeleteAttachmentIdentifiers) => Promise<void>;
|
|
430
|
+
declare function getAttachment(httpClient: HttpClient$5): (identifiers: GetAttachmentIdentifiers) => Promise<ContactAttachment & {
|
|
430
431
|
image: string;
|
|
431
432
|
document: string;
|
|
432
433
|
_id: string;
|
|
@@ -435,8 +436,8 @@ declare function getAttachment(httpClient: HttpClient): (identifiers: GetAttachm
|
|
|
435
436
|
mimeType: string;
|
|
436
437
|
attachmentType: AttachmentType;
|
|
437
438
|
}>;
|
|
438
|
-
declare const onAttachmentCreated: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
439
|
-
declare const onAttachmentDeleted: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
439
|
+
declare const onAttachmentCreated: EventDefinition$4<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
440
|
+
declare const onAttachmentDeleted: EventDefinition$4<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
440
441
|
|
|
441
442
|
type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
442
443
|
type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
@@ -1949,6 +1950,32 @@ interface ContactRemovedFromSegment {
|
|
|
1949
1950
|
/** The contact that was removed */
|
|
1950
1951
|
contact?: Contact;
|
|
1951
1952
|
}
|
|
1953
|
+
interface ListContactIdsBySegmentRequest {
|
|
1954
|
+
/** Segment id */
|
|
1955
|
+
segmentId?: string;
|
|
1956
|
+
/** Cursor paging. */
|
|
1957
|
+
cursorPaging?: CursorPaging$1;
|
|
1958
|
+
}
|
|
1959
|
+
interface ListContactIdsBySegmentResponse {
|
|
1960
|
+
/** List of contact IDs */
|
|
1961
|
+
contactIds?: string[];
|
|
1962
|
+
/** Paging metadata */
|
|
1963
|
+
cursorPagingMetadata?: CursorPagingMetadata$1;
|
|
1964
|
+
}
|
|
1965
|
+
/** This is the preferred message for cursor-paging enabled services */
|
|
1966
|
+
interface CursorPagingMetadata$1 {
|
|
1967
|
+
/** Number of items returned in the response. */
|
|
1968
|
+
count?: number | null;
|
|
1969
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1970
|
+
cursors?: Cursors$1;
|
|
1971
|
+
/**
|
|
1972
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1973
|
+
*
|
|
1974
|
+
* + `true`: Another page of results can be retrieved.
|
|
1975
|
+
* + `false`: This is the last page.
|
|
1976
|
+
*/
|
|
1977
|
+
hasNext?: boolean | null;
|
|
1978
|
+
}
|
|
1952
1979
|
interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
|
|
1953
1980
|
createdEvent?: EntityCreatedEvent$3;
|
|
1954
1981
|
updatedEvent?: EntityUpdatedEvent$3;
|
|
@@ -2001,6 +2028,9 @@ interface DomainEventBodyOneOf$3 {
|
|
|
2001
2028
|
interface EntityCreatedEvent$3 {
|
|
2002
2029
|
entity?: string;
|
|
2003
2030
|
}
|
|
2031
|
+
interface RestoreInfo$1 {
|
|
2032
|
+
deletedDate?: Date;
|
|
2033
|
+
}
|
|
2004
2034
|
interface EntityUpdatedEvent$3 {
|
|
2005
2035
|
/**
|
|
2006
2036
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
@@ -2517,17 +2547,57 @@ interface GetContactOptions {
|
|
|
2517
2547
|
fieldsets?: ContactFieldSet[];
|
|
2518
2548
|
}
|
|
2519
2549
|
|
|
2550
|
+
interface HttpClient$4 {
|
|
2551
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
2552
|
+
fetchWithAuth: typeof fetch;
|
|
2553
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2554
|
+
}
|
|
2555
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
2556
|
+
type HttpResponse$4<T = any> = {
|
|
2557
|
+
data: T;
|
|
2558
|
+
status: number;
|
|
2559
|
+
statusText: string;
|
|
2560
|
+
headers: any;
|
|
2561
|
+
request?: any;
|
|
2562
|
+
};
|
|
2563
|
+
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
2564
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2565
|
+
url: string;
|
|
2566
|
+
data?: Data;
|
|
2567
|
+
params?: URLSearchParams;
|
|
2568
|
+
} & APIMetadata$4;
|
|
2569
|
+
type APIMetadata$4 = {
|
|
2570
|
+
methodFqn?: string;
|
|
2571
|
+
entityFqdn?: string;
|
|
2572
|
+
packageName?: string;
|
|
2573
|
+
};
|
|
2574
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2575
|
+
__type: 'event-definition';
|
|
2576
|
+
type: Type;
|
|
2577
|
+
isDomainEvent?: boolean;
|
|
2578
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2579
|
+
__payload: Payload;
|
|
2580
|
+
};
|
|
2581
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2582
|
+
|
|
2583
|
+
declare global {
|
|
2584
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2585
|
+
interface SymbolConstructor {
|
|
2586
|
+
readonly observable: symbol;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2520
2590
|
declare const __metadata$4: {
|
|
2521
2591
|
PACKAGE_NAME: string;
|
|
2522
2592
|
};
|
|
2523
|
-
declare function createContact(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2524
|
-
declare function updateContact(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2525
|
-
declare function mergeContacts(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2526
|
-
declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
2527
|
-
declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2528
|
-
declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2529
|
-
declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2530
|
-
declare function getContact(httpClient: HttpClient): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
2593
|
+
declare function createContact(httpClient: HttpClient$4): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2594
|
+
declare function updateContact(httpClient: HttpClient$4): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2595
|
+
declare function mergeContacts(httpClient: HttpClient$4): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2596
|
+
declare function deleteContact(httpClient: HttpClient$4): (contactId: string) => Promise<void>;
|
|
2597
|
+
declare function labelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2598
|
+
declare function unlabelContact(httpClient: HttpClient$4): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2599
|
+
declare function queryContacts(httpClient: HttpClient$4): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2600
|
+
declare function getContact(httpClient: HttpClient$4): (_id: string, options?: GetContactOptions) => Promise<Contact & {
|
|
2531
2601
|
_id: string;
|
|
2532
2602
|
revision: number;
|
|
2533
2603
|
source?: {
|
|
@@ -2562,10 +2632,10 @@ declare function getContact(httpClient: HttpClient): (_id: string, options?: Get
|
|
|
2562
2632
|
} | undefined;
|
|
2563
2633
|
} | undefined;
|
|
2564
2634
|
}>;
|
|
2565
|
-
declare const onContactCreated: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2566
|
-
declare const onContactUpdated: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2567
|
-
declare const onContactMerged: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2568
|
-
declare const onContactDeleted: EventDefinition<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
2635
|
+
declare const onContactCreated: EventDefinition$3<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2636
|
+
declare const onContactUpdated: EventDefinition$3<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2637
|
+
declare const onContactMerged: EventDefinition$3<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2638
|
+
declare const onContactDeleted: EventDefinition$3<ContactDeletedEnvelope, "wix.contacts.v4.contact_deleted">;
|
|
2569
2639
|
|
|
2570
2640
|
type index_d$4_Action = Action;
|
|
2571
2641
|
declare const index_d$4_Action: typeof Action;
|
|
@@ -2634,6 +2704,8 @@ type index_d$4_LabelContactRequest = LabelContactRequest;
|
|
|
2634
2704
|
type index_d$4_LabelContactResponse = LabelContactResponse;
|
|
2635
2705
|
type index_d$4_LabelContactResponseNonNullableFields = LabelContactResponseNonNullableFields;
|
|
2636
2706
|
type index_d$4_LastActivityUpdate = LastActivityUpdate;
|
|
2707
|
+
type index_d$4_ListContactIdsBySegmentRequest = ListContactIdsBySegmentRequest;
|
|
2708
|
+
type index_d$4_ListContactIdsBySegmentResponse = ListContactIdsBySegmentResponse;
|
|
2637
2709
|
type index_d$4_ListContactsRequest = ListContactsRequest;
|
|
2638
2710
|
type index_d$4_ListContactsResponse = ListContactsResponse;
|
|
2639
2711
|
type index_d$4_ListFacetsRequest = ListFacetsRequest;
|
|
@@ -2703,7 +2775,7 @@ declare const index_d$4_queryContacts: typeof queryContacts;
|
|
|
2703
2775
|
declare const index_d$4_unlabelContact: typeof unlabelContact;
|
|
2704
2776
|
declare const index_d$4_updateContact: typeof updateContact;
|
|
2705
2777
|
declare namespace index_d$4 {
|
|
2706
|
-
export { index_d$4_Action as Action, type ActionEvent$3 as ActionEvent, type ActivityIcon$1 as ActivityIcon, type Address$1 as Address, type AddressLocation$1 as AddressLocation, type AddressStreetOneOf$1 as AddressStreetOneOf, AddressTag$1 as AddressTag, type index_d$4_ApplicationError as ApplicationError, type AssigneesWrapper$1 as AssigneesWrapper, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$4_BulkActionMetadata as BulkActionMetadata, type index_d$4_BulkAddSegmentToContactsRequest as BulkAddSegmentToContactsRequest, type index_d$4_BulkAddSegmentToContactsResponse as BulkAddSegmentToContactsResponse, type index_d$4_BulkDeleteContactsRequest as BulkDeleteContactsRequest, type index_d$4_BulkDeleteContactsResponse as BulkDeleteContactsResponse, type index_d$4_BulkLabelAndUnlabelContactsRequest as BulkLabelAndUnlabelContactsRequest, type index_d$4_BulkLabelAndUnlabelContactsResponse as BulkLabelAndUnlabelContactsResponse, type index_d$4_BulkRemoveSegmentFromContactsRequest as BulkRemoveSegmentFromContactsRequest, type index_d$4_BulkRemoveSegmentFromContactsResponse as BulkRemoveSegmentFromContactsResponse, type index_d$4_BulkUpdateContactsRequest as BulkUpdateContactsRequest, type index_d$4_BulkUpdateContactsResponse as BulkUpdateContactsResponse, type index_d$4_BulkUpsertContactsRequest as BulkUpsertContactsRequest, type index_d$4_BulkUpsertContactsResponse as BulkUpsertContactsResponse, type index_d$4_BulkUpsertContactsResponseMetadata as BulkUpsertContactsResponseMetadata, type index_d$4_Contact as Contact, type ContactActivity$1 as ContactActivity, ContactActivityType$1 as ContactActivityType, type index_d$4_ContactAddedToSegment as ContactAddedToSegment, type ContactAddress$1 as ContactAddress, type ContactAddressesWrapper$1 as ContactAddressesWrapper, type index_d$4_ContactChanged as ContactChanged, type index_d$4_ContactCreatedEnvelope as ContactCreatedEnvelope, type index_d$4_ContactDeletedEnvelope as ContactDeletedEnvelope, type ContactEmail$1 as ContactEmail, type index_d$4_ContactEmailSubscriptionUpdated as ContactEmailSubscriptionUpdated, type ContactEmailsWrapper$1 as ContactEmailsWrapper, index_d$4_ContactFieldSet as ContactFieldSet, type ContactInfo$2 as ContactInfo, type index_d$4_ContactMerged as ContactMerged, type index_d$4_ContactMergedEnvelope as ContactMergedEnvelope, type ContactName$1 as ContactName, type ContactPhone$1 as ContactPhone, type index_d$4_ContactPhoneSubscriptionUpdated as ContactPhoneSubscriptionUpdated, type ContactPhonesWrapper$1 as ContactPhonesWrapper, type ContactPicture$1 as ContactPicture, type index_d$4_ContactPrimaryInfoUpdated as ContactPrimaryInfoUpdated, type index_d$4_ContactRemovedFromSegment as ContactRemovedFromSegment, type index_d$4_ContactSource as ContactSource, ContactSourceType$1 as ContactSourceType, type index_d$4_ContactSubmitted as ContactSubmitted, type index_d$4_ContactUpdatedEnvelope as ContactUpdatedEnvelope, type index_d$4_ContactsFacet as ContactsFacet, index_d$4_ContactsFacetType as ContactsFacetType, type index_d$4_ContactsQueryBuilder as ContactsQueryBuilder, type index_d$4_ContactsQueryResult as ContactsQueryResult, type index_d$4_CountContactsRequest as CountContactsRequest, type index_d$4_CountContactsResponse as CountContactsResponse, type index_d$4_CreateContactOptions as CreateContactOptions, type index_d$4_CreateContactRequest as CreateContactRequest, type index_d$4_CreateContactResponse as CreateContactResponse, type index_d$4_CreateContactResponseNonNullableFields as CreateContactResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type Cursors$1 as Cursors, type index_d$4_DeleteContactRequest as DeleteContactRequest, type index_d$4_DeleteContactResponse as DeleteContactResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type index_d$4_DuplicateContactExists as DuplicateContactExists, index_d$4_EmailDeliverabilityStatus as EmailDeliverabilityStatus, EmailTag$1 as EmailTag, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type index_d$4_Error as Error, type EventMetadata$3 as EventMetadata, type ExtendedFieldsWrapper$1 as ExtendedFieldsWrapper, type index_d$4_GeneratePictureUploadUrlRequest as GeneratePictureUploadUrlRequest, type index_d$4_GeneratePictureUploadUrlResponse as GeneratePictureUploadUrlResponse, type index_d$4_GetContactOptions as GetContactOptions, type index_d$4_GetContactRequest as GetContactRequest, type index_d$4_GetContactResponse as GetContactResponse, type index_d$4_GetContactResponseNonNullableFields as GetContactResponseNonNullableFields, index_d$4_GetContactResponseType as GetContactResponseType, type index_d$4_GroupInfo as GroupInfo, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, ImageProvider$1 as ImageProvider, type index_d$4_Item as Item, type index_d$4_ItemMetadata as ItemMetadata, type index_d$4_LabelAndUnlabelContactRequest as LabelAndUnlabelContactRequest, type index_d$4_LabelAndUnlabelContactResponse as LabelAndUnlabelContactResponse, type index_d$4_LabelContactRequest as LabelContactRequest, type index_d$4_LabelContactResponse as LabelContactResponse, type index_d$4_LabelContactResponseNonNullableFields as LabelContactResponseNonNullableFields, type LabelsWrapper$1 as LabelsWrapper, type index_d$4_LastActivityUpdate as LastActivityUpdate, type index_d$4_ListContactsRequest as ListContactsRequest, type index_d$4_ListContactsResponse as ListContactsResponse, type index_d$4_ListFacetsRequest as ListFacetsRequest, type index_d$4_ListFacetsResponse as ListFacetsResponse, type LocationsWrapper$1 as LocationsWrapper, type index_d$4_MemberInfo as MemberInfo, index_d$4_MemberStatus as MemberStatus, type index_d$4_MergeContactsOptions as MergeContactsOptions, type index_d$4_MergeContactsRequest as MergeContactsRequest, type index_d$4_MergeContactsResponse as MergeContactsResponse, type index_d$4_MergeContactsResponseNonNullableFields as MergeContactsResponseNonNullableFields, type MessageEnvelope$4 as MessageEnvelope, type index_d$4_Metadata as Metadata, index_d$4_Mode as Mode, type Paging$3 as Paging, type PagingMetadata$2 as PagingMetadata, type PagingMetadataV2$1 as PagingMetadataV2, index_d$4_PhoneDeliverabilityStatus as PhoneDeliverabilityStatus, PhoneTag$1 as PhoneTag, type index_d$4_PreviewMergeContactsRequest as PreviewMergeContactsRequest, type index_d$4_PreviewMergeContactsResponse as PreviewMergeContactsResponse, type index_d$4_PrimaryContactInfo as PrimaryContactInfo, type index_d$4_PrimaryEmail as PrimaryEmail, type index_d$4_PrimaryPhone as PrimaryPhone, type index_d$4_PrimarySubscriptionStatus as PrimarySubscriptionStatus, index_d$4_PrivacyStatus as PrivacyStatus, type index_d$4_ProfileInfo as ProfileInfo, type Query$2 as Query, type index_d$4_QueryContactsOptions as QueryContactsOptions, type index_d$4_QueryContactsRequest as QueryContactsRequest, type index_d$4_QueryContactsResponse as QueryContactsResponse, type index_d$4_QueryContactsResponseNonNullableFields as QueryContactsResponseNonNullableFields, type index_d$4_QueryFacetsRequest as QueryFacetsRequest, type index_d$4_QueryFacetsResponse as QueryFacetsResponse, index_d$4_Role as Role, type index_d$4_Search as Search, type index_d$4_SearchContactsRequest as SearchContactsRequest, type index_d$4_SearchContactsResponse as SearchContactsResponse, type index_d$4_SearchDetails as SearchDetails, type index_d$4_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type index_d$4_SegmentsWrapper as SegmentsWrapper, type index_d$4_SessionInfo as SessionInfo, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, type StreetAddress$1 as StreetAddress, type Subdivision$1 as Subdivision, SubdivisionType$1 as SubdivisionType, SubmitOperation$1 as SubmitOperation, index_d$4_SubscriptionStatus as SubscriptionStatus, type index_d$4_SyncSubmitContactRequest as SyncSubmitContactRequest, type index_d$4_SyncSubmitContactResponse as SyncSubmitContactResponse, type index_d$4_UnlabelContactRequest as UnlabelContactRequest, type index_d$4_UnlabelContactResponse as UnlabelContactResponse, type index_d$4_UnlabelContactResponseNonNullableFields as UnlabelContactResponseNonNullableFields, type index_d$4_UpdateContactOptions as UpdateContactOptions, type index_d$4_UpdateContactRequest as UpdateContactRequest, type index_d$4_UpdateContactResponse as UpdateContactResponse, type index_d$4_UpdateContactResponseNonNullableFields as UpdateContactResponseNonNullableFields, type index_d$4_UpsertContactRequest as UpsertContactRequest, type index_d$4_UpsertContactResponse as UpsertContactResponse, index_d$4_UpsertContactResponseAction as UpsertContactResponseAction, type index_d$4_UserInfo as UserInfo, WebhookIdentityType$4 as WebhookIdentityType, __metadata$4 as __metadata, index_d$4_createContact as createContact, index_d$4_deleteContact as deleteContact, index_d$4_getContact as getContact, index_d$4_labelContact as labelContact, index_d$4_mergeContacts as mergeContacts, index_d$4_onContactCreated as onContactCreated, index_d$4_onContactDeleted as onContactDeleted, index_d$4_onContactMerged as onContactMerged, index_d$4_onContactUpdated as onContactUpdated, index_d$4_queryContacts as queryContacts, index_d$4_unlabelContact as unlabelContact, index_d$4_updateContact as updateContact };
|
|
2778
|
+
export { index_d$4_Action as Action, type ActionEvent$3 as ActionEvent, type ActivityIcon$1 as ActivityIcon, type Address$1 as Address, type AddressLocation$1 as AddressLocation, type AddressStreetOneOf$1 as AddressStreetOneOf, AddressTag$1 as AddressTag, type index_d$4_ApplicationError as ApplicationError, type AssigneesWrapper$1 as AssigneesWrapper, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$4_BulkActionMetadata as BulkActionMetadata, type index_d$4_BulkAddSegmentToContactsRequest as BulkAddSegmentToContactsRequest, type index_d$4_BulkAddSegmentToContactsResponse as BulkAddSegmentToContactsResponse, type index_d$4_BulkDeleteContactsRequest as BulkDeleteContactsRequest, type index_d$4_BulkDeleteContactsResponse as BulkDeleteContactsResponse, type index_d$4_BulkLabelAndUnlabelContactsRequest as BulkLabelAndUnlabelContactsRequest, type index_d$4_BulkLabelAndUnlabelContactsResponse as BulkLabelAndUnlabelContactsResponse, type index_d$4_BulkRemoveSegmentFromContactsRequest as BulkRemoveSegmentFromContactsRequest, type index_d$4_BulkRemoveSegmentFromContactsResponse as BulkRemoveSegmentFromContactsResponse, type index_d$4_BulkUpdateContactsRequest as BulkUpdateContactsRequest, type index_d$4_BulkUpdateContactsResponse as BulkUpdateContactsResponse, type index_d$4_BulkUpsertContactsRequest as BulkUpsertContactsRequest, type index_d$4_BulkUpsertContactsResponse as BulkUpsertContactsResponse, type index_d$4_BulkUpsertContactsResponseMetadata as BulkUpsertContactsResponseMetadata, type index_d$4_Contact as Contact, type ContactActivity$1 as ContactActivity, ContactActivityType$1 as ContactActivityType, type index_d$4_ContactAddedToSegment as ContactAddedToSegment, type ContactAddress$1 as ContactAddress, type ContactAddressesWrapper$1 as ContactAddressesWrapper, type index_d$4_ContactChanged as ContactChanged, type index_d$4_ContactCreatedEnvelope as ContactCreatedEnvelope, type index_d$4_ContactDeletedEnvelope as ContactDeletedEnvelope, type ContactEmail$1 as ContactEmail, type index_d$4_ContactEmailSubscriptionUpdated as ContactEmailSubscriptionUpdated, type ContactEmailsWrapper$1 as ContactEmailsWrapper, index_d$4_ContactFieldSet as ContactFieldSet, type ContactInfo$2 as ContactInfo, type index_d$4_ContactMerged as ContactMerged, type index_d$4_ContactMergedEnvelope as ContactMergedEnvelope, type ContactName$1 as ContactName, type ContactPhone$1 as ContactPhone, type index_d$4_ContactPhoneSubscriptionUpdated as ContactPhoneSubscriptionUpdated, type ContactPhonesWrapper$1 as ContactPhonesWrapper, type ContactPicture$1 as ContactPicture, type index_d$4_ContactPrimaryInfoUpdated as ContactPrimaryInfoUpdated, type index_d$4_ContactRemovedFromSegment as ContactRemovedFromSegment, type index_d$4_ContactSource as ContactSource, ContactSourceType$1 as ContactSourceType, type index_d$4_ContactSubmitted as ContactSubmitted, type index_d$4_ContactUpdatedEnvelope as ContactUpdatedEnvelope, type index_d$4_ContactsFacet as ContactsFacet, index_d$4_ContactsFacetType as ContactsFacetType, type index_d$4_ContactsQueryBuilder as ContactsQueryBuilder, type index_d$4_ContactsQueryResult as ContactsQueryResult, type index_d$4_CountContactsRequest as CountContactsRequest, type index_d$4_CountContactsResponse as CountContactsResponse, type index_d$4_CreateContactOptions as CreateContactOptions, type index_d$4_CreateContactRequest as CreateContactRequest, type index_d$4_CreateContactResponse as CreateContactResponse, type index_d$4_CreateContactResponseNonNullableFields as CreateContactResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type Cursors$1 as Cursors, type index_d$4_DeleteContactRequest as DeleteContactRequest, type index_d$4_DeleteContactResponse as DeleteContactResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type index_d$4_DuplicateContactExists as DuplicateContactExists, index_d$4_EmailDeliverabilityStatus as EmailDeliverabilityStatus, EmailTag$1 as EmailTag, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type index_d$4_Error as Error, type EventMetadata$3 as EventMetadata, type ExtendedFieldsWrapper$1 as ExtendedFieldsWrapper, type index_d$4_GeneratePictureUploadUrlRequest as GeneratePictureUploadUrlRequest, type index_d$4_GeneratePictureUploadUrlResponse as GeneratePictureUploadUrlResponse, type index_d$4_GetContactOptions as GetContactOptions, type index_d$4_GetContactRequest as GetContactRequest, type index_d$4_GetContactResponse as GetContactResponse, type index_d$4_GetContactResponseNonNullableFields as GetContactResponseNonNullableFields, index_d$4_GetContactResponseType as GetContactResponseType, type index_d$4_GroupInfo as GroupInfo, type IdentificationData$4 as IdentificationData, type IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, ImageProvider$1 as ImageProvider, type index_d$4_Item as Item, type index_d$4_ItemMetadata as ItemMetadata, type index_d$4_LabelAndUnlabelContactRequest as LabelAndUnlabelContactRequest, type index_d$4_LabelAndUnlabelContactResponse as LabelAndUnlabelContactResponse, type index_d$4_LabelContactRequest as LabelContactRequest, type index_d$4_LabelContactResponse as LabelContactResponse, type index_d$4_LabelContactResponseNonNullableFields as LabelContactResponseNonNullableFields, type LabelsWrapper$1 as LabelsWrapper, type index_d$4_LastActivityUpdate as LastActivityUpdate, type index_d$4_ListContactIdsBySegmentRequest as ListContactIdsBySegmentRequest, type index_d$4_ListContactIdsBySegmentResponse as ListContactIdsBySegmentResponse, type index_d$4_ListContactsRequest as ListContactsRequest, type index_d$4_ListContactsResponse as ListContactsResponse, type index_d$4_ListFacetsRequest as ListFacetsRequest, type index_d$4_ListFacetsResponse as ListFacetsResponse, type LocationsWrapper$1 as LocationsWrapper, type index_d$4_MemberInfo as MemberInfo, index_d$4_MemberStatus as MemberStatus, type index_d$4_MergeContactsOptions as MergeContactsOptions, type index_d$4_MergeContactsRequest as MergeContactsRequest, type index_d$4_MergeContactsResponse as MergeContactsResponse, type index_d$4_MergeContactsResponseNonNullableFields as MergeContactsResponseNonNullableFields, type MessageEnvelope$4 as MessageEnvelope, type index_d$4_Metadata as Metadata, index_d$4_Mode as Mode, type Paging$3 as Paging, type PagingMetadata$2 as PagingMetadata, type PagingMetadataV2$1 as PagingMetadataV2, index_d$4_PhoneDeliverabilityStatus as PhoneDeliverabilityStatus, PhoneTag$1 as PhoneTag, type index_d$4_PreviewMergeContactsRequest as PreviewMergeContactsRequest, type index_d$4_PreviewMergeContactsResponse as PreviewMergeContactsResponse, type index_d$4_PrimaryContactInfo as PrimaryContactInfo, type index_d$4_PrimaryEmail as PrimaryEmail, type index_d$4_PrimaryPhone as PrimaryPhone, type index_d$4_PrimarySubscriptionStatus as PrimarySubscriptionStatus, index_d$4_PrivacyStatus as PrivacyStatus, type index_d$4_ProfileInfo as ProfileInfo, type Query$2 as Query, type index_d$4_QueryContactsOptions as QueryContactsOptions, type index_d$4_QueryContactsRequest as QueryContactsRequest, type index_d$4_QueryContactsResponse as QueryContactsResponse, type index_d$4_QueryContactsResponseNonNullableFields as QueryContactsResponseNonNullableFields, type index_d$4_QueryFacetsRequest as QueryFacetsRequest, type index_d$4_QueryFacetsResponse as QueryFacetsResponse, type RestoreInfo$1 as RestoreInfo, index_d$4_Role as Role, type index_d$4_Search as Search, type index_d$4_SearchContactsRequest as SearchContactsRequest, type index_d$4_SearchContactsResponse as SearchContactsResponse, type index_d$4_SearchDetails as SearchDetails, type index_d$4_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type index_d$4_SegmentsWrapper as SegmentsWrapper, type index_d$4_SessionInfo as SessionInfo, SortOrder$3 as SortOrder, type Sorting$3 as Sorting, type StreetAddress$1 as StreetAddress, type Subdivision$1 as Subdivision, SubdivisionType$1 as SubdivisionType, SubmitOperation$1 as SubmitOperation, index_d$4_SubscriptionStatus as SubscriptionStatus, type index_d$4_SyncSubmitContactRequest as SyncSubmitContactRequest, type index_d$4_SyncSubmitContactResponse as SyncSubmitContactResponse, type index_d$4_UnlabelContactRequest as UnlabelContactRequest, type index_d$4_UnlabelContactResponse as UnlabelContactResponse, type index_d$4_UnlabelContactResponseNonNullableFields as UnlabelContactResponseNonNullableFields, type index_d$4_UpdateContactOptions as UpdateContactOptions, type index_d$4_UpdateContactRequest as UpdateContactRequest, type index_d$4_UpdateContactResponse as UpdateContactResponse, type index_d$4_UpdateContactResponseNonNullableFields as UpdateContactResponseNonNullableFields, type index_d$4_UpsertContactRequest as UpsertContactRequest, type index_d$4_UpsertContactResponse as UpsertContactResponse, index_d$4_UpsertContactResponseAction as UpsertContactResponseAction, type index_d$4_UserInfo as UserInfo, WebhookIdentityType$4 as WebhookIdentityType, __metadata$4 as __metadata, index_d$4_createContact as createContact, index_d$4_deleteContact as deleteContact, index_d$4_getContact as getContact, index_d$4_labelContact as labelContact, index_d$4_mergeContacts as mergeContacts, index_d$4_onContactCreated as onContactCreated, index_d$4_onContactDeleted as onContactDeleted, index_d$4_onContactMerged as onContactMerged, index_d$4_onContactUpdated as onContactUpdated, index_d$4_queryContacts as queryContacts, index_d$4_unlabelContact as unlabelContact, index_d$4_updateContact as updateContact };
|
|
2707
2779
|
}
|
|
2708
2780
|
|
|
2709
2781
|
/** Extended field that was found or created. */
|
|
@@ -3291,27 +3363,67 @@ interface FieldsQueryBuilder {
|
|
|
3291
3363
|
find: () => Promise<FieldsQueryResult>;
|
|
3292
3364
|
}
|
|
3293
3365
|
|
|
3366
|
+
interface HttpClient$3 {
|
|
3367
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
3368
|
+
fetchWithAuth: typeof fetch;
|
|
3369
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3370
|
+
}
|
|
3371
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
3372
|
+
type HttpResponse$3<T = any> = {
|
|
3373
|
+
data: T;
|
|
3374
|
+
status: number;
|
|
3375
|
+
statusText: string;
|
|
3376
|
+
headers: any;
|
|
3377
|
+
request?: any;
|
|
3378
|
+
};
|
|
3379
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
3380
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3381
|
+
url: string;
|
|
3382
|
+
data?: Data;
|
|
3383
|
+
params?: URLSearchParams;
|
|
3384
|
+
} & APIMetadata$3;
|
|
3385
|
+
type APIMetadata$3 = {
|
|
3386
|
+
methodFqn?: string;
|
|
3387
|
+
entityFqdn?: string;
|
|
3388
|
+
packageName?: string;
|
|
3389
|
+
};
|
|
3390
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3391
|
+
__type: 'event-definition';
|
|
3392
|
+
type: Type;
|
|
3393
|
+
isDomainEvent?: boolean;
|
|
3394
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3395
|
+
__payload: Payload;
|
|
3396
|
+
};
|
|
3397
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3398
|
+
|
|
3399
|
+
declare global {
|
|
3400
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3401
|
+
interface SymbolConstructor {
|
|
3402
|
+
readonly observable: symbol;
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3294
3406
|
declare const __metadata$3: {
|
|
3295
3407
|
PACKAGE_NAME: string;
|
|
3296
3408
|
};
|
|
3297
|
-
declare function findOrCreateExtendedField(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3298
|
-
declare function getExtendedField(httpClient: HttpClient): (key: string) => Promise<ExtendedField & {
|
|
3409
|
+
declare function findOrCreateExtendedField(httpClient: HttpClient$3): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3410
|
+
declare function getExtendedField(httpClient: HttpClient$3): (key: string) => Promise<ExtendedField & {
|
|
3299
3411
|
key: string;
|
|
3300
3412
|
displayName: string;
|
|
3301
3413
|
dataType: FieldDataType;
|
|
3302
3414
|
fieldType: FieldType;
|
|
3303
3415
|
}>;
|
|
3304
|
-
declare function renameExtendedField(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3416
|
+
declare function renameExtendedField(httpClient: HttpClient$3): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3305
3417
|
key: string;
|
|
3306
3418
|
displayName: string;
|
|
3307
3419
|
dataType: FieldDataType;
|
|
3308
3420
|
fieldType: FieldType;
|
|
3309
3421
|
}>;
|
|
3310
|
-
declare function deleteExtendedField(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3311
|
-
declare function queryExtendedFields(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
3312
|
-
declare const onExtendedFieldCreated: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3313
|
-
declare const onExtendedFieldUpdated: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3314
|
-
declare const onExtendedFieldDeleted: EventDefinition<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
3422
|
+
declare function deleteExtendedField(httpClient: HttpClient$3): (key: string) => Promise<void>;
|
|
3423
|
+
declare function queryExtendedFields(httpClient: HttpClient$3): () => FieldsQueryBuilder;
|
|
3424
|
+
declare const onExtendedFieldCreated: EventDefinition$2<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3425
|
+
declare const onExtendedFieldUpdated: EventDefinition$2<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3426
|
+
declare const onExtendedFieldDeleted: EventDefinition$2<ExtendedFieldDeletedEnvelope, "wix.contacts.v4.extended-field_deleted">;
|
|
3315
3427
|
|
|
3316
3428
|
type index_d$3_DeleteExtendedFieldRequest = DeleteExtendedFieldRequest;
|
|
3317
3429
|
type index_d$3_DeleteExtendedFieldResponse = DeleteExtendedFieldResponse;
|
|
@@ -3960,25 +4072,65 @@ interface LabelsQueryBuilder {
|
|
|
3960
4072
|
find: () => Promise<LabelsQueryResult>;
|
|
3961
4073
|
}
|
|
3962
4074
|
|
|
4075
|
+
interface HttpClient$2 {
|
|
4076
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
4077
|
+
fetchWithAuth: typeof fetch;
|
|
4078
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4079
|
+
}
|
|
4080
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
4081
|
+
type HttpResponse$2<T = any> = {
|
|
4082
|
+
data: T;
|
|
4083
|
+
status: number;
|
|
4084
|
+
statusText: string;
|
|
4085
|
+
headers: any;
|
|
4086
|
+
request?: any;
|
|
4087
|
+
};
|
|
4088
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
4089
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4090
|
+
url: string;
|
|
4091
|
+
data?: Data;
|
|
4092
|
+
params?: URLSearchParams;
|
|
4093
|
+
} & APIMetadata$2;
|
|
4094
|
+
type APIMetadata$2 = {
|
|
4095
|
+
methodFqn?: string;
|
|
4096
|
+
entityFqdn?: string;
|
|
4097
|
+
packageName?: string;
|
|
4098
|
+
};
|
|
4099
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
4100
|
+
__type: 'event-definition';
|
|
4101
|
+
type: Type;
|
|
4102
|
+
isDomainEvent?: boolean;
|
|
4103
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4104
|
+
__payload: Payload;
|
|
4105
|
+
};
|
|
4106
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
4107
|
+
|
|
4108
|
+
declare global {
|
|
4109
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4110
|
+
interface SymbolConstructor {
|
|
4111
|
+
readonly observable: symbol;
|
|
4112
|
+
}
|
|
4113
|
+
}
|
|
4114
|
+
|
|
3963
4115
|
declare const __metadata$2: {
|
|
3964
4116
|
PACKAGE_NAME: string;
|
|
3965
4117
|
};
|
|
3966
|
-
declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
3967
|
-
declare function getLabel(httpClient: HttpClient): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
4118
|
+
declare function findOrCreateLabel(httpClient: HttpClient$2): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
4119
|
+
declare function getLabel(httpClient: HttpClient$2): (key: string, options?: GetLabelOptions) => Promise<ContactLabel & {
|
|
3968
4120
|
key: string;
|
|
3969
4121
|
displayName: string;
|
|
3970
4122
|
labelType: LabelType;
|
|
3971
4123
|
}>;
|
|
3972
|
-
declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
4124
|
+
declare function renameLabel(httpClient: HttpClient$2): (key: string, label: RenameLabel, options?: RenameLabelOptions) => Promise<ContactLabel & {
|
|
3973
4125
|
key: string;
|
|
3974
4126
|
displayName: string;
|
|
3975
4127
|
labelType: LabelType;
|
|
3976
4128
|
}>;
|
|
3977
|
-
declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3978
|
-
declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
3979
|
-
declare const onLabelCreated: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
3980
|
-
declare const onLabelUpdated: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
3981
|
-
declare const onLabelDeleted: EventDefinition<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
4129
|
+
declare function deleteLabel(httpClient: HttpClient$2): (key: string) => Promise<void>;
|
|
4130
|
+
declare function queryLabels(httpClient: HttpClient$2): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
4131
|
+
declare const onLabelCreated: EventDefinition$1<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
4132
|
+
declare const onLabelUpdated: EventDefinition$1<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
4133
|
+
declare const onLabelDeleted: EventDefinition$1<LabelDeletedEnvelope, "wix.contacts.v4.label_deleted">;
|
|
3982
4134
|
|
|
3983
4135
|
type index_d$2_ContactLabel = ContactLabel;
|
|
3984
4136
|
type index_d$2_ContactLabelNamespace = ContactLabelNamespace;
|
|
@@ -4622,10 +4774,42 @@ interface AppendOrCreateContactOptions {
|
|
|
4622
4774
|
contactId?: string | null;
|
|
4623
4775
|
}
|
|
4624
4776
|
|
|
4777
|
+
interface HttpClient$1 {
|
|
4778
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
4779
|
+
fetchWithAuth: typeof fetch;
|
|
4780
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4781
|
+
}
|
|
4782
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
4783
|
+
type HttpResponse$1<T = any> = {
|
|
4784
|
+
data: T;
|
|
4785
|
+
status: number;
|
|
4786
|
+
statusText: string;
|
|
4787
|
+
headers: any;
|
|
4788
|
+
request?: any;
|
|
4789
|
+
};
|
|
4790
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
4791
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4792
|
+
url: string;
|
|
4793
|
+
data?: Data;
|
|
4794
|
+
params?: URLSearchParams;
|
|
4795
|
+
} & APIMetadata$1;
|
|
4796
|
+
type APIMetadata$1 = {
|
|
4797
|
+
methodFqn?: string;
|
|
4798
|
+
entityFqdn?: string;
|
|
4799
|
+
packageName?: string;
|
|
4800
|
+
};
|
|
4801
|
+
|
|
4802
|
+
declare global {
|
|
4803
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4804
|
+
interface SymbolConstructor {
|
|
4805
|
+
readonly observable: symbol;
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
|
|
4625
4809
|
declare const __metadata$1: {
|
|
4626
4810
|
PACKAGE_NAME: string;
|
|
4627
4811
|
};
|
|
4628
|
-
declare function appendOrCreateContact(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4812
|
+
declare function appendOrCreateContact(httpClient: HttpClient$1): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4629
4813
|
|
|
4630
4814
|
type index_d$1_ActivityIcon = ActivityIcon;
|
|
4631
4815
|
type index_d$1_Address = Address;
|
|
@@ -5324,6 +5508,46 @@ interface MoveTaskAfterOptions {
|
|
|
5324
5508
|
beforeTaskId?: string | null;
|
|
5325
5509
|
}
|
|
5326
5510
|
|
|
5511
|
+
interface HttpClient {
|
|
5512
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
5513
|
+
fetchWithAuth: typeof fetch;
|
|
5514
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
5515
|
+
}
|
|
5516
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
5517
|
+
type HttpResponse<T = any> = {
|
|
5518
|
+
data: T;
|
|
5519
|
+
status: number;
|
|
5520
|
+
statusText: string;
|
|
5521
|
+
headers: any;
|
|
5522
|
+
request?: any;
|
|
5523
|
+
};
|
|
5524
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
5525
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5526
|
+
url: string;
|
|
5527
|
+
data?: Data;
|
|
5528
|
+
params?: URLSearchParams;
|
|
5529
|
+
} & APIMetadata;
|
|
5530
|
+
type APIMetadata = {
|
|
5531
|
+
methodFqn?: string;
|
|
5532
|
+
entityFqdn?: string;
|
|
5533
|
+
packageName?: string;
|
|
5534
|
+
};
|
|
5535
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
5536
|
+
__type: 'event-definition';
|
|
5537
|
+
type: Type;
|
|
5538
|
+
isDomainEvent?: boolean;
|
|
5539
|
+
transformations?: (envelope: unknown) => Payload;
|
|
5540
|
+
__payload: Payload;
|
|
5541
|
+
};
|
|
5542
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
5543
|
+
|
|
5544
|
+
declare global {
|
|
5545
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5546
|
+
interface SymbolConstructor {
|
|
5547
|
+
readonly observable: symbol;
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5327
5551
|
declare const __metadata: {
|
|
5328
5552
|
PACKAGE_NAME: string;
|
|
5329
5553
|
};
|