@wix/crm 1.0.20 → 1.0.21

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.
@@ -3,29 +3,47 @@ import { DeleteLabelRequest, DeleteLabelResponse, FindOrCreateLabelRequest, Find
3
3
  /**
4
4
  * Retrieves a label with a given name, or creates one if it doesn't exist.
5
5
  *
6
- * Successful calls to this endpoint always return a label,
7
- * which can be passed to subsequent requests.
8
- *
9
- * For example, in the Contacts API,
10
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
11
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
12
- * requests will fail if you include a nonexistant label.
13
- * To ensure successful calls, you can call this endpoint first,
14
- * and then use the response in the label and unlabel requests.
15
- *
16
- * To find an existing label without potentially creating a new one, use
17
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
18
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
6
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
7
+ *
8
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
9
+ *
10
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
11
+ *
12
+ * > **Note:**
13
+ * > Only visitors with **Manage Contacts** permissions can run this function.
14
+ *
19
15
  */
20
16
  export declare function findOrCreateLabel(payload: FindOrCreateLabelRequest): RequestOptionsFactory<FindOrCreateLabelResponse>;
21
17
  /** Updates a label's specified properties. */
22
18
  export declare function updateLabel(payload: UpdateLabelRequest): RequestOptionsFactory<UpdateLabelResponse>;
23
- /** Deletes a label from the site and removes it from contacts it applies to. */
19
+ /**
20
+ * Deletes a label from the site and removes it from contacts it applies to.
21
+ *
22
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
23
+ *
24
+ * > **Note:**
25
+ * > Only visitors with **Manage Contacts** permissions can run this function.
26
+ *
27
+ */
24
28
  export declare function deleteLabel(payload: DeleteLabelRequest): RequestOptionsFactory<DeleteLabelResponse>;
25
29
  /**
26
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
30
+ * Creates a query to retrieve a list of labels.
31
+ *
32
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
33
+ *
34
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
35
+ *
36
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
37
+ *
38
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
39
+ * - [`skip(0)`](#labelsquerybuilder/skip)
40
+ * - [`limit(50)`](#labelsquerybuilder/limit)
41
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
42
+ *
43
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
44
+ *
45
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
46
+ *
27
47
  *
28
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
29
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
30
48
  */
31
49
  export declare function queryLabels(payload: QueryLabelsRequest): RequestOptionsFactory<QueryLabelsResponse>;
@@ -66,19 +66,15 @@ function resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url(opts) {
66
66
  /**
67
67
  * Retrieves a label with a given name, or creates one if it doesn't exist.
68
68
  *
69
- * Successful calls to this endpoint always return a label,
70
- * which can be passed to subsequent requests.
71
- *
72
- * For example, in the Contacts API,
73
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
74
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
75
- * requests will fail if you include a nonexistant label.
76
- * To ensure successful calls, you can call this endpoint first,
77
- * and then use the response in the label and unlabel requests.
78
- *
79
- * To find an existing label without potentially creating a new one, use
80
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
81
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
69
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
70
+ *
71
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
72
+ *
73
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
74
+ *
75
+ * > **Note:**
76
+ * > Only visitors with **Manage Contacts** permissions can run this function.
77
+ *
82
78
  */
83
79
  function findOrCreateLabel(payload) {
84
80
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_findOrCreateLabelRequest, {});
@@ -133,7 +129,15 @@ function updateLabel(payload) {
133
129
  return __updateLabel;
134
130
  }
135
131
  exports.updateLabel = updateLabel;
136
- /** Deletes a label from the site and removes it from contacts it applies to. */
132
+ /**
133
+ * Deletes a label from the site and removes it from contacts it applies to.
134
+ *
135
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
136
+ *
137
+ * > **Note:**
138
+ * > Only visitors with **Manage Contacts** permissions can run this function.
139
+ *
140
+ */
137
141
  function deleteLabel(payload) {
138
142
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteLabelRequest, {});
139
143
  const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteLabelResponse, {});
@@ -158,10 +162,24 @@ function deleteLabel(payload) {
158
162
  }
159
163
  exports.deleteLabel = deleteLabel;
160
164
  /**
161
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
165
+ * Creates a query to retrieve a list of labels.
166
+ *
167
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
168
+ *
169
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
170
+ *
171
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
172
+ *
173
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
174
+ * - [`skip(0)`](#labelsquerybuilder/skip)
175
+ * - [`limit(50)`](#labelsquerybuilder/limit)
176
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
177
+ *
178
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
179
+ *
180
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
181
+ *
162
182
  *
163
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
164
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
165
183
  */
166
184
  function queryLabels(payload) {
167
185
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryLabelsRequest, {});
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAchD,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,0BAA0B,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AAC9D,MAAM,mBAAmB,GAAG,EAA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B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;IAEhC,OAAO,aAAa,CAAC;AACvB,CAAC;AAjCD,kCAiCC"}
@@ -1,11 +1,11 @@
1
1
  import { HttpClient } from '@wix/sdk-types';
2
- import { FindOrCreateLabelOptions, QueryLabelsOptions, RenameLabelOptions } from './contacts-v4-label.universal';
2
+ import { RenameLabel, FindOrCreateLabelOptions, QueryLabelsOptions, RenameLabelOptions } from './contacts-v4-label.universal';
3
3
  export declare const __metadata: {
4
4
  PACKAGE_NAME: string;
5
5
  };
6
6
  export declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").FindOrCreateLabelResponse>;
7
- export declare function renameLabel(httpClient: HttpClient): (key: string, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel>;
7
+ export declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel>;
8
8
  export declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
9
9
  export declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions | undefined) => import("./contacts-v4-label.universal").LabelsQueryBuilder;
10
10
  export { LabelType, SortOrder } from './contacts-v4-label.universal';
11
- export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelOptions, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
11
+ export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelOptions, RenameLabel, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
@@ -10,7 +10,7 @@ function findOrCreateLabel(httpClient) {
10
10
  }
11
11
  exports.findOrCreateLabel = findOrCreateLabel;
12
12
  function renameLabel(httpClient) {
13
- return (key, options) => (0, contacts_v4_label_universal_1.renameLabel)(key, options,
13
+ return (key, label, options) => (0, contacts_v4_label_universal_1.renameLabel)(key, label, options,
14
14
  // @ts-ignore
15
15
  { httpClient });
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.public.ts"],"names":[],"mappings":";;;AACA,+EAQuC;AAE1B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,WAAmB,EAAE,OAAkC,EAAE,EAAE,CACjE,IAAA,+CAA0B,EACxB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,8CAQC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,OAA4B,EAAE,EAAE,CACnD,IAAA,yCAAoB,EAClB,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,kCAQC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,IAAA,yCAAoB,EAClB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kCAOC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,OAA4B,EAAE,EAAE,CACtC,IAAA,yCAAoB,EAClB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kCAOC;AAED,6EAAqE;AAA5D,wHAAA,SAAS,OAAA;AAAE,wHAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"contacts-v4-label.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.public.ts"],"names":[],"mappings":";;;AACA,+EASuC;AAE1B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,WAAmB,EAAE,OAAkC,EAAE,EAAE,CACjE,IAAA,+CAA0B,EACxB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,8CAQC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,KAAkB,EAAE,OAA4B,EAAE,EAAE,CACvE,IAAA,yCAAoB,EAClB,GAAG,EACH,KAAK,EACL,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,kCASC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,IAAA,yCAAoB,EAClB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kCAOC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,OAA4B,EAAE,EAAE,CACtC,IAAA,yCAAoB,EAClB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kCAOC;AAED,6EAAqE;AAA5D,wHAAA,SAAS,OAAA;AAAE,wHAAA,SAAS,OAAA"}
@@ -33,9 +33,9 @@ export interface ContactLabel {
33
33
  /**
34
34
  * Label type.
35
35
  *
36
- * - `SYSTEM`: The label is a default system label for the Contact List.
37
- * - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
38
- * - `WIX_APP_DEFINED`: The label was created by a Wix app.
36
+ * - `"SYSTEM"`: The label is a default system label for the Contact List.
37
+ * - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
38
+ * - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
39
39
  * @readonly
40
40
  */
41
41
  labelType?: LabelType;
@@ -260,19 +260,15 @@ export interface QueryLabelsResponse {
260
260
  /**
261
261
  * Retrieves a label with a given name, or creates one if it doesn't exist.
262
262
  *
263
- * Successful calls to this endpoint always return a label,
264
- * which can be passed to subsequent requests.
263
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
265
264
  *
266
- * For example, in the Contacts API,
267
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
268
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
269
- * requests will fail if you include a nonexistant label.
270
- * To ensure successful calls, you can call this endpoint first,
271
- * and then use the response in the label and unlabel requests.
265
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
266
+ *
267
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
268
+ *
269
+ * > **Note:**
270
+ * > Only visitors with **Manage Contacts** permissions can run this function.
272
271
  *
273
- * To find an existing label without potentially creating a new one, use
274
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
275
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
276
272
  *
277
273
  * This function is not a universal function and runs only on the backend.
278
274
  * @param displayName - Display name to retrieve or create.
@@ -284,12 +280,19 @@ export interface QueryLabelsResponse {
284
280
  * @public
285
281
  * @documentationMaturity preview
286
282
  * @requiredField displayName
283
+ * @param options - Language options.
287
284
  * @permissionScope Manage Contact Labels
285
+ * @applicableIdentity APP
288
286
  * @returns Label that was found or created.
289
287
  */
290
288
  export declare function findOrCreateLabel(displayName: string, options?: FindOrCreateLabelOptions): Promise<FindOrCreateLabelResponse>;
291
289
  export interface FindOrCreateLabelOptions {
292
- /** Language for localization. */
290
+ /**
291
+ * Language for localization.
292
+ *
293
+ * 2-letter language code in
294
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
295
+ */
293
296
  language?: string | null;
294
297
  }
295
298
  /**
@@ -303,73 +306,108 @@ export interface FindOrCreateLabelOptions {
303
306
  * @public
304
307
  * @documentationMaturity preview
305
308
  * @requiredField key
306
- * @requiredField options.label.displayName
309
+ * @requiredField label
310
+ * @requiredField label.displayName
311
+ * @param options - Language options.
307
312
  * @permissionScope Manage Contact Labels
308
- * @returns Updated label.
313
+ * @applicableIdentity APP
314
+ * @returns Renames a label.
315
+ *
316
+ * The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
317
+ *
318
+ * >**Note:**
319
+ * > Only visitors with **Manage Contacts** permissions can run this function.
309
320
  */
310
- export declare function renameLabel(key: string, options?: RenameLabelOptions): Promise<ContactLabel>;
321
+ export declare function renameLabel(key: string, label: RenameLabel, options?: RenameLabelOptions): Promise<ContactLabel>;
322
+ export interface RenameLabel {
323
+ /**
324
+ * Label namespace.
325
+ *
326
+ * Labels created by site contributors or 3rd-party apps
327
+ * are automatically assigned to the `custom` namespace.
328
+ * @readonly
329
+ */
330
+ namespace?: string | null;
331
+ /**
332
+ * Display name for the namespace,
333
+ * used to organize the list of labels in the site Dashboard.
334
+ * @readonly
335
+ */
336
+ namespaceDisplayName?: string | null;
337
+ /** Label display name shown in the Dashboard. */
338
+ displayName?: string;
339
+ /**
340
+ * Label type.
341
+ *
342
+ * - `"SYSTEM"`: The label is a default system label for the Contact List.
343
+ * - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
344
+ * - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
345
+ * @readonly
346
+ */
347
+ labelType?: LabelType;
348
+ /**
349
+ * Date and time the label was created.
350
+ * @readonly
351
+ */
352
+ _createdDate?: Date;
353
+ /**
354
+ * Date and time the label was last updated.
355
+ * @readonly
356
+ */
357
+ _updatedDate?: Date;
358
+ }
311
359
  export interface RenameLabelOptions {
312
- label: {
313
- /**
314
- * Label namespace.
315
- *
316
- * Labels created by site contributors or 3rd-party apps
317
- * are automatically assigned to the `custom` namespace.
318
- * @readonly
319
- */
320
- namespace?: string | null;
321
- /**
322
- * Display name for the namespace,
323
- * used to organize the list of labels in the site Dashboard.
324
- * @readonly
325
- */
326
- namespaceDisplayName?: string | null;
327
- /** Label display name shown in the Dashboard. */
328
- displayName?: string;
329
- /**
330
- * Label type.
331
- *
332
- * - `SYSTEM`: The label is a default system label for the Contact List.
333
- * - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
334
- * - `WIX_APP_DEFINED`: The label was created by a Wix app.
335
- * @readonly
336
- */
337
- labelType?: LabelType;
338
- /**
339
- * Date and time the label was created.
340
- * @readonly
341
- */
342
- _createdDate?: Date;
343
- /**
344
- * Date and time the label was last updated.
345
- * @readonly
346
- */
347
- _updatedDate?: Date;
348
- };
349
- /** Language for localization. */
360
+ /**
361
+ * Language for localization.
362
+ *
363
+ * 2-letter language code in
364
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
365
+ */
350
366
  language?: string | null;
351
367
  }
352
368
  /**
353
369
  * Deletes a label from the site and removes it from contacts it applies to.
354
370
  *
371
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
372
+ *
373
+ * > **Note:**
374
+ * > Only visitors with **Manage Contacts** permissions can run this function.
375
+ *
376
+ *
355
377
  * This function is not a universal function and runs only on the backend.
356
378
  * @param key - Label key to delete.
357
379
  * @public
358
380
  * @documentationMaturity preview
359
381
  * @requiredField key
360
382
  * @permissionScope Manage Contact Labels
383
+ * @applicableIdentity APP
361
384
  */
362
385
  export declare function deleteLabel(key: string): Promise<void>;
363
386
  /**
364
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
387
+ * Creates a query to retrieve a list of labels.
388
+ *
389
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
390
+ *
391
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
392
+ *
393
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
394
+ *
395
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
396
+ * - [`skip(0)`](#labelsquerybuilder/skip)
397
+ * - [`limit(50)`](#labelsquerybuilder/limit)
398
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
399
+ *
400
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
401
+ *
402
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
403
+ *
365
404
  *
366
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
367
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
368
405
  *
369
406
  * This function is not a universal function and runs only on the backend.
370
407
  * @public
371
408
  * @documentationMaturity preview
372
409
  * @permissionScope Manage Contact Labels
410
+ * @applicableIdentity APP
373
411
  */
374
412
  export declare function queryLabels(options?: QueryLabelsOptions): LabelsQueryBuilder;
375
413
  export interface QueryLabelsOptions {
@@ -72,19 +72,15 @@ const _updateLabelResponse = {};
72
72
  /**
73
73
  * Retrieves a label with a given name, or creates one if it doesn't exist.
74
74
  *
75
- * Successful calls to this endpoint always return a label,
76
- * which can be passed to subsequent requests.
75
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
77
76
  *
78
- * For example, in the Contacts API,
79
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
80
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
81
- * requests will fail if you include a nonexistant label.
82
- * To ensure successful calls, you can call this endpoint first,
83
- * and then use the response in the label and unlabel requests.
77
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
78
+ *
79
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
80
+ *
81
+ * > **Note:**
82
+ * > Only visitors with **Manage Contacts** permissions can run this function.
84
83
  *
85
- * To find an existing label without potentially creating a new one, use
86
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
87
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
88
84
  *
89
85
  * This function is not a universal function and runs only on the backend.
90
86
  * @param displayName - Display name to retrieve or create.
@@ -96,7 +92,9 @@ const _updateLabelResponse = {};
96
92
  * @public
97
93
  * @documentationMaturity preview
98
94
  * @requiredField displayName
95
+ * @param options - Language options.
99
96
  * @permissionScope Manage Contact Labels
97
+ * @applicableIdentity APP
100
98
  * @returns Label that was found or created.
101
99
  */
102
100
  function findOrCreateLabel(displayName, options) {
@@ -158,20 +156,28 @@ exports.findOrCreateLabel = findOrCreateLabel;
158
156
  * @public
159
157
  * @documentationMaturity preview
160
158
  * @requiredField key
161
- * @requiredField options.label.displayName
159
+ * @requiredField label
160
+ * @requiredField label.displayName
161
+ * @param options - Language options.
162
162
  * @permissionScope Manage Contact Labels
163
- * @returns Updated label.
163
+ * @applicableIdentity APP
164
+ * @returns Renames a label.
165
+ *
166
+ * The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
167
+ *
168
+ * >**Note:**
169
+ * > Only visitors with **Manage Contacts** permissions can run this function.
164
170
  */
165
- function renameLabel(key, options) {
171
+ function renameLabel(key, label, options) {
166
172
  var _a, _b, _c;
167
173
  return __awaiter(this, arguments, void 0, function* () {
168
174
  const requestTransformation = {
169
- label: { '*': '$[1].label', key: '$[0]' },
170
- language: '$[1].language',
175
+ label: { '*': '$[1]', key: '$[0]' },
176
+ language: '$[2].language',
171
177
  };
172
178
  const responseTransformation = '$.label';
173
179
  // @ts-ignore
174
- const { httpClient, sideEffects } = arguments[2];
180
+ const { httpClient, sideEffects } = arguments[3];
175
181
  const { toAmbassadorRequest } = (0, velo_1.serializer)({
176
182
  rootSchema: _updateLabelRequest,
177
183
  depSchemas: {},
@@ -190,7 +196,7 @@ function renameLabel(key, options) {
190
196
  },
191
197
  customTransformation: responseTransformation,
192
198
  });
193
- const payload = toAmbassadorRequest([key, options]);
199
+ const payload = toAmbassadorRequest([key, label, options]);
194
200
  const reqOpts = ambassadorWixContactsV4Label.updateLabel(payload);
195
201
  __log(`"UpdateLabel" sending request with: ${__inspect(reqOpts)}`);
196
202
  (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
@@ -202,6 +208,7 @@ function renameLabel(key, options) {
202
208
  catch (err) {
203
209
  const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
204
210
  'key',
211
+ 'label',
205
212
  'options',
206
213
  ]);
207
214
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
@@ -213,12 +220,19 @@ exports.renameLabel = renameLabel;
213
220
  /**
214
221
  * Deletes a label from the site and removes it from contacts it applies to.
215
222
  *
223
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
224
+ *
225
+ * > **Note:**
226
+ * > Only visitors with **Manage Contacts** permissions can run this function.
227
+ *
228
+ *
216
229
  * This function is not a universal function and runs only on the backend.
217
230
  * @param key - Label key to delete.
218
231
  * @public
219
232
  * @documentationMaturity preview
220
233
  * @requiredField key
221
234
  * @permissionScope Manage Contact Labels
235
+ * @applicableIdentity APP
222
236
  */
223
237
  function deleteLabel(key) {
224
238
  var _a, _b, _c;
@@ -265,15 +279,30 @@ function deleteLabel(key) {
265
279
  }
266
280
  exports.deleteLabel = deleteLabel;
267
281
  /**
268
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
282
+ * Creates a query to retrieve a list of labels.
283
+ *
284
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
285
+ *
286
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
287
+ *
288
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
289
+ *
290
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
291
+ * - [`skip(0)`](#labelsquerybuilder/skip)
292
+ * - [`limit(50)`](#labelsquerybuilder/limit)
293
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
294
+ *
295
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
296
+ *
297
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
298
+ *
269
299
  *
270
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
271
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
272
300
  *
273
301
  * This function is not a universal function and runs only on the backend.
274
302
  * @public
275
303
  * @documentationMaturity preview
276
304
  * @permissionScope Manage Contact Labels
305
+ * @applicableIdentity APP
277
306
  */
278
307
  function queryLabels(options) {
279
308
  const requestTransformation = { '*': '$[1]', query: '$[0]' };
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.universal.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AAEjC,uFAAyE;AACzE,aAAa;AACb,4FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAiD5B,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kDAAkD;IAClD,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AA6BD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA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+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,CAAC;aACX;QACH,CAAC,CAAA;QACD,kBAAkB,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;QACjE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,gBAAgB,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC7B,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,IAAA,4CAAqC,EAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AA5DD,kCA4DC"}
@@ -3,29 +3,47 @@ import { DeleteLabelRequest, DeleteLabelResponse, FindOrCreateLabelRequest, Find
3
3
  /**
4
4
  * Retrieves a label with a given name, or creates one if it doesn't exist.
5
5
  *
6
- * Successful calls to this endpoint always return a label,
7
- * which can be passed to subsequent requests.
8
- *
9
- * For example, in the Contacts API,
10
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
11
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
12
- * requests will fail if you include a nonexistant label.
13
- * To ensure successful calls, you can call this endpoint first,
14
- * and then use the response in the label and unlabel requests.
15
- *
16
- * To find an existing label without potentially creating a new one, use
17
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
18
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
6
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
7
+ *
8
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
9
+ *
10
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
11
+ *
12
+ * > **Note:**
13
+ * > Only visitors with **Manage Contacts** permissions can run this function.
14
+ *
19
15
  */
20
16
  export declare function findOrCreateLabel(payload: FindOrCreateLabelRequest): RequestOptionsFactory<FindOrCreateLabelResponse>;
21
17
  /** Updates a label's specified properties. */
22
18
  export declare function updateLabel(payload: UpdateLabelRequest): RequestOptionsFactory<UpdateLabelResponse>;
23
- /** Deletes a label from the site and removes it from contacts it applies to. */
19
+ /**
20
+ * Deletes a label from the site and removes it from contacts it applies to.
21
+ *
22
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
23
+ *
24
+ * > **Note:**
25
+ * > Only visitors with **Manage Contacts** permissions can run this function.
26
+ *
27
+ */
24
28
  export declare function deleteLabel(payload: DeleteLabelRequest): RequestOptionsFactory<DeleteLabelResponse>;
25
29
  /**
26
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
30
+ * Creates a query to retrieve a list of labels.
31
+ *
32
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
33
+ *
34
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
35
+ *
36
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
37
+ *
38
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
39
+ * - [`skip(0)`](#labelsquerybuilder/skip)
40
+ * - [`limit(50)`](#labelsquerybuilder/limit)
41
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
42
+ *
43
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
44
+ *
45
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
46
+ *
27
47
  *
28
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
29
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
30
48
  */
31
49
  export declare function queryLabels(payload: QueryLabelsRequest): RequestOptionsFactory<QueryLabelsResponse>;
@@ -63,19 +63,15 @@ function resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url(opts) {
63
63
  /**
64
64
  * Retrieves a label with a given name, or creates one if it doesn't exist.
65
65
  *
66
- * Successful calls to this endpoint always return a label,
67
- * which can be passed to subsequent requests.
68
- *
69
- * For example, in the Contacts API,
70
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
71
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
72
- * requests will fail if you include a nonexistant label.
73
- * To ensure successful calls, you can call this endpoint first,
74
- * and then use the response in the label and unlabel requests.
75
- *
76
- * To find an existing label without potentially creating a new one, use
77
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
78
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
66
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
67
+ *
68
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
69
+ *
70
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
71
+ *
72
+ * > **Note:**
73
+ * > Only visitors with **Manage Contacts** permissions can run this function.
74
+ *
79
75
  */
80
76
  export function findOrCreateLabel(payload) {
81
77
  const { toJSON: toReq, fromJSON: fromReq } = serializer(_findOrCreateLabelRequest, {});
@@ -128,7 +124,15 @@ export function updateLabel(payload) {
128
124
  __updateLabel.fromReq = fromReq;
129
125
  return __updateLabel;
130
126
  }
131
- /** Deletes a label from the site and removes it from contacts it applies to. */
127
+ /**
128
+ * Deletes a label from the site and removes it from contacts it applies to.
129
+ *
130
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
131
+ *
132
+ * > **Note:**
133
+ * > Only visitors with **Manage Contacts** permissions can run this function.
134
+ *
135
+ */
132
136
  export function deleteLabel(payload) {
133
137
  const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteLabelRequest, {});
134
138
  const { fromJSON: fromRes } = serializer(_deleteLabelResponse, {});
@@ -152,10 +156,24 @@ export function deleteLabel(payload) {
152
156
  return __deleteLabel;
153
157
  }
154
158
  /**
155
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
159
+ * Creates a query to retrieve a list of labels.
160
+ *
161
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
162
+ *
163
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
164
+ *
165
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
166
+ *
167
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
168
+ * - [`skip(0)`](#labelsquerybuilder/skip)
169
+ * - [`limit(50)`](#labelsquerybuilder/limit)
170
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
171
+ *
172
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
173
+ *
174
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
175
+ *
156
176
  *
157
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
158
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
159
177
  */
160
178
  export function queryLabels(payload) {
161
179
  const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryLabelsRequest, {});
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAchD,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,0BAA0B,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AAC9D,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AACzD,MAAM,mBAAmB,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AACvD,MAAM,oBAAoB,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AAExD,SAAS,2DAA2D,CAClE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,qBAAqB;gBAC9B,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY;aACvB;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,0BAA0B;gBACnC,QAAQ,EAAE,YAAY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AE,OAAO,EAAE,GAAG,UAAU,CACrD,mBAAmB,EACnB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,oBAAoB,EAAE;QAC7D,aAAa;KACd,CAAC,CAAC;IAEH,SAAS,aAAa,CAAC,EAAE,IAAI,EAAO;QAClC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,uBAAuB;YACnC,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,oEAAoE;YACtE,GAAG,EAAE,2DAA2D,CAAC;gBAC/D,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;IAEhC,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { HttpClient } from '@wix/sdk-types';
2
- import { FindOrCreateLabelOptions, QueryLabelsOptions, RenameLabelOptions } from './contacts-v4-label.universal';
2
+ import { RenameLabel, FindOrCreateLabelOptions, QueryLabelsOptions, RenameLabelOptions } from './contacts-v4-label.universal';
3
3
  export declare const __metadata: {
4
4
  PACKAGE_NAME: string;
5
5
  };
6
6
  export declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").FindOrCreateLabelResponse>;
7
- export declare function renameLabel(httpClient: HttpClient): (key: string, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel>;
7
+ export declare function renameLabel(httpClient: HttpClient): (key: string, label: RenameLabel, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel>;
8
8
  export declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
9
9
  export declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions | undefined) => import("./contacts-v4-label.universal").LabelsQueryBuilder;
10
10
  export { LabelType, SortOrder } from './contacts-v4-label.universal';
11
- export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelOptions, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
11
+ export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelOptions, RenameLabel, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
@@ -6,7 +6,7 @@ export function findOrCreateLabel(httpClient) {
6
6
  { httpClient });
7
7
  }
8
8
  export function renameLabel(httpClient) {
9
- return (key, options) => universalRenameLabel(key, options,
9
+ return (key, label, options) => universalRenameLabel(key, label, options,
10
10
  // @ts-ignore
11
11
  { httpClient });
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,IAAI,0BAA0B,EAC/C,WAAW,IAAI,oBAAoB,EACnC,WAAW,IAAI,oBAAoB,EACnC,WAAW,IAAI,oBAAoB,GAIpC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,WAAmB,EAAE,OAAkC,EAAE,EAAE,CACjE,0BAA0B,CACxB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,OAA4B,EAAE,EAAE,CACnD,oBAAoB,CAClB,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,oBAAoB,CAClB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,OAA4B,EAAE,EAAE,CACtC,oBAAoB,CAClB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"contacts-v4-label.public.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,IAAI,0BAA0B,EAC/C,WAAW,IAAI,oBAAoB,EACnC,WAAW,IAAI,oBAAoB,EACnC,WAAW,IAAI,oBAAoB,GAKpC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AAEvD,MAAM,UAAU,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,WAAmB,EAAE,OAAkC,EAAE,EAAE,CACjE,0BAA0B,CACxB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,KAAkB,EAAE,OAA4B,EAAE,EAAE,CACvE,oBAAoB,CAClB,GAAG,EACH,KAAK,EACL,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,oBAAoB,CAClB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,OAA4B,EAAE,EAAE,CACtC,oBAAoB,CAClB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
@@ -33,9 +33,9 @@ export interface ContactLabel {
33
33
  /**
34
34
  * Label type.
35
35
  *
36
- * - `SYSTEM`: The label is a default system label for the Contact List.
37
- * - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
38
- * - `WIX_APP_DEFINED`: The label was created by a Wix app.
36
+ * - `"SYSTEM"`: The label is a default system label for the Contact List.
37
+ * - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
38
+ * - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
39
39
  * @readonly
40
40
  */
41
41
  labelType?: LabelType;
@@ -260,19 +260,15 @@ export interface QueryLabelsResponse {
260
260
  /**
261
261
  * Retrieves a label with a given name, or creates one if it doesn't exist.
262
262
  *
263
- * Successful calls to this endpoint always return a label,
264
- * which can be passed to subsequent requests.
263
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
265
264
  *
266
- * For example, in the Contacts API,
267
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
268
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
269
- * requests will fail if you include a nonexistant label.
270
- * To ensure successful calls, you can call this endpoint first,
271
- * and then use the response in the label and unlabel requests.
265
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
266
+ *
267
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
268
+ *
269
+ * > **Note:**
270
+ * > Only visitors with **Manage Contacts** permissions can run this function.
272
271
  *
273
- * To find an existing label without potentially creating a new one, use
274
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
275
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
276
272
  *
277
273
  * This function is not a universal function and runs only on the backend.
278
274
  * @param displayName - Display name to retrieve or create.
@@ -284,12 +280,19 @@ export interface QueryLabelsResponse {
284
280
  * @public
285
281
  * @documentationMaturity preview
286
282
  * @requiredField displayName
283
+ * @param options - Language options.
287
284
  * @permissionScope Manage Contact Labels
285
+ * @applicableIdentity APP
288
286
  * @returns Label that was found or created.
289
287
  */
290
288
  export declare function findOrCreateLabel(displayName: string, options?: FindOrCreateLabelOptions): Promise<FindOrCreateLabelResponse>;
291
289
  export interface FindOrCreateLabelOptions {
292
- /** Language for localization. */
290
+ /**
291
+ * Language for localization.
292
+ *
293
+ * 2-letter language code in
294
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
295
+ */
293
296
  language?: string | null;
294
297
  }
295
298
  /**
@@ -303,73 +306,108 @@ export interface FindOrCreateLabelOptions {
303
306
  * @public
304
307
  * @documentationMaturity preview
305
308
  * @requiredField key
306
- * @requiredField options.label.displayName
309
+ * @requiredField label
310
+ * @requiredField label.displayName
311
+ * @param options - Language options.
307
312
  * @permissionScope Manage Contact Labels
308
- * @returns Updated label.
313
+ * @applicableIdentity APP
314
+ * @returns Renames a label.
315
+ *
316
+ * The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
317
+ *
318
+ * >**Note:**
319
+ * > Only visitors with **Manage Contacts** permissions can run this function.
309
320
  */
310
- export declare function renameLabel(key: string, options?: RenameLabelOptions): Promise<ContactLabel>;
321
+ export declare function renameLabel(key: string, label: RenameLabel, options?: RenameLabelOptions): Promise<ContactLabel>;
322
+ export interface RenameLabel {
323
+ /**
324
+ * Label namespace.
325
+ *
326
+ * Labels created by site contributors or 3rd-party apps
327
+ * are automatically assigned to the `custom` namespace.
328
+ * @readonly
329
+ */
330
+ namespace?: string | null;
331
+ /**
332
+ * Display name for the namespace,
333
+ * used to organize the list of labels in the site Dashboard.
334
+ * @readonly
335
+ */
336
+ namespaceDisplayName?: string | null;
337
+ /** Label display name shown in the Dashboard. */
338
+ displayName?: string;
339
+ /**
340
+ * Label type.
341
+ *
342
+ * - `"SYSTEM"`: The label is a default system label for the Contact List.
343
+ * - `"USER_DEFINED"`: The label was created by a site contributor or 3rd-party app.
344
+ * - `"WIX_APP_DEFINED"`: The label was created by a Wix app.
345
+ * @readonly
346
+ */
347
+ labelType?: LabelType;
348
+ /**
349
+ * Date and time the label was created.
350
+ * @readonly
351
+ */
352
+ _createdDate?: Date;
353
+ /**
354
+ * Date and time the label was last updated.
355
+ * @readonly
356
+ */
357
+ _updatedDate?: Date;
358
+ }
311
359
  export interface RenameLabelOptions {
312
- label: {
313
- /**
314
- * Label namespace.
315
- *
316
- * Labels created by site contributors or 3rd-party apps
317
- * are automatically assigned to the `custom` namespace.
318
- * @readonly
319
- */
320
- namespace?: string | null;
321
- /**
322
- * Display name for the namespace,
323
- * used to organize the list of labels in the site Dashboard.
324
- * @readonly
325
- */
326
- namespaceDisplayName?: string | null;
327
- /** Label display name shown in the Dashboard. */
328
- displayName?: string;
329
- /**
330
- * Label type.
331
- *
332
- * - `SYSTEM`: The label is a default system label for the Contact List.
333
- * - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
334
- * - `WIX_APP_DEFINED`: The label was created by a Wix app.
335
- * @readonly
336
- */
337
- labelType?: LabelType;
338
- /**
339
- * Date and time the label was created.
340
- * @readonly
341
- */
342
- _createdDate?: Date;
343
- /**
344
- * Date and time the label was last updated.
345
- * @readonly
346
- */
347
- _updatedDate?: Date;
348
- };
349
- /** Language for localization. */
360
+ /**
361
+ * Language for localization.
362
+ *
363
+ * 2-letter language code in
364
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
365
+ */
350
366
  language?: string | null;
351
367
  }
352
368
  /**
353
369
  * Deletes a label from the site and removes it from contacts it applies to.
354
370
  *
371
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
372
+ *
373
+ * > **Note:**
374
+ * > Only visitors with **Manage Contacts** permissions can run this function.
375
+ *
376
+ *
355
377
  * This function is not a universal function and runs only on the backend.
356
378
  * @param key - Label key to delete.
357
379
  * @public
358
380
  * @documentationMaturity preview
359
381
  * @requiredField key
360
382
  * @permissionScope Manage Contact Labels
383
+ * @applicableIdentity APP
361
384
  */
362
385
  export declare function deleteLabel(key: string): Promise<void>;
363
386
  /**
364
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
387
+ * Creates a query to retrieve a list of labels.
388
+ *
389
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
390
+ *
391
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
392
+ *
393
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
394
+ *
395
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
396
+ * - [`skip(0)`](#labelsquerybuilder/skip)
397
+ * - [`limit(50)`](#labelsquerybuilder/limit)
398
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
399
+ *
400
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
401
+ *
402
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
403
+ *
365
404
  *
366
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
367
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
368
405
  *
369
406
  * This function is not a universal function and runs only on the backend.
370
407
  * @public
371
408
  * @documentationMaturity preview
372
409
  * @permissionScope Manage Contact Labels
410
+ * @applicableIdentity APP
373
411
  */
374
412
  export declare function queryLabels(options?: QueryLabelsOptions): LabelsQueryBuilder;
375
413
  export interface QueryLabelsOptions {
@@ -50,19 +50,15 @@ const _updateLabelResponse = {};
50
50
  /**
51
51
  * Retrieves a label with a given name, or creates one if it doesn't exist.
52
52
  *
53
- * Successful calls to this endpoint always return a label,
54
- * which can be passed to subsequent requests.
53
+ * The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.
55
54
  *
56
- * For example, in the Contacts API,
57
- * [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
58
- * [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
59
- * requests will fail if you include a nonexistant label.
60
- * To ensure successful calls, you can call this endpoint first,
61
- * and then use the response in the label and unlabel requests.
55
+ * Successful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.
56
+ *
57
+ * To find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).
58
+ *
59
+ * > **Note:**
60
+ * > Only visitors with **Manage Contacts** permissions can run this function.
62
61
  *
63
- * To find an existing label without potentially creating a new one, use
64
- * [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
65
- * [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
66
62
  *
67
63
  * This function is not a universal function and runs only on the backend.
68
64
  * @param displayName - Display name to retrieve or create.
@@ -74,7 +70,9 @@ const _updateLabelResponse = {};
74
70
  * @public
75
71
  * @documentationMaturity preview
76
72
  * @requiredField displayName
73
+ * @param options - Language options.
77
74
  * @permissionScope Manage Contact Labels
75
+ * @applicableIdentity APP
78
76
  * @returns Label that was found or created.
79
77
  */
80
78
  export function findOrCreateLabel(displayName, options) {
@@ -135,20 +133,28 @@ export function findOrCreateLabel(displayName, options) {
135
133
  * @public
136
134
  * @documentationMaturity preview
137
135
  * @requiredField key
138
- * @requiredField options.label.displayName
136
+ * @requiredField label
137
+ * @requiredField label.displayName
138
+ * @param options - Language options.
139
139
  * @permissionScope Manage Contact Labels
140
- * @returns Updated label.
140
+ * @applicableIdentity APP
141
+ * @returns Renames a label.
142
+ *
143
+ * The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.
144
+ *
145
+ * >**Note:**
146
+ * > Only visitors with **Manage Contacts** permissions can run this function.
141
147
  */
142
- export function renameLabel(key, options) {
148
+ export function renameLabel(key, label, options) {
143
149
  var _a, _b, _c;
144
150
  return __awaiter(this, arguments, void 0, function* () {
145
151
  const requestTransformation = {
146
- label: { '*': '$[1].label', key: '$[0]' },
147
- language: '$[1].language',
152
+ label: { '*': '$[1]', key: '$[0]' },
153
+ language: '$[2].language',
148
154
  };
149
155
  const responseTransformation = '$.label';
150
156
  // @ts-ignore
151
- const { httpClient, sideEffects } = arguments[2];
157
+ const { httpClient, sideEffects } = arguments[3];
152
158
  const { toAmbassadorRequest } = serializer({
153
159
  rootSchema: _updateLabelRequest,
154
160
  depSchemas: {},
@@ -167,7 +173,7 @@ export function renameLabel(key, options) {
167
173
  },
168
174
  customTransformation: responseTransformation,
169
175
  });
170
- const payload = toAmbassadorRequest([key, options]);
176
+ const payload = toAmbassadorRequest([key, label, options]);
171
177
  const reqOpts = ambassadorWixContactsV4Label.updateLabel(payload);
172
178
  __log(`"UpdateLabel" sending request with: ${__inspect(reqOpts)}`);
173
179
  (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
@@ -179,6 +185,7 @@ export function renameLabel(key, options) {
179
185
  catch (err) {
180
186
  const transformedError = transformError(err, requestTransformation, [
181
187
  'key',
188
+ 'label',
182
189
  'options',
183
190
  ]);
184
191
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
@@ -189,12 +196,19 @@ export function renameLabel(key, options) {
189
196
  /**
190
197
  * Deletes a label from the site and removes it from contacts it applies to.
191
198
  *
199
+ * The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.
200
+ *
201
+ * > **Note:**
202
+ * > Only visitors with **Manage Contacts** permissions can run this function.
203
+ *
204
+ *
192
205
  * This function is not a universal function and runs only on the backend.
193
206
  * @param key - Label key to delete.
194
207
  * @public
195
208
  * @documentationMaturity preview
196
209
  * @requiredField key
197
210
  * @permissionScope Manage Contact Labels
211
+ * @applicableIdentity APP
198
212
  */
199
213
  export function deleteLabel(key) {
200
214
  var _a, _b, _c;
@@ -240,15 +254,30 @@ export function deleteLabel(key) {
240
254
  });
241
255
  }
242
256
  /**
243
- * Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
257
+ * Creates a query to retrieve a list of labels.
258
+ *
259
+ * The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.
260
+ *
261
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function.
262
+ *
263
+ * You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns.
264
+ *
265
+ * `queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:
266
+ * - [`skip(0)`](#labelsquerybuilder/skip)
267
+ * - [`limit(50)`](#labelsquerybuilder/limit)
268
+ * - [`descending('_createdDate')`](#labelsquerybuilder/descending)
269
+ *
270
+ * >**Note:** Only visitors with **Manage Contacts** permissions can query labels.
271
+ *
272
+ * The following `LabelsQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).
273
+ *
244
274
  *
245
- * For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
246
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
247
275
  *
248
276
  * This function is not a universal function and runs only on the backend.
249
277
  * @public
250
278
  * @documentationMaturity preview
251
279
  * @permissionScope Manage Contact Labels
280
+ * @applicableIdentity APP
252
281
  */
253
282
  export function queryLabels(options) {
254
283
  const requestTransformation = { '*': '$[1]', query: '$[0]' };
@@ -1 +1 @@
1
- {"version":3,"file":"contacts-v4-label.universal.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,4BAA4B,MAAM,0BAA0B,CAAC;AACzE,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,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cAAc,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,qCAAqC,CAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"contacts-v4-label.universal.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,4BAA4B,MAAM,0BAA0B,CAAC;AACzE,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAiD5B,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kDAAkD;IAClD,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;AACrC,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB;AA6BD,MAAM,CAAN,IAAY,SAGX;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C,WAAW,iCACnD,OAAO,GACP,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,EAClB,CAAC;YAEH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;YAC5B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;gBACjC,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,CAAC;aACX;QACH,CAAC,CAAA;QACD,kBAAkB,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;QACjE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,gBAAgB,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC7B,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,qCAAqC,CAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/crm",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -33,5 +33,5 @@
33
33
  "groupId": "com.wixpress.public-sdk-autogen"
34
34
  }
35
35
  },
36
- "falconPackageHash": "510d8ec9349c004ea0f2cef5eb730bd88d42606fdbb1a2f217f12d9d"
36
+ "falconPackageHash": "06ee57d9c3725429601fb9e9fe2c611a2bcd8ac807734b7fbf21ac14"
37
37
  }