@wix/crm 1.0.26 → 1.0.28

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.
Files changed (27) hide show
  1. package/build/cjs/src/contacts-v4-extended-field.http.d.ts +41 -12
  2. package/build/cjs/src/contacts-v4-extended-field.http.js +41 -12
  3. package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -1
  4. package/build/cjs/src/contacts-v4-extended-field.types.d.ts +1 -1
  5. package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +73 -65
  6. package/build/cjs/src/contacts-v4-extended-field.universal.js +44 -24
  7. package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -1
  8. package/build/cjs/src/contacts-v4-label.universal.d.ts +4 -24
  9. package/build/cjs/src/contacts-v4-label.universal.js +0 -4
  10. package/build/cjs/src/contacts-v4-label.universal.js.map +1 -1
  11. package/build/cjs/src/crm-tasks-v1-task.universal.d.ts +33 -32
  12. package/build/cjs/src/crm-tasks-v1-task.universal.js +5 -4
  13. package/build/cjs/src/crm-tasks-v1-task.universal.js.map +1 -1
  14. package/build/es/src/contacts-v4-extended-field.http.d.ts +41 -12
  15. package/build/es/src/contacts-v4-extended-field.http.js +41 -12
  16. package/build/es/src/contacts-v4-extended-field.http.js.map +1 -1
  17. package/build/es/src/contacts-v4-extended-field.types.d.ts +1 -1
  18. package/build/es/src/contacts-v4-extended-field.universal.d.ts +73 -65
  19. package/build/es/src/contacts-v4-extended-field.universal.js +44 -24
  20. package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -1
  21. package/build/es/src/contacts-v4-label.universal.d.ts +4 -24
  22. package/build/es/src/contacts-v4-label.universal.js +0 -4
  23. package/build/es/src/contacts-v4-label.universal.js.map +1 -1
  24. package/build/es/src/crm-tasks-v1-task.universal.d.ts +33 -32
  25. package/build/es/src/crm-tasks-v1-task.universal.js +5 -4
  26. package/build/es/src/crm-tasks-v1-task.universal.js.map +1 -1
  27. package/package.json +2 -2
