@wix/crm 1.0.166 → 1.0.168
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 +4 -4
- package/type-bundles/context.bundle.d.ts +54 -139
- package/type-bundles/index.bundle.d.ts +54 -139
- package/type-bundles/meta.bundle.d.ts +55 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/crm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.168",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"type-bundles"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@wix/crm_attachments": "1.0.
|
|
24
|
+
"@wix/crm_attachments": "1.0.25",
|
|
25
25
|
"@wix/crm_contacts": "1.0.70",
|
|
26
26
|
"@wix/crm_extended-fields": "1.0.50",
|
|
27
|
-
"@wix/crm_labels": "1.0.
|
|
27
|
+
"@wix/crm_labels": "1.0.49",
|
|
28
28
|
"@wix/crm_submitted-contact": "1.0.44",
|
|
29
29
|
"@wix/crm_tasks": "1.0.52"
|
|
30
30
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"fqdn": ""
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
"falconPackageHash": "
|
|
54
|
+
"falconPackageHash": "b53d0b8d0346dc9e860b5cae8162858a11d7f445f1ec14c209c8f1a3"
|
|
55
55
|
}
|
|
@@ -796,59 +796,6 @@ interface ListAttachmentsResponseNonNullableFields {
|
|
|
796
796
|
interface GetAttachmentResponseNonNullableFields {
|
|
797
797
|
attachment?: ContactAttachmentNonNullableFields;
|
|
798
798
|
}
|
|
799
|
-
interface BaseEventMetadata$4 {
|
|
800
|
-
/** App instance ID. */
|
|
801
|
-
instanceId?: string | null;
|
|
802
|
-
/** Event type. */
|
|
803
|
-
eventType?: string;
|
|
804
|
-
/** The identification type and identity data. */
|
|
805
|
-
identity?: IdentificationData$5;
|
|
806
|
-
}
|
|
807
|
-
interface EventMetadata$4 extends BaseEventMetadata$4 {
|
|
808
|
-
/**
|
|
809
|
-
* Unique event ID.
|
|
810
|
-
* Allows clients to ignore duplicate webhooks.
|
|
811
|
-
*/
|
|
812
|
-
_id?: string;
|
|
813
|
-
/**
|
|
814
|
-
* Assumes actions are also always typed to an entity_type
|
|
815
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
816
|
-
*/
|
|
817
|
-
entityFqdn?: string;
|
|
818
|
-
/**
|
|
819
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
820
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
821
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
822
|
-
*/
|
|
823
|
-
slug?: string;
|
|
824
|
-
/** ID of the entity associated with the event. */
|
|
825
|
-
entityId?: string;
|
|
826
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
827
|
-
eventTime?: Date | null;
|
|
828
|
-
/**
|
|
829
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
830
|
-
* (for example, GDPR).
|
|
831
|
-
*/
|
|
832
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
833
|
-
/** If present, indicates the action that triggered the event. */
|
|
834
|
-
originatedFrom?: string | null;
|
|
835
|
-
/**
|
|
836
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
837
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
838
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
839
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
840
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
841
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
842
|
-
*/
|
|
843
|
-
entityEventSequence?: string | null;
|
|
844
|
-
}
|
|
845
|
-
interface AttachmentCreatedEnvelope {
|
|
846
|
-
entity: ContactAttachment;
|
|
847
|
-
metadata: EventMetadata$4;
|
|
848
|
-
}
|
|
849
|
-
interface AttachmentDeletedEnvelope {
|
|
850
|
-
metadata: EventMetadata$4;
|
|
851
|
-
}
|
|
852
799
|
interface GenerateAttachmentUploadUrlOptions {
|
|
853
800
|
/**
|
|
854
801
|
* Mime type of the attachment file, for example, `application/pdf`.
|
|
@@ -909,30 +856,12 @@ interface GetAttachmentSignature {
|
|
|
909
856
|
*/
|
|
910
857
|
(identifiers: GetAttachmentIdentifiers): Promise<ContactAttachment & ContactAttachmentNonNullableFields>;
|
|
911
858
|
}
|
|
912
|
-
declare const onAttachmentCreated$1: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
913
|
-
declare const onAttachmentDeleted$1: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
914
|
-
|
|
915
|
-
declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
916
859
|
|
|
917
860
|
declare const generateAttachmentUploadUrl: MaybeContext<BuildRESTFunction<typeof generateAttachmentUploadUrl$1> & typeof generateAttachmentUploadUrl$1>;
|
|
918
861
|
declare const listAttachments: MaybeContext<BuildRESTFunction<typeof listAttachments$1> & typeof listAttachments$1>;
|
|
919
862
|
declare const deleteAttachment: MaybeContext<BuildRESTFunction<typeof deleteAttachment$1> & typeof deleteAttachment$1>;
|
|
920
863
|
declare const getAttachment: MaybeContext<BuildRESTFunction<typeof getAttachment$1> & typeof getAttachment$1>;
|
|
921
864
|
|
|
922
|
-
type _publicOnAttachmentCreatedType = typeof onAttachmentCreated$1;
|
|
923
|
-
/**
|
|
924
|
-
* Triggered when an attachment is created.
|
|
925
|
-
*/
|
|
926
|
-
declare const onAttachmentCreated: ReturnType<typeof createEventModule$4<_publicOnAttachmentCreatedType>>;
|
|
927
|
-
|
|
928
|
-
type _publicOnAttachmentDeletedType = typeof onAttachmentDeleted$1;
|
|
929
|
-
/**
|
|
930
|
-
* Triggered when a contact is deleted.
|
|
931
|
-
*/
|
|
932
|
-
declare const onAttachmentDeleted: ReturnType<typeof createEventModule$4<_publicOnAttachmentDeletedType>>;
|
|
933
|
-
|
|
934
|
-
type context$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
935
|
-
type context$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
936
865
|
type context$5_AttachmentMedia = AttachmentMedia;
|
|
937
866
|
type context$5_AttachmentMediaMediaOneOf = AttachmentMediaMediaOneOf;
|
|
938
867
|
type context$5_AttachmentMetadata = AttachmentMetadata;
|
|
@@ -966,16 +895,12 @@ type context$5_ListAttachmentsRequest = ListAttachmentsRequest;
|
|
|
966
895
|
type context$5_ListAttachmentsResponse = ListAttachmentsResponse;
|
|
967
896
|
type context$5_ListAttachmentsResponseNonNullableFields = ListAttachmentsResponseNonNullableFields;
|
|
968
897
|
type context$5_MediaFileUploadedEvent = MediaFileUploadedEvent;
|
|
969
|
-
type context$5__publicOnAttachmentCreatedType = _publicOnAttachmentCreatedType;
|
|
970
|
-
type context$5__publicOnAttachmentDeletedType = _publicOnAttachmentDeletedType;
|
|
971
898
|
declare const context$5_deleteAttachment: typeof deleteAttachment;
|
|
972
899
|
declare const context$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
|
|
973
900
|
declare const context$5_getAttachment: typeof getAttachment;
|
|
974
901
|
declare const context$5_listAttachments: typeof listAttachments;
|
|
975
|
-
declare const context$5_onAttachmentCreated: typeof onAttachmentCreated;
|
|
976
|
-
declare const context$5_onAttachmentDeleted: typeof onAttachmentDeleted;
|
|
977
902
|
declare namespace context$5 {
|
|
978
|
-
export { type ActionEvent$4 as ActionEvent, type context$
|
|
903
|
+
export { type ActionEvent$4 as ActionEvent, type context$5_AttachmentMedia as AttachmentMedia, type context$5_AttachmentMediaMediaOneOf as AttachmentMediaMediaOneOf, type context$5_AttachmentMetadata as AttachmentMetadata, type context$5_AttachmentSource as AttachmentSource, context$5_AttachmentType as AttachmentType, type context$5_ContactAttachment as ContactAttachment, type context$5_ContactAttachmentMediaOneOf as ContactAttachmentMediaOneOf, type context$5_ContactAttachmentNonNullableFields as ContactAttachmentNonNullableFields, type context$5_CreateDemoAttachmentRequest as CreateDemoAttachmentRequest, type context$5_CreateDemoAttachmentResponse as CreateDemoAttachmentResponse, type context$5_CrmAttachment as CrmAttachment, context$5_CrmAttachmentAttachmentType as CrmAttachmentAttachmentType, type context$5_CrmAttachmentUploadedEvent as CrmAttachmentUploadedEvent, type context$5_DeleteAttachmentIdentifiers as DeleteAttachmentIdentifiers, type context$5_DeleteAttachmentRequest as DeleteAttachmentRequest, type context$5_DeleteAttachmentResponse as DeleteAttachmentResponse, context$5_DemoContactType as DemoContactType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type context$5_GenerateAttachmentUploadUrlOptions as GenerateAttachmentUploadUrlOptions, type context$5_GenerateAttachmentUploadUrlRequest as GenerateAttachmentUploadUrlRequest, type context$5_GenerateAttachmentUploadUrlResponse as GenerateAttachmentUploadUrlResponse, type context$5_GenerateAttachmentUploadUrlResponseNonNullableFields as GenerateAttachmentUploadUrlResponseNonNullableFields, type context$5_GetAttachmentIdentifiers as GetAttachmentIdentifiers, type context$5_GetAttachmentRequest as GetAttachmentRequest, type context$5_GetAttachmentResponse as GetAttachmentResponse, type context$5_GetAttachmentResponseNonNullableFields as GetAttachmentResponseNonNullableFields, type IdentificationData$5 as IdentificationData, type IdentificationDataIdOneOf$5 as IdentificationDataIdOneOf, type context$5_ListAttachmentsOptions as ListAttachmentsOptions, type context$5_ListAttachmentsRequest as ListAttachmentsRequest, type context$5_ListAttachmentsResponse as ListAttachmentsResponse, type context$5_ListAttachmentsResponseNonNullableFields as ListAttachmentsResponseNonNullableFields, type context$5_MediaFileUploadedEvent as MediaFileUploadedEvent, type MessageEnvelope$5 as MessageEnvelope, type Paging$4 as Paging, type PagingMetadata$3 as PagingMetadata, type RestoreInfo$4 as RestoreInfo, WebhookIdentityType$5 as WebhookIdentityType, context$5_deleteAttachment as deleteAttachment, context$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, context$5_getAttachment as getAttachment, context$5_listAttachments as listAttachments };
|
|
979
904
|
}
|
|
980
905
|
|
|
981
906
|
interface Contact {
|
|
@@ -3940,14 +3865,14 @@ interface ContactLabel {
|
|
|
3940
3865
|
/**
|
|
3941
3866
|
* Label namespace.
|
|
3942
3867
|
*
|
|
3943
|
-
* Labels created by
|
|
3868
|
+
* Labels created by calling the Find Or Create Label method
|
|
3944
3869
|
* are automatically assigned to the `custom` namespace.
|
|
3945
3870
|
* @readonly
|
|
3946
3871
|
*/
|
|
3947
3872
|
namespace?: string | null;
|
|
3948
3873
|
/**
|
|
3949
3874
|
* Display name for the namespace,
|
|
3950
|
-
* used to organize the list of labels in the site
|
|
3875
|
+
* used to organize the list of labels in the site dashboard.
|
|
3951
3876
|
* @readonly
|
|
3952
3877
|
*/
|
|
3953
3878
|
namespaceDisplayName?: string | null;
|
|
@@ -3955,18 +3880,14 @@ interface ContactLabel {
|
|
|
3955
3880
|
* Label key.
|
|
3956
3881
|
*
|
|
3957
3882
|
* `key` is generated when the label is created.
|
|
3958
|
-
* It
|
|
3883
|
+
* It can't be modified, even if `displayName` is updated.
|
|
3959
3884
|
* @readonly
|
|
3960
3885
|
*/
|
|
3961
3886
|
key?: string;
|
|
3962
|
-
/** Label display name shown in the
|
|
3887
|
+
/** Label display name shown in the dashboard. */
|
|
3963
3888
|
displayName?: string;
|
|
3964
3889
|
/**
|
|
3965
|
-
* Label type.
|
|
3966
|
-
*
|
|
3967
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
3968
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
3969
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
3890
|
+
* Label type indicating how the label was created.
|
|
3970
3891
|
* @readonly
|
|
3971
3892
|
*/
|
|
3972
3893
|
labelType?: LabelType;
|
|
@@ -3982,11 +3903,11 @@ interface ContactLabel {
|
|
|
3982
3903
|
_updatedDate?: Date | null;
|
|
3983
3904
|
}
|
|
3984
3905
|
declare enum LabelType {
|
|
3985
|
-
/** Default system label for the
|
|
3906
|
+
/** Default system label for the contact list. */
|
|
3986
3907
|
SYSTEM = "SYSTEM",
|
|
3987
|
-
/** Label created by
|
|
3908
|
+
/** Label created by calling the Find Or Create Label method. */
|
|
3988
3909
|
USER_DEFINED = "USER_DEFINED",
|
|
3989
|
-
/** Label created by
|
|
3910
|
+
/** Label created by an app built by Wix. */
|
|
3990
3911
|
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
3991
3912
|
}
|
|
3992
3913
|
/** Label filter options. */
|
|
@@ -4001,7 +3922,6 @@ interface ListLabelsRequest {
|
|
|
4001
3922
|
sort?: Sorting$1;
|
|
4002
3923
|
/** Paging options. */
|
|
4003
3924
|
paging?: Paging$1;
|
|
4004
|
-
/** Language for localization. */
|
|
4005
3925
|
language?: string | null;
|
|
4006
3926
|
}
|
|
4007
3927
|
interface Sorting$1 {
|
|
@@ -4062,7 +3982,10 @@ interface FindOrCreateLabelRequest {
|
|
|
4062
3982
|
* If not, a new label is created and returned.
|
|
4063
3983
|
*/
|
|
4064
3984
|
displayName: string;
|
|
4065
|
-
/**
|
|
3985
|
+
/**
|
|
3986
|
+
* Language for localization.
|
|
3987
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
3988
|
+
*/
|
|
4066
3989
|
language?: string | null;
|
|
4067
3990
|
}
|
|
4068
3991
|
/** Label that was found or created. */
|
|
@@ -4072,8 +3995,7 @@ interface FindOrCreateLabelResponse {
|
|
|
4072
3995
|
/**
|
|
4073
3996
|
* Indicates whether the label was just created or already existed.
|
|
4074
3997
|
*
|
|
4075
|
-
*
|
|
4076
|
-
* If it already existed, returns `false`.
|
|
3998
|
+
* Returns `true` if the label was just created.
|
|
4077
3999
|
*/
|
|
4078
4000
|
newLabel?: boolean;
|
|
4079
4001
|
}
|
|
@@ -4108,10 +4030,13 @@ interface GetLabelRequest {
|
|
|
4108
4030
|
* Label key.
|
|
4109
4031
|
*
|
|
4110
4032
|
* `key` is generated when the label is created.
|
|
4111
|
-
* It
|
|
4033
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4112
4034
|
*/
|
|
4113
4035
|
key: string;
|
|
4114
|
-
/**
|
|
4036
|
+
/**
|
|
4037
|
+
* Language for localization.
|
|
4038
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4039
|
+
*/
|
|
4115
4040
|
language?: string | null;
|
|
4116
4041
|
}
|
|
4117
4042
|
/** The specified label. */
|
|
@@ -4130,14 +4055,17 @@ interface GetLabelByLegacyIdResponse {
|
|
|
4130
4055
|
label?: ContactLabel;
|
|
4131
4056
|
}
|
|
4132
4057
|
interface UpdateLabelRequest {
|
|
4133
|
-
/** Label
|
|
4058
|
+
/** Label to rename. */
|
|
4134
4059
|
label?: ContactLabel;
|
|
4135
|
-
/**
|
|
4060
|
+
/**
|
|
4061
|
+
* Language for localization.
|
|
4062
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4063
|
+
*/
|
|
4136
4064
|
language?: string | null;
|
|
4137
4065
|
}
|
|
4138
4066
|
/** Updated label. */
|
|
4139
4067
|
interface UpdateLabelResponse {
|
|
4140
|
-
/**
|
|
4068
|
+
/** Renamed label. */
|
|
4141
4069
|
label?: ContactLabel;
|
|
4142
4070
|
}
|
|
4143
4071
|
interface DeleteLabelRequest {
|
|
@@ -4167,7 +4095,10 @@ interface GdprListResponse {
|
|
|
4167
4095
|
interface QueryLabelsRequest {
|
|
4168
4096
|
/** Query options. */
|
|
4169
4097
|
query?: Query;
|
|
4170
|
-
/**
|
|
4098
|
+
/**
|
|
4099
|
+
* Language for localization.
|
|
4100
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4101
|
+
*/
|
|
4171
4102
|
language?: string | null;
|
|
4172
4103
|
}
|
|
4173
4104
|
interface Query {
|
|
@@ -4389,18 +4320,14 @@ interface LabelUpdatedEnvelope {
|
|
|
4389
4320
|
interface FindOrCreateLabelOptions {
|
|
4390
4321
|
/**
|
|
4391
4322
|
* Language for localization.
|
|
4392
|
-
*
|
|
4393
|
-
* 2-letter language code in
|
|
4394
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4323
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4395
4324
|
*/
|
|
4396
4325
|
language?: string | null;
|
|
4397
4326
|
}
|
|
4398
4327
|
interface GetLabelOptions {
|
|
4399
4328
|
/**
|
|
4400
4329
|
* Language for localization.
|
|
4401
|
-
*
|
|
4402
|
-
* 2-letter language code in
|
|
4403
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4330
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4404
4331
|
*/
|
|
4405
4332
|
language?: string | null;
|
|
4406
4333
|
}
|
|
@@ -4408,25 +4335,21 @@ interface RenameLabel {
|
|
|
4408
4335
|
/**
|
|
4409
4336
|
* Label namespace.
|
|
4410
4337
|
*
|
|
4411
|
-
* Labels created by
|
|
4338
|
+
* Labels created by calling the Find Or Create Label method
|
|
4412
4339
|
* are automatically assigned to the `custom` namespace.
|
|
4413
4340
|
* @readonly
|
|
4414
4341
|
*/
|
|
4415
4342
|
namespace?: string | null;
|
|
4416
4343
|
/**
|
|
4417
4344
|
* Display name for the namespace,
|
|
4418
|
-
* used to organize the list of labels in the site
|
|
4345
|
+
* used to organize the list of labels in the site dashboard.
|
|
4419
4346
|
* @readonly
|
|
4420
4347
|
*/
|
|
4421
4348
|
namespaceDisplayName?: string | null;
|
|
4422
|
-
/** Label display name shown in the
|
|
4349
|
+
/** Label display name shown in the dashboard. */
|
|
4423
4350
|
displayName?: string;
|
|
4424
4351
|
/**
|
|
4425
|
-
* Label type.
|
|
4426
|
-
*
|
|
4427
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
4428
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
4429
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
4352
|
+
* Label type indicating how the label was created.
|
|
4430
4353
|
* @readonly
|
|
4431
4354
|
*/
|
|
4432
4355
|
labelType?: LabelType;
|
|
@@ -4444,9 +4367,7 @@ interface RenameLabel {
|
|
|
4444
4367
|
interface RenameLabelOptions {
|
|
4445
4368
|
/**
|
|
4446
4369
|
* Language for localization.
|
|
4447
|
-
*
|
|
4448
|
-
* 2-letter language code in
|
|
4449
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4370
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4450
4371
|
*/
|
|
4451
4372
|
language?: string | null;
|
|
4452
4373
|
}
|
|
@@ -4535,15 +4456,18 @@ interface LabelsQueryBuilder {
|
|
|
4535
4456
|
declare function findOrCreateLabel$1(httpClient: HttpClient): FindOrCreateLabelSignature;
|
|
4536
4457
|
interface FindOrCreateLabelSignature {
|
|
4537
4458
|
/**
|
|
4538
|
-
* Retrieves a label with a
|
|
4539
|
-
*
|
|
4540
|
-
* The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
|
|
4541
|
-
*
|
|
4542
|
-
* Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
|
|
4459
|
+
* Retrieves a label with a specified name, or creates one if it doesn't exist.
|
|
4543
4460
|
*
|
|
4544
|
-
*
|
|
4461
|
+
* Successful calls to this method always return a label,
|
|
4462
|
+
* which can be specified in subsequent calls.
|
|
4545
4463
|
*
|
|
4464
|
+
* For example, in the Contacts API, Label Contact and Unlabel Contact
|
|
4465
|
+
* calls will fail if you include a non-existant label.
|
|
4466
|
+
* To ensure successful calls, you can call this method first,
|
|
4467
|
+
* and then use the response in the Label Contact and Unlabel Contact calls.
|
|
4546
4468
|
*
|
|
4469
|
+
* To find an existing label without potentially creating a new one, call
|
|
4470
|
+
* Get Label or Query Labels.
|
|
4547
4471
|
* @param - Display name to retrieve or create.
|
|
4548
4472
|
*
|
|
4549
4473
|
* If an existing label is an exact match
|
|
@@ -4559,12 +4483,10 @@ declare function getLabel$1(httpClient: HttpClient): GetLabelSignature;
|
|
|
4559
4483
|
interface GetLabelSignature {
|
|
4560
4484
|
/**
|
|
4561
4485
|
* Retrieves a label by the specified label key.
|
|
4562
|
-
*
|
|
4563
|
-
* The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.
|
|
4564
4486
|
* @param - Label key.
|
|
4565
4487
|
*
|
|
4566
4488
|
* `key` is generated when the label is created.
|
|
4567
|
-
* It
|
|
4489
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4568
4490
|
* @param - Language options.
|
|
4569
4491
|
* @returns The specified label.
|
|
4570
4492
|
*/
|
|
@@ -4574,27 +4496,20 @@ declare function renameLabel$1(httpClient: HttpClient): RenameLabelSignature;
|
|
|
4574
4496
|
interface RenameLabelSignature {
|
|
4575
4497
|
/**
|
|
4576
4498
|
* Renames a label.
|
|
4577
|
-
*
|
|
4578
|
-
* The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
|
|
4579
|
-
*
|
|
4580
4499
|
* @param - Label key.
|
|
4581
4500
|
*
|
|
4582
4501
|
* `key` is generated when the label is created.
|
|
4583
|
-
* It
|
|
4502
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4584
4503
|
* @param - Language options.
|
|
4585
4504
|
* @param - Label to rename.
|
|
4586
|
-
* @returns
|
|
4505
|
+
* @returns Renamed label.
|
|
4587
4506
|
*/
|
|
4588
4507
|
(key: string, label: RenameLabel, options?: RenameLabelOptions | undefined): Promise<ContactLabel & ContactLabelNonNullableFields>;
|
|
4589
4508
|
}
|
|
4590
4509
|
declare function deleteLabel$1(httpClient: HttpClient): DeleteLabelSignature;
|
|
4591
4510
|
interface DeleteLabelSignature {
|
|
4592
4511
|
/**
|
|
4593
|
-
* Deletes
|
|
4594
|
-
*
|
|
4595
|
-
* The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
|
|
4596
|
-
*
|
|
4597
|
-
*
|
|
4512
|
+
* Deletes the specified label from a site and removes it from the contacts it applies to.
|
|
4598
4513
|
* @param - Label key to delete.
|
|
4599
4514
|
*/
|
|
4600
4515
|
(key: string): Promise<void>;
|
|
@@ -4604,18 +4519,18 @@ interface QueryLabelsSignature {
|
|
|
4604
4519
|
/**
|
|
4605
4520
|
* Creates a query to retrieve a list of labels.
|
|
4606
4521
|
*
|
|
4607
|
-
* The `queryLabels()`
|
|
4522
|
+
* The `queryLabels()` method builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
|
|
4608
4523
|
*
|
|
4609
|
-
* The returned object contains the query definition, which is used to
|
|
4524
|
+
* The returned object contains the query definition, which is used to call the query using the `find()` method.
|
|
4610
4525
|
*
|
|
4611
|
-
* You can refine the query by chaining `LabelsQueryBuilder`
|
|
4526
|
+
* You can refine the query by chaining `LabelsQueryBuilder` methods onto the query. `LabelsQueryBuilder` methods enable you to filter, sort, and control the response that `queryLabels()` returns.
|
|
4612
4527
|
*
|
|
4613
|
-
* `queryLabels()`
|
|
4528
|
+
* `queryLabels()` is called with the following `LabelsQueryBuilder` defaults, which you can override:
|
|
4614
4529
|
* - `skip(0)`
|
|
4615
4530
|
* - `limit(50)`
|
|
4616
4531
|
* - `descending('_createdDate')`
|
|
4617
4532
|
*
|
|
4618
|
-
* The following `LabelsQueryBuilder`
|
|
4533
|
+
* The following `LabelsQueryBuilder` methods are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the `items` field in `LabelsQueryResult`.
|
|
4619
4534
|
*
|
|
4620
4535
|
*
|
|
4621
4536
|
* @param - Language options.
|
|
@@ -796,59 +796,6 @@ interface ListAttachmentsResponseNonNullableFields {
|
|
|
796
796
|
interface GetAttachmentResponseNonNullableFields {
|
|
797
797
|
attachment?: ContactAttachmentNonNullableFields;
|
|
798
798
|
}
|
|
799
|
-
interface BaseEventMetadata$4 {
|
|
800
|
-
/** App instance ID. */
|
|
801
|
-
instanceId?: string | null;
|
|
802
|
-
/** Event type. */
|
|
803
|
-
eventType?: string;
|
|
804
|
-
/** The identification type and identity data. */
|
|
805
|
-
identity?: IdentificationData$5;
|
|
806
|
-
}
|
|
807
|
-
interface EventMetadata$4 extends BaseEventMetadata$4 {
|
|
808
|
-
/**
|
|
809
|
-
* Unique event ID.
|
|
810
|
-
* Allows clients to ignore duplicate webhooks.
|
|
811
|
-
*/
|
|
812
|
-
_id?: string;
|
|
813
|
-
/**
|
|
814
|
-
* Assumes actions are also always typed to an entity_type
|
|
815
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
816
|
-
*/
|
|
817
|
-
entityFqdn?: string;
|
|
818
|
-
/**
|
|
819
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
820
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
821
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
822
|
-
*/
|
|
823
|
-
slug?: string;
|
|
824
|
-
/** ID of the entity associated with the event. */
|
|
825
|
-
entityId?: string;
|
|
826
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
827
|
-
eventTime?: Date | null;
|
|
828
|
-
/**
|
|
829
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
830
|
-
* (for example, GDPR).
|
|
831
|
-
*/
|
|
832
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
833
|
-
/** If present, indicates the action that triggered the event. */
|
|
834
|
-
originatedFrom?: string | null;
|
|
835
|
-
/**
|
|
836
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
837
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
838
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
839
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
840
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
841
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
842
|
-
*/
|
|
843
|
-
entityEventSequence?: string | null;
|
|
844
|
-
}
|
|
845
|
-
interface AttachmentCreatedEnvelope {
|
|
846
|
-
entity: ContactAttachment;
|
|
847
|
-
metadata: EventMetadata$4;
|
|
848
|
-
}
|
|
849
|
-
interface AttachmentDeletedEnvelope {
|
|
850
|
-
metadata: EventMetadata$4;
|
|
851
|
-
}
|
|
852
799
|
interface GenerateAttachmentUploadUrlOptions {
|
|
853
800
|
/**
|
|
854
801
|
* Mime type of the attachment file, for example, `application/pdf`.
|
|
@@ -909,30 +856,12 @@ interface GetAttachmentSignature {
|
|
|
909
856
|
*/
|
|
910
857
|
(identifiers: GetAttachmentIdentifiers): Promise<ContactAttachment & ContactAttachmentNonNullableFields>;
|
|
911
858
|
}
|
|
912
|
-
declare const onAttachmentCreated$1: EventDefinition<AttachmentCreatedEnvelope, "wix.contacts.v4.attachment_created">;
|
|
913
|
-
declare const onAttachmentDeleted$1: EventDefinition<AttachmentDeletedEnvelope, "wix.contacts.v4.attachment_deleted">;
|
|
914
|
-
|
|
915
|
-
declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
916
859
|
|
|
917
860
|
declare const generateAttachmentUploadUrl: MaybeContext<BuildRESTFunction<typeof generateAttachmentUploadUrl$1> & typeof generateAttachmentUploadUrl$1>;
|
|
918
861
|
declare const listAttachments: MaybeContext<BuildRESTFunction<typeof listAttachments$1> & typeof listAttachments$1>;
|
|
919
862
|
declare const deleteAttachment: MaybeContext<BuildRESTFunction<typeof deleteAttachment$1> & typeof deleteAttachment$1>;
|
|
920
863
|
declare const getAttachment: MaybeContext<BuildRESTFunction<typeof getAttachment$1> & typeof getAttachment$1>;
|
|
921
864
|
|
|
922
|
-
type _publicOnAttachmentCreatedType = typeof onAttachmentCreated$1;
|
|
923
|
-
/**
|
|
924
|
-
* Triggered when an attachment is created.
|
|
925
|
-
*/
|
|
926
|
-
declare const onAttachmentCreated: ReturnType<typeof createEventModule$4<_publicOnAttachmentCreatedType>>;
|
|
927
|
-
|
|
928
|
-
type _publicOnAttachmentDeletedType = typeof onAttachmentDeleted$1;
|
|
929
|
-
/**
|
|
930
|
-
* Triggered when a contact is deleted.
|
|
931
|
-
*/
|
|
932
|
-
declare const onAttachmentDeleted: ReturnType<typeof createEventModule$4<_publicOnAttachmentDeletedType>>;
|
|
933
|
-
|
|
934
|
-
type index_d$5_AttachmentCreatedEnvelope = AttachmentCreatedEnvelope;
|
|
935
|
-
type index_d$5_AttachmentDeletedEnvelope = AttachmentDeletedEnvelope;
|
|
936
865
|
type index_d$5_AttachmentMedia = AttachmentMedia;
|
|
937
866
|
type index_d$5_AttachmentMediaMediaOneOf = AttachmentMediaMediaOneOf;
|
|
938
867
|
type index_d$5_AttachmentMetadata = AttachmentMetadata;
|
|
@@ -966,16 +895,12 @@ type index_d$5_ListAttachmentsRequest = ListAttachmentsRequest;
|
|
|
966
895
|
type index_d$5_ListAttachmentsResponse = ListAttachmentsResponse;
|
|
967
896
|
type index_d$5_ListAttachmentsResponseNonNullableFields = ListAttachmentsResponseNonNullableFields;
|
|
968
897
|
type index_d$5_MediaFileUploadedEvent = MediaFileUploadedEvent;
|
|
969
|
-
type index_d$5__publicOnAttachmentCreatedType = _publicOnAttachmentCreatedType;
|
|
970
|
-
type index_d$5__publicOnAttachmentDeletedType = _publicOnAttachmentDeletedType;
|
|
971
898
|
declare const index_d$5_deleteAttachment: typeof deleteAttachment;
|
|
972
899
|
declare const index_d$5_generateAttachmentUploadUrl: typeof generateAttachmentUploadUrl;
|
|
973
900
|
declare const index_d$5_getAttachment: typeof getAttachment;
|
|
974
901
|
declare const index_d$5_listAttachments: typeof listAttachments;
|
|
975
|
-
declare const index_d$5_onAttachmentCreated: typeof onAttachmentCreated;
|
|
976
|
-
declare const index_d$5_onAttachmentDeleted: typeof onAttachmentDeleted;
|
|
977
902
|
declare namespace index_d$5 {
|
|
978
|
-
export { type ActionEvent$4 as ActionEvent, type index_d$
|
|
903
|
+
export { type ActionEvent$4 as ActionEvent, type index_d$5_AttachmentMedia as AttachmentMedia, type index_d$5_AttachmentMediaMediaOneOf as AttachmentMediaMediaOneOf, type index_d$5_AttachmentMetadata as AttachmentMetadata, type index_d$5_AttachmentSource as AttachmentSource, index_d$5_AttachmentType as AttachmentType, type index_d$5_ContactAttachment as ContactAttachment, type index_d$5_ContactAttachmentMediaOneOf as ContactAttachmentMediaOneOf, type index_d$5_ContactAttachmentNonNullableFields as ContactAttachmentNonNullableFields, type index_d$5_CreateDemoAttachmentRequest as CreateDemoAttachmentRequest, type index_d$5_CreateDemoAttachmentResponse as CreateDemoAttachmentResponse, type index_d$5_CrmAttachment as CrmAttachment, index_d$5_CrmAttachmentAttachmentType as CrmAttachmentAttachmentType, type index_d$5_CrmAttachmentUploadedEvent as CrmAttachmentUploadedEvent, type index_d$5_DeleteAttachmentIdentifiers as DeleteAttachmentIdentifiers, type index_d$5_DeleteAttachmentRequest as DeleteAttachmentRequest, type index_d$5_DeleteAttachmentResponse as DeleteAttachmentResponse, index_d$5_DemoContactType as DemoContactType, type DomainEvent$4 as DomainEvent, type DomainEventBodyOneOf$4 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$4 as EntityCreatedEvent, type EntityDeletedEvent$4 as EntityDeletedEvent, type EntityUpdatedEvent$4 as EntityUpdatedEvent, type index_d$5_GenerateAttachmentUploadUrlOptions as GenerateAttachmentUploadUrlOptions, type index_d$5_GenerateAttachmentUploadUrlRequest as GenerateAttachmentUploadUrlRequest, type index_d$5_GenerateAttachmentUploadUrlResponse as GenerateAttachmentUploadUrlResponse, type index_d$5_GenerateAttachmentUploadUrlResponseNonNullableFields as GenerateAttachmentUploadUrlResponseNonNullableFields, type index_d$5_GetAttachmentIdentifiers as GetAttachmentIdentifiers, type index_d$5_GetAttachmentRequest as GetAttachmentRequest, type index_d$5_GetAttachmentResponse as GetAttachmentResponse, type index_d$5_GetAttachmentResponseNonNullableFields as GetAttachmentResponseNonNullableFields, type IdentificationData$5 as IdentificationData, type IdentificationDataIdOneOf$5 as IdentificationDataIdOneOf, type index_d$5_ListAttachmentsOptions as ListAttachmentsOptions, type index_d$5_ListAttachmentsRequest as ListAttachmentsRequest, type index_d$5_ListAttachmentsResponse as ListAttachmentsResponse, type index_d$5_ListAttachmentsResponseNonNullableFields as ListAttachmentsResponseNonNullableFields, type index_d$5_MediaFileUploadedEvent as MediaFileUploadedEvent, type MessageEnvelope$5 as MessageEnvelope, type Paging$4 as Paging, type PagingMetadata$3 as PagingMetadata, type RestoreInfo$4 as RestoreInfo, WebhookIdentityType$5 as WebhookIdentityType, index_d$5_deleteAttachment as deleteAttachment, index_d$5_generateAttachmentUploadUrl as generateAttachmentUploadUrl, index_d$5_getAttachment as getAttachment, index_d$5_listAttachments as listAttachments };
|
|
979
904
|
}
|
|
980
905
|
|
|
981
906
|
interface Contact {
|
|
@@ -3940,14 +3865,14 @@ interface ContactLabel {
|
|
|
3940
3865
|
/**
|
|
3941
3866
|
* Label namespace.
|
|
3942
3867
|
*
|
|
3943
|
-
* Labels created by
|
|
3868
|
+
* Labels created by calling the Find Or Create Label method
|
|
3944
3869
|
* are automatically assigned to the `custom` namespace.
|
|
3945
3870
|
* @readonly
|
|
3946
3871
|
*/
|
|
3947
3872
|
namespace?: string | null;
|
|
3948
3873
|
/**
|
|
3949
3874
|
* Display name for the namespace,
|
|
3950
|
-
* used to organize the list of labels in the site
|
|
3875
|
+
* used to organize the list of labels in the site dashboard.
|
|
3951
3876
|
* @readonly
|
|
3952
3877
|
*/
|
|
3953
3878
|
namespaceDisplayName?: string | null;
|
|
@@ -3955,18 +3880,14 @@ interface ContactLabel {
|
|
|
3955
3880
|
* Label key.
|
|
3956
3881
|
*
|
|
3957
3882
|
* `key` is generated when the label is created.
|
|
3958
|
-
* It
|
|
3883
|
+
* It can't be modified, even if `displayName` is updated.
|
|
3959
3884
|
* @readonly
|
|
3960
3885
|
*/
|
|
3961
3886
|
key?: string;
|
|
3962
|
-
/** Label display name shown in the
|
|
3887
|
+
/** Label display name shown in the dashboard. */
|
|
3963
3888
|
displayName?: string;
|
|
3964
3889
|
/**
|
|
3965
|
-
* Label type.
|
|
3966
|
-
*
|
|
3967
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
3968
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
3969
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
3890
|
+
* Label type indicating how the label was created.
|
|
3970
3891
|
* @readonly
|
|
3971
3892
|
*/
|
|
3972
3893
|
labelType?: LabelType;
|
|
@@ -3982,11 +3903,11 @@ interface ContactLabel {
|
|
|
3982
3903
|
_updatedDate?: Date | null;
|
|
3983
3904
|
}
|
|
3984
3905
|
declare enum LabelType {
|
|
3985
|
-
/** Default system label for the
|
|
3906
|
+
/** Default system label for the contact list. */
|
|
3986
3907
|
SYSTEM = "SYSTEM",
|
|
3987
|
-
/** Label created by
|
|
3908
|
+
/** Label created by calling the Find Or Create Label method. */
|
|
3988
3909
|
USER_DEFINED = "USER_DEFINED",
|
|
3989
|
-
/** Label created by
|
|
3910
|
+
/** Label created by an app built by Wix. */
|
|
3990
3911
|
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
3991
3912
|
}
|
|
3992
3913
|
/** Label filter options. */
|
|
@@ -4001,7 +3922,6 @@ interface ListLabelsRequest {
|
|
|
4001
3922
|
sort?: Sorting$1;
|
|
4002
3923
|
/** Paging options. */
|
|
4003
3924
|
paging?: Paging$1;
|
|
4004
|
-
/** Language for localization. */
|
|
4005
3925
|
language?: string | null;
|
|
4006
3926
|
}
|
|
4007
3927
|
interface Sorting$1 {
|
|
@@ -4062,7 +3982,10 @@ interface FindOrCreateLabelRequest {
|
|
|
4062
3982
|
* If not, a new label is created and returned.
|
|
4063
3983
|
*/
|
|
4064
3984
|
displayName: string;
|
|
4065
|
-
/**
|
|
3985
|
+
/**
|
|
3986
|
+
* Language for localization.
|
|
3987
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
3988
|
+
*/
|
|
4066
3989
|
language?: string | null;
|
|
4067
3990
|
}
|
|
4068
3991
|
/** Label that was found or created. */
|
|
@@ -4072,8 +3995,7 @@ interface FindOrCreateLabelResponse {
|
|
|
4072
3995
|
/**
|
|
4073
3996
|
* Indicates whether the label was just created or already existed.
|
|
4074
3997
|
*
|
|
4075
|
-
*
|
|
4076
|
-
* If it already existed, returns `false`.
|
|
3998
|
+
* Returns `true` if the label was just created.
|
|
4077
3999
|
*/
|
|
4078
4000
|
newLabel?: boolean;
|
|
4079
4001
|
}
|
|
@@ -4108,10 +4030,13 @@ interface GetLabelRequest {
|
|
|
4108
4030
|
* Label key.
|
|
4109
4031
|
*
|
|
4110
4032
|
* `key` is generated when the label is created.
|
|
4111
|
-
* It
|
|
4033
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4112
4034
|
*/
|
|
4113
4035
|
key: string;
|
|
4114
|
-
/**
|
|
4036
|
+
/**
|
|
4037
|
+
* Language for localization.
|
|
4038
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4039
|
+
*/
|
|
4115
4040
|
language?: string | null;
|
|
4116
4041
|
}
|
|
4117
4042
|
/** The specified label. */
|
|
@@ -4130,14 +4055,17 @@ interface GetLabelByLegacyIdResponse {
|
|
|
4130
4055
|
label?: ContactLabel;
|
|
4131
4056
|
}
|
|
4132
4057
|
interface UpdateLabelRequest {
|
|
4133
|
-
/** Label
|
|
4058
|
+
/** Label to rename. */
|
|
4134
4059
|
label?: ContactLabel;
|
|
4135
|
-
/**
|
|
4060
|
+
/**
|
|
4061
|
+
* Language for localization.
|
|
4062
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4063
|
+
*/
|
|
4136
4064
|
language?: string | null;
|
|
4137
4065
|
}
|
|
4138
4066
|
/** Updated label. */
|
|
4139
4067
|
interface UpdateLabelResponse {
|
|
4140
|
-
/**
|
|
4068
|
+
/** Renamed label. */
|
|
4141
4069
|
label?: ContactLabel;
|
|
4142
4070
|
}
|
|
4143
4071
|
interface DeleteLabelRequest {
|
|
@@ -4167,7 +4095,10 @@ interface GdprListResponse {
|
|
|
4167
4095
|
interface QueryLabelsRequest {
|
|
4168
4096
|
/** Query options. */
|
|
4169
4097
|
query?: Query;
|
|
4170
|
-
/**
|
|
4098
|
+
/**
|
|
4099
|
+
* Language for localization.
|
|
4100
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4101
|
+
*/
|
|
4171
4102
|
language?: string | null;
|
|
4172
4103
|
}
|
|
4173
4104
|
interface Query {
|
|
@@ -4389,18 +4320,14 @@ interface LabelUpdatedEnvelope {
|
|
|
4389
4320
|
interface FindOrCreateLabelOptions {
|
|
4390
4321
|
/**
|
|
4391
4322
|
* Language for localization.
|
|
4392
|
-
*
|
|
4393
|
-
* 2-letter language code in
|
|
4394
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4323
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4395
4324
|
*/
|
|
4396
4325
|
language?: string | null;
|
|
4397
4326
|
}
|
|
4398
4327
|
interface GetLabelOptions {
|
|
4399
4328
|
/**
|
|
4400
4329
|
* Language for localization.
|
|
4401
|
-
*
|
|
4402
|
-
* 2-letter language code in
|
|
4403
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4330
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4404
4331
|
*/
|
|
4405
4332
|
language?: string | null;
|
|
4406
4333
|
}
|
|
@@ -4408,25 +4335,21 @@ interface RenameLabel {
|
|
|
4408
4335
|
/**
|
|
4409
4336
|
* Label namespace.
|
|
4410
4337
|
*
|
|
4411
|
-
* Labels created by
|
|
4338
|
+
* Labels created by calling the Find Or Create Label method
|
|
4412
4339
|
* are automatically assigned to the `custom` namespace.
|
|
4413
4340
|
* @readonly
|
|
4414
4341
|
*/
|
|
4415
4342
|
namespace?: string | null;
|
|
4416
4343
|
/**
|
|
4417
4344
|
* Display name for the namespace,
|
|
4418
|
-
* used to organize the list of labels in the site
|
|
4345
|
+
* used to organize the list of labels in the site dashboard.
|
|
4419
4346
|
* @readonly
|
|
4420
4347
|
*/
|
|
4421
4348
|
namespaceDisplayName?: string | null;
|
|
4422
|
-
/** Label display name shown in the
|
|
4349
|
+
/** Label display name shown in the dashboard. */
|
|
4423
4350
|
displayName?: string;
|
|
4424
4351
|
/**
|
|
4425
|
-
* Label type.
|
|
4426
|
-
*
|
|
4427
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
4428
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
4429
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
4352
|
+
* Label type indicating how the label was created.
|
|
4430
4353
|
* @readonly
|
|
4431
4354
|
*/
|
|
4432
4355
|
labelType?: LabelType;
|
|
@@ -4444,9 +4367,7 @@ interface RenameLabel {
|
|
|
4444
4367
|
interface RenameLabelOptions {
|
|
4445
4368
|
/**
|
|
4446
4369
|
* Language for localization.
|
|
4447
|
-
*
|
|
4448
|
-
* 2-letter language code in
|
|
4449
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4370
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4450
4371
|
*/
|
|
4451
4372
|
language?: string | null;
|
|
4452
4373
|
}
|
|
@@ -4535,15 +4456,18 @@ interface LabelsQueryBuilder {
|
|
|
4535
4456
|
declare function findOrCreateLabel$1(httpClient: HttpClient): FindOrCreateLabelSignature;
|
|
4536
4457
|
interface FindOrCreateLabelSignature {
|
|
4537
4458
|
/**
|
|
4538
|
-
* Retrieves a label with a
|
|
4539
|
-
*
|
|
4540
|
-
* The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
|
|
4541
|
-
*
|
|
4542
|
-
* Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
|
|
4459
|
+
* Retrieves a label with a specified name, or creates one if it doesn't exist.
|
|
4543
4460
|
*
|
|
4544
|
-
*
|
|
4461
|
+
* Successful calls to this method always return a label,
|
|
4462
|
+
* which can be specified in subsequent calls.
|
|
4545
4463
|
*
|
|
4464
|
+
* For example, in the Contacts API, Label Contact and Unlabel Contact
|
|
4465
|
+
* calls will fail if you include a non-existant label.
|
|
4466
|
+
* To ensure successful calls, you can call this method first,
|
|
4467
|
+
* and then use the response in the Label Contact and Unlabel Contact calls.
|
|
4546
4468
|
*
|
|
4469
|
+
* To find an existing label without potentially creating a new one, call
|
|
4470
|
+
* Get Label or Query Labels.
|
|
4547
4471
|
* @param - Display name to retrieve or create.
|
|
4548
4472
|
*
|
|
4549
4473
|
* If an existing label is an exact match
|
|
@@ -4559,12 +4483,10 @@ declare function getLabel$1(httpClient: HttpClient): GetLabelSignature;
|
|
|
4559
4483
|
interface GetLabelSignature {
|
|
4560
4484
|
/**
|
|
4561
4485
|
* Retrieves a label by the specified label key.
|
|
4562
|
-
*
|
|
4563
|
-
* The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.
|
|
4564
4486
|
* @param - Label key.
|
|
4565
4487
|
*
|
|
4566
4488
|
* `key` is generated when the label is created.
|
|
4567
|
-
* It
|
|
4489
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4568
4490
|
* @param - Language options.
|
|
4569
4491
|
* @returns The specified label.
|
|
4570
4492
|
*/
|
|
@@ -4574,27 +4496,20 @@ declare function renameLabel$1(httpClient: HttpClient): RenameLabelSignature;
|
|
|
4574
4496
|
interface RenameLabelSignature {
|
|
4575
4497
|
/**
|
|
4576
4498
|
* Renames a label.
|
|
4577
|
-
*
|
|
4578
|
-
* The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
|
|
4579
|
-
*
|
|
4580
4499
|
* @param - Label key.
|
|
4581
4500
|
*
|
|
4582
4501
|
* `key` is generated when the label is created.
|
|
4583
|
-
* It
|
|
4502
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4584
4503
|
* @param - Language options.
|
|
4585
4504
|
* @param - Label to rename.
|
|
4586
|
-
* @returns
|
|
4505
|
+
* @returns Renamed label.
|
|
4587
4506
|
*/
|
|
4588
4507
|
(key: string, label: RenameLabel, options?: RenameLabelOptions | undefined): Promise<ContactLabel & ContactLabelNonNullableFields>;
|
|
4589
4508
|
}
|
|
4590
4509
|
declare function deleteLabel$1(httpClient: HttpClient): DeleteLabelSignature;
|
|
4591
4510
|
interface DeleteLabelSignature {
|
|
4592
4511
|
/**
|
|
4593
|
-
* Deletes
|
|
4594
|
-
*
|
|
4595
|
-
* The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
|
|
4596
|
-
*
|
|
4597
|
-
*
|
|
4512
|
+
* Deletes the specified label from a site and removes it from the contacts it applies to.
|
|
4598
4513
|
* @param - Label key to delete.
|
|
4599
4514
|
*/
|
|
4600
4515
|
(key: string): Promise<void>;
|
|
@@ -4604,18 +4519,18 @@ interface QueryLabelsSignature {
|
|
|
4604
4519
|
/**
|
|
4605
4520
|
* Creates a query to retrieve a list of labels.
|
|
4606
4521
|
*
|
|
4607
|
-
* The `queryLabels()`
|
|
4522
|
+
* The `queryLabels()` method builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
|
|
4608
4523
|
*
|
|
4609
|
-
* The returned object contains the query definition, which is used to
|
|
4524
|
+
* The returned object contains the query definition, which is used to call the query using the `find()` method.
|
|
4610
4525
|
*
|
|
4611
|
-
* You can refine the query by chaining `LabelsQueryBuilder`
|
|
4526
|
+
* You can refine the query by chaining `LabelsQueryBuilder` methods onto the query. `LabelsQueryBuilder` methods enable you to filter, sort, and control the response that `queryLabels()` returns.
|
|
4612
4527
|
*
|
|
4613
|
-
* `queryLabels()`
|
|
4528
|
+
* `queryLabels()` is called with the following `LabelsQueryBuilder` defaults, which you can override:
|
|
4614
4529
|
* - `skip(0)`
|
|
4615
4530
|
* - `limit(50)`
|
|
4616
4531
|
* - `descending('_createdDate')`
|
|
4617
4532
|
*
|
|
4618
|
-
* The following `LabelsQueryBuilder`
|
|
4533
|
+
* The following `LabelsQueryBuilder` methods are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the `items` field in `LabelsQueryResult`.
|
|
4619
4534
|
*
|
|
4620
4535
|
*
|
|
4621
4536
|
* @param - Language options.
|
|
@@ -2582,14 +2582,14 @@ interface ContactLabel$1 {
|
|
|
2582
2582
|
/**
|
|
2583
2583
|
* Label namespace.
|
|
2584
2584
|
*
|
|
2585
|
-
* Labels created by
|
|
2585
|
+
* Labels created by calling the Find Or Create Label method
|
|
2586
2586
|
* are automatically assigned to the `custom` namespace.
|
|
2587
2587
|
* @readonly
|
|
2588
2588
|
*/
|
|
2589
2589
|
namespace?: string | null;
|
|
2590
2590
|
/**
|
|
2591
2591
|
* Display name for the namespace,
|
|
2592
|
-
* used to organize the list of labels in the site
|
|
2592
|
+
* used to organize the list of labels in the site dashboard.
|
|
2593
2593
|
* @readonly
|
|
2594
2594
|
*/
|
|
2595
2595
|
namespaceDisplayName?: string | null;
|
|
@@ -2597,11 +2597,11 @@ interface ContactLabel$1 {
|
|
|
2597
2597
|
* Label key.
|
|
2598
2598
|
*
|
|
2599
2599
|
* `key` is generated when the label is created.
|
|
2600
|
-
* It
|
|
2600
|
+
* It can't be modified, even if `displayName` is updated.
|
|
2601
2601
|
* @readonly
|
|
2602
2602
|
*/
|
|
2603
2603
|
key?: string;
|
|
2604
|
-
/** Label display name shown in the
|
|
2604
|
+
/** Label display name shown in the dashboard. */
|
|
2605
2605
|
displayName?: string;
|
|
2606
2606
|
/**
|
|
2607
2607
|
* Label type indicating how the label was created.
|
|
@@ -2620,11 +2620,11 @@ interface ContactLabel$1 {
|
|
|
2620
2620
|
updatedDate?: Date | null;
|
|
2621
2621
|
}
|
|
2622
2622
|
declare enum LabelType$1 {
|
|
2623
|
-
/** Default system label for the
|
|
2623
|
+
/** Default system label for the contact list. */
|
|
2624
2624
|
SYSTEM = "SYSTEM",
|
|
2625
|
-
/** Label created by
|
|
2625
|
+
/** Label created by calling the Find Or Create Label method. */
|
|
2626
2626
|
USER_DEFINED = "USER_DEFINED",
|
|
2627
|
-
/** Label created by
|
|
2627
|
+
/** Label created by an app built by Wix. */
|
|
2628
2628
|
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
2629
2629
|
}
|
|
2630
2630
|
interface Sorting$3 {
|
|
@@ -2678,7 +2678,10 @@ interface FindOrCreateLabelRequest$1 {
|
|
|
2678
2678
|
* If not, a new label is created and returned.
|
|
2679
2679
|
*/
|
|
2680
2680
|
displayName: string;
|
|
2681
|
-
/**
|
|
2681
|
+
/**
|
|
2682
|
+
* Language for localization.
|
|
2683
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2684
|
+
*/
|
|
2682
2685
|
language?: string | null;
|
|
2683
2686
|
}
|
|
2684
2687
|
/** Label that was found or created. */
|
|
@@ -2688,8 +2691,7 @@ interface FindOrCreateLabelResponse$1 {
|
|
|
2688
2691
|
/**
|
|
2689
2692
|
* Indicates whether the label was just created or already existed.
|
|
2690
2693
|
*
|
|
2691
|
-
*
|
|
2692
|
-
* If it already existed, returns `false`.
|
|
2694
|
+
* Returns `true` if the label was just created.
|
|
2693
2695
|
*/
|
|
2694
2696
|
newLabel?: boolean;
|
|
2695
2697
|
}
|
|
@@ -2698,10 +2700,13 @@ interface GetLabelRequest$1 {
|
|
|
2698
2700
|
* Label key.
|
|
2699
2701
|
*
|
|
2700
2702
|
* `key` is generated when the label is created.
|
|
2701
|
-
* It
|
|
2703
|
+
* It can't be modified, even if `displayName` is updated.
|
|
2702
2704
|
*/
|
|
2703
2705
|
key: string;
|
|
2704
|
-
/**
|
|
2706
|
+
/**
|
|
2707
|
+
* Language for localization.
|
|
2708
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2709
|
+
*/
|
|
2705
2710
|
language?: string | null;
|
|
2706
2711
|
}
|
|
2707
2712
|
/** The specified label. */
|
|
@@ -2710,14 +2715,17 @@ interface GetLabelResponse$1 {
|
|
|
2710
2715
|
label?: ContactLabel$1;
|
|
2711
2716
|
}
|
|
2712
2717
|
interface UpdateLabelRequest$1 {
|
|
2713
|
-
/** Label
|
|
2718
|
+
/** Label to rename. */
|
|
2714
2719
|
label?: ContactLabel$1;
|
|
2715
|
-
/**
|
|
2720
|
+
/**
|
|
2721
|
+
* Language for localization.
|
|
2722
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2723
|
+
*/
|
|
2716
2724
|
language?: string | null;
|
|
2717
2725
|
}
|
|
2718
2726
|
/** Updated label. */
|
|
2719
2727
|
interface UpdateLabelResponse$1 {
|
|
2720
|
-
/**
|
|
2728
|
+
/** Renamed label. */
|
|
2721
2729
|
label?: ContactLabel$1;
|
|
2722
2730
|
}
|
|
2723
2731
|
interface DeleteLabelRequest$1 {
|
|
@@ -2729,7 +2737,10 @@ interface DeleteLabelResponse$1 {
|
|
|
2729
2737
|
interface QueryLabelsRequest$1 {
|
|
2730
2738
|
/** Query options. */
|
|
2731
2739
|
query?: Query$1;
|
|
2732
|
-
/**
|
|
2740
|
+
/**
|
|
2741
|
+
* Language for localization.
|
|
2742
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2743
|
+
*/
|
|
2733
2744
|
language?: string | null;
|
|
2734
2745
|
}
|
|
2735
2746
|
interface Query$1 {
|
|
@@ -2787,14 +2798,14 @@ interface ContactLabel {
|
|
|
2787
2798
|
/**
|
|
2788
2799
|
* Label namespace.
|
|
2789
2800
|
*
|
|
2790
|
-
* Labels created by
|
|
2801
|
+
* Labels created by calling the Find Or Create Label method
|
|
2791
2802
|
* are automatically assigned to the `custom` namespace.
|
|
2792
2803
|
* @readonly
|
|
2793
2804
|
*/
|
|
2794
2805
|
namespace?: string | null;
|
|
2795
2806
|
/**
|
|
2796
2807
|
* Display name for the namespace,
|
|
2797
|
-
* used to organize the list of labels in the site
|
|
2808
|
+
* used to organize the list of labels in the site dashboard.
|
|
2798
2809
|
* @readonly
|
|
2799
2810
|
*/
|
|
2800
2811
|
namespaceDisplayName?: string | null;
|
|
@@ -2802,18 +2813,14 @@ interface ContactLabel {
|
|
|
2802
2813
|
* Label key.
|
|
2803
2814
|
*
|
|
2804
2815
|
* `key` is generated when the label is created.
|
|
2805
|
-
* It
|
|
2816
|
+
* It can't be modified, even if `displayName` is updated.
|
|
2806
2817
|
* @readonly
|
|
2807
2818
|
*/
|
|
2808
2819
|
key?: string;
|
|
2809
|
-
/** Label display name shown in the
|
|
2820
|
+
/** Label display name shown in the dashboard. */
|
|
2810
2821
|
displayName?: string;
|
|
2811
2822
|
/**
|
|
2812
|
-
* Label type.
|
|
2813
|
-
*
|
|
2814
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
2815
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
2816
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
2823
|
+
* Label type indicating how the label was created.
|
|
2817
2824
|
* @readonly
|
|
2818
2825
|
*/
|
|
2819
2826
|
labelType?: LabelType;
|
|
@@ -2829,11 +2836,11 @@ interface ContactLabel {
|
|
|
2829
2836
|
_updatedDate?: Date | null;
|
|
2830
2837
|
}
|
|
2831
2838
|
declare enum LabelType {
|
|
2832
|
-
/** Default system label for the
|
|
2839
|
+
/** Default system label for the contact list. */
|
|
2833
2840
|
SYSTEM = "SYSTEM",
|
|
2834
|
-
/** Label created by
|
|
2841
|
+
/** Label created by calling the Find Or Create Label method. */
|
|
2835
2842
|
USER_DEFINED = "USER_DEFINED",
|
|
2836
|
-
/** Label created by
|
|
2843
|
+
/** Label created by an app built by Wix. */
|
|
2837
2844
|
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
2838
2845
|
}
|
|
2839
2846
|
interface Sorting$2 {
|
|
@@ -2887,7 +2894,10 @@ interface FindOrCreateLabelRequest {
|
|
|
2887
2894
|
* If not, a new label is created and returned.
|
|
2888
2895
|
*/
|
|
2889
2896
|
displayName: string;
|
|
2890
|
-
/**
|
|
2897
|
+
/**
|
|
2898
|
+
* Language for localization.
|
|
2899
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2900
|
+
*/
|
|
2891
2901
|
language?: string | null;
|
|
2892
2902
|
}
|
|
2893
2903
|
/** Label that was found or created. */
|
|
@@ -2897,8 +2907,7 @@ interface FindOrCreateLabelResponse {
|
|
|
2897
2907
|
/**
|
|
2898
2908
|
* Indicates whether the label was just created or already existed.
|
|
2899
2909
|
*
|
|
2900
|
-
*
|
|
2901
|
-
* If it already existed, returns `false`.
|
|
2910
|
+
* Returns `true` if the label was just created.
|
|
2902
2911
|
*/
|
|
2903
2912
|
newLabel?: boolean;
|
|
2904
2913
|
}
|
|
@@ -2907,10 +2916,13 @@ interface GetLabelRequest {
|
|
|
2907
2916
|
* Label key.
|
|
2908
2917
|
*
|
|
2909
2918
|
* `key` is generated when the label is created.
|
|
2910
|
-
* It
|
|
2919
|
+
* It can't be modified, even if `displayName` is updated.
|
|
2911
2920
|
*/
|
|
2912
2921
|
key: string;
|
|
2913
|
-
/**
|
|
2922
|
+
/**
|
|
2923
|
+
* Language for localization.
|
|
2924
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2925
|
+
*/
|
|
2914
2926
|
language?: string | null;
|
|
2915
2927
|
}
|
|
2916
2928
|
/** The specified label. */
|
|
@@ -2919,14 +2931,17 @@ interface GetLabelResponse {
|
|
|
2919
2931
|
label?: ContactLabel;
|
|
2920
2932
|
}
|
|
2921
2933
|
interface UpdateLabelRequest {
|
|
2922
|
-
/** Label
|
|
2934
|
+
/** Label to rename. */
|
|
2923
2935
|
label?: ContactLabel;
|
|
2924
|
-
/**
|
|
2936
|
+
/**
|
|
2937
|
+
* Language for localization.
|
|
2938
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2939
|
+
*/
|
|
2925
2940
|
language?: string | null;
|
|
2926
2941
|
}
|
|
2927
2942
|
/** Updated label. */
|
|
2928
2943
|
interface UpdateLabelResponse {
|
|
2929
|
-
/**
|
|
2944
|
+
/** Renamed label. */
|
|
2930
2945
|
label?: ContactLabel;
|
|
2931
2946
|
}
|
|
2932
2947
|
interface DeleteLabelRequest {
|
|
@@ -2938,7 +2953,10 @@ interface DeleteLabelResponse {
|
|
|
2938
2953
|
interface QueryLabelsRequest {
|
|
2939
2954
|
/** Query options. */
|
|
2940
2955
|
query?: Query;
|
|
2941
|
-
/**
|
|
2956
|
+
/**
|
|
2957
|
+
* Language for localization.
|
|
2958
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
2959
|
+
*/
|
|
2942
2960
|
language?: string | null;
|
|
2943
2961
|
}
|
|
2944
2962
|
interface Query {
|