@wix/auto_sdk_crm_labels 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/contacts-v4-label-labels.context.d.ts +25 -0
  11. package/build/cjs/src/contacts-v4-label-labels.context.js +31 -0
  12. package/build/cjs/src/contacts-v4-label-labels.context.js.map +1 -0
  13. package/build/cjs/src/contacts-v4-label-labels.http.d.ts +41 -0
  14. package/build/cjs/src/contacts-v4-label-labels.http.js +223 -0
  15. package/build/cjs/src/contacts-v4-label-labels.http.js.map +1 -0
  16. package/build/cjs/src/contacts-v4-label-labels.meta.d.ts +23 -0
  17. package/build/cjs/src/contacts-v4-label-labels.meta.js +123 -0
  18. package/build/cjs/src/contacts-v4-label-labels.meta.js.map +1 -0
  19. package/build/cjs/src/contacts-v4-label-labels.public.d.ts +93 -0
  20. package/build/cjs/src/contacts-v4-label-labels.public.js +74 -0
  21. package/build/cjs/src/contacts-v4-label-labels.public.js.map +1 -0
  22. package/build/cjs/src/contacts-v4-label-labels.types.d.ts +403 -0
  23. package/build/cjs/src/contacts-v4-label-labels.types.js +28 -0
  24. package/build/cjs/src/contacts-v4-label-labels.types.js.map +1 -0
  25. package/build/cjs/src/contacts-v4-label-labels.universal.d.ts +754 -0
  26. package/build/cjs/src/contacts-v4-label-labels.universal.js +326 -0
  27. package/build/cjs/src/contacts-v4-label-labels.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/contacts-v4-label-labels.context.d.ts +25 -0
  39. package/build/es/src/contacts-v4-label-labels.context.js +25 -0
  40. package/build/es/src/contacts-v4-label-labels.context.js.map +1 -0
  41. package/build/es/src/contacts-v4-label-labels.http.d.ts +41 -0
  42. package/build/es/src/contacts-v4-label-labels.http.js +215 -0
  43. package/build/es/src/contacts-v4-label-labels.http.js.map +1 -0
  44. package/build/es/src/contacts-v4-label-labels.meta.d.ts +23 -0
  45. package/build/es/src/contacts-v4-label-labels.meta.js +92 -0
  46. package/build/es/src/contacts-v4-label-labels.meta.js.map +1 -0
  47. package/build/es/src/contacts-v4-label-labels.public.d.ts +93 -0
  48. package/build/es/src/contacts-v4-label-labels.public.js +63 -0
  49. package/build/es/src/contacts-v4-label-labels.public.js.map +1 -0
  50. package/build/es/src/contacts-v4-label-labels.types.d.ts +403 -0
  51. package/build/es/src/contacts-v4-label-labels.types.js +25 -0
  52. package/build/es/src/contacts-v4-label-labels.types.js.map +1 -0
  53. package/build/es/src/contacts-v4-label-labels.universal.d.ts +754 -0
  54. package/build/es/src/contacts-v4-label-labels.universal.js +295 -0
  55. package/build/es/src/contacts-v4-label-labels.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/contacts-v4-label-labels.context.d.ts +25 -0
  66. package/build/internal/cjs/src/contacts-v4-label-labels.context.js +31 -0
  67. package/build/internal/cjs/src/contacts-v4-label-labels.context.js.map +1 -0
  68. package/build/internal/cjs/src/contacts-v4-label-labels.http.d.ts +41 -0
  69. package/build/internal/cjs/src/contacts-v4-label-labels.http.js +223 -0
  70. package/build/internal/cjs/src/contacts-v4-label-labels.http.js.map +1 -0
  71. package/build/internal/cjs/src/contacts-v4-label-labels.meta.d.ts +23 -0
  72. package/build/internal/cjs/src/contacts-v4-label-labels.meta.js +123 -0
  73. package/build/internal/cjs/src/contacts-v4-label-labels.meta.js.map +1 -0
  74. package/build/internal/cjs/src/contacts-v4-label-labels.public.d.ts +93 -0
  75. package/build/internal/cjs/src/contacts-v4-label-labels.public.js +74 -0
  76. package/build/internal/cjs/src/contacts-v4-label-labels.public.js.map +1 -0
  77. package/build/internal/cjs/src/contacts-v4-label-labels.types.d.ts +403 -0
  78. package/build/internal/cjs/src/contacts-v4-label-labels.types.js +28 -0
  79. package/build/internal/cjs/src/contacts-v4-label-labels.types.js.map +1 -0
  80. package/build/internal/cjs/src/contacts-v4-label-labels.universal.d.ts +754 -0
  81. package/build/internal/cjs/src/contacts-v4-label-labels.universal.js +326 -0
  82. package/build/internal/cjs/src/contacts-v4-label-labels.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/contacts-v4-label-labels.context.d.ts +25 -0
  93. package/build/internal/es/src/contacts-v4-label-labels.context.js +25 -0
  94. package/build/internal/es/src/contacts-v4-label-labels.context.js.map +1 -0
  95. package/build/internal/es/src/contacts-v4-label-labels.http.d.ts +41 -0
  96. package/build/internal/es/src/contacts-v4-label-labels.http.js +215 -0
  97. package/build/internal/es/src/contacts-v4-label-labels.http.js.map +1 -0
  98. package/build/internal/es/src/contacts-v4-label-labels.meta.d.ts +23 -0
  99. package/build/internal/es/src/contacts-v4-label-labels.meta.js +92 -0
  100. package/build/internal/es/src/contacts-v4-label-labels.meta.js.map +1 -0
  101. package/build/internal/es/src/contacts-v4-label-labels.public.d.ts +93 -0
  102. package/build/internal/es/src/contacts-v4-label-labels.public.js +63 -0
  103. package/build/internal/es/src/contacts-v4-label-labels.public.js.map +1 -0
  104. package/build/internal/es/src/contacts-v4-label-labels.types.d.ts +403 -0
  105. package/build/internal/es/src/contacts-v4-label-labels.types.js +25 -0
  106. package/build/internal/es/src/contacts-v4-label-labels.types.js.map +1 -0
  107. package/build/internal/es/src/contacts-v4-label-labels.universal.d.ts +754 -0
  108. package/build/internal/es/src/contacts-v4-label-labels.universal.js +295 -0
  109. package/build/internal/es/src/contacts-v4-label-labels.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,754 @@
