@wix/crm 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +4 -1
- package/build/cjs/index.js +5 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.http.d.ts +192 -0
- package/build/cjs/src/contacts-v4-contact.http.js +522 -0
- package/build/cjs/src/contacts-v4-contact.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.public.d.ts +14 -0
- package/build/cjs/src/contacts-v4-contact.public.js +64 -0
- package/build/cjs/src/contacts-v4-contact.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.types.d.ts +1310 -0
- package/build/cjs/src/contacts-v4-contact.types.js +202 -0
- package/build/cjs/src/contacts-v4-contact.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +1663 -0
- package/build/cjs/src/contacts-v4-contact.universal.js +903 -0
- package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +31 -0
- package/build/cjs/src/contacts-v4-extended-field.http.js +215 -0
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +12 -0
- package/build/cjs/src/contacts-v4-extended-field.public.js +40 -0
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +257 -0
- package/build/cjs/src/contacts-v4-extended-field.types.js +23 -0
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +476 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.js +393 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.http.d.ts +31 -0
- package/build/cjs/src/contacts-v4-label.http.js +191 -0
- package/build/cjs/src/contacts-v4-label.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.public.d.ts +11 -0
- package/build/cjs/src/contacts-v4-label.public.js +33 -0
- package/build/cjs/src/contacts-v4-label.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.types.d.ts +253 -0
- package/build/cjs/src/contacts-v4-label.types.js +17 -0
- package/build/cjs/src/contacts-v4-label.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.universal.d.ts +442 -0
- package/build/cjs/src/contacts-v4-label.universal.js +326 -0
- package/build/cjs/src/contacts-v4-label.universal.js.map +1 -0
- package/build/es/index.d.ts +4 -1
- package/build/es/index.js +4 -1
- package/build/es/index.js.map +1 -1
- package/build/es/src/contacts-v4-contact.http.d.ts +192 -0
- package/build/es/src/contacts-v4-contact.http.js +512 -0
- package/build/es/src/contacts-v4-contact.http.js.map +1 -0
- package/build/es/src/contacts-v4-contact.public.d.ts +14 -0
- package/build/es/src/contacts-v4-contact.public.js +39 -0
- package/build/es/src/contacts-v4-contact.public.js.map +1 -0
- package/build/es/src/contacts-v4-contact.types.d.ts +1310 -0
- package/build/es/src/contacts-v4-contact.types.js +199 -0
- package/build/es/src/contacts-v4-contact.types.js.map +1 -0
- package/build/es/src/contacts-v4-contact.universal.d.ts +1663 -0
- package/build/es/src/contacts-v4-contact.universal.js +874 -0
- package/build/es/src/contacts-v4-contact.universal.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.http.d.ts +31 -0
- package/build/es/src/contacts-v4-extended-field.http.js +207 -0
- package/build/es/src/contacts-v4-extended-field.http.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.public.d.ts +12 -0
- package/build/es/src/contacts-v4-extended-field.public.js +29 -0
- package/build/es/src/contacts-v4-extended-field.public.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.types.d.ts +257 -0
- package/build/es/src/contacts-v4-extended-field.types.js +20 -0
- package/build/es/src/contacts-v4-extended-field.types.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +476 -0
- package/build/es/src/contacts-v4-extended-field.universal.js +366 -0
- package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -0
- package/build/es/src/contacts-v4-label.http.d.ts +31 -0
- package/build/es/src/contacts-v4-label.http.js +184 -0
- package/build/es/src/contacts-v4-label.http.js.map +1 -0
- package/build/es/src/contacts-v4-label.public.d.ts +11 -0
- package/build/es/src/contacts-v4-label.public.js +24 -0
- package/build/es/src/contacts-v4-label.public.js.map +1 -0
- package/build/es/src/contacts-v4-label.types.d.ts +253 -0
- package/build/es/src/contacts-v4-label.types.js +14 -0
- package/build/es/src/contacts-v4-label.types.js.map +1 -0
- package/build/es/src/contacts-v4-label.universal.d.ts +442 -0
- package/build/es/src/contacts-v4-label.universal.js +300 -0
- package/build/es/src/contacts-v4-label.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/** Label that was found or created. */
|
|
8
|
+
export interface ContactLabel {
|
|
9
|
+
/**
|
|
10
|
+
* Label namespace.
|
|
11
|
+
*
|
|
12
|
+
* Labels created by site contributors or 3rd-party apps
|
|
13
|
+
* are automatically assigned to the `custom` namespace.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
namespace?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Display name for the namespace,
|
|
19
|
+
* used to organize the list of labels in the site Dashboard.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
namespaceDisplayName?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Label key.
|
|
25
|
+
*
|
|
26
|
+
* `key` is generated when the label is created
|
|
27
|
+
* and cannot be modified, even if `displayName` changes.
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
key?: string;
|
|
31
|
+
/** Label display name shown in the Dashboard. */
|
|
32
|
+
displayName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Label type.
|
|
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.
|
|
39
|
+
* @readonly
|
|
40
|
+
*/
|
|
41
|
+
labelType?: LabelType;
|
|
42
|
+
/**
|
|
43
|
+
* Date and time the label was created.
|
|
44
|
+
* @readonly
|
|
45
|
+
*/
|
|
46
|
+
_createdDate?: Date;
|
|
47
|
+
/**
|
|
48
|
+
* Date and time the label was last updated.
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
_updatedDate?: Date;
|
|
52
|
+
}
|
|
53
|
+
export declare enum LabelType {
|
|
54
|
+
/** Need UNKNOWN to be able to fetch all labels */
|
|
55
|
+
UNKNOWN = "UNKNOWN",
|
|
56
|
+
SYSTEM = "SYSTEM",
|
|
57
|
+
USER_DEFINED = "USER_DEFINED",
|
|
58
|
+
WIX_APP_DEFINED = "WIX_APP_DEFINED"
|
|
59
|
+
}
|
|
60
|
+
/** Label filter options. */
|
|
61
|
+
export interface ListLabelsRequest {
|
|
62
|
+
/** Filter for labels of the specified type. */
|
|
63
|
+
labelType?: LabelType;
|
|
64
|
+
/** Filter for labels in the specified namespace. */
|
|
65
|
+
namespace?: string | null;
|
|
66
|
+
/** Filter for labels where `displayName` starts with the specified case-sensitive string. */
|
|
67
|
+
startsWith?: string | null;
|
|
68
|
+
/** Sorting options. */
|
|
69
|
+
sort?: Sorting;
|
|
70
|
+
/** Paging options. */
|
|
71
|
+
paging?: Paging;
|
|
72
|
+
/** Language for localization. */
|
|
73
|
+
language?: string | null;
|
|
74
|
+
}
|
|
75
|
+
export interface Sorting {
|
|
76
|
+
/** Name of the field to sort by. */
|
|
77
|
+
fieldName?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
80
|
+
*
|
|
81
|
+
* Defaults to `ASC`.
|
|
82
|
+
*/
|
|
83
|
+
order?: SortOrder;
|
|
84
|
+
}
|
|
85
|
+
export declare enum SortOrder {
|
|
86
|
+
ASC = "ASC",
|
|
87
|
+
DESC = "DESC"
|
|
88
|
+
}
|
|
89
|
+
export interface Paging {
|
|
90
|
+
/**
|
|
91
|
+
* Number of items to return.
|
|
92
|
+
*
|
|
93
|
+
* Defaults to `1000`. <br>
|
|
94
|
+
* Maximum: `2000`.
|
|
95
|
+
*/
|
|
96
|
+
limit?: number | null;
|
|
97
|
+
/** Number of items to skip in the current sort order. */
|
|
98
|
+
offset?: number | null;
|
|
99
|
+
}
|
|
100
|
+
/** List of labels. */
|
|
101
|
+
export interface ListLabelsResponse {
|
|
102
|
+
/** List of labels. */
|
|
103
|
+
labels?: ContactLabel[];
|
|
104
|
+
/** Metadata for the page of results. */
|
|
105
|
+
metadata?: PagingMetadata;
|
|
106
|
+
}
|
|
107
|
+
export interface PagingMetadata {
|
|
108
|
+
/** Number of items returned. */
|
|
109
|
+
count?: number | null;
|
|
110
|
+
/** Requested offset. */
|
|
111
|
+
offset?: number | null;
|
|
112
|
+
/** Number of items that matched the query. */
|
|
113
|
+
total?: number | null;
|
|
114
|
+
/**
|
|
115
|
+
* Indicates if `total` calculation timed out before the response was sent.
|
|
116
|
+
* Typically this happens if there is a large set of results.
|
|
117
|
+
*/
|
|
118
|
+
tooManyToCount?: boolean | null;
|
|
119
|
+
}
|
|
120
|
+
/** Label to find or create. */
|
|
121
|
+
export interface FindOrCreateLabelRequest {
|
|
122
|
+
/**
|
|
123
|
+
* Display name to retrieve or create.
|
|
124
|
+
*
|
|
125
|
+
* If an existing label is an exact match
|
|
126
|
+
* for the specified display name,
|
|
127
|
+
* the existing label is returned.
|
|
128
|
+
* If not, a new label is created and returned.
|
|
129
|
+
*/
|
|
130
|
+
displayName: string;
|
|
131
|
+
/** Language for localization. */
|
|
132
|
+
language?: string | null;
|
|
133
|
+
}
|
|
134
|
+
/** Label that was found or created. */
|
|
135
|
+
export interface FindOrCreateLabelResponse {
|
|
136
|
+
/** Label that was found or created. */
|
|
137
|
+
label?: ContactLabel;
|
|
138
|
+
/**
|
|
139
|
+
* Indicates whether the label was just created or already existed.
|
|
140
|
+
*
|
|
141
|
+
* If the label was just created, returns `true`.
|
|
142
|
+
* If it already existed, returns `false`.
|
|
143
|
+
*/
|
|
144
|
+
newLabel?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface LabelsQuotaReached {
|
|
147
|
+
labelsQuota?: string | null;
|
|
148
|
+
labelsCurrentTotal?: string | null;
|
|
149
|
+
}
|
|
150
|
+
export interface ListLabelNamespacesRequest {
|
|
151
|
+
/** Language for localization */
|
|
152
|
+
language?: string | null;
|
|
153
|
+
}
|
|
154
|
+
export interface ListLabelNamespacesResponse {
|
|
155
|
+
namespaces?: ContactLabelNamespace[];
|
|
156
|
+
}
|
|
157
|
+
export interface ContactLabelNamespace {
|
|
158
|
+
/**
|
|
159
|
+
* Namespace key
|
|
160
|
+
* @readonly
|
|
161
|
+
*/
|
|
162
|
+
key?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Namespace display name
|
|
165
|
+
* @readonly
|
|
166
|
+
*/
|
|
167
|
+
displayName?: string | null;
|
|
168
|
+
}
|
|
169
|
+
export interface GetLabelRequest {
|
|
170
|
+
/**
|
|
171
|
+
* Label key.
|
|
172
|
+
*
|
|
173
|
+
* `key` is generated when the label is created
|
|
174
|
+
* and cannot be modified, even if `displayName` changes.
|
|
175
|
+
*/
|
|
176
|
+
key?: string;
|
|
177
|
+
/** Language for localization. */
|
|
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
|
+
legacyId?: string;
|
|
187
|
+
/** Language for localization */
|
|
188
|
+
language?: string | null;
|
|
189
|
+
}
|
|
190
|
+
export interface GetLabelByLegacyIdResponse {
|
|
191
|
+
label?: ContactLabel;
|
|
192
|
+
}
|
|
193
|
+
export interface UpdateLabelRequest {
|
|
194
|
+
/** Label details to update. */
|
|
195
|
+
label?: ContactLabel;
|
|
196
|
+
/** Language for localization. */
|
|
197
|
+
language?: string | null;
|
|
198
|
+
}
|
|
199
|
+
/** Updated label. */
|
|
200
|
+
export interface UpdateLabelResponse {
|
|
201
|
+
/** Updated label. */
|
|
202
|
+
label?: ContactLabel;
|
|
203
|
+
}
|
|
204
|
+
export interface DeleteLabelRequest {
|
|
205
|
+
/** Label key to delete. */
|
|
206
|
+
key: string;
|
|
207
|
+
}
|
|
208
|
+
export interface DeleteLabelResponse {
|
|
209
|
+
}
|
|
210
|
+
export interface PurgeRequest {
|
|
211
|
+
instanceId?: string;
|
|
212
|
+
exludingLabelKeys?: string[];
|
|
213
|
+
}
|
|
214
|
+
export interface PurgeResponse {
|
|
215
|
+
deletedItems?: number;
|
|
216
|
+
}
|
|
217
|
+
export interface GdprListRequest {
|
|
218
|
+
instanceId?: string;
|
|
219
|
+
}
|
|
220
|
+
export interface GdprListResponse {
|
|
221
|
+
labels?: ContactLabel[];
|
|
222
|
+
}
|
|
223
|
+
export interface QueryLabelsRequest {
|
|
224
|
+
/** Query options. */
|
|
225
|
+
query?: Query;
|
|
226
|
+
/** Language for localization. */
|
|
227
|
+
language?: string | null;
|
|
228
|
+
}
|
|
229
|
+
export interface Query {
|
|
230
|
+
/**
|
|
231
|
+
* ilter object.
|
|
232
|
+
*
|
|
233
|
+
* Possible filters: `$eq`, `$gt`, `$gte`, `$in`, `$lt`, `$lte`, `$ne`, `$startsWith`.
|
|
234
|
+
*
|
|
235
|
+
* For a detailed list of supported filters, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter).
|
|
236
|
+
*
|
|
237
|
+
* Example: `{ "filter": {
|
|
238
|
+
* "displayName": {
|
|
239
|
+
* "$startsWith": "Referral"
|
|
240
|
+
* }
|
|
241
|
+
* }
|
|
242
|
+
* }`
|
|
243
|
+
*/
|
|
244
|
+
filter?: Record<string, any> | null;
|
|
245
|
+
/**
|
|
246
|
+
* 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).
|
|
247
|
+
*
|
|
248
|
+
* Example: `{ "sort": [{"fieldName": "displayName", "order": "DESC"}] }`
|
|
249
|
+
*/
|
|
250
|
+
sort?: Sorting[];
|
|
251
|
+
/** Pagination options. */
|
|
252
|
+
paging?: Paging;
|
|
253
|
+
}
|
|
254
|
+
export interface QueryLabelsResponse {
|
|
255
|
+
/** List of labels */
|
|
256
|
+
labels?: ContactLabel[];
|
|
257
|
+
/** Details on the paged set of results returned. */
|
|
258
|
+
pagingMetadata?: PagingMetadata;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Retrieves a label with a given name, or creates one if it doesn't exist.
|
|
262
|
+
*
|
|
263
|
+
* Successful calls to this endpoint always return a label,
|
|
264
|
+
* which can be passed to subsequent requests.
|
|
265
|
+
*
|
|
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.
|
|
272
|
+
*
|
|
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
|
+
*
|
|
277
|
+
* This function is not a universal function and runs only on the backend.
|
|
278
|
+
* @param displayName - Display name to retrieve or create.
|
|
279
|
+
*
|
|
280
|
+
* If an existing label is an exact match
|
|
281
|
+
* for the specified display name,
|
|
282
|
+
* the existing label is returned.
|
|
283
|
+
* If not, a new label is created and returned.
|
|
284
|
+
* @public
|
|
285
|
+
* @documentationMaturity preview
|
|
286
|
+
* @requiredField displayName
|
|
287
|
+
* @returns Label that was found or created.
|
|
288
|
+
*/
|
|
289
|
+
export declare function findOrCreateLabel(displayName: string, options?: FindOrCreateLabelOptions): Promise<FindOrCreateLabelResponse>;
|
|
290
|
+
export interface FindOrCreateLabelOptions {
|
|
291
|
+
/** Language for localization. */
|
|
292
|
+
language?: string | null;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Updates a label's specified properties.
|
|
296
|
+
*
|
|
297
|
+
* This function is not a universal function and runs only on the backend.
|
|
298
|
+
* @param key - Label key.
|
|
299
|
+
*
|
|
300
|
+
* `key` is generated when the label is created
|
|
301
|
+
* and cannot be modified, even if `displayName` changes.
|
|
302
|
+
* @public
|
|
303
|
+
* @documentationMaturity preview
|
|
304
|
+
* @requiredField key
|
|
305
|
+
* @requiredField options.label.displayName
|
|
306
|
+
* @returns Updated label.
|
|
307
|
+
*/
|
|
308
|
+
export declare function renameLabel(key: string, options?: RenameLabelOptions): Promise<ContactLabel>;
|
|
309
|
+
export interface RenameLabelOptions {
|
|
310
|
+
label: {
|
|
311
|
+
/**
|
|
312
|
+
* Label namespace.
|
|
313
|
+
*
|
|
314
|
+
* Labels created by site contributors or 3rd-party apps
|
|
315
|
+
* are automatically assigned to the `custom` namespace.
|
|
316
|
+
* @readonly
|
|
317
|
+
*/
|
|
318
|
+
namespace?: string | null;
|
|
319
|
+
/**
|
|
320
|
+
* Display name for the namespace,
|
|
321
|
+
* used to organize the list of labels in the site Dashboard.
|
|
322
|
+
* @readonly
|
|
323
|
+
*/
|
|
324
|
+
namespaceDisplayName?: string | null;
|
|
325
|
+
/** Label display name shown in the Dashboard. */
|
|
326
|
+
displayName?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Label type.
|
|
329
|
+
*
|
|
330
|
+
* - `SYSTEM`: The label is a default system label for the Contact List.
|
|
331
|
+
* - `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.
|
|
332
|
+
* - `WIX_APP_DEFINED`: The label was created by a Wix app.
|
|
333
|
+
* @readonly
|
|
334
|
+
*/
|
|
335
|
+
labelType?: LabelType;
|
|
336
|
+
/**
|
|
337
|
+
* Date and time the label was created.
|
|
338
|
+
* @readonly
|
|
339
|
+
*/
|
|
340
|
+
_createdDate?: Date;
|
|
341
|
+
/**
|
|
342
|
+
* Date and time the label was last updated.
|
|
343
|
+
* @readonly
|
|
344
|
+
*/
|
|
345
|
+
_updatedDate?: Date;
|
|
346
|
+
};
|
|
347
|
+
/** Language for localization. */
|
|
348
|
+
language?: string | null;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Deletes a label from the site and removes it from contacts it applies to.
|
|
352
|
+
*
|
|
353
|
+
* This function is not a universal function and runs only on the backend.
|
|
354
|
+
* @param key - Label key to delete.
|
|
355
|
+
* @public
|
|
356
|
+
* @documentationMaturity preview
|
|
357
|
+
* @requiredField key
|
|
358
|
+
*/
|
|
359
|
+
export declare function deleteLabel(key: string): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
|
|
362
|
+
*
|
|
363
|
+
* 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
|
|
364
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
365
|
+
*
|
|
366
|
+
* This function is not a universal function and runs only on the backend.
|
|
367
|
+
* @public
|
|
368
|
+
* @documentationMaturity preview
|
|
369
|
+
*/
|
|
370
|
+
export declare function queryLabels(options?: QueryLabelsOptions): LabelsQueryBuilder;
|
|
371
|
+
export interface QueryLabelsOptions {
|
|
372
|
+
/** Language for localization. */
|
|
373
|
+
language?: string | null | undefined;
|
|
374
|
+
}
|
|
375
|
+
interface QueryOffsetResult {
|
|
376
|
+
currentPage: number;
|
|
377
|
+
totalPages: number;
|
|
378
|
+
totalCount: number;
|
|
379
|
+
hasNext: () => boolean;
|
|
380
|
+
hasPrev: () => boolean;
|
|
381
|
+
length: number;
|
|
382
|
+
pageSize: number;
|
|
383
|
+
}
|
|
384
|
+
export interface LabelsQueryResult extends QueryOffsetResult {
|
|
385
|
+
items: ContactLabel[];
|
|
386
|
+
query: LabelsQueryBuilder;
|
|
387
|
+
next: () => Promise<LabelsQueryResult>;
|
|
388
|
+
prev: () => Promise<LabelsQueryResult>;
|
|
389
|
+
}
|
|
390
|
+
export interface LabelsQueryBuilder {
|
|
391
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
392
|
+
* @param value - Value to compare against.
|
|
393
|
+
* @documentationMaturity preview
|
|
394
|
+
*/
|
|
395
|
+
eq: (propertyName: 'namespace' | 'key' | 'displayName' | 'labelType' | '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
|
|
396
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
397
|
+
* @param value - Value to compare against.
|
|
398
|
+
* @documentationMaturity preview
|
|
399
|
+
*/
|
|
400
|
+
ne: (propertyName: 'namespace' | 'key' | 'displayName' | '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
|
|
401
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
402
|
+
* @param value - Value to compare against.
|
|
403
|
+
* @documentationMaturity preview
|
|
404
|
+
*/
|
|
405
|
+
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
|
|
406
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
407
|
+
* @param value - Value to compare against.
|
|
408
|
+
* @documentationMaturity preview
|
|
409
|
+
*/
|
|
410
|
+
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
|
|
411
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
412
|
+
* @param value - Value to compare against.
|
|
413
|
+
* @documentationMaturity preview
|
|
414
|
+
*/
|
|
415
|
+
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => LabelsQueryBuilder;
|
|
416
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
417
|
+
* @param string - String to compare against. Case-insensitive.
|
|
418
|
+
* @documentationMaturity preview
|
|
419
|
+
*/
|
|
420
|
+
startsWith: (propertyName: 'displayName', value: string) => LabelsQueryBuilder;
|
|
421
|
+
/** @documentationMaturity preview */
|
|
422
|
+
in: (propertyName: 'key' | 'displayName', value: any) => LabelsQueryBuilder;
|
|
423
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
424
|
+
* @documentationMaturity preview
|
|
425
|
+
*/
|
|
426
|
+
ascending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => LabelsQueryBuilder;
|
|
427
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
428
|
+
* @documentationMaturity preview
|
|
429
|
+
*/
|
|
430
|
+
descending: (...propertyNames: Array<'displayName' | '_createdDate' | '_updatedDate'>) => LabelsQueryBuilder;
|
|
431
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
432
|
+
* @documentationMaturity preview
|
|
433
|
+
*/
|
|
434
|
+
limit: (limit: number) => LabelsQueryBuilder;
|
|
435
|
+
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
436
|
+
* @documentationMaturity preview
|
|
437
|
+
*/
|
|
438
|
+
skip: (skip: number) => LabelsQueryBuilder;
|
|
439
|
+
/** @documentationMaturity preview */
|
|
440
|
+
find: () => Promise<LabelsQueryResult>;
|
|
441
|
+
}
|
|
442
|
+
export {};
|