@wix/crm 1.0.165 → 1.0.167
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 +94 -156
- package/type-bundles/index.bundle.d.ts +94 -156
- package/type-bundles/meta.bundle.d.ts +85 -87
|
@@ -3239,7 +3239,7 @@ interface ExtendedField {
|
|
|
3239
3239
|
/**
|
|
3240
3240
|
* Extended field namespace.
|
|
3241
3241
|
*
|
|
3242
|
-
* Extended fields created by
|
|
3242
|
+
* Extended fields created through by calling the Find Or Create Extended Field method
|
|
3243
3243
|
* are automatically assigned to the `custom` namespace.
|
|
3244
3244
|
* @readonly
|
|
3245
3245
|
*/
|
|
@@ -3248,34 +3248,24 @@ interface ExtendedField {
|
|
|
3248
3248
|
* Extended field key.
|
|
3249
3249
|
*
|
|
3250
3250
|
* When accessing contact data,
|
|
3251
|
-
* extended field data is available at `
|
|
3251
|
+
* extended field data is available at `extendedFields[key]`.
|
|
3252
3252
|
* For example, if the key is "custom.notes",
|
|
3253
|
-
* the value can be accessed at `
|
|
3253
|
+
* the value can be accessed at `extendedFields["custom.notes"]`.
|
|
3254
3254
|
*
|
|
3255
3255
|
* `key` is generated when the extended field is created
|
|
3256
|
-
* and
|
|
3256
|
+
* and can't be modified, even if `displayName` changes.
|
|
3257
3257
|
* @readonly
|
|
3258
3258
|
*/
|
|
3259
3259
|
key?: string;
|
|
3260
|
-
/** Display name shown in the
|
|
3260
|
+
/** Display name shown in the contact list. */
|
|
3261
3261
|
displayName?: string;
|
|
3262
3262
|
/**
|
|
3263
3263
|
* Type of data the field holds.
|
|
3264
|
-
*
|
|
3265
|
-
* One of:
|
|
3266
|
-
* - `"TEXT"`: Accepts strings.
|
|
3267
|
-
* - `"NUMBER"`: Accepts floats.
|
|
3268
|
-
* - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
|
|
3269
|
-
* - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
|
|
3270
3264
|
* @readonly
|
|
3271
3265
|
*/
|
|
3272
3266
|
dataType?: FieldDataType;
|
|
3273
3267
|
/**
|
|
3274
3268
|
* Indicates whether the extended field is a system field or custom field.
|
|
3275
|
-
*
|
|
3276
|
-
* One of:
|
|
3277
|
-
* - `"SYSTEM"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
|
|
3278
|
-
* - `"USER_DEFINED"`: Custom field that can be modified by 3rd-party apps or site admins.
|
|
3279
3269
|
* @readonly
|
|
3280
3270
|
*/
|
|
3281
3271
|
fieldType?: FieldType;
|
|
@@ -3306,9 +3296,9 @@ declare enum FieldDataType {
|
|
|
3306
3296
|
URL = "URL"
|
|
3307
3297
|
}
|
|
3308
3298
|
declare enum FieldType {
|
|
3309
|
-
/**
|
|
3299
|
+
/** Field is a system field managed by Wix. System fields can't be modified by calling the Update Extended Field method. */
|
|
3310
3300
|
SYSTEM = "SYSTEM",
|
|
3311
|
-
/**
|
|
3301
|
+
/** Field is a custom field and can be modified by calling the Update Extended Field method. */
|
|
3312
3302
|
USER_DEFINED = "USER_DEFINED"
|
|
3313
3303
|
}
|
|
3314
3304
|
/** Extended field filter options. */
|
|
@@ -3317,7 +3307,7 @@ interface ListExtendedFieldsRequest {
|
|
|
3317
3307
|
fieldType?: FieldType;
|
|
3318
3308
|
/**
|
|
3319
3309
|
* Filter for fields in the specified namespace.
|
|
3320
|
-
* Fields created by
|
|
3310
|
+
* Fields created by calling the Find Or Create Extended Field method
|
|
3321
3311
|
* are automatically assigned to the `custom` namespace.
|
|
3322
3312
|
*/
|
|
3323
3313
|
namespace?: string | null;
|
|
@@ -3381,10 +3371,10 @@ interface PagingMetadata$1 {
|
|
|
3381
3371
|
/** Custom field to find or create. */
|
|
3382
3372
|
interface FindOrCreateExtendedFieldRequest {
|
|
3383
3373
|
/**
|
|
3384
|
-
* Display name to
|
|
3374
|
+
* Display name to retrieve or create.
|
|
3385
3375
|
*
|
|
3386
3376
|
* If an existing custom field is an exact match
|
|
3387
|
-
* for the specified
|
|
3377
|
+
* for the specified display name,
|
|
3388
3378
|
* the existing field is returned.
|
|
3389
3379
|
* If not, a new field is created and returned.
|
|
3390
3380
|
*/
|
|
@@ -3392,12 +3382,7 @@ interface FindOrCreateExtendedFieldRequest {
|
|
|
3392
3382
|
/**
|
|
3393
3383
|
* Type of data the field holds.
|
|
3394
3384
|
* Ignored if an existing field is an exact match
|
|
3395
|
-
* for the specified display name.
|
|
3396
|
-
*
|
|
3397
|
-
* - `"TEXT"`: Accepts strings.
|
|
3398
|
-
* - `"NUMBER"`: Accepts floats.
|
|
3399
|
-
* - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
|
|
3400
|
-
* - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
|
|
3385
|
+
* for the specified display name.
|
|
3401
3386
|
*/
|
|
3402
3387
|
dataType?: FieldDataType;
|
|
3403
3388
|
}
|
|
@@ -3408,8 +3393,7 @@ interface FindOrCreateExtendedFieldResponse {
|
|
|
3408
3393
|
/**
|
|
3409
3394
|
* Indicates whether the extended field was just created or already existed.
|
|
3410
3395
|
*
|
|
3411
|
-
*
|
|
3412
|
-
* If the field already existed, returns `false`.
|
|
3396
|
+
* Returns `true` if the field was just created.
|
|
3413
3397
|
*/
|
|
3414
3398
|
newField?: boolean;
|
|
3415
3399
|
}
|
|
@@ -3418,11 +3402,12 @@ interface GetExtendedFieldRequest {
|
|
|
3418
3402
|
* Extended field key.
|
|
3419
3403
|
*
|
|
3420
3404
|
* When accessing contact data,
|
|
3421
|
-
* extended field values are available at `
|
|
3422
|
-
* For example, if the key is "custom.
|
|
3423
|
-
* the value can be accessed at `
|
|
3405
|
+
* extended field values are available at `info.extendedFields.items[key]`.
|
|
3406
|
+
* For example, if the key is "custom.patronus",
|
|
3407
|
+
* the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
|
|
3424
3408
|
*
|
|
3425
|
-
*
|
|
3409
|
+
* `key` is generated when the extended field is created.
|
|
3410
|
+
* It can't be modified, even if `displayName` is updated.
|
|
3426
3411
|
*/
|
|
3427
3412
|
key: string;
|
|
3428
3413
|
}
|
|
@@ -3440,12 +3425,12 @@ interface GetExtendedFieldByLegacyIdResponse {
|
|
|
3440
3425
|
field?: ExtendedField;
|
|
3441
3426
|
}
|
|
3442
3427
|
interface UpdateExtendedFieldRequest {
|
|
3443
|
-
/**
|
|
3428
|
+
/** Extended field to rename. */
|
|
3444
3429
|
field?: ExtendedField;
|
|
3445
3430
|
}
|
|
3446
3431
|
/** Updated extended field. */
|
|
3447
3432
|
interface UpdateExtendedFieldResponse {
|
|
3448
|
-
/**
|
|
3433
|
+
/** Renamed extended field. */
|
|
3449
3434
|
field?: ExtendedField;
|
|
3450
3435
|
}
|
|
3451
3436
|
interface DeleteExtendedFieldRequest {
|
|
@@ -3695,30 +3680,20 @@ interface RenameExtendedField {
|
|
|
3695
3680
|
/**
|
|
3696
3681
|
* Extended field namespace.
|
|
3697
3682
|
*
|
|
3698
|
-
* Extended fields created by
|
|
3683
|
+
* Extended fields created through by calling the Find Or Create Extended Field method
|
|
3699
3684
|
* are automatically assigned to the `custom` namespace.
|
|
3700
3685
|
* @readonly
|
|
3701
3686
|
*/
|
|
3702
3687
|
namespace?: string | null;
|
|
3703
|
-
/** Display name shown in the
|
|
3688
|
+
/** Display name shown in the contact list. */
|
|
3704
3689
|
displayName?: string;
|
|
3705
3690
|
/**
|
|
3706
3691
|
* Type of data the field holds.
|
|
3707
|
-
*
|
|
3708
|
-
* One of:
|
|
3709
|
-
* - `"TEXT"`: Accepts strings.
|
|
3710
|
-
* - `"NUMBER"`: Accepts floats.
|
|
3711
|
-
* - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
|
|
3712
|
-
* - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
|
|
3713
3692
|
* @readonly
|
|
3714
3693
|
*/
|
|
3715
3694
|
dataType?: FieldDataType;
|
|
3716
3695
|
/**
|
|
3717
3696
|
* Indicates whether the extended field is a system field or custom field.
|
|
3718
|
-
*
|
|
3719
|
-
* One of:
|
|
3720
|
-
* - `"SYSTEM"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
|
|
3721
|
-
* - `"USER_DEFINED"`: Custom field that can be modified by 3rd-party apps or site admins.
|
|
3722
3697
|
* @readonly
|
|
3723
3698
|
*/
|
|
3724
3699
|
fieldType?: FieldType;
|
|
@@ -3814,28 +3789,23 @@ interface FieldsQueryBuilder {
|
|
|
3814
3789
|
declare function findOrCreateExtendedField$1(httpClient: HttpClient): FindOrCreateExtendedFieldSignature;
|
|
3815
3790
|
interface FindOrCreateExtendedFieldSignature {
|
|
3816
3791
|
/**
|
|
3817
|
-
* Retrieves a custom field with a
|
|
3818
|
-
*
|
|
3819
|
-
* The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
|
|
3792
|
+
* Retrieves a custom field with a specified name, or creates one if it doesn't exist.
|
|
3793
|
+
* The number of custom fields is limited to 100.
|
|
3820
3794
|
*
|
|
3821
|
-
* Successful calls to
|
|
3795
|
+
* Successful calls to this method always return a field,
|
|
3796
|
+
* which can be specified in subsequent calls.
|
|
3822
3797
|
*
|
|
3823
|
-
* To find an existing
|
|
3824
|
-
*
|
|
3825
|
-
* @param - Display name to
|
|
3798
|
+
* To find an existing custom field without potentially creating a new one, call Get Extended Field or
|
|
3799
|
+
* Query Extended Fields.
|
|
3800
|
+
* @param - Display name to retrieve or create.
|
|
3826
3801
|
*
|
|
3827
3802
|
* If an existing custom field is an exact match
|
|
3828
|
-
* for the specified
|
|
3803
|
+
* for the specified display name,
|
|
3829
3804
|
* the existing field is returned.
|
|
3830
3805
|
* If not, a new field is created and returned.
|
|
3831
3806
|
* @param - Type of data the field holds.
|
|
3832
3807
|
* Ignored if an existing field is an exact match
|
|
3833
|
-
* for the specified display name.
|
|
3834
|
-
*
|
|
3835
|
-
* - `"TEXT"`: Accepts strings.
|
|
3836
|
-
* - `"NUMBER"`: Accepts floats.
|
|
3837
|
-
* - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
|
|
3838
|
-
* - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
|
|
3808
|
+
* for the specified display name.
|
|
3839
3809
|
* @returns Extended field that was found or created.
|
|
3840
3810
|
*/
|
|
3841
3811
|
(displayName: string, dataType: FieldDataType): Promise<FindOrCreateExtendedFieldResponse & FindOrCreateExtendedFieldResponseNonNullableFields>;
|
|
@@ -3843,18 +3813,8 @@ interface FindOrCreateExtendedFieldSignature {
|
|
|
3843
3813
|
declare function getExtendedField$1(httpClient: HttpClient): GetExtendedFieldSignature;
|
|
3844
3814
|
interface GetExtendedFieldSignature {
|
|
3845
3815
|
/**
|
|
3846
|
-
* Retrieves an extended field.
|
|
3847
|
-
*
|
|
3848
|
-
* The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
|
|
3849
|
-
*
|
|
3850
|
-
* @param - Extended field key.
|
|
3851
|
-
*
|
|
3852
|
-
* When accessing contact data,
|
|
3853
|
-
* extended field values are available at `fields[key]`.
|
|
3854
|
-
* For example, if the key is "custom.notes",
|
|
3855
|
-
* the value can be accessed at `fields["custom.notes"]`.
|
|
3856
|
-
*
|
|
3857
|
-
* Once set, `key` cannot be modified, even if `displayName` changes.
|
|
3816
|
+
* Retrieves an extended field by the specified extended field key.
|
|
3817
|
+
* @param - null
|
|
3858
3818
|
* @returns The specified field.
|
|
3859
3819
|
*/
|
|
3860
3820
|
(key: string): Promise<ExtendedField & ExtendedFieldNonNullableFields>;
|
|
@@ -3863,19 +3823,9 @@ declare function renameExtendedField$1(httpClient: HttpClient): RenameExtendedFi
|
|
|
3863
3823
|
interface RenameExtendedFieldSignature {
|
|
3864
3824
|
/**
|
|
3865
3825
|
* Renames an extended field.
|
|
3866
|
-
*
|
|
3867
|
-
*
|
|
3868
|
-
*
|
|
3869
|
-
* @param - Extended field key.
|
|
3870
|
-
*
|
|
3871
|
-
* When accessing contact data,
|
|
3872
|
-
* extended field values are available at `fields[key]`.
|
|
3873
|
-
* For example, if the key is "custom.notes",
|
|
3874
|
-
* the value can be accessed at `fields["custom.notes"]`.
|
|
3875
|
-
*
|
|
3876
|
-
* Once set, `key` cannot be modified, even if `displayName` changes.
|
|
3877
|
-
* @param - Extended field to rename.
|
|
3878
|
-
* @returns Updated extended field.
|
|
3826
|
+
* @param - null
|
|
3827
|
+
* @param - null
|
|
3828
|
+
* @returns Renamed extended field.
|
|
3879
3829
|
*/
|
|
3880
3830
|
(key: string, field: RenameExtendedField): Promise<ExtendedField & ExtendedFieldNonNullableFields>;
|
|
3881
3831
|
}
|
|
@@ -3884,10 +3834,8 @@ interface DeleteExtendedFieldSignature {
|
|
|
3884
3834
|
/**
|
|
3885
3835
|
* Deletes an extended field.
|
|
3886
3836
|
*
|
|
3887
|
-
*
|
|
3888
|
-
*
|
|
3889
|
-
* When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
|
|
3890
|
-
*
|
|
3837
|
+
* When an extended field is deleted,
|
|
3838
|
+
* any contact data stored in the field is also permanently deleted.
|
|
3891
3839
|
* @param - Extended field key.
|
|
3892
3840
|
*/
|
|
3893
3841
|
(key: string): Promise<void>;
|
|
@@ -3897,18 +3845,18 @@ interface QueryExtendedFieldsSignature {
|
|
|
3897
3845
|
/**
|
|
3898
3846
|
* Creates a query to retrieve a list of extended fields.
|
|
3899
3847
|
*
|
|
3900
|
-
* The `queryExtendedFields()`
|
|
3848
|
+
* The `queryExtendedFields()` method builds a query to retrieve a list of extended fields and returns an `FieldsQueryBuilder` object.
|
|
3901
3849
|
*
|
|
3902
|
-
* The returned object contains the query definition, which is used to run the query using the `find()`
|
|
3850
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
3903
3851
|
*
|
|
3904
|
-
* You can refine the query by chaining `FieldsQueryBuilder`
|
|
3852
|
+
* You can refine the query by chaining `FieldsQueryBuilder` methods onto the query. `FieldsQueryBuilder` methods enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
|
|
3905
3853
|
*
|
|
3906
3854
|
* `queryExtendedFields()` runs with these `FieldsQueryBuilder` defaults, which you can override:
|
|
3907
3855
|
* - `skip()`
|
|
3908
3856
|
* - `limit(50)`
|
|
3909
3857
|
* - `descending('_createdDate')`
|
|
3910
3858
|
*
|
|
3911
|
-
* The following `FieldsQueryBuilder`
|
|
3859
|
+
* The following `FieldsQueryBuilder` methods are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the `items` property in `FieldsQueryResult`.
|
|
3912
3860
|
*/
|
|
3913
3861
|
(): FieldsQueryBuilder;
|
|
3914
3862
|
}
|
|
@@ -3992,14 +3940,14 @@ interface ContactLabel {
|
|
|
3992
3940
|
/**
|
|
3993
3941
|
* Label namespace.
|
|
3994
3942
|
*
|
|
3995
|
-
* Labels created by
|
|
3943
|
+
* Labels created by calling the Find Or Create Label method
|
|
3996
3944
|
* are automatically assigned to the `custom` namespace.
|
|
3997
3945
|
* @readonly
|
|
3998
3946
|
*/
|
|
3999
3947
|
namespace?: string | null;
|
|
4000
3948
|
/**
|
|
4001
3949
|
* Display name for the namespace,
|
|
4002
|
-
* used to organize the list of labels in the site
|
|
3950
|
+
* used to organize the list of labels in the site dashboard.
|
|
4003
3951
|
* @readonly
|
|
4004
3952
|
*/
|
|
4005
3953
|
namespaceDisplayName?: string | null;
|
|
@@ -4007,18 +3955,14 @@ interface ContactLabel {
|
|
|
4007
3955
|
* Label key.
|
|
4008
3956
|
*
|
|
4009
3957
|
* `key` is generated when the label is created.
|
|
4010
|
-
* It
|
|
3958
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4011
3959
|
* @readonly
|
|
4012
3960
|
*/
|
|
4013
3961
|
key?: string;
|
|
4014
|
-
/** Label display name shown in the
|
|
3962
|
+
/** Label display name shown in the dashboard. */
|
|
4015
3963
|
displayName?: string;
|
|
4016
3964
|
/**
|
|
4017
|
-
* Label type.
|
|
4018
|
-
*
|
|
4019
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
4020
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
4021
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
3965
|
+
* Label type indicating how the label was created.
|
|
4022
3966
|
* @readonly
|
|
4023
3967
|
*/
|
|
4024
3968
|
labelType?: LabelType;
|
|
@@ -4034,11 +3978,11 @@ interface ContactLabel {
|
|
|
4034
3978
|
_updatedDate?: Date | null;
|
|
4035
3979
|
}
|
|
4036
3980
|
declare enum LabelType {
|
|
4037
|
-
/** Default system label for the
|
|
3981
|
+
/** Default system label for the contact list. */
|
|
4038
3982
|
SYSTEM = "SYSTEM",
|
|
4039
|
-
/** Label created by
|
|
3983
|
+
/** Label created by calling the Find Or Create Label method. */
|
|
4040
3984
|
USER_DEFINED = "USER_DEFINED",
|
|
4041
|
-
/** Label created by
|
|
3985
|
+
/** Label created by an app built by Wix. */
|
|
4042
3986
|
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
4043
3987
|
}
|
|
4044
3988
|
/** Label filter options. */
|
|
@@ -4053,7 +3997,6 @@ interface ListLabelsRequest {
|
|
|
4053
3997
|
sort?: Sorting$1;
|
|
4054
3998
|
/** Paging options. */
|
|
4055
3999
|
paging?: Paging$1;
|
|
4056
|
-
/** Language for localization. */
|
|
4057
4000
|
language?: string | null;
|
|
4058
4001
|
}
|
|
4059
4002
|
interface Sorting$1 {
|
|
@@ -4114,7 +4057,10 @@ interface FindOrCreateLabelRequest {
|
|
|
4114
4057
|
* If not, a new label is created and returned.
|
|
4115
4058
|
*/
|
|
4116
4059
|
displayName: string;
|
|
4117
|
-
/**
|
|
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
|
+
*/
|
|
4118
4064
|
language?: string | null;
|
|
4119
4065
|
}
|
|
4120
4066
|
/** Label that was found or created. */
|
|
@@ -4124,8 +4070,7 @@ interface FindOrCreateLabelResponse {
|
|
|
4124
4070
|
/**
|
|
4125
4071
|
* Indicates whether the label was just created or already existed.
|
|
4126
4072
|
*
|
|
4127
|
-
*
|
|
4128
|
-
* If it already existed, returns `false`.
|
|
4073
|
+
* Returns `true` if the label was just created.
|
|
4129
4074
|
*/
|
|
4130
4075
|
newLabel?: boolean;
|
|
4131
4076
|
}
|
|
@@ -4160,10 +4105,13 @@ interface GetLabelRequest {
|
|
|
4160
4105
|
* Label key.
|
|
4161
4106
|
*
|
|
4162
4107
|
* `key` is generated when the label is created.
|
|
4163
|
-
* It
|
|
4108
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4164
4109
|
*/
|
|
4165
4110
|
key: string;
|
|
4166
|
-
/**
|
|
4111
|
+
/**
|
|
4112
|
+
* Language for localization.
|
|
4113
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4114
|
+
*/
|
|
4167
4115
|
language?: string | null;
|
|
4168
4116
|
}
|
|
4169
4117
|
/** The specified label. */
|
|
@@ -4182,14 +4130,17 @@ interface GetLabelByLegacyIdResponse {
|
|
|
4182
4130
|
label?: ContactLabel;
|
|
4183
4131
|
}
|
|
4184
4132
|
interface UpdateLabelRequest {
|
|
4185
|
-
/** Label
|
|
4133
|
+
/** Label to rename. */
|
|
4186
4134
|
label?: ContactLabel;
|
|
4187
|
-
/**
|
|
4135
|
+
/**
|
|
4136
|
+
* Language for localization.
|
|
4137
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4138
|
+
*/
|
|
4188
4139
|
language?: string | null;
|
|
4189
4140
|
}
|
|
4190
4141
|
/** Updated label. */
|
|
4191
4142
|
interface UpdateLabelResponse {
|
|
4192
|
-
/**
|
|
4143
|
+
/** Renamed label. */
|
|
4193
4144
|
label?: ContactLabel;
|
|
4194
4145
|
}
|
|
4195
4146
|
interface DeleteLabelRequest {
|
|
@@ -4219,7 +4170,10 @@ interface GdprListResponse {
|
|
|
4219
4170
|
interface QueryLabelsRequest {
|
|
4220
4171
|
/** Query options. */
|
|
4221
4172
|
query?: Query;
|
|
4222
|
-
/**
|
|
4173
|
+
/**
|
|
4174
|
+
* Language for localization.
|
|
4175
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4176
|
+
*/
|
|
4223
4177
|
language?: string | null;
|
|
4224
4178
|
}
|
|
4225
4179
|
interface Query {
|
|
@@ -4441,18 +4395,14 @@ interface LabelUpdatedEnvelope {
|
|
|
4441
4395
|
interface FindOrCreateLabelOptions {
|
|
4442
4396
|
/**
|
|
4443
4397
|
* Language for localization.
|
|
4444
|
-
*
|
|
4445
|
-
* 2-letter language code in
|
|
4446
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4398
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4447
4399
|
*/
|
|
4448
4400
|
language?: string | null;
|
|
4449
4401
|
}
|
|
4450
4402
|
interface GetLabelOptions {
|
|
4451
4403
|
/**
|
|
4452
4404
|
* Language for localization.
|
|
4453
|
-
*
|
|
4454
|
-
* 2-letter language code in
|
|
4455
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4405
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4456
4406
|
*/
|
|
4457
4407
|
language?: string | null;
|
|
4458
4408
|
}
|
|
@@ -4460,25 +4410,21 @@ interface RenameLabel {
|
|
|
4460
4410
|
/**
|
|
4461
4411
|
* Label namespace.
|
|
4462
4412
|
*
|
|
4463
|
-
* Labels created by
|
|
4413
|
+
* Labels created by calling the Find Or Create Label method
|
|
4464
4414
|
* are automatically assigned to the `custom` namespace.
|
|
4465
4415
|
* @readonly
|
|
4466
4416
|
*/
|
|
4467
4417
|
namespace?: string | null;
|
|
4468
4418
|
/**
|
|
4469
4419
|
* Display name for the namespace,
|
|
4470
|
-
* used to organize the list of labels in the site
|
|
4420
|
+
* used to organize the list of labels in the site dashboard.
|
|
4471
4421
|
* @readonly
|
|
4472
4422
|
*/
|
|
4473
4423
|
namespaceDisplayName?: string | null;
|
|
4474
|
-
/** Label display name shown in the
|
|
4424
|
+
/** Label display name shown in the dashboard. */
|
|
4475
4425
|
displayName?: string;
|
|
4476
4426
|
/**
|
|
4477
|
-
* Label type.
|
|
4478
|
-
*
|
|
4479
|
-
* - `"SYSTEM"`: The label is a default system label for the Contact List.
|
|
4480
|
-
* - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
|
|
4481
|
-
* - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
|
|
4427
|
+
* Label type indicating how the label was created.
|
|
4482
4428
|
* @readonly
|
|
4483
4429
|
*/
|
|
4484
4430
|
labelType?: LabelType;
|
|
@@ -4496,9 +4442,7 @@ interface RenameLabel {
|
|
|
4496
4442
|
interface RenameLabelOptions {
|
|
4497
4443
|
/**
|
|
4498
4444
|
* Language for localization.
|
|
4499
|
-
*
|
|
4500
|
-
* 2-letter language code in
|
|
4501
|
-
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
4445
|
+
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
|
|
4502
4446
|
*/
|
|
4503
4447
|
language?: string | null;
|
|
4504
4448
|
}
|
|
@@ -4587,15 +4531,18 @@ interface LabelsQueryBuilder {
|
|
|
4587
4531
|
declare function findOrCreateLabel$1(httpClient: HttpClient): FindOrCreateLabelSignature;
|
|
4588
4532
|
interface FindOrCreateLabelSignature {
|
|
4589
4533
|
/**
|
|
4590
|
-
* Retrieves a label with a
|
|
4534
|
+
* Retrieves a label with a specified name, or creates one if it doesn't exist.
|
|
4591
4535
|
*
|
|
4592
|
-
*
|
|
4593
|
-
*
|
|
4594
|
-
* Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
|
|
4595
|
-
*
|
|
4596
|
-
* To find an existing label without potentially creating a new one, use `getLabel()` or `queryLabels()`.
|
|
4536
|
+
* Successful calls to this method always return a label,
|
|
4537
|
+
* which can be specified in subsequent calls.
|
|
4597
4538
|
*
|
|
4539
|
+
* For example, in the Contacts API, Label Contact and Unlabel Contact
|
|
4540
|
+
* calls will fail if you include a non-existant label.
|
|
4541
|
+
* To ensure successful calls, you can call this method first,
|
|
4542
|
+
* and then use the response in the Label Contact and Unlabel Contact calls.
|
|
4598
4543
|
*
|
|
4544
|
+
* To find an existing label without potentially creating a new one, call
|
|
4545
|
+
* Get Label or Query Labels.
|
|
4599
4546
|
* @param - Display name to retrieve or create.
|
|
4600
4547
|
*
|
|
4601
4548
|
* If an existing label is an exact match
|
|
@@ -4611,12 +4558,10 @@ declare function getLabel$1(httpClient: HttpClient): GetLabelSignature;
|
|
|
4611
4558
|
interface GetLabelSignature {
|
|
4612
4559
|
/**
|
|
4613
4560
|
* Retrieves a label by the specified label key.
|
|
4614
|
-
*
|
|
4615
|
-
* The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.
|
|
4616
4561
|
* @param - Label key.
|
|
4617
4562
|
*
|
|
4618
4563
|
* `key` is generated when the label is created.
|
|
4619
|
-
* It
|
|
4564
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4620
4565
|
* @param - Language options.
|
|
4621
4566
|
* @returns The specified label.
|
|
4622
4567
|
*/
|
|
@@ -4626,27 +4571,20 @@ declare function renameLabel$1(httpClient: HttpClient): RenameLabelSignature;
|
|
|
4626
4571
|
interface RenameLabelSignature {
|
|
4627
4572
|
/**
|
|
4628
4573
|
* Renames a label.
|
|
4629
|
-
*
|
|
4630
|
-
* The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
|
|
4631
|
-
*
|
|
4632
4574
|
* @param - Label key.
|
|
4633
4575
|
*
|
|
4634
4576
|
* `key` is generated when the label is created.
|
|
4635
|
-
* It
|
|
4577
|
+
* It can't be modified, even if `displayName` is updated.
|
|
4636
4578
|
* @param - Language options.
|
|
4637
4579
|
* @param - Label to rename.
|
|
4638
|
-
* @returns
|
|
4580
|
+
* @returns Renamed label.
|
|
4639
4581
|
*/
|
|
4640
4582
|
(key: string, label: RenameLabel, options?: RenameLabelOptions | undefined): Promise<ContactLabel & ContactLabelNonNullableFields>;
|
|
4641
4583
|
}
|
|
4642
4584
|
declare function deleteLabel$1(httpClient: HttpClient): DeleteLabelSignature;
|
|
4643
4585
|
interface DeleteLabelSignature {
|
|
4644
4586
|
/**
|
|
4645
|
-
* Deletes
|
|
4646
|
-
*
|
|
4647
|
-
* The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
|
|
4648
|
-
*
|
|
4649
|
-
*
|
|
4587
|
+
* Deletes the specified label from a site and removes it from the contacts it applies to.
|
|
4650
4588
|
* @param - Label key to delete.
|
|
4651
4589
|
*/
|
|
4652
4590
|
(key: string): Promise<void>;
|
|
@@ -4656,18 +4594,18 @@ interface QueryLabelsSignature {
|
|
|
4656
4594
|
/**
|
|
4657
4595
|
* Creates a query to retrieve a list of labels.
|
|
4658
4596
|
*
|
|
4659
|
-
* The `queryLabels()`
|
|
4597
|
+
* The `queryLabels()` method builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
|
|
4660
4598
|
*
|
|
4661
|
-
* The returned object contains the query definition, which is used to
|
|
4599
|
+
* The returned object contains the query definition, which is used to call the query using the `find()` method.
|
|
4662
4600
|
*
|
|
4663
|
-
* You can refine the query by chaining `LabelsQueryBuilder`
|
|
4601
|
+
* 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.
|
|
4664
4602
|
*
|
|
4665
|
-
* `queryLabels()`
|
|
4603
|
+
* `queryLabels()` is called with the following `LabelsQueryBuilder` defaults, which you can override:
|
|
4666
4604
|
* - `skip(0)`
|
|
4667
4605
|
* - `limit(50)`
|
|
4668
4606
|
* - `descending('_createdDate')`
|
|
4669
4607
|
*
|
|
4670
|
-
* The following `LabelsQueryBuilder`
|
|
4608
|
+
* 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`.
|
|
4671
4609
|
*
|
|
4672
4610
|
*
|
|
4673
4611
|
* @param - Language options.
|