@@ -3,29 +3,58 @@ import { DeleteExtendedFieldRequest, DeleteExtendedFieldResponse, FindOrCreateEx
3
3
  /**
4
4
  * Retrieves a custom field with a given name, or creates one if it doesn't exist.
5
5
  *
6
- * Successful calls to this endpoint always return a field,
7
- * which can be passed to subsequent requests.
6
+ * The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
7
+ *
8
+ * Successful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.
9
+ *
10
+ * To find an existing extended field without potentially creating a new one, use [`getExtendedField()`](#getextendedfield) or [`queryExtendedFields()`](#queryextendedfields).
11
+ *
12
+ * >**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.
8
13
  *
9
- * To find an existing custom field without potentially creating a new one, use
10
- * [Get Extended Field](https:dev.wix.com/api/rest/contacts/extended-fields/get-extended-field) or
11
- * [List Extended Fields](https:dev.wix.com/api/rest/contacts/extended-fields/list-extended-fields).
12
14
  */
13
15
  export declare function findOrCreateExtendedField(payload: FindOrCreateExtendedFieldRequest): RequestOptionsFactory<FindOrCreateExtendedFieldResponse>;
14
- /** Retrieves an extended field. */
16
+ /**
17
+ * Retrieves an extended field.
18
+ *
19
+ * The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
20
+ *
21
+ * >**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields.
22
+ */
15
23
  export declare function getExtendedField(payload: GetExtendedFieldRequest): RequestOptionsFactory<GetExtendedFieldResponse>;
16
- /** Updates an extended field's specified properties. */
24
+ /**
25
+ * Renames an extended field.
26
+ *
27
+ * The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed
28
+ *
29
+ * > **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields.
30
+ */
17
31
  export declare function updateExtendedField(payload: UpdateExtendedFieldRequest): RequestOptionsFactory<UpdateExtendedFieldResponse>;
18
32
  /**
19
33
  * Deletes an extended field.
20
34
  *
21
- * When an extended field is deleted,
22
- * any contact data stored in the field is permanently deleted as well.
35
+ * The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.
36
+ *
37
+ * When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
38
+ *
39
+ * >**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields.
23
40
  */
24
41
  export declare function deleteExtendedField(payload: DeleteExtendedFieldRequest): RequestOptionsFactory<DeleteExtendedFieldResponse>;
25
42
  /**
26
- * Retrieves a list of extended fields.
43
+ * Creates a query to retrieve a list of extended fields.
44
+ *
45
+ * The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an [`ExtendedFieldsQueryBuilder`](#extendedfieldsquerybuilder) object.
46
+ *
47
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#extendedfieldsquerybuilder/find) function.
48
+ *
49
+ * You can refine the query by chaining `ExtendedFieldsQueryBuilder` functions onto the query. `ExtendedFieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
50
+ *
51
+ * `queryExtendedFields()` runs with these `ExtendedFieldsQueryBuilder` defaults, which you can override:
52
+ * - [`skip()`](#extendedfieldsquerybuilder/skip)
53
+ * - [`limit(50)`](#extendedfieldsquerybuilder/limit)
54
+ * - [`descending('_createdDate')`](#extendedfieldsquerybuilder/descending)
55
+ *
56
+ * > **Note:** Only visitors with **Manage Contacts** permissions can query extended fields.
27
57
  *
28
- * For a detailed list of supported operations, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter). To learn more about query language, see
29
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
58
+ * The following `ExtendedFieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the [`items`](#extendedfieldsqueryresult/items) property in [`ExtendedFieldsQueryResult`](#extendedfieldsqueryresult).
30
59
  */
31
60
  export declare function queryExtendedFields(payload: QueryExtendedFieldsRequest): RequestOptionsFactory<QueryExtendedFieldsResponse>;
@@ -68,12 +68,14 @@ function resolveComWixpressContactsFieldsV4ContactExtendedFieldsServiceV4Url(opt
68
68
  /**
69
69
  * Retrieves a custom field with a given name, or creates one if it doesn't exist.
70
70
  *
71
- * Successful calls to this endpoint always return a field,
72
- * which can be passed to subsequent requests.
71
+ * The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
72
+ *
73
+ * Successful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.
74
+ *
75
+ * To find an existing extended field without potentially creating a new one, use [`getExtendedField()`](#getextendedfield) or [`queryExtendedFields()`](#queryextendedfields).
76
+ *
77
+ * >**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.
73
78
  *
74
- * To find an existing custom field without potentially creating a new one, use
75
- * [Get Extended Field](https:dev.wix.com/api/rest/contacts/extended-fields/get-extended-field) or
76
- * [List Extended Fields](https:dev.wix.com/api/rest/contacts/extended-fields/list-extended-fields).
77
79
  */
78
80
  function findOrCreateExtendedField(payload) {
79
81
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_findOrCreateExtendedFieldRequest, {});
@@ -100,7 +102,13 @@ function findOrCreateExtendedField(payload) {
100
102
  return __findOrCreateExtendedField;
101
103
  }
102
104
  exports.findOrCreateExtendedField = findOrCreateExtendedField;
103
- /** Retrieves an extended field. */
105
+ /**
106
+ * Retrieves an extended field.
107
+ *
108
+ * The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
109
+ *
110
+ * >**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields.
111
+ */
104
112
  function getExtendedField(payload) {
105
113
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getExtendedFieldRequest, {});
106
114
  const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getExtendedFieldResponse, {
@@ -126,7 +134,13 @@ function getExtendedField(payload) {
126
134
  return __getExtendedField;
127
135
  }
128
136
  exports.getExtendedField = getExtendedField;
129
- /** Updates an extended field's specified properties. */
137
+ /**
138
+ * Renames an extended field.
139
+ *
140
+ * The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed
141
+ *
142
+ * > **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields.
143
+ */
130
144
  function updateExtendedField(payload) {
131
145
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateExtendedFieldRequest, { _extendedField });
132
146
  const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateExtendedFieldResponse, {
@@ -155,8 +169,11 @@ exports.updateExtendedField = updateExtendedField;
155
169
  /**
156
170
  * Deletes an extended field.
157
171
  *
158
- * When an extended field is deleted,
159
- * any contact data stored in the field is permanently deleted as well.
172
+ * The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.
173
+ *
174
+ * When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
175
+ *
176
+ * >**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields.
160
177
  */
161
178
  function deleteExtendedField(payload) {
162
179
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteExtendedFieldRequest, {});
@@ -182,10 +199,22 @@ function deleteExtendedField(payload) {
182
199
  }
183
200
  exports.deleteExtendedField = deleteExtendedField;
184
201
  /**
185
- * Retrieves a list of extended fields.
202
+ * Creates a query to retrieve a list of extended fields.
203
+ *
204
+ * The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an [`ExtendedFieldsQueryBuilder`](#extendedfieldsquerybuilder) object.
205
+ *
206
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#extendedfieldsquerybuilder/find) function.
207
+ *
208
+ * You can refine the query by chaining `ExtendedFieldsQueryBuilder` functions onto the query. `ExtendedFieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
209
+ *
210
+ * `queryExtendedFields()` runs with these `ExtendedFieldsQueryBuilder` defaults, which you can override:
211
+ * - [`skip()`](#extendedfieldsquerybuilder/skip)
212
+ * - [`limit(50)`](#extendedfieldsquerybuilder/limit)
213
+ * - [`descending('_createdDate')`](#extendedfieldsquerybuilder/descending)
214
+ *
215
+ * > **Note:** Only visitors with **Manage Contacts** permissions can query extended fields.
186
216
  *
187
- * For a detailed list of supported operations, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter). To learn more about query language, see
188
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
217
+ * The following `ExtendedFieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the [`items`](#extendedfieldsqueryresult/items) property in [`ExtendedFieldsQueryResult`](#extendedfieldsqueryresult).
189
218
  */
190
219
  function queryExtendedFields(payload) {
191
220
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryExtendedFieldsRequest, {});
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-extended-field.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-extended-field.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,2BAA2B,GAAG,EAAE,CAAC;AACvC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,MAAM,cAAc,GAAG;IACrB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAC7C,MAAM,kCAAkC,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;AACvE,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,yBAAyB,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;AAC9D,MAAM,2BAA2B,GAAG,EAAE,CAAC;AACvC,MAAM,4BAA4B,GAAG,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AAClE,MAAM,2BAA2B,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;AAChE,MAAM,4BAA4B,GAAG,EAAE,KAAK,EAAE,gBAA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,EAAE,GAAG,IAAA,uBAAU,EACrD,2BAA2B,EAC3B,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,4BAA4B,EAAE;QACrE,cAAc;KACf,CAAC,CAAC;IAEH,SAAS,qBAAqB,CAAC,EAAE,IAAI,EAAO;QAC1C,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,gCAAgC;YAC5C,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,oFAAoF;YACtF,GAAG,EAAE,mEAAmE,CAAC;gBACvE,SAAS,EAAE,2BAA2B;gBACtC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,qBAAqB,CAAC,OAAO,GAAG,OAAO,CAAC;IAExC,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAjCD,kDAiCC"}
@@ -165,7 +165,7 @@ export interface FindOrCreateExtendedFieldResponse {
165
165
  * Indicates whether the extended field was just created or already existed.
166
166
  *
167
167
  * If the field was just created, returns `true`.
168
- * If it already existed, returns `false`.
168
+ * If the field already existed, returns `false`.
169
169
  */
170
170
  newField?: boolean;
171
171
  }
@@ -20,7 +20,7 @@ export interface ExtendedField {
20
20
  * When accessing contact data,
21
21
  * extended field data is available at `extendedFields[key]`.
22
22
  * For example, if the key is "custom.notes",
23
- * the value can be accessed at `extendedFields["custom.notes"]`.
23
+ * the value can be accessed at `fields["custom.notes"]`.
24
24
  *
25
25
  * `key` is generated when the extended field is created
26
26
  * and cannot be modified, even if `displayName` changes.
@@ -32,18 +32,20 @@ export interface ExtendedField {
32
32
  /**
33
33
  * Type of data the field holds.
34
34
  *
35
- * - `TEXT`: Accepts strings.
36
- * - `NUMBER`: Accepts floats.
37
- * - `DATE`: Accepts dates formatted as `YYYY-MM-DD`.
38
- * - `URL`: Accepts strings. Prepends `https://` if no protocol is included.
35
+ * One of:
36
+ * - `"TEXT"`: Accepts strings.
37
+ * - `"NUMBER"`: Accepts floats.
38
+ * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
39
+ * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
39
40
  * @readonly
40
41
  */
41
42
  dataType?: FieldDataType;
42
43
  /**
43
44
  * Indicates whether the extended field is a system field or custom field.
44
45
  *
45
- * - `SYSTEM`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
46
- * - `USER_DEFINED`: The field is a custom field and can be modified by 3rd-party apps or site contributors.
46
+ * One of:
47
+ * - `"SYSTEM"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
48
+ * - `"USER_DEFINED"`: The field is a custom field and can be modified by 3rd-party apps or site contributors.
47
49
  * @readonly
48
50
  */
49
51
  fieldType?: FieldType;
@@ -154,12 +156,12 @@ export interface FindOrCreateExtendedFieldRequest {
154
156
  /**
155
157
  * Type of data the field holds.
156
158
  * Ignored if an existing field is an exact match
157
- * for the specified display name.
159
+ * for the specified display name. One of:
158
160
  *
159
- * - `TEXT`: Accepts strings.
160
- * - `NUMBER`: Accepts floats.
161
- * - `DATE`: Accepts dates formatted as `YYYY-MM-DD`.
162
- * - `URL`: Accepts strings. Prepends `https://` if no protocol is included.
161
+ * - `"TEXT"`: Accepts strings.
162
+ * - `"NUMBER"`: Accepts floats.
163
+ * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
164
+ * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
163
165
  */
164
166
  dataType?: FieldDataType;
165
167
  }
@@ -171,7 +173,7 @@ export interface FindOrCreateExtendedFieldResponse {
171
173
  * Indicates whether the extended field was just created or already existed.
172
174
  *
173
175
  * If the field was just created, returns `true`.
174
- * If it already existed, returns `false`.
176
+ * If the field already existed, returns `false`.
175
177
  */
176
178
  newField?: boolean;
177
179
  }
@@ -181,8 +183,8 @@ export interface GetExtendedFieldRequest {
181
183
  *
182
184
  * When accessing contact data,
183
185
  * extended field values are available at `info.extendedFields.items[key]`.
184
- * For example, if the key is "custom.patronus",
185
- * the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
186
+ * For example, if the key is "custom.notes",
187
+ * the value can be accessed at `fields["custom.notes"]`.
186
188
  *
187
189
  * Once set, `key` cannot be modified, even if `displayName` changes.
188
190
  */
@@ -264,24 +266,25 @@ export interface QueryExtendedFieldsResponse {
264
266
  /**
265
267
  * Retrieves a custom field with a given name, or creates one if it doesn't exist.
266
268
  *
267
- * Successful calls to this endpoint always return a field,
268
- * which can be passed to subsequent requests.
269
+ * The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
270
+ *
271
+ * Successful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.
272
+ *
273
+ * To find an existing extended field without potentially creating a new one, use [`getExtendedField()`](#getextendedfield) or [`queryExtendedFields()`](#queryextendedfields).
274
+ *
275
+ * >**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.
269
276
  *
270
- * To find an existing custom field without potentially creating a new one, use
271
- * [Get Extended Field](https:dev.wix.com/api/rest/contacts/extended-fields/get-extended-field) or
272
- * [List Extended Fields](https:dev.wix.com/api/rest/contacts/extended-fields/list-extended-fields).
273
277
  *
274
278
  * This function is not a universal function and runs only on the backend.
275
279
  * @param dataType - Type of data the field holds.
276
280
  * Ignored if an existing field is an exact match
277
- * for the specified display name.
281
+ * for the specified display name. One of:
278
282
  *
279
- * - `TEXT`: Accepts strings.
280
- * - `NUMBER`: Accepts floats.
281
- * - `DATE`: Accepts dates formatted as `YYYY-MM-DD`.
282
- * - `URL`: Accepts strings. Prepends `https://` if no protocol is included.
283
+ * - `"TEXT"`: Accepts strings.
284
+ * - `"NUMBER"`: Accepts floats.
285
+ * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
286
+ * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
283
287
  * @public
284
- * @documentationMaturity preview
285
288
  * @requiredField dataType
286
289
  * @requiredField options
287
290
  * @requiredField options.displayName
@@ -304,17 +307,20 @@ export interface FindOrCreateExtendedFieldOptions {
304
307
  /**
305
308
  * Retrieves an extended field.
306
309
  *
310
+ * The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
311
+ *
312
+ * >**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields.
313
+ *
307
314
  * This function is not a universal function and runs only on the backend.
308
315
  * @param key - Extended field key.
309
316
  *
310
317
  * When accessing contact data,
311
318
  * extended field values are available at `info.extendedFields.items[key]`.
312
- * For example, if the key is "custom.patronus",
313
- * the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
319
+ * For example, if the key is "custom.notes",
320
+ * the value can be accessed at `fields["custom.notes"]`.
314
321
  *
315
322
  * Once set, `key` cannot be modified, even if `displayName` changes.
316
323
  * @public
317
- * @documentationMaturity preview
318
324
  * @requiredField key
319
325
  * @permissionScope Manage Contact Extended Fields
320
326
  * @applicableIdentity APP
@@ -322,7 +328,11 @@ export interface FindOrCreateExtendedFieldOptions {
322
328
  */
323
329
  export declare function getExtendedField(key: string): Promise<ExtendedField>;
324
330
  /**
325
- * Updates an extended field's specified properties.
331
+ * Renames an extended field.
332
+ *
333
+ * The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed
334
+ *
335
+ * > **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields.
326
336
  *
327
337
  * This function is not a universal function and runs only on the backend.
328
338
  * @param key - Extended field key.
@@ -330,12 +340,11 @@ export declare function getExtendedField(key: string): Promise<ExtendedField>;
330
340
  * When accessing contact data,
331
341
  * extended field data is available at `extendedFields[key]`.
332
342
  * For example, if the key is "custom.notes",
333
- * the value can be accessed at `extendedFields["custom.notes"]`.
343
+ * the value can be accessed at `fields["custom.notes"]`.
334
344
  *
335
345
  * `key` is generated when the extended field is created
336
346
  * and cannot be modified, even if `displayName` changes.
337
347
  * @public
338
- * @documentationMaturity preview
339
348
  * @requiredField field
340
349
  * @requiredField field.displayName
341
350
  * @requiredField key
@@ -358,18 +367,20 @@ export interface RenameExtendedField {
358
367
  /**
359
368
  * Type of data the field holds.
360
369
  *
361
- * - `TEXT`: Accepts strings.
362
- * - `NUMBER`: Accepts floats.
363
- * - `DATE`: Accepts dates formatted as `YYYY-MM-DD`.
364
- * - `URL`: Accepts strings. Prepends `https://` if no protocol is included.
370
+ * One of:
371
+ * - `"TEXT"`: Accepts strings.
372
+ * - `"NUMBER"`: Accepts floats.
373
+ * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
374
+ * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
365
375
  * @readonly
366
376
  */
367
377
  dataType?: FieldDataType;
368
378
  /**
369
379
  * Indicates whether the extended field is a system field or custom field.
370
380
  *
371
- * - `SYSTEM`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
372
- * - `USER_DEFINED`: The field is a custom field and can be modified by 3rd-party apps or site contributors.
381
+ * One of:
382
+ * - `"SYSTEM"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.
383
+ * - `"USER_DEFINED"`: The field is a custom field and can be modified by 3rd-party apps or site contributors.
373
384
  * @readonly
374
385
  */
375
386
  fieldType?: FieldType;
@@ -392,27 +403,40 @@ export interface RenameExtendedField {
392
403
  /**
393
404
  * Deletes an extended field.
394
405
  *
395
- * When an extended field is deleted,
396
- * any contact data stored in the field is permanently deleted as well.
406
+ * The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.
407
+ *
408
+ * When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
409
+ *
410
+ * >**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields.
397
411
  *
398
412
  * This function is not a universal function and runs only on the backend.
399
413
  * @param key - Extended field key.
400
414
  * @public
401
- * @documentationMaturity preview
402
415
  * @requiredField key
403
416
  * @permissionScope Manage Contact Extended Fields
404
417
  * @applicableIdentity APP
405
418
  */
406
419
  export declare function deleteExtendedField(key: string): Promise<void>;
407
420
  /**
408
- * Retrieves a list of extended fields.
421
+ * Creates a query to retrieve a list of extended fields.
422
+ *
423
+ * The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an [`ExtendedFieldsQueryBuilder`](#extendedfieldsquerybuilder) object.
424
+ *
425
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#extendedfieldsquerybuilder/find) function.
426
+ *
427
+ * You can refine the query by chaining `ExtendedFieldsQueryBuilder` functions onto the query. `ExtendedFieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
428
+ *
429
+ * `queryExtendedFields()` runs with these `ExtendedFieldsQueryBuilder` defaults, which you can override:
430
+ * - [`skip()`](#extendedfieldsquerybuilder/skip)
431
+ * - [`limit(50)`](#extendedfieldsquerybuilder/limit)
432
+ * - [`descending('_createdDate')`](#extendedfieldsquerybuilder/descending)
409
433
  *
410
- * For a detailed list of supported operations, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter). To learn more about query language, see
411
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
434
+ * > **Note:** Only visitors with **Manage Contacts** permissions can query extended fields.
435
+ *
436
+ * The following `ExtendedFieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the [`items`](#extendedfieldsqueryresult/items) property in [`ExtendedFieldsQueryResult`](#extendedfieldsqueryresult).
412
437
  *
413
438
  * This function is not a universal function and runs only on the backend.
414
439
  * @public
415
- * @documentationMaturity preview
416
440
  * @permissionScope Manage Contact Extended Fields
417
441
  * @applicableIdentity APP
418
442
  */
@@ -435,53 +459,37 @@ export interface FieldsQueryResult extends QueryOffsetResult {
435
459
  export interface FieldsQueryBuilder {
436
460
  /** @param propertyName - Property whose value is compared with `value`.
437
461
  * @param value - Value to compare against.
438
- * @documentationMaturity preview
439
462
  */
440
463
  eq: (propertyName: 'namespace' | 'key' | 'displayName' | 'dataType' | 'fieldType' | '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
441
464
  /** @param propertyName - Property whose value is compared with `value`.
442
465
  * @param value - Value to compare against.
443
- * @documentationMaturity preview
444
466
  */
445
467
  ne: (propertyName: 'namespace' | 'key' | 'displayName' | 'dataType' | '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
446
468
  /** @param propertyName - Property whose value is compared with `value`.
447
469
  * @param value - Value to compare against.
448
- * @documentationMaturity preview
449
470
  */
450
471
  gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
451
472
  /** @param propertyName - Property whose value is compared with `value`.
452
473
  * @param value - Value to compare against.
453
- * @documentationMaturity preview
454
474
  */
455
475
  le: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
456
476
  /** @param propertyName - Property whose value is compared with `value`.
457
477
  * @param value - Value to compare against.
458
- * @documentationMaturity preview
459
478
  */
460
479
  lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => FieldsQueryBuilder;
461
480
  /** @param propertyName - Property whose value is compared with `string`.
462
481
  * @param string - String to compare against. Case-insensitive.
463
- * @documentationMaturity preview
464
482
  */
465
483
  startsWith: (propertyName: 'displayName', value: string) => FieldsQueryBuilder;
466
- /** @documentationMaturity preview */
467
484
  in: (propertyName: 'key' | 'displayName', value: any) => FieldsQueryBuilder;
468
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
469
- * @documentationMaturity preview
470
- */
485
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
471
486
  ascending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => FieldsQueryBuilder;
472
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
473
- * @documentationMaturity preview
474
- */
487
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
475
488
  descending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => FieldsQueryBuilder;
476
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
477
- * @documentationMaturity preview
478
- */
489
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
479
490
  limit: (limit: number) => FieldsQueryBuilder;
480
- /** @param skip - Number of items to skip in the query results before returning the results.
481
- * @documentationMaturity preview
482
- */
491
+ /** @param skip - Number of items to skip in the query results before returning the results. */
483
492
  skip: (skip: number) => FieldsQueryBuilder;
484
- /** @documentationMaturity preview */
485
493
  find: () => Promise<FieldsQueryResult>;
486
494
  }
487
495
  export {};
@@ -80,24 +80,25 @@ const _updateExtendedFieldResponse = {};
80
80
  /**
81
81
  * Retrieves a custom field with a given name, or creates one if it doesn't exist.
82
82
  *
83
- * Successful calls to this endpoint always return a field,
84
- * which can be passed to subsequent requests.
83
+ * The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.
84
+ *
85
+ * Successful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.
86
+ *
87
+ * To find an existing extended field without potentially creating a new one, use [`getExtendedField()`](#getextendedfield) or [`queryExtendedFields()`](#queryextendedfields).
88
+ *
89
+ * >**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.
85
90
  *
86
- * To find an existing custom field without potentially creating a new one, use
87
- * [Get Extended Field](https:dev.wix.com/api/rest/contacts/extended-fields/get-extended-field) or
88
- * [List Extended Fields](https:dev.wix.com/api/rest/contacts/extended-fields/list-extended-fields).
89
91
  *
90
92
  * This function is not a universal function and runs only on the backend.
91
93
  * @param dataType - Type of data the field holds.
92
94
  * Ignored if an existing field is an exact match
93
- * for the specified display name.
95
+ * for the specified display name. One of:
94
96
  *
95
- * - `TEXT`: Accepts strings.
96
- * - `NUMBER`: Accepts floats.
97
- * - `DATE`: Accepts dates formatted as `YYYY-MM-DD`.
98
- * - `URL`: Accepts strings. Prepends `https://` if no protocol is included.
97
+ * - `"TEXT"`: Accepts strings.
98
+ * - `"NUMBER"`: Accepts floats.
99
+ * - `"DATE"`: Accepts dates formatted as `YYYY-MM-DD`.
100
+ * - `"URL"`: Accepts strings. Prepends `https://` if no protocol is included.
99
101
  * @public
100
- * @documentationMaturity preview
101
102
  * @requiredField dataType
102
103
  * @requiredField options
103
104
  * @requiredField options.displayName
@@ -156,17 +157,20 @@ exports.findOrCreateExtendedField = findOrCreateExtendedField;
156
157
  /**
157
158
  * Retrieves an extended field.
158
159
  *
160
+ * The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.
161
+ *
162
+ * >**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields.
163
+ *
159
164
  * This function is not a universal function and runs only on the backend.
160
165
  * @param key - Extended field key.
161
166
  *
162
167
  * When accessing contact data,
163
168
  * extended field values are available at `info.extendedFields.items[key]`.
164
- * For example, if the key is "custom.patronus",
165
- * the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
169
+ * For example, if the key is "custom.notes",
170
+ * the value can be accessed at `fields["custom.notes"]`.
166
171
  *
167
172
  * Once set, `key` cannot be modified, even if `displayName` changes.
168
173
  * @public
169
- * @documentationMaturity preview
170
174
  * @requiredField key
171
175
  * @permissionScope Manage Contact Extended Fields
172
176
  * @applicableIdentity APP
@@ -217,7 +221,11 @@ function getExtendedField(key) {
217
221
  }
218
222
  exports.getExtendedField = getExtendedField;
219
223
  /**
220
- * Updates an extended field's specified properties.
224
+ * Renames an extended field.
225
+ *
226
+ * The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed
227
+ *
228
+ * > **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields.
221
229
  *
222
230
  * This function is not a universal function and runs only on the backend.
223
231
  * @param key - Extended field key.
@@ -225,12 +233,11 @@ exports.getExtendedField = getExtendedField;
225
233
  * When accessing contact data,
226
234
  * extended field data is available at `extendedFields[key]`.
227
235
  * For example, if the key is "custom.notes",
228
- * the value can be accessed at `extendedFields["custom.notes"]`.
236
+ * the value can be accessed at `fields["custom.notes"]`.
229
237
  *
230
238
  * `key` is generated when the extended field is created
231
239
  * and cannot be modified, even if `displayName` changes.
232
240
  * @public
233
- * @documentationMaturity preview
234
241
  * @requiredField field
235
242
  * @requiredField field.displayName
236
243
  * @requiredField key
@@ -286,13 +293,15 @@ exports.renameExtendedField = renameExtendedField;
286
293
  /**
287
294
  * Deletes an extended field.
288
295
  *
289
- * When an extended field is deleted,
290
- * any contact data stored in the field is permanently deleted as well.
296
+ * The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.
297
+ *
298
+ * When an extended field is deleted, any contact data stored in the field is permanently deleted as well.
299
+ *
300
+ * >**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields.
291
301
  *
292
302
  * This function is not a universal function and runs only on the backend.
293
303
  * @param key - Extended field key.
294
304
  * @public
295
- * @documentationMaturity preview
296
305
  * @requiredField key
297
306
  * @permissionScope Manage Contact Extended Fields
298
307
  * @applicableIdentity APP
@@ -342,14 +351,25 @@ function deleteExtendedField(key) {
342
351
  }
343
352
  exports.deleteExtendedField = deleteExtendedField;
344
353
  /**
345
- * Retrieves a list of extended fields.
354
+ * Creates a query to retrieve a list of extended fields.
355
+ *
356
+ * The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an [`ExtendedFieldsQueryBuilder`](#extendedfieldsquerybuilder) object.
357
+ *
358
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#extendedfieldsquerybuilder/find) function.
359
+ *
360
+ * You can refine the query by chaining `ExtendedFieldsQueryBuilder` functions onto the query. `ExtendedFieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns.
361
+ *
362
+ * `queryExtendedFields()` runs with these `ExtendedFieldsQueryBuilder` defaults, which you can override:
363
+ * - [`skip()`](#extendedfieldsquerybuilder/skip)
364
+ * - [`limit(50)`](#extendedfieldsquerybuilder/limit)
365
+ * - [`descending('_createdDate')`](#extendedfieldsquerybuilder/descending)
366
+ *
367
+ * > **Note:** Only visitors with **Manage Contacts** permissions can query extended fields.
346
368
  *
347
- * For a detailed list of supported operations, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter). To learn more about query language, see
348
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
369
+ * The following `ExtendedFieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the [`items`](#extendedfieldsqueryresult/items) property in [`ExtendedFieldsQueryResult`](#extendedfieldsqueryresult).
349
370
  *
350
371
  * This function is not a universal function and runs only on the backend.
351
372
  * @public
352
- * @documentationMaturity preview
353
373
  * @permissionScope Manage Contact Extended Fields
354
374
  * @applicableIdentity APP
355
375
  */