@wix/crm 1.0.117 → 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 +238 -45
|
@@ -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;
|
|
@@ -2546,17 +2547,57 @@ interface GetContactOptions {
|
|
|
2546
2547
|
fieldsets?: ContactFieldSet[];
|
|
2547
2548
|
}
|
|
2548
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
|
+
|
|
2549
2590
|
declare const __metadata$4: {
|
|
2550
2591
|
PACKAGE_NAME: string;
|
|
2551
2592
|
};
|
|
2552
|
-
declare function createContact(httpClient: HttpClient): (info: ContactInfo$2, options?: CreateContactOptions) => Promise<CreateContactResponse & CreateContactResponseNonNullableFields>;
|
|
2553
|
-
declare function updateContact(httpClient: HttpClient): (contactId: string, info: ContactInfo$2, revision: number | null, options?: UpdateContactOptions) => Promise<UpdateContactResponse & UpdateContactResponseNonNullableFields>;
|
|
2554
|
-
declare function mergeContacts(httpClient: HttpClient): (targetContactId: string, targetContactRevision: number | null, options?: MergeContactsOptions) => Promise<MergeContactsResponse & MergeContactsResponseNonNullableFields>;
|
|
2555
|
-
declare function deleteContact(httpClient: HttpClient): (contactId: string) => Promise<void>;
|
|
2556
|
-
declare function labelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<LabelContactResponse & LabelContactResponseNonNullableFields>;
|
|
2557
|
-
declare function unlabelContact(httpClient: HttpClient): (contactId: string, labelKeys: string[]) => Promise<UnlabelContactResponse & UnlabelContactResponseNonNullableFields>;
|
|
2558
|
-
declare function queryContacts(httpClient: HttpClient): (options?: QueryContactsOptions) => ContactsQueryBuilder;
|
|
2559
|
-
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 & {
|
|
2560
2601
|
_id: string;
|
|
2561
2602
|
revision: number;
|
|
2562
2603
|
source?: {
|
|
@@ -2591,10 +2632,10 @@ declare function getContact(httpClient: HttpClient): (_id: string, options?: Get
|
|
|
2591
2632
|
} | undefined;
|
|
2592
2633
|
} | undefined;
|
|
2593
2634
|
}>;
|
|
2594
|
-
declare const onContactCreated: EventDefinition<ContactCreatedEnvelope, "wix.contacts.v4.contact_created">;
|
|
2595
|
-
declare const onContactUpdated: EventDefinition<ContactUpdatedEnvelope, "wix.contacts.v4.contact_updated">;
|
|
2596
|
-
declare const onContactMerged: EventDefinition<ContactMergedEnvelope, "wix.contacts.v4.contact_merged">;
|
|
2597
|
-
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">;
|
|
2598
2639
|
|
|
2599
2640
|
type index_d$4_Action = Action;
|
|
2600
2641
|
declare const index_d$4_Action: typeof Action;
|
|
@@ -3322,27 +3363,67 @@ interface FieldsQueryBuilder {
|
|
|
3322
3363
|
find: () => Promise<FieldsQueryResult>;
|
|
3323
3364
|
}
|
|
3324
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
|
+
|
|
3325
3406
|
declare const __metadata$3: {
|
|
3326
3407
|
PACKAGE_NAME: string;
|
|
3327
3408
|
};
|
|
3328
|
-
declare function findOrCreateExtendedField(httpClient: HttpClient): (displayName: string, dataType: FieldDataType) => Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
3329
|
-
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 & {
|
|
3330
3411
|
key: string;
|
|
3331
3412
|
displayName: string;
|
|
3332
3413
|
dataType: FieldDataType;
|
|
3333
3414
|
fieldType: FieldType;
|
|
3334
3415
|
}>;
|
|
3335
|
-
declare function renameExtendedField(httpClient: HttpClient): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3416
|
+
declare function renameExtendedField(httpClient: HttpClient$3): (key: string, field: RenameExtendedField) => Promise<ExtendedField & {
|
|
3336
3417
|
key: string;
|
|
3337
3418
|
displayName: string;
|
|
3338
3419
|
dataType: FieldDataType;
|
|
3339
3420
|
fieldType: FieldType;
|
|
3340
3421
|
}>;
|
|
3341
|
-
declare function deleteExtendedField(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
3342
|
-
declare function queryExtendedFields(httpClient: HttpClient): () => FieldsQueryBuilder;
|
|
3343
|
-
declare const onExtendedFieldCreated: EventDefinition<ExtendedFieldCreatedEnvelope, "wix.contacts.v4.extended-field_created">;
|
|
3344
|
-
declare const onExtendedFieldUpdated: EventDefinition<ExtendedFieldUpdatedEnvelope, "wix.contacts.v4.extended-field_updated">;
|
|
3345
|
-
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">;
|
|
3346
3427
|
|
|
3347
3428
|
type index_d$3_DeleteExtendedFieldRequest = DeleteExtendedFieldRequest;
|
|
3348
3429
|
type index_d$3_DeleteExtendedFieldResponse = DeleteExtendedFieldResponse;
|
|
@@ -3991,25 +4072,65 @@ interface LabelsQueryBuilder {
|
|
|
3991
4072
|
find: () => Promise<LabelsQueryResult>;
|
|
3992
4073
|
}
|
|
3993
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
|
+
|
|
3994
4115
|
declare const __metadata$2: {
|
|
3995
4116
|
PACKAGE_NAME: string;
|
|
3996
4117
|
};
|
|
3997
|
-
declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions) => Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
|
|
3998
|
-
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 & {
|
|
3999
4120
|
key: string;
|
|
4000
4121
|
displayName: string;
|
|
4001
4122
|
labelType: LabelType;
|
|
4002
4123
|
}>;
|
|
4003
|
-
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 & {
|
|
4004
4125
|
key: string;
|
|
4005
4126
|
displayName: string;
|
|
4006
4127
|
labelType: LabelType;
|
|
4007
4128
|
}>;
|
|
4008
|
-
declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
4009
|
-
declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions) => LabelsQueryBuilder;
|
|
4010
|
-
declare const onLabelCreated: EventDefinition<LabelCreatedEnvelope, "wix.contacts.v4.label_created">;
|
|
4011
|
-
declare const onLabelUpdated: EventDefinition<LabelUpdatedEnvelope, "wix.contacts.v4.label_updated">;
|
|
4012
|
-
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">;
|
|
4013
4134
|
|
|
4014
4135
|
type index_d$2_ContactLabel = ContactLabel;
|
|
4015
4136
|
type index_d$2_ContactLabelNamespace = ContactLabelNamespace;
|
|
@@ -4653,10 +4774,42 @@ interface AppendOrCreateContactOptions {
|
|
|
4653
4774
|
contactId?: string | null;
|
|
4654
4775
|
}
|
|
4655
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
|
+
|
|
4656
4809
|
declare const __metadata$1: {
|
|
4657
4810
|
PACKAGE_NAME: string;
|
|
4658
4811
|
};
|
|
4659
|
-
declare function appendOrCreateContact(httpClient: HttpClient): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4812
|
+
declare function appendOrCreateContact(httpClient: HttpClient$1): (options?: AppendOrCreateContactOptions) => Promise<SubmitContactResponse & SubmitContactResponseNonNullableFields>;
|
|
4660
4813
|
|
|
4661
4814
|
type index_d$1_ActivityIcon = ActivityIcon;
|
|
4662
4815
|
type index_d$1_Address = Address;
|
|
@@ -5355,6 +5508,46 @@ interface MoveTaskAfterOptions {
|
|
|
5355
5508
|
beforeTaskId?: string | null;
|
|
5356
5509
|
}
|
|
5357
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
|
+
|
|
5358
5551
|
declare const __metadata: {
|
|
5359
5552
|
PACKAGE_NAME: string;
|
|
5360
5553
|
};
|