1
+ /** Label that was found or created. */
2
+ export interface ContactLabel {
3
+ /**
4
+ * Label namespace.
5
+ *
6
+ * Labels created by calling the Find Or Create Label method
7
+ * are automatically assigned to the `custom` namespace.
8
+ * @readonly
9
+ */
10
+ namespace?: string | null;
11
+ /**
12
+ * Display name for the namespace,
13
+ * used to organize the list of labels in the site dashboard.
14
+ * @readonly
15
+ */
16
+ namespaceDisplayName?: string | null;
17
+ /**
18
+ * Label key.
19
+ *
20
+ * `key` is generated when the label is created.
21
+ * It can't be modified, even if `displayName` is updated.
22
+ * @readonly
23
+ */
24
+ key?: string;
25
+ /** Label display name shown in the dashboard. */
26
+ displayName?: string;
27
+ /**
28
+ * Label type indicating how the label was created.
29
+ * @readonly
30
+ */
31
+ labelType?: LabelType;
32
+ /**
33
+ * Date and time the label was created.
34
+ * @readonly
35
+ */
36
+ _createdDate?: Date | null;
37
+ /**
38
+ * Date and time the label was last updated.
39
+ * @readonly
40
+ */
41
+ _updatedDate?: Date | null;
42
+ }
43
+ export declare enum LabelType {
44
+ /** Default system label for the contact list. */
45
+ SYSTEM = "SYSTEM",
46
+ /** Label created by calling the Find Or Create Label method. */
47
+ USER_DEFINED = "USER_DEFINED",
48
+ /** Label created by an app built by Wix. */
49
+ WIX_APP_DEFINED = "WIX_APP_DEFINED"
50
+ }
51
+ /** Label filter options. */
52
+ export interface ListLabelsRequest {
53
+ /** Filter for labels of the specified type. */
54
+ labelType?: LabelType;
55
+ /** Filter for labels in the specified namespace. */
56
+ namespace?: string | null;
57
+ /** Filter for labels where `displayName` starts with the specified case-sensitive string. */
58
+ startsWith?: string | null;
59
+ /** Sorting options. */
60
+ sort?: Sorting;
61
+ /** Paging options. */
62
+ paging?: Paging;
63
+ language?: string | null;
64
+ }
65
+ export interface Sorting {
66
+ /** Name of the field to sort by. */
67
+ fieldName?: string;
68
+ /**
69
+ * Sort order.
70
+ *
71
+ * Default: `ASC`.
72
+ */
73
+ order?: SortOrder;
74
+ }
75
+ export declare enum SortOrder {
76
+ /** Sort by ascending order. */
77
+ ASC = "ASC",
78
+ /** Sort by descending order. */
79
+ DESC = "DESC"
80
+ }
81
+ export interface Paging {
82
+ /**
83
+ * Number of items to return.
84
+ *
85
+ * Defaults to `1000`. <br>
86
+ * Maximum: `2000`.
87
+ */
88
+ limit?: number | null;
89
+ /** Number of items to skip in the current sort order. */
90
+ offset?: number | null;
91
+ }
92
+ /** List of labels. */
93
+ export interface ListLabelsResponse {
94
+ /** List of labels. */
95
+ labels?: ContactLabel[];
96
+ /** Metadata for the page of results. */
97
+ metadata?: PagingMetadata;
98
+ }
99
+ export interface PagingMetadata {
100
+ /** Number of items returned. */
101
+ count?: number | null;
102
+ /** Requested offset. */
103
+ offset?: number | null;
104
+ /** Number of items that matched the query. */
105
+ total?: number | null;
106
+ /**
107
+ * Indicates if `total` calculation timed out before the response was sent.
108
+ * Typically this happens if there is a large set of results.
109
+ */
110
+ tooManyToCount?: boolean | null;
111
+ }
112
+ /** Label to find or create. */
113
+ export interface FindOrCreateLabelRequest {
114
+ /**
115
+ * Display name to retrieve or create.
116
+ *
117
+ * If an existing label is an exact match
118
+ * for the specified display name,
119
+ * the existing label is returned.
120
+ * If not, a new label is created and returned.
121
+ */
122
+ displayName: string;
123
+ /**
124
+ * Language for localization.
125
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
126
+ */
127
+ language?: string | null;
128
+ }
129
+ /** Label that was found or created. */
130
+ export interface FindOrCreateLabelResponse {
131
+ /** Label that was found or created. */
132
+ label?: ContactLabel;
133
+ /**
134
+ * Indicates whether the label was just created or already existed.
135
+ *
136
+ * Returns `true` if the label was just created.
137
+ */
138
+ newLabel?: boolean;
139
+ }
140
+ export interface LabelsQuotaReached {
141
+ /** The maximum number of labels allowed for the site. */
142
+ labelsQuota?: string | null;
143
+ /** The current total number of labels on the site. */
144
+ labelsCurrentTotal?: string | null;
145
+ }
146
+ export interface ListLabelNamespacesRequest {
147
+ /** Language for localization */
148
+ language?: string | null;
149
+ }
150
+ export interface ListLabelNamespacesResponse {
151
+ /** List of namespaces */
152
+ namespaces?: ContactLabelNamespace[];
153
+ }
154
+ export interface ContactLabelNamespace {
155
+ /**
156
+ * Namespace key
157
+ * @readonly
158
+ */
159
+ key?: string;
160
+ /**
161
+ * Namespace display name
162
+ * @readonly
163
+ */
164
+ displayName?: string | null;
165
+ }
166
+ export interface GetLabelRequest {
167
+ /**
168
+ * Label key.
169
+ *
170
+ * `key` is generated when the label is created.
171
+ * It can't be modified, even if `displayName` is updated.
172
+ */
173
+ key: string;
174
+ /**
175
+ * Language for localization.
176
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
177
+ */
178
+ language?: string | null;
179
+ }
180
+ /** The specified label. */
181
+ export interface GetLabelResponse {
182
+ /** The specified label. */
183
+ label?: ContactLabel;
184
+ }
185
+ export interface GetLabelByLegacyIdRequest {
186
+ /** Legacy id of the label */
187
+ legacyId?: string;
188
+ /** Language for localization */
189
+ language?: string | null;
190
+ }
191
+ export interface GetLabelByLegacyIdResponse {
192
+ /** Requested label */
193
+ label?: ContactLabel;
194
+ }
195
+ export interface UpdateLabelRequest {
196
+ /** Label to rename. */
197
+ label?: ContactLabel;
198
+ /**
199
+ * Language for localization.
200
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
201
+ */
202
+ language?: string | null;
203
+ }
204
+ /** Updated label. */
205
+ export interface UpdateLabelResponse {
206
+ /** Renamed label. */
207
+ label?: ContactLabel;
208
+ }
209
+ export interface DeleteLabelRequest {
210
+ /** Label key to delete. */
211
+ key: string;
212
+ }
213
+ export interface DeleteLabelResponse {
214
+ }
215
+ export interface PurgeRequest {
216
+ /** Contacts Instance ID of the site. */
217
+ instanceId?: string;
218
+ /** Labels to exclude from the purge. */
219
+ exludingLabelKeys?: string[];
220
+ }
221
+ export interface PurgeResponse {
222
+ /** Number of deleted items */
223
+ deletedItems?: number;
224
+ }
225
+ export interface GdprListRequest {
226
+ /** Contacts Instance ID of the site. */
227
+ instanceId?: string;
228
+ }
229
+ export interface GdprListResponse {
230
+ /** List of labels */
231
+ labels?: ContactLabel[];
232
+ }
233
+ export interface QueryLabelsRequest {
234
+ /** Query options. */
235
+ query?: Query;
236
+ /**
237
+ * Language for localization.
238
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
239
+ */
240
+ language?: string | null;
241
+ }
242
+ export interface Query {
243
+ /**
244
+ * ilter object.
245
+ *
246
+ * Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
247
+ *
248
+ * For a detailed list of supported filters, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
249
+ *
250
+ * Example: `{ "filter": {
251
+ * "displayName": {
252
+ * "$startsWith": "Referral"
253
+ * }
254
+ * }
255
+ * }`
256
+ */
257
+ filter?: Record<string, any> | null;
258
+ /**
259
+ * Sorting options. For a list of fields that can be sorted, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
260
+ *
261
+ * Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
262
+ */
263
+ sort?: Sorting[];
264
+ /** Pagination options. */
265
+ paging?: Paging;
266
+ }
267
+ export interface QueryLabelsResponse {
268
+ /** List of labels */
269
+ labels?: ContactLabel[];
270
+ /** Details on the paged set of results returned. */
271
+ pagingMetadata?: PagingMetadata;
272
+ }
273
+ export interface DomainEvent extends DomainEventBodyOneOf {
274
+ createdEvent?: EntityCreatedEvent;
275
+ updatedEvent?: EntityUpdatedEvent;
276
+ deletedEvent?: EntityDeletedEvent;
277
+ actionEvent?: ActionEvent;
278
+ /**
279
+ * Unique event ID.
280
+ * Allows clients to ignore duplicate webhooks.
281
+ */
282
+ _id?: string;
283
+ /**
284
+ * Assumes actions are also always typed to an entity_type
285
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
286
+ */
287
+ entityFqdn?: string;
288
+ /**
289
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
290
+ * This is although the created/updated/deleted notion is duplication of the oneof types
291
+ * Example: created/updated/deleted/started/completed/email_opened
292
+ */
293
+ slug?: string;
294
+ /** ID of the entity associated with the event. */
295
+ entityId?: string;
296
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
297
+ eventTime?: Date | null;
298
+ /**
299
+ * Whether the event was triggered as a result of a privacy regulation application
300
+ * (for example, GDPR).
301
+ */
302
+ triggeredByAnonymizeRequest?: boolean | null;
303
+ /** If present, indicates the action that triggered the event. */
304
+ originatedFrom?: string | null;
305
+ /**
306
+ * A sequence number defining the order of updates to the underlying entity.
307
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
308
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
309
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
310
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
311
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
312
+ */
313
+ entityEventSequence?: string | null;
314
+ }
315
+ /** @oneof */
316
+ export interface DomainEventBodyOneOf {
317
+ createdEvent?: EntityCreatedEvent;
318
+ updatedEvent?: EntityUpdatedEvent;
319
+ deletedEvent?: EntityDeletedEvent;
320
+ actionEvent?: ActionEvent;
321
+ }
322
+ export interface EntityCreatedEvent {
323
+ entity?: string;
324
+ }
325
+ export interface RestoreInfo {
326
+ deletedDate?: Date | null;
327
+ }
328
+ export interface EntityUpdatedEvent {
329
+ /**
330
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
331
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
332
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
333
+ */
334
+ currentEntity?: string;
335
+ }
336
+ export interface EntityDeletedEvent {
337
+ /** Entity that was deleted */
338
+ deletedEntity?: string | null;
339
+ }
340
+ export interface ActionEvent {
341
+ body?: string;
342
+ }
343
+ export interface MessageEnvelope {
344
+ /** App instance ID. */
345
+ instanceId?: string | null;
346
+ /** Event type. */
347
+ eventType?: string;
348
+ /** The identification type and identity data. */
349
+ identity?: IdentificationData;
350
+ /** Stringify payload. */
351
+ data?: string;
352
+ }
353
+ export interface IdentificationData extends IdentificationDataIdOneOf {
354
+ /** ID of a site visitor that has not logged in to the site. */
355
+ anonymousVisitorId?: string;
356
+ /** ID of a site visitor that has logged in to the site. */
357
+ memberId?: string;
358
+ /** ID of a Wix user (site owner, contributor, etc.). */
359
+ wixUserId?: string;
360
+ /** ID of an app. */
361
+ appId?: string;
362
+ /** @readonly */
363
+ identityType?: WebhookIdentityType;
364
+ }
365
+ /** @oneof */
366
+ export interface IdentificationDataIdOneOf {
367
+ /** ID of a site visitor that has not logged in to the site. */
368
+ anonymousVisitorId?: string;
369
+ /** ID of a site visitor that has logged in to the site. */
370
+ memberId?: string;
371
+ /** ID of a Wix user (site owner, contributor, etc.). */
372
+ wixUserId?: string;
373
+ /** ID of an app. */
374
+ appId?: string;
375
+ }
376
+ export declare enum WebhookIdentityType {
377
+ UNKNOWN = "UNKNOWN",
378
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
379
+ MEMBER = "MEMBER",
380
+ WIX_USER = "WIX_USER",
381
+ APP = "APP"
382
+ }
383
+ export interface ContactLabelNonNullableFields {
384
+ key: string;
385
+ displayName: string;
386
+ labelType: LabelType;
387
+ }
388
+ export interface FindOrCreateLabelResponseNonNullableFields {
389
+ label?: ContactLabelNonNullableFields;
390
+ newLabel: boolean;
391
+ }
392
+ export interface GetLabelResponseNonNullableFields {
393
+ label?: ContactLabelNonNullableFields;
394
+ }
395
+ export interface UpdateLabelResponseNonNullableFields {
396
+ label?: ContactLabelNonNullableFields;
397
+ }
398
+ export interface QueryLabelsResponseNonNullableFields {
399
+ labels: ContactLabelNonNullableFields[];
400
+ }
401
+ export interface BaseEventMetadata {
402
+ /** App instance ID. */
403
+ instanceId?: string | null;
404
+ /** Event type. */
405
+ eventType?: string;
406
+ /** The identification type and identity data. */
407
+ identity?: IdentificationData;
408
+ }
409
+ export interface EventMetadata extends BaseEventMetadata {
410
+ /**
411
+ * Unique event ID.
412
+ * Allows clients to ignore duplicate webhooks.
413
+ */
414
+ _id?: string;
415
+ /**
416
+ * Assumes actions are also always typed to an entity_type
417
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
418
+ */
419
+ entityFqdn?: string;
420
+ /**
421
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
422
+ * This is although the created/updated/deleted notion is duplication of the oneof types
423
+ * Example: created/updated/deleted/started/completed/email_opened
424
+ */
425
+ slug?: string;
426
+ /** ID of the entity associated with the event. */
427
+ entityId?: string;
428
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
429
+ eventTime?: Date | null;
430
+ /**
431
+ * Whether the event was triggered as a result of a privacy regulation application
432
+ * (for example, GDPR).
433
+ */
434
+ triggeredByAnonymizeRequest?: boolean | null;
435
+ /** If present, indicates the action that triggered the event. */
436
+ originatedFrom?: string | null;
437
+ /**
438
+ * A sequence number defining the order of updates to the underlying entity.
439
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
440
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
441
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
442
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
443
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
444
+ */
445
+ entityEventSequence?: string | null;
446
+ }
447
+ export interface LabelCreatedEnvelope {
448
+ entity: ContactLabel;
449
+ metadata: EventMetadata;
450
+ }
451
+ /**
452
+ * Triggered when a label is created.
453
+ * @permissionScope Manage Bookings Services and Settings
454
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
455
+ * @permissionScope Manage Contact Labels
456
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
457
+ * @permissionScope Manage Portfolio
458
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
459
+ * @permissionScope Manage Restaurants - all permissions
460
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
461
+ * @permissionScope Manage Members and Contacts - all permissions
462
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
463
+ * @permissionId CONTACTS_LABELS.VIEW
464
+ * @webhook
465
+ * @eventType wix.contacts.v4.label_created
466
+ */
467
+ export declare function onLabelCreated(handler: (event: LabelCreatedEnvelope) => void | Promise<void>): void;
468
+ export interface LabelDeletedEnvelope {
469
+ metadata: EventMetadata;
470
+ }
471
+ /**
472
+ * Triggered when a label is deleted.
473
+ * @permissionScope Manage Bookings Services and Settings
474
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
475
+ * @permissionScope Manage Contact Labels
476
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
477
+ * @permissionScope Manage Portfolio
478
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
479
+ * @permissionScope Manage Restaurants - all permissions
480
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
481
+ * @permissionScope Manage Members and Contacts - all permissions
482
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
483
+ * @permissionId CONTACTS_LABELS.VIEW
484
+ * @webhook
485
+ * @eventType wix.contacts.v4.label_deleted
486
+ */
487
+ export declare function onLabelDeleted(handler: (event: LabelDeletedEnvelope) => void | Promise<void>): void;
488
+ export interface LabelUpdatedEnvelope {
489
+ entity: ContactLabel;
490
+ metadata: EventMetadata;
491
+ }
492
+ /**
493
+ * Triggered when a label is updated.
494
+ * @permissionScope Manage Bookings Services and Settings
495
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
496
+ * @permissionScope Manage Contact Labels
497
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
498
+ * @permissionScope Manage Portfolio
499
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
500
+ * @permissionScope Manage Restaurants - all permissions
501
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
502
+ * @permissionScope Manage Members and Contacts - all permissions
503
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
504
+ * @permissionId CONTACTS_LABELS.VIEW
505
+ * @webhook
506
+ * @eventType wix.contacts.v4.label_updated
507
+ */
508
+ export declare function onLabelUpdated(handler: (event: LabelUpdatedEnvelope) => void | Promise<void>): void;
509
+ /**
510
+ * Retrieves a label with a specified name, or creates one if it doesn't exist.
511
+ *
512
+ * Successful calls to this method always return a label,
513
+ * which can be specified in subsequent calls.
514
+ *
515
+ * For example, in the Contacts API, Label Contact and Unlabel Contact
516
+ * calls will fail if you include a non-existent label.
517
+ * To ensure successful calls, you can call this method first,
518
+ * and then use the response in the Label Contact and Unlabel Contact calls.
519
+ *
520
+ * To find an existing label without potentially creating a new one, call
521
+ * Get Label or Query Labels.
522
+ * @param displayName - Display name to retrieve or create.
523
+ *
524
+ * If an existing label is an exact match
525
+ * for the specified display name,
526
+ * the existing label is returned.
527
+ * If not, a new label is created and returned.
528
+ * @public
529
+ * @requiredField displayName
530
+ * @param options - Language options.
531
+ * @permissionId CONTACTS_LABELS.MODIFY
532
+ * @permissionScope Manage Contact Labels
533
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
534
+ * @permissionScope Manage Members and Contacts - all permissions
535
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
536
+ * @applicableIdentity APP
537
+ * @returns Label that was found or created.
538
+ * @fqn com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.FindOrCreateLabel
539
+ */
540
+ export declare function findOrCreateLabel(displayName: string, options?: FindOrCreateLabelOptions): Promise<FindOrCreateLabelResponse & FindOrCreateLabelResponseNonNullableFields>;
541
+ export interface FindOrCreateLabelOptions {
542
+ /**
543
+ * Language for localization.
544
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
545
+ */
546
+ language?: string | null;
547
+ }
548
+ /**
549
+ * Retrieves a label by the specified label key.
550
+ * @param key - Label key.
551
+ *
552
+ * `key` is generated when the label is created.
553
+ * It can't be modified, even if `displayName` is updated.
554
+ * @public
555
+ * @requiredField key
556
+ * @param options - Language options.
557
+ * @permissionId CONTACTS_LABELS.VIEW
558
+ * @permissionScope Manage Bookings Services and Settings
559
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
560
+ * @permissionScope Manage Contact Labels
561
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
562
+ * @permissionScope Manage Portfolio
563
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
564
+ * @permissionScope Manage Restaurants - all permissions
565
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
566
+ * @permissionScope Manage Members and Contacts - all permissions
567
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
568
+ * @applicableIdentity APP
569
+ * @returns The specified label.
570
+ * @fqn com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.GetLabel
571
+ */
572
+ export declare function getLabel(key: string, options?: GetLabelOptions): Promise<ContactLabel & ContactLabelNonNullableFields>;
573
+ export interface GetLabelOptions {
574
+ /**
575
+ * Language for localization.
576
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
577
+ */
578
+ language?: string | null;
579
+ }
580
+ /**
581
+ * Renames a label.
582
+ * @param key - Label key.
583
+ *
584
+ * `key` is generated when the label is created.
585
+ * It can't be modified, even if `displayName` is updated.
586
+ * @public
587
+ * @requiredField key
588
+ * @requiredField label
589
+ * @requiredField label.displayName
590
+ * @param options - Language options.
591
+ * @param label - Label to rename.
592
+ * @permissionId CONTACTS_LABELS.MODIFY
593
+ * @permissionScope Manage Contact Labels
594
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
595
+ * @permissionScope Manage Members and Contacts - all permissions
596
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
597
+ * @applicableIdentity APP
598
+ * @returns Renamed label.
599
+ * @fqn com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.UpdateLabel
600
+ */
601
+ export declare function renameLabel(key: string, label: RenameLabel, options?: RenameLabelOptions): Promise<ContactLabel & ContactLabelNonNullableFields>;
602
+ export interface RenameLabel {
603
+ /**
604
+ * Label namespace.
605
+ *
606
+ * Labels created by calling the Find Or Create Label method
607
+ * are automatically assigned to the `custom` namespace.
608
+ * @readonly
609
+ */
610
+ namespace?: string | null;
611
+ /**
612
+ * Display name for the namespace,
613
+ * used to organize the list of labels in the site dashboard.
614
+ * @readonly
615
+ */
616
+ namespaceDisplayName?: string | null;
617
+ /** Label display name shown in the dashboard. */
618
+ displayName?: string;
619
+ /**
620
+ * Label type indicating how the label was created.
621
+ * @readonly
622
+ */
623
+ labelType?: LabelType;
624
+ /**
625
+ * Date and time the label was created.
626
+ * @readonly
627
+ */
628
+ _createdDate?: Date | null;
629
+ /**
630
+ * Date and time the label was last updated.
631
+ * @readonly
632
+ */
633
+ _updatedDate?: Date | null;
634
+ }
635
+ export interface RenameLabelOptions {
636
+ /**
637
+ * Language for localization.
638
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.
639
+ */
640
+ language?: string | null;
641
+ }
642
+ /**
643
+ * Deletes the specified label from a site and removes it from the contacts it applies to.
644
+ * @param key - Label key to delete.
645
+ * @public
646
+ * @requiredField key
647
+ * @permissionId CONTACTS_LABELS.MODIFY
648
+ * @permissionScope Manage Contact Labels
649
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
650
+ * @permissionScope Manage Members and Contacts - all permissions
651
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
652
+ * @applicableIdentity APP
653
+ * @fqn com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.DeleteLabel
654
+ */
655
+ export declare function deleteLabel(key: string): Promise<void>;
656
+ /**
657
+ * Creates a query to retrieve a list of labels.
658
+ *
659
+ * The `queryLabels()` method builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.
660
+ *
661
+ * The returned object contains the query definition, which is used to call the query using the `find()` method.
662
+ *
663
+ * You can refine the query by chaining `LabelsQueryBuilder` methods onto the query. `LabelsQueryBuilder` methods enable you to filter, sort, and control the response that `queryLabels()` returns.
664
+ *
665
+ * `queryLabels()` is called with the following `LabelsQueryBuilder` defaults, which you can override:
666
+ * - `skip(0)`
667
+ * - `limit(50)`
668
+ * - `descending('_createdDate')`
669
+ *
670
+ * The following `LabelsQueryBuilder` methods are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the `items` field in `LabelsQueryResult`.
671
+ *
672
+ *
673
+ * @public
674
+ * @param options - Language options.
675
+ * @permissionScope Manage Bookings Services and Settings
676
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
677
+ * @permissionScope Manage Contact Labels
678
+ * @permissionScopeId SCOPE.DC-CONTACTS.MANAGE-LABELS
679
+ * @permissionScope Manage Portfolio
680
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
681
+ * @permissionScope Manage Restaurants - all permissions
682
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
683
+ * @permissionScope Manage Members and Contacts - all permissions
684
+ * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
685
+ * @permissionId CONTACTS_LABELS.VIEW
686
+ * @applicableIdentity APP
687
+ * @fqn com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.QueryLabels
688
+ */
689
+ export declare function queryLabels(options?: QueryLabelsOptions): LabelsQueryBuilder;
690
+ export interface QueryLabelsOptions {
691
+ /**
692
+ * Language for localization.
693
+ *
694
+ * 2-letter language code in
695
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
696
+ */
697
+ language?: string | null | undefined;
698
+ }
699
+ interface QueryOffsetResult {
700
+ currentPage: number | undefined;
701
+ totalPages: number | undefined;
702
+ totalCount: number | undefined;
703
+ hasNext: () => boolean;
704
+ hasPrev: () => boolean;
705
+ length: number;
706
+ pageSize: number;
707
+ }
708
+ export interface LabelsQueryResult extends QueryOffsetResult {
709
+ items: ContactLabel[];
710
+ query: LabelsQueryBuilder;
711
+ next: () => Promise<LabelsQueryResult>;
712
+ prev: () => Promise<LabelsQueryResult>;
713
+ }
714
+ export interface LabelsQueryBuilder {
715
+ /** @param propertyName - Property whose value is compared with `value`.
716
+ * @param value - Value to compare against.
717
+ */
718
+ eq: (propertyName: 'namespace' | 'key' | 'displayName' | 'labelType' | '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
719
+ /** @param propertyName - Property whose value is compared with `value`.
720
+ * @param value - Value to compare against.
721
+ */
722
+ ne: (propertyName: 'namespace' | 'key' | 'displayName' | '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
723
+ /** @param propertyName - Property whose value is compared with `value`.
724
+ * @param value - Value to compare against.
725
+ */
726
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
727
+ /** @param propertyName - Property whose value is compared with `value`.
728
+ * @param value - Value to compare against.
729
+ */
730
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
731
+ /** @param propertyName - Property whose value is compared with `value`.
732
+ * @param value - Value to compare against.
733
+ */
734
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
735
+ /** @param propertyName - Property whose value is compared with `value`.
736
+ * @param value - Value to compare against.
737
+ */
738
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
739
+ /** @param propertyName - Property whose value is compared with `string`.
740
+ * @param string - String to compare against. Case-insensitive.
741
+ */
742
+ startsWith: (propertyName: 'displayName', value: string) => LabelsQueryBuilder;
743
+ in: (propertyName: 'key' | 'displayName', value: any) => LabelsQueryBuilder;
744
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
745
+ ascending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => LabelsQueryBuilder;
746
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
747
+ descending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => LabelsQueryBuilder;
748
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
749
+ limit: (limit: number) => LabelsQueryBuilder;
750
+ /** @param skip - Number of items to skip in the query results before returning the results. */
751
+ skip: (skip: number) => LabelsQueryBuilder;
752
+ find: () => Promise<LabelsQueryResult>;
753
+ }
754
+ export {};