@wix/auto_sdk_crm_pipelines 1.0.0 → 1.0.1
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 +76 -130
- package/build/cjs/index.js +194 -977
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +998 -15
- package/build/cjs/index.typings.js +146 -767
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +133 -1005
- package/build/cjs/meta.js +128 -682
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +76 -130
- package/build/es/index.mjs +184 -947
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +998 -15
- package/build/es/index.typings.mjs +138 -743
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +133 -1005
- package/build/es/meta.mjs +121 -659
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +76 -163
- package/build/internal/cjs/index.js +194 -977
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +998 -15
- package/build/internal/cjs/index.typings.js +146 -767
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +133 -1005
- package/build/internal/cjs/meta.js +128 -682
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +76 -163
- package/build/internal/es/index.mjs +184 -947
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +998 -15
- package/build/internal/es/index.typings.mjs +138 -743
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +133 -1005
- package/build/internal/es/meta.mjs +121 -659
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
- package/build/cjs/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.ts +0 -2265
- package/build/es/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.mts +0 -2265
- package/build/internal/cjs/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.ts +0 -2303
- package/build/internal/es/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.mts +0 -2303
|
@@ -1,2265 +0,0 @@
|
|
|
1
|
-
import * as _wix_sdk_types from '@wix/sdk-types';
|
|
2
|
-
import { QuerySpec, SearchSpec, Query, Search, NonNullablePaths } from '@wix/sdk-types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A business entity representing a deal, lead, opportunity, or project that moves through pipeline stages.
|
|
6
|
-
*
|
|
7
|
-
* Cards contain comprehensive business information including contact details, monetary values,
|
|
8
|
-
* priorities, due dates, and outcomes. They progress through pipeline stages as work advances
|
|
9
|
-
* and can be assigned to team members for ownership and responsibility tracking.
|
|
10
|
-
*/
|
|
11
|
-
interface Card {
|
|
12
|
-
/**
|
|
13
|
-
* Card ID.
|
|
14
|
-
* @format GUID
|
|
15
|
-
* @readonly
|
|
16
|
-
*/
|
|
17
|
-
_id?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Revision number, which increments by 1 each time the card is updated.
|
|
20
|
-
* To prevent conflicting changes, the current revision must be passed when updating the card.
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
revision?: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* Date and time the card was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
26
|
-
* @readonly
|
|
27
|
-
*/
|
|
28
|
-
_createdDate?: Date | null;
|
|
29
|
-
/**
|
|
30
|
-
* Date and time the card was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
31
|
-
* @readonly
|
|
32
|
-
*/
|
|
33
|
-
_updatedDate?: Date | null;
|
|
34
|
-
/**
|
|
35
|
-
* ID of the pipeline containing this card.
|
|
36
|
-
* @format GUID
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
pipelineId?: string | null;
|
|
40
|
-
/**
|
|
41
|
-
* ID of the cards' current.
|
|
42
|
-
* @format GUID
|
|
43
|
-
*/
|
|
44
|
-
stageId?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Date and time when the card last moved between stagesin [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
47
|
-
* @readonly
|
|
48
|
-
*/
|
|
49
|
-
stageUpdatedDate?: Date | null;
|
|
50
|
-
/**
|
|
51
|
-
* How the card was moved to its current stage.
|
|
52
|
-
* @readonly
|
|
53
|
-
*/
|
|
54
|
-
stageUpdateSource?: CardSource;
|
|
55
|
-
/**
|
|
56
|
-
* The Card name.
|
|
57
|
-
* @minLength 1
|
|
58
|
-
* @maxLength 100
|
|
59
|
-
*/
|
|
60
|
-
name?: string | null;
|
|
61
|
-
/**
|
|
62
|
-
* Card description.
|
|
63
|
-
* @maxLength 1000
|
|
64
|
-
*/
|
|
65
|
-
description?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* Priority level of the card for task management.
|
|
68
|
-
*
|
|
69
|
-
* Default: `P3_MEDIUM`
|
|
70
|
-
*/
|
|
71
|
-
priority?: PriorityWithLiterals;
|
|
72
|
-
/**
|
|
73
|
-
* ID of the Wix user assigned to manage the card.
|
|
74
|
-
* @format GUID
|
|
75
|
-
*/
|
|
76
|
-
assigneeId?: string | null;
|
|
77
|
-
/**
|
|
78
|
-
* Date and time when the card is expected to moved to the done stage in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
79
|
-
* If the card remains active past this date, it becomes overdue.
|
|
80
|
-
*/
|
|
81
|
-
dueDate?: Date | null;
|
|
82
|
-
/**
|
|
83
|
-
* Date and time when the card becomes stale based on the stage's stale duration setting in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
84
|
-
* This date is automatically calculated and updated when the card moves to a new stage.
|
|
85
|
-
* @readonly
|
|
86
|
-
*/
|
|
87
|
-
staleDate?: Date | null;
|
|
88
|
-
/** Monetary value assigned to the card. */
|
|
89
|
-
value?: Money;
|
|
90
|
-
/**
|
|
91
|
-
* Final outcome of the card when moved to the done stage.
|
|
92
|
-
*
|
|
93
|
-
* Default: `NONE`
|
|
94
|
-
*/
|
|
95
|
-
outcome?: OutcomeWithLiterals;
|
|
96
|
-
/** Primary contact associated with the card. */
|
|
97
|
-
mainContact?: ContactInfo;
|
|
98
|
-
/**
|
|
99
|
-
* Secondary contacts associated with the card.
|
|
100
|
-
* @maxSize 10
|
|
101
|
-
*/
|
|
102
|
-
additionalContacts?: ContactInfo[];
|
|
103
|
-
/**
|
|
104
|
-
* Other entities linked to the card.
|
|
105
|
-
*
|
|
106
|
-
* For example, orders, invoices, activities, or other relevant entities.
|
|
107
|
-
* @maxSize 20
|
|
108
|
-
*/
|
|
109
|
-
linkedEntities?: LinkedEntity[];
|
|
110
|
-
/** Extended fields data. */
|
|
111
|
-
extendedFields?: ExtendedFields;
|
|
112
|
-
/** Tags for organizing and categorizing the card. */
|
|
113
|
-
tags?: PrivateTags;
|
|
114
|
-
}
|
|
115
|
-
interface CardSource {
|
|
116
|
-
/**
|
|
117
|
-
* ID of the Wix user who last moved the card.
|
|
118
|
-
* @format GUID
|
|
119
|
-
* @readonly
|
|
120
|
-
*/
|
|
121
|
-
userId?: string | null;
|
|
122
|
-
/**
|
|
123
|
-
* ID of the app that last moved the card.
|
|
124
|
-
* @format GUID
|
|
125
|
-
* @readonly
|
|
126
|
-
*/
|
|
127
|
-
appId?: string | null;
|
|
128
|
-
}
|
|
129
|
-
declare enum Priority {
|
|
130
|
-
/** Urgent priority. Card requires immediate attention. */
|
|
131
|
-
P1_URGENT = "P1_URGENT",
|
|
132
|
-
/** High priority. Card is important and should be addressed promptly. */
|
|
133
|
-
P2_HIGH = "P2_HIGH",
|
|
134
|
-
/** Medium priority. Card should be completed within regular workflow timelines. */
|
|
135
|
-
P3_MEDIUM = "P3_MEDIUM",
|
|
136
|
-
/** Low priority. Card can be addressed when time and resources allow. */
|
|
137
|
-
P4_LOW = "P4_LOW"
|
|
138
|
-
}
|
|
139
|
-
/** @enumType */
|
|
140
|
-
type PriorityWithLiterals = Priority | 'P1_URGENT' | 'P2_HIGH' | 'P3_MEDIUM' | 'P4_LOW';
|
|
141
|
-
/**
|
|
142
|
-
* Monetary amount with currency information.
|
|
143
|
-
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
144
|
-
*/
|
|
145
|
-
interface Money {
|
|
146
|
-
/**
|
|
147
|
-
* Monetary amount. For example, `"3.99"`, or `"-4.99"` for a negative amount.
|
|
148
|
-
* @format DECIMAL_VALUE
|
|
149
|
-
* @decimalValue options { maxScale:2 }
|
|
150
|
-
*/
|
|
151
|
-
value?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Three-letter currency code in ISO-4217 format.
|
|
154
|
-
* Currency is the same as the pipeline currency and is immutable.
|
|
155
|
-
* @format CURRENCY
|
|
156
|
-
* @readonly
|
|
157
|
-
*/
|
|
158
|
-
currency?: string;
|
|
159
|
-
}
|
|
160
|
-
declare enum Outcome {
|
|
161
|
-
/** No specific outcome. The card reached the final stage but hasn't been specified as successful or unsuccessful. */
|
|
162
|
-
NONE = "NONE",
|
|
163
|
-
/** Successful outcome. The card achieved its intended goal. */
|
|
164
|
-
WON = "WON",
|
|
165
|
-
/** Unsuccessful outcome. The card didn't achieve its intended goal. */
|
|
166
|
-
LOST = "LOST"
|
|
167
|
-
}
|
|
168
|
-
/** @enumType */
|
|
169
|
-
type OutcomeWithLiterals = Outcome | 'NONE' | 'WON' | 'LOST';
|
|
170
|
-
interface ContactInfo {
|
|
171
|
-
/**
|
|
172
|
-
* ID of the contact associated with the card.
|
|
173
|
-
* @format GUID
|
|
174
|
-
*/
|
|
175
|
-
contactId?: string | null;
|
|
176
|
-
/**
|
|
177
|
-
* Contact's first name.
|
|
178
|
-
* @readonly
|
|
179
|
-
* @maxLength 50
|
|
180
|
-
*/
|
|
181
|
-
firstName?: string | null;
|
|
182
|
-
/**
|
|
183
|
-
* Contact's last name.
|
|
184
|
-
* @readonly
|
|
185
|
-
* @maxLength 50
|
|
186
|
-
*/
|
|
187
|
-
lastName?: string | null;
|
|
188
|
-
/**
|
|
189
|
-
* Contact's primary email.
|
|
190
|
-
* @format EMAIL
|
|
191
|
-
* @maxLength 320
|
|
192
|
-
* @readonly
|
|
193
|
-
*/
|
|
194
|
-
email?: string | null;
|
|
195
|
-
/**
|
|
196
|
-
* Contact's primary phone.
|
|
197
|
-
* @minLength 1
|
|
198
|
-
* @maxLength 50
|
|
199
|
-
* @readonly
|
|
200
|
-
*/
|
|
201
|
-
phone?: string | null;
|
|
202
|
-
}
|
|
203
|
-
interface LinkedEntity {
|
|
204
|
-
/**
|
|
205
|
-
* ID of the linked entity.
|
|
206
|
-
* @format GUID
|
|
207
|
-
*/
|
|
208
|
-
entityId?: string;
|
|
209
|
-
/**
|
|
210
|
-
* Linked entity type.
|
|
211
|
-
*
|
|
212
|
-
* Identifies the type of entity associated with this card such as a contact submitted by a form, or an invoice sent to close a deal.
|
|
213
|
-
* You can store any value that helps identify the entity type.
|
|
214
|
-
* Use the item selection provider key to make the item selectable by the client.
|
|
215
|
-
* For example, an invoice uses "13ee94c1-b635-8505-3391-97919052c16f_InvoiceSelectionProvider".
|
|
216
|
-
* @minLength 1
|
|
217
|
-
* @maxLength 100
|
|
218
|
-
*/
|
|
219
|
-
referencedEntity?: string;
|
|
220
|
-
/**
|
|
221
|
-
* Date and time the entity was linked to the card in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
222
|
-
* @readonly
|
|
223
|
-
*/
|
|
224
|
-
linkedDate?: Date | null;
|
|
225
|
-
}
|
|
226
|
-
interface ExtendedFields {
|
|
227
|
-
/**
|
|
228
|
-
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
229
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
230
|
-
*
|
|
231
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
232
|
-
*
|
|
233
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
234
|
-
*/
|
|
235
|
-
namespaces?: Record<string, Record<string, any>>;
|
|
236
|
-
}
|
|
237
|
-
interface PrivateTags {
|
|
238
|
-
/** Tags that are exposed to anyone with access to the entity, including site members and visitors. */
|
|
239
|
-
privateTags?: TagList;
|
|
240
|
-
}
|
|
241
|
-
interface TagList {
|
|
242
|
-
/**
|
|
243
|
-
* List of tag IDs.
|
|
244
|
-
* @maxSize 100
|
|
245
|
-
* @maxLength 5
|
|
246
|
-
*/
|
|
247
|
-
tagIds?: string[];
|
|
248
|
-
}
|
|
249
|
-
interface CardMoved {
|
|
250
|
-
/** The card that moved. */
|
|
251
|
-
card?: Card;
|
|
252
|
-
/**
|
|
253
|
-
* The ID of the stage to which the card was moved.
|
|
254
|
-
* @format GUID
|
|
255
|
-
*/
|
|
256
|
-
targetStageId?: string;
|
|
257
|
-
/**
|
|
258
|
-
* The ID of the stage from which the card was moved.
|
|
259
|
-
* @format GUID
|
|
260
|
-
*/
|
|
261
|
-
sourceStageId?: string;
|
|
262
|
-
}
|
|
263
|
-
interface CardAssigned {
|
|
264
|
-
/** The card that is assigned. */
|
|
265
|
-
card?: Card;
|
|
266
|
-
}
|
|
267
|
-
interface CardOverdue {
|
|
268
|
-
/** The card that is overdue. */
|
|
269
|
-
card?: Card;
|
|
270
|
-
}
|
|
271
|
-
interface CardStale {
|
|
272
|
-
/** The card that is stale. */
|
|
273
|
-
card?: Card;
|
|
274
|
-
}
|
|
275
|
-
interface CreateCardRequest {
|
|
276
|
-
/** Card to create. */
|
|
277
|
-
card?: Card;
|
|
278
|
-
}
|
|
279
|
-
interface CreateCardResponse {
|
|
280
|
-
/** Created card. */
|
|
281
|
-
card?: Card;
|
|
282
|
-
}
|
|
283
|
-
interface ContactsNotFound {
|
|
284
|
-
/**
|
|
285
|
-
* The contact IDs that were not found.
|
|
286
|
-
* @format GUID
|
|
287
|
-
* @minSize 1
|
|
288
|
-
* @maxSize 11
|
|
289
|
-
*/
|
|
290
|
-
contactIds?: string[] | null;
|
|
291
|
-
}
|
|
292
|
-
interface GetCardRequest {
|
|
293
|
-
/**
|
|
294
|
-
* Card ID to retrieve.
|
|
295
|
-
* @format GUID
|
|
296
|
-
*/
|
|
297
|
-
cardId: string;
|
|
298
|
-
}
|
|
299
|
-
interface GetCardResponse {
|
|
300
|
-
/** Retrieved card. */
|
|
301
|
-
card?: Card;
|
|
302
|
-
}
|
|
303
|
-
interface UpdateCardRequest {
|
|
304
|
-
/** Card to update, may be partial. */
|
|
305
|
-
card?: Card;
|
|
306
|
-
}
|
|
307
|
-
interface UpdateCardResponse {
|
|
308
|
-
/** Updated card. */
|
|
309
|
-
card?: Card;
|
|
310
|
-
}
|
|
311
|
-
interface MoveCardRequest {
|
|
312
|
-
/**
|
|
313
|
-
* Card ID to move.
|
|
314
|
-
* @format GUID
|
|
315
|
-
*/
|
|
316
|
-
cardId: string;
|
|
317
|
-
/**
|
|
318
|
-
* ID of the stage to move the card to.
|
|
319
|
-
* @format GUID
|
|
320
|
-
*/
|
|
321
|
-
stageId: string;
|
|
322
|
-
/** Revision of the card to move. Moving the card changes the `stageId` on the card and increases `revision` by 1. */
|
|
323
|
-
revision: string | null;
|
|
324
|
-
/** New card outcome. */
|
|
325
|
-
outcome?: OutcomeWithLiterals;
|
|
326
|
-
}
|
|
327
|
-
interface MoveCardResponse {
|
|
328
|
-
/** Updated card. */
|
|
329
|
-
card?: Card;
|
|
330
|
-
}
|
|
331
|
-
interface DeleteCardRequest {
|
|
332
|
-
/**
|
|
333
|
-
* Card ID to delete.
|
|
334
|
-
* @format GUID
|
|
335
|
-
*/
|
|
336
|
-
cardId: string;
|
|
337
|
-
}
|
|
338
|
-
interface DeleteCardResponse {
|
|
339
|
-
}
|
|
340
|
-
interface QueryCardsRequest {
|
|
341
|
-
/** Query options. */
|
|
342
|
-
query?: CursorQuery;
|
|
343
|
-
}
|
|
344
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
345
|
-
/**
|
|
346
|
-
* Cursor paging options.
|
|
347
|
-
*
|
|
348
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
349
|
-
*/
|
|
350
|
-
cursorPaging?: CursorPaging;
|
|
351
|
-
/**
|
|
352
|
-
* Filter object.
|
|
353
|
-
*
|
|
354
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
355
|
-
*/
|
|
356
|
-
filter?: Record<string, any> | null;
|
|
357
|
-
/**
|
|
358
|
-
* Sort object.
|
|
359
|
-
*
|
|
360
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
361
|
-
* @maxSize 5
|
|
362
|
-
*/
|
|
363
|
-
sort?: Sorting[];
|
|
364
|
-
}
|
|
365
|
-
/** @oneof */
|
|
366
|
-
interface CursorQueryPagingMethodOneOf {
|
|
367
|
-
/**
|
|
368
|
-
* Cursor paging options.
|
|
369
|
-
*
|
|
370
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
371
|
-
*/
|
|
372
|
-
cursorPaging?: CursorPaging;
|
|
373
|
-
}
|
|
374
|
-
interface Sorting {
|
|
375
|
-
/**
|
|
376
|
-
* Name of the field to sort by.
|
|
377
|
-
* @maxLength 512
|
|
378
|
-
*/
|
|
379
|
-
fieldName?: string;
|
|
380
|
-
/** Sort order. */
|
|
381
|
-
order?: SortOrderWithLiterals;
|
|
382
|
-
}
|
|
383
|
-
declare enum SortOrder {
|
|
384
|
-
ASC = "ASC",
|
|
385
|
-
DESC = "DESC"
|
|
386
|
-
}
|
|
387
|
-
/** @enumType */
|
|
388
|
-
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
389
|
-
interface CursorPaging {
|
|
390
|
-
/**
|
|
391
|
-
* Maximum number of items to return in the results. Default is 50.
|
|
392
|
-
* @max 100
|
|
393
|
-
*/
|
|
394
|
-
limit?: number | null;
|
|
395
|
-
/**
|
|
396
|
-
* Pointer to the next or previous page in the list of results.
|
|
397
|
-
*
|
|
398
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
399
|
-
* Not relevant for the first request.
|
|
400
|
-
* @maxLength 16000
|
|
401
|
-
*/
|
|
402
|
-
cursor?: string | null;
|
|
403
|
-
}
|
|
404
|
-
interface QueryCardsResponse {
|
|
405
|
-
/** List of cards. */
|
|
406
|
-
cards?: Card[];
|
|
407
|
-
/** Paging metadata. */
|
|
408
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
409
|
-
}
|
|
410
|
-
interface CursorPagingMetadata {
|
|
411
|
-
/** Number of items returned in current page. */
|
|
412
|
-
count?: number | null;
|
|
413
|
-
/** Cursor strings that point to the next page, previous page, or both. */
|
|
414
|
-
cursors?: Cursors;
|
|
415
|
-
/**
|
|
416
|
-
* Whether there are more pages to retrieve following the current page.
|
|
417
|
-
*
|
|
418
|
-
* + `true`: Another page of results can be retrieved.
|
|
419
|
-
* + `false`: This is the last page.
|
|
420
|
-
*/
|
|
421
|
-
hasNext?: boolean | null;
|
|
422
|
-
}
|
|
423
|
-
interface Cursors {
|
|
424
|
-
/**
|
|
425
|
-
* Cursor string pointing to the next page in the list of results.
|
|
426
|
-
* @maxLength 16000
|
|
427
|
-
*/
|
|
428
|
-
next?: string | null;
|
|
429
|
-
/**
|
|
430
|
-
* Cursor pointing to the previous page in the list of results.
|
|
431
|
-
* @maxLength 16000
|
|
432
|
-
*/
|
|
433
|
-
prev?: string | null;
|
|
434
|
-
}
|
|
435
|
-
interface SearchCardsRequest {
|
|
436
|
-
/** Search options. */
|
|
437
|
-
search?: CursorSearch;
|
|
438
|
-
/**
|
|
439
|
-
* Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.
|
|
440
|
-
* By default, names are ordered by first name followed by last name.
|
|
441
|
-
* When set to `"BY_LAST_NAME"`, names are ordered by last name followed by first name.
|
|
442
|
-
*/
|
|
443
|
-
nameFormat?: NameFormatWithLiterals;
|
|
444
|
-
}
|
|
445
|
-
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
446
|
-
/**
|
|
447
|
-
* Cursor paging options.
|
|
448
|
-
*
|
|
449
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
450
|
-
*/
|
|
451
|
-
cursorPaging?: CursorPaging;
|
|
452
|
-
/**
|
|
453
|
-
* Filter object.
|
|
454
|
-
*
|
|
455
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
456
|
-
*/
|
|
457
|
-
filter?: Record<string, any> | null;
|
|
458
|
-
/**
|
|
459
|
-
* List of sort objects.
|
|
460
|
-
*
|
|
461
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
462
|
-
* @maxSize 10
|
|
463
|
-
*/
|
|
464
|
-
sort?: Sorting[];
|
|
465
|
-
/**
|
|
466
|
-
* Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
467
|
-
* @maxSize 10
|
|
468
|
-
*/
|
|
469
|
-
aggregations?: Aggregation[];
|
|
470
|
-
/** Free text to match in searchable fields. */
|
|
471
|
-
search?: SearchDetails;
|
|
472
|
-
/**
|
|
473
|
-
* UTC offset or IANA time zone. Valid values are
|
|
474
|
-
* ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
475
|
-
* and IANA time zone IDs, such as Europe/Rome.
|
|
476
|
-
*
|
|
477
|
-
* Affects all filters and aggregations returned values.
|
|
478
|
-
* You may override this behavior in a specific filter by providing
|
|
479
|
-
* timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`.
|
|
480
|
-
* @maxLength 50
|
|
481
|
-
*/
|
|
482
|
-
timeZone?: string | null;
|
|
483
|
-
}
|
|
484
|
-
/** @oneof */
|
|
485
|
-
interface CursorSearchPagingMethodOneOf {
|
|
486
|
-
/**
|
|
487
|
-
* Cursor paging options.
|
|
488
|
-
*
|
|
489
|
-
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
490
|
-
*/
|
|
491
|
-
cursorPaging?: CursorPaging;
|
|
492
|
-
}
|
|
493
|
-
interface Aggregation extends AggregationKindOneOf {
|
|
494
|
-
/** Value aggregation. */
|
|
495
|
-
value?: ValueAggregation;
|
|
496
|
-
/** Range aggregation. */
|
|
497
|
-
range?: RangeAggregation;
|
|
498
|
-
/** Scalar aggregation. */
|
|
499
|
-
scalar?: ScalarAggregation;
|
|
500
|
-
/** Date histogram aggregation. */
|
|
501
|
-
dateHistogram?: DateHistogramAggregation;
|
|
502
|
-
/** Nested aggregation. */
|
|
503
|
-
nested?: NestedAggregation;
|
|
504
|
-
/**
|
|
505
|
-
* User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
506
|
-
* @maxLength 100
|
|
507
|
-
*/
|
|
508
|
-
name?: string | null;
|
|
509
|
-
/** Type of aggregation, client must provide matching aggregation field below. */
|
|
510
|
-
type?: AggregationTypeWithLiterals;
|
|
511
|
-
/**
|
|
512
|
-
* Field to aggregate by, use dot notation to specify json path.
|
|
513
|
-
* @maxLength 200
|
|
514
|
-
*/
|
|
515
|
-
fieldPath?: string;
|
|
516
|
-
}
|
|
517
|
-
/** @oneof */
|
|
518
|
-
interface AggregationKindOneOf {
|
|
519
|
-
/** Value aggregation. */
|
|
520
|
-
value?: ValueAggregation;
|
|
521
|
-
/** Range aggregation. */
|
|
522
|
-
range?: RangeAggregation;
|
|
523
|
-
/** Scalar aggregation. */
|
|
524
|
-
scalar?: ScalarAggregation;
|
|
525
|
-
/** Date histogram aggregation. */
|
|
526
|
-
dateHistogram?: DateHistogramAggregation;
|
|
527
|
-
/** Nested aggregation. */
|
|
528
|
-
nested?: NestedAggregation;
|
|
529
|
-
}
|
|
530
|
-
interface RangeBucket {
|
|
531
|
-
/** Inclusive lower bound of the range. Required if `to` is not provided. */
|
|
532
|
-
from?: number | null;
|
|
533
|
-
/** Exclusive upper bound of the range. Required if `from` is not provided. */
|
|
534
|
-
to?: number | null;
|
|
535
|
-
}
|
|
536
|
-
declare enum SortType {
|
|
537
|
-
/** Sort by number of matches. */
|
|
538
|
-
COUNT = "COUNT",
|
|
539
|
-
/** Sort by value of the field alphabetically. */
|
|
540
|
-
VALUE = "VALUE"
|
|
541
|
-
}
|
|
542
|
-
/** @enumType */
|
|
543
|
-
type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
|
|
544
|
-
declare enum SortDirection {
|
|
545
|
-
/** Sort in descending order. */
|
|
546
|
-
DESC = "DESC",
|
|
547
|
-
/** Sort in ascending order. */
|
|
548
|
-
ASC = "ASC"
|
|
549
|
-
}
|
|
550
|
-
/** @enumType */
|
|
551
|
-
type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
|
|
552
|
-
declare enum MissingValues {
|
|
553
|
-
/** Exclude missing values from the aggregation results. */
|
|
554
|
-
EXCLUDE = "EXCLUDE",
|
|
555
|
-
/** Include missing values in the aggregation results. */
|
|
556
|
-
INCLUDE = "INCLUDE"
|
|
557
|
-
}
|
|
558
|
-
/** @enumType */
|
|
559
|
-
type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
|
|
560
|
-
interface IncludeMissingValuesOptions {
|
|
561
|
-
/**
|
|
562
|
-
* Specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
563
|
-
* @maxLength 20
|
|
564
|
-
*/
|
|
565
|
-
addToBucket?: string;
|
|
566
|
-
}
|
|
567
|
-
declare enum ScalarType {
|
|
568
|
-
/** Count of distinct values. */
|
|
569
|
-
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
570
|
-
/** Minimum value. */
|
|
571
|
-
MIN = "MIN",
|
|
572
|
-
/** Maximum value. */
|
|
573
|
-
MAX = "MAX"
|
|
574
|
-
}
|
|
575
|
-
/** @enumType */
|
|
576
|
-
type ScalarTypeWithLiterals = ScalarType | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
|
|
577
|
-
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
578
|
-
/** Options for including missing values. */
|
|
579
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
580
|
-
/** Whether to sort by number of matches or value of the field. */
|
|
581
|
-
sortType?: SortTypeWithLiterals;
|
|
582
|
-
/** Whether to sort in ascending or descending order. */
|
|
583
|
-
sortDirection?: SortDirectionWithLiterals;
|
|
584
|
-
/** How many aggregations to return. Can be between 1 and 250. 10 is the default. */
|
|
585
|
-
limit?: number | null;
|
|
586
|
-
/** Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`. */
|
|
587
|
-
missingValues?: MissingValuesWithLiterals;
|
|
588
|
-
}
|
|
589
|
-
/** @oneof */
|
|
590
|
-
interface ValueAggregationOptionsOneOf {
|
|
591
|
-
/** Options for including missing values. */
|
|
592
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
593
|
-
}
|
|
594
|
-
declare enum NestedAggregationType {
|
|
595
|
-
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
596
|
-
VALUE = "VALUE",
|
|
597
|
-
/** An aggregation, where user can define set of ranges - each representing a bucket. */
|
|
598
|
-
RANGE = "RANGE",
|
|
599
|
-
/** A single-value metric aggregation. For example, min, max, sum, avg. */
|
|
600
|
-
SCALAR = "SCALAR",
|
|
601
|
-
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.). */
|
|
602
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
603
|
-
}
|
|
604
|
-
/** @enumType */
|
|
605
|
-
type NestedAggregationTypeWithLiterals = NestedAggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
|
|
606
|
-
interface RangeAggregation {
|
|
607
|
-
/**
|
|
608
|
-
* List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds.
|
|
609
|
-
* @maxSize 50
|
|
610
|
-
*/
|
|
611
|
-
buckets?: RangeBucket[];
|
|
612
|
-
}
|
|
613
|
-
interface ScalarAggregation {
|
|
614
|
-
/** Define the operator for the scalar aggregation. */
|
|
615
|
-
type?: ScalarTypeWithLiterals;
|
|
616
|
-
}
|
|
617
|
-
interface DateHistogramAggregation {
|
|
618
|
-
/** Interval for date histogram aggregation. */
|
|
619
|
-
interval?: IntervalWithLiterals;
|
|
620
|
-
}
|
|
621
|
-
declare enum Interval {
|
|
622
|
-
/** Yearly interval */
|
|
623
|
-
YEAR = "YEAR",
|
|
624
|
-
/** Monthly interval */
|
|
625
|
-
MONTH = "MONTH",
|
|
626
|
-
/** Weekly interval */
|
|
627
|
-
WEEK = "WEEK",
|
|
628
|
-
/** Daily interval */
|
|
629
|
-
DAY = "DAY",
|
|
630
|
-
/** Hourly interval */
|
|
631
|
-
HOUR = "HOUR",
|
|
632
|
-
/** Minute interval */
|
|
633
|
-
MINUTE = "MINUTE",
|
|
634
|
-
/** Second interval */
|
|
635
|
-
SECOND = "SECOND"
|
|
636
|
-
}
|
|
637
|
-
/** @enumType */
|
|
638
|
-
type IntervalWithLiterals = Interval | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
|
|
639
|
-
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
640
|
-
/** Value aggregation. */
|
|
641
|
-
value?: ValueAggregation;
|
|
642
|
-
/** Range aggregation. */
|
|
643
|
-
range?: RangeAggregation;
|
|
644
|
-
/** Scalar aggregation. */
|
|
645
|
-
scalar?: ScalarAggregation;
|
|
646
|
-
/** Date histogram aggregation. */
|
|
647
|
-
dateHistogram?: DateHistogramAggregation;
|
|
648
|
-
/**
|
|
649
|
-
* User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
650
|
-
* @maxLength 100
|
|
651
|
-
*/
|
|
652
|
-
name?: string | null;
|
|
653
|
-
/** Type of aggregation, client must provide matching aggregation field below. */
|
|
654
|
-
type?: NestedAggregationTypeWithLiterals;
|
|
655
|
-
/**
|
|
656
|
-
* Field to aggregate by, use dot notation to specify json path.
|
|
657
|
-
* @maxLength 200
|
|
658
|
-
*/
|
|
659
|
-
fieldPath?: string;
|
|
660
|
-
}
|
|
661
|
-
/** @oneof */
|
|
662
|
-
interface NestedAggregationItemKindOneOf {
|
|
663
|
-
/** Value aggregation. */
|
|
664
|
-
value?: ValueAggregation;
|
|
665
|
-
/** Range aggregation. */
|
|
666
|
-
range?: RangeAggregation;
|
|
667
|
-
/** Scalar aggregation. */
|
|
668
|
-
scalar?: ScalarAggregation;
|
|
669
|
-
/** Date histogram aggregation. */
|
|
670
|
-
dateHistogram?: DateHistogramAggregation;
|
|
671
|
-
}
|
|
672
|
-
declare enum AggregationType {
|
|
673
|
-
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
674
|
-
VALUE = "VALUE",
|
|
675
|
-
/** An aggregation, where user can define set of ranges - each representing a bucket. */
|
|
676
|
-
RANGE = "RANGE",
|
|
677
|
-
/** A single-value metric aggregation. For example, min, max, sum, avg. */
|
|
678
|
-
SCALAR = "SCALAR",
|
|
679
|
-
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
680
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
681
|
-
/** Multi-level aggregation, where each next aggregation is nested within previous one. */
|
|
682
|
-
NESTED = "NESTED"
|
|
683
|
-
}
|
|
684
|
-
/** @enumType */
|
|
685
|
-
type AggregationTypeWithLiterals = AggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
|
|
686
|
-
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */
|
|
687
|
-
interface NestedAggregation {
|
|
688
|
-
/**
|
|
689
|
-
* Flattened list of aggregations, where each next aggregation is nested within previous one.
|
|
690
|
-
* @minSize 2
|
|
691
|
-
* @maxSize 3
|
|
692
|
-
*/
|
|
693
|
-
nestedAggregations?: NestedAggregationItem[];
|
|
694
|
-
}
|
|
695
|
-
interface SearchDetails {
|
|
696
|
-
/** Defines how separate search terms in `expression` are combined. */
|
|
697
|
-
mode?: ModeWithLiterals;
|
|
698
|
-
/**
|
|
699
|
-
* Search term or expression.
|
|
700
|
-
* @maxLength 100
|
|
701
|
-
*/
|
|
702
|
-
expression?: string | null;
|
|
703
|
-
/**
|
|
704
|
-
* Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
|
|
705
|
-
* @maxLength 200
|
|
706
|
-
* @maxSize 20
|
|
707
|
-
*/
|
|
708
|
-
fields?: string[];
|
|
709
|
-
/** Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). */
|
|
710
|
-
fuzzy?: boolean;
|
|
711
|
-
}
|
|
712
|
-
declare enum Mode {
|
|
713
|
-
/** Any of the search terms must be present. */
|
|
714
|
-
OR = "OR",
|
|
715
|
-
/** All search terms must be present. */
|
|
716
|
-
AND = "AND"
|
|
717
|
-
}
|
|
718
|
-
/** @enumType */
|
|
719
|
-
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
720
|
-
/** Name format types for sorting and searching. */
|
|
721
|
-
declare enum NameFormat {
|
|
722
|
-
/** Names are ordered by first name followed by last name. */
|
|
723
|
-
BY_FIRST_NAME = "BY_FIRST_NAME",
|
|
724
|
-
/** Names are ordered by last name followed by first name. */
|
|
725
|
-
BY_LAST_NAME = "BY_LAST_NAME"
|
|
726
|
-
}
|
|
727
|
-
/** @enumType */
|
|
728
|
-
type NameFormatWithLiterals = NameFormat | 'BY_FIRST_NAME' | 'BY_LAST_NAME';
|
|
729
|
-
interface SearchCardsResponse {
|
|
730
|
-
/** List of cards. */
|
|
731
|
-
cards?: Card[];
|
|
732
|
-
/** Paging metadata. */
|
|
733
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
734
|
-
/** Aggregation data. */
|
|
735
|
-
aggregationData?: AggregationData;
|
|
736
|
-
}
|
|
737
|
-
interface AggregationData {
|
|
738
|
-
/**
|
|
739
|
-
* key = aggregation name (as derived from search request).
|
|
740
|
-
* @maxSize 10000
|
|
741
|
-
*/
|
|
742
|
-
results?: AggregationResults[];
|
|
743
|
-
}
|
|
744
|
-
interface ValueAggregationResult {
|
|
745
|
-
/**
|
|
746
|
-
* Value of the field.
|
|
747
|
-
* @maxLength 100
|
|
748
|
-
*/
|
|
749
|
-
value?: string;
|
|
750
|
-
/** Count of entities with this value. */
|
|
751
|
-
count?: number;
|
|
752
|
-
}
|
|
753
|
-
interface RangeAggregationResult {
|
|
754
|
-
/** Inclusive lower bound of the range. */
|
|
755
|
-
from?: number | null;
|
|
756
|
-
/** Exclusive upper bound of the range. */
|
|
757
|
-
to?: number | null;
|
|
758
|
-
/** Count of entities in this range. */
|
|
759
|
-
count?: number;
|
|
760
|
-
}
|
|
761
|
-
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
762
|
-
/** Value aggregation results. */
|
|
763
|
-
values?: ValueResults;
|
|
764
|
-
/** Range aggregation results. */
|
|
765
|
-
ranges?: RangeResults;
|
|
766
|
-
/** Scalar aggregation results. */
|
|
767
|
-
scalar?: AggregationResultsScalarResult;
|
|
768
|
-
/**
|
|
769
|
-
* User-defined name of aggregation, matches the one provided in request.
|
|
770
|
-
* @maxLength 100
|
|
771
|
-
*/
|
|
772
|
-
name?: string;
|
|
773
|
-
/** Type of aggregation that matches result. */
|
|
774
|
-
type?: AggregationTypeWithLiterals;
|
|
775
|
-
/**
|
|
776
|
-
* Field to aggregate by, matches the one provided in request.
|
|
777
|
-
* @maxLength 200
|
|
778
|
-
*/
|
|
779
|
-
fieldPath?: string;
|
|
780
|
-
}
|
|
781
|
-
/** @oneof */
|
|
782
|
-
interface NestedAggregationResultsResultOneOf {
|
|
783
|
-
/** Value aggregation results. */
|
|
784
|
-
values?: ValueResults;
|
|
785
|
-
/** Range aggregation results. */
|
|
786
|
-
ranges?: RangeResults;
|
|
787
|
-
/** Scalar aggregation results. */
|
|
788
|
-
scalar?: AggregationResultsScalarResult;
|
|
789
|
-
}
|
|
790
|
-
interface ValueResults {
|
|
791
|
-
/**
|
|
792
|
-
* List of value aggregations.
|
|
793
|
-
* @maxSize 250
|
|
794
|
-
*/
|
|
795
|
-
results?: ValueAggregationResult[];
|
|
796
|
-
}
|
|
797
|
-
interface RangeResults {
|
|
798
|
-
/**
|
|
799
|
-
* List of ranges returned in same order as requested.
|
|
800
|
-
* @maxSize 50
|
|
801
|
-
*/
|
|
802
|
-
results?: RangeAggregationResult[];
|
|
803
|
-
}
|
|
804
|
-
interface AggregationResultsScalarResult {
|
|
805
|
-
/** Type of scalar aggregation. */
|
|
806
|
-
type?: ScalarTypeWithLiterals;
|
|
807
|
-
/** Value of the scalar aggregation. */
|
|
808
|
-
value?: number;
|
|
809
|
-
}
|
|
810
|
-
interface NestedValueAggregationResult {
|
|
811
|
-
/**
|
|
812
|
-
* Value of the field.
|
|
813
|
-
* @maxLength 1000
|
|
814
|
-
*/
|
|
815
|
-
value?: string;
|
|
816
|
-
/** Nested aggregations. */
|
|
817
|
-
nestedResults?: NestedAggregationResults;
|
|
818
|
-
}
|
|
819
|
-
interface ValueResult {
|
|
820
|
-
/**
|
|
821
|
-
* Value of the field.
|
|
822
|
-
* @maxLength 1000
|
|
823
|
-
*/
|
|
824
|
-
value?: string;
|
|
825
|
-
/** Count of entities with this value. */
|
|
826
|
-
count?: number | null;
|
|
827
|
-
}
|
|
828
|
-
interface RangeResult {
|
|
829
|
-
/** Inclusive lower bound of the range. */
|
|
830
|
-
from?: number | null;
|
|
831
|
-
/** Exclusive upper bound of the range. */
|
|
832
|
-
to?: number | null;
|
|
833
|
-
/** Count of entities in this range. */
|
|
834
|
-
count?: number | null;
|
|
835
|
-
}
|
|
836
|
-
interface ScalarResult {
|
|
837
|
-
/** Value of the scalar aggregation. */
|
|
838
|
-
value?: number;
|
|
839
|
-
}
|
|
840
|
-
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
841
|
-
/** Value aggregation result. */
|
|
842
|
-
value?: ValueResult;
|
|
843
|
-
/** Range aggregation result. */
|
|
844
|
-
range?: RangeResult;
|
|
845
|
-
/** Scalar aggregation result. */
|
|
846
|
-
scalar?: ScalarResult;
|
|
847
|
-
/** Date histogram aggregation result. */
|
|
848
|
-
dateHistogram?: ValueResult;
|
|
849
|
-
}
|
|
850
|
-
/** @oneof */
|
|
851
|
-
interface NestedResultValueResultOneOf {
|
|
852
|
-
/** Value aggregation result. */
|
|
853
|
-
value?: ValueResult;
|
|
854
|
-
/** Range aggregation result. */
|
|
855
|
-
range?: RangeResult;
|
|
856
|
-
/** Scalar aggregation result. */
|
|
857
|
-
scalar?: ScalarResult;
|
|
858
|
-
/** Date histogram aggregation result. */
|
|
859
|
-
dateHistogram?: ValueResult;
|
|
860
|
-
}
|
|
861
|
-
interface Results {
|
|
862
|
-
/** List of nested aggregations. */
|
|
863
|
-
results?: Record<string, NestedResultValue>;
|
|
864
|
-
}
|
|
865
|
-
interface DateHistogramResult {
|
|
866
|
-
/**
|
|
867
|
-
* Date in ISO 8601 format.
|
|
868
|
-
* @maxLength 100
|
|
869
|
-
*/
|
|
870
|
-
value?: string;
|
|
871
|
-
/** Count of documents in the bucket. */
|
|
872
|
-
count?: number;
|
|
873
|
-
}
|
|
874
|
-
interface GroupByValueResults {
|
|
875
|
-
/**
|
|
876
|
-
* List of value aggregations.
|
|
877
|
-
* @maxSize 1000
|
|
878
|
-
*/
|
|
879
|
-
results?: NestedValueAggregationResult[];
|
|
880
|
-
}
|
|
881
|
-
interface DateHistogramResults {
|
|
882
|
-
/**
|
|
883
|
-
* List of date histogram aggregations.
|
|
884
|
-
* @maxSize 200
|
|
885
|
-
*/
|
|
886
|
-
results?: DateHistogramResult[];
|
|
887
|
-
}
|
|
888
|
-
/**
|
|
889
|
-
* Results of `NESTED` aggregation type in a flattened form.
|
|
890
|
-
* Aggregations in resulting array are keyed by requested aggregation `name`.
|
|
891
|
-
*/
|
|
892
|
-
interface NestedResults {
|
|
893
|
-
/**
|
|
894
|
-
* List of nested aggregations.
|
|
895
|
-
* @maxSize 1000
|
|
896
|
-
*/
|
|
897
|
-
results?: Results[];
|
|
898
|
-
}
|
|
899
|
-
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
900
|
-
/** Value aggregation results. */
|
|
901
|
-
values?: ValueResults;
|
|
902
|
-
/** Range aggregation results. */
|
|
903
|
-
ranges?: RangeResults;
|
|
904
|
-
/** Scalar aggregation results. */
|
|
905
|
-
scalar?: AggregationResultsScalarResult;
|
|
906
|
-
/** Group by value aggregation results. */
|
|
907
|
-
groupedByValue?: GroupByValueResults;
|
|
908
|
-
/** Date histogram aggregation results. */
|
|
909
|
-
dateHistogram?: DateHistogramResults;
|
|
910
|
-
/** Nested aggregation results. */
|
|
911
|
-
nested?: NestedResults;
|
|
912
|
-
/**
|
|
913
|
-
* User-defined name of aggregation as derived from search request.
|
|
914
|
-
* @maxLength 100
|
|
915
|
-
*/
|
|
916
|
-
name?: string;
|
|
917
|
-
/** Type of aggregation that must match provided kind as derived from search request. */
|
|
918
|
-
type?: AggregationTypeWithLiterals;
|
|
919
|
-
/**
|
|
920
|
-
* Field to aggregate by as derived from search request.
|
|
921
|
-
* @maxLength 200
|
|
922
|
-
*/
|
|
923
|
-
fieldPath?: string;
|
|
924
|
-
}
|
|
925
|
-
/** @oneof */
|
|
926
|
-
interface AggregationResultsResultOneOf {
|
|
927
|
-
/** Value aggregation results. */
|
|
928
|
-
values?: ValueResults;
|
|
929
|
-
/** Range aggregation results. */
|
|
930
|
-
ranges?: RangeResults;
|
|
931
|
-
/** Scalar aggregation results. */
|
|
932
|
-
scalar?: AggregationResultsScalarResult;
|
|
933
|
-
/** Group by value aggregation results. */
|
|
934
|
-
groupedByValue?: GroupByValueResults;
|
|
935
|
-
/** Date histogram aggregation results. */
|
|
936
|
-
dateHistogram?: DateHistogramResults;
|
|
937
|
-
/** Nested aggregation results. */
|
|
938
|
-
nested?: NestedResults;
|
|
939
|
-
}
|
|
940
|
-
interface SearchCardsByStageRequest {
|
|
941
|
-
/**
|
|
942
|
-
* ID of the pipeline in which to look for cards.
|
|
943
|
-
* @format GUID
|
|
944
|
-
*/
|
|
945
|
-
pipelineId: string | null;
|
|
946
|
-
/**
|
|
947
|
-
* Stage IDs to filter by.
|
|
948
|
-
* @format GUID
|
|
949
|
-
* @minSize 1
|
|
950
|
-
* @maxSize 35
|
|
951
|
-
*/
|
|
952
|
-
stageIds: string[];
|
|
953
|
-
/** Search options. `search.cursorPaging.cursor` is not supported in this request and is ignored. */
|
|
954
|
-
search?: CursorSearch;
|
|
955
|
-
/**
|
|
956
|
-
* Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.
|
|
957
|
-
* By default, names are ordered by first name followed by last name.
|
|
958
|
-
* When set to `"BY_LAST_NAME"`, names are ordered by last name followed by first name.
|
|
959
|
-
*/
|
|
960
|
-
nameFormat?: NameFormatWithLiterals;
|
|
961
|
-
}
|
|
962
|
-
interface SearchCardsByStageResponse {
|
|
963
|
-
/**
|
|
964
|
-
* List of card results matching the filter and search.
|
|
965
|
-
* @minSize 1
|
|
966
|
-
* @maxSize 30
|
|
967
|
-
*/
|
|
968
|
-
results?: BulkSearchCardsResult[];
|
|
969
|
-
}
|
|
970
|
-
interface BulkSearchCardsResult {
|
|
971
|
-
/**
|
|
972
|
-
* ID of the pipeline containing the cards.
|
|
973
|
-
* @format GUID
|
|
974
|
-
*/
|
|
975
|
-
pipelineId?: string | null;
|
|
976
|
-
/**
|
|
977
|
-
* ID of the stage containing the cards.
|
|
978
|
-
* @format GUID
|
|
979
|
-
*/
|
|
980
|
-
stageId?: string | null;
|
|
981
|
-
/** List of cards. */
|
|
982
|
-
cards?: Card[];
|
|
983
|
-
/** Paging metadata. */
|
|
984
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
985
|
-
/** Aggregation data. */
|
|
986
|
-
aggregationData?: AggregationData;
|
|
987
|
-
}
|
|
988
|
-
interface BulkCreateCardsRequest {
|
|
989
|
-
/**
|
|
990
|
-
* List of cards to create.
|
|
991
|
-
* @minSize 1
|
|
992
|
-
* @maxSize 100
|
|
993
|
-
*/
|
|
994
|
-
cards: Card[];
|
|
995
|
-
/**
|
|
996
|
-
* Whether to return the created cards in the response.
|
|
997
|
-
*
|
|
998
|
-
* Default: `false`
|
|
999
|
-
*/
|
|
1000
|
-
returnEntity?: boolean;
|
|
1001
|
-
}
|
|
1002
|
-
interface BulkCreateCardsResponse {
|
|
1003
|
-
/**
|
|
1004
|
-
* List of cards created by the bulk operation.
|
|
1005
|
-
* @minSize 1
|
|
1006
|
-
* @maxSize 100
|
|
1007
|
-
*/
|
|
1008
|
-
results?: BulkCardResult[];
|
|
1009
|
-
/** Bulk operation metadata. */
|
|
1010
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1011
|
-
}
|
|
1012
|
-
interface ItemMetadata {
|
|
1013
|
-
/**
|
|
1014
|
-
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
1015
|
-
* @format GUID
|
|
1016
|
-
*/
|
|
1017
|
-
_id?: string | null;
|
|
1018
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1019
|
-
originalIndex?: number;
|
|
1020
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1021
|
-
success?: boolean;
|
|
1022
|
-
/** Details about the error in case of failure. */
|
|
1023
|
-
error?: ApplicationError;
|
|
1024
|
-
}
|
|
1025
|
-
interface ApplicationError {
|
|
1026
|
-
/** Error code. */
|
|
1027
|
-
code?: string;
|
|
1028
|
-
/** Description of the error. */
|
|
1029
|
-
description?: string;
|
|
1030
|
-
/** Data related to the error. */
|
|
1031
|
-
data?: Record<string, any> | null;
|
|
1032
|
-
}
|
|
1033
|
-
interface BulkCardResult {
|
|
1034
|
-
/** Information about the card that was created. */
|
|
1035
|
-
itemMetadata?: ItemMetadata;
|
|
1036
|
-
/**
|
|
1037
|
-
* Created card.
|
|
1038
|
-
*
|
|
1039
|
-
* Only returned if `returnEntity` was set to `true` in the request.
|
|
1040
|
-
*/
|
|
1041
|
-
item?: Card;
|
|
1042
|
-
}
|
|
1043
|
-
interface BulkActionMetadata {
|
|
1044
|
-
/** Number of items that were successfully processed. */
|
|
1045
|
-
totalSuccesses?: number;
|
|
1046
|
-
/** Number of items that couldn't be processed. */
|
|
1047
|
-
totalFailures?: number;
|
|
1048
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1049
|
-
undetailedFailures?: number;
|
|
1050
|
-
}
|
|
1051
|
-
interface BulkUpdateCardsRequest {
|
|
1052
|
-
/**
|
|
1053
|
-
* List of cards to update.
|
|
1054
|
-
* @minSize 1
|
|
1055
|
-
* @maxSize 100
|
|
1056
|
-
* @readonly
|
|
1057
|
-
*/
|
|
1058
|
-
cards: MaskedCard[];
|
|
1059
|
-
/**
|
|
1060
|
-
* Whether to return the updated cards in the response.
|
|
1061
|
-
*
|
|
1062
|
-
* Default: `false`
|
|
1063
|
-
*/
|
|
1064
|
-
returnEntity?: boolean;
|
|
1065
|
-
}
|
|
1066
|
-
interface MaskedCard {
|
|
1067
|
-
/**
|
|
1068
|
-
* Card to update, may be partial.
|
|
1069
|
-
* @readonly
|
|
1070
|
-
*/
|
|
1071
|
-
card?: Card;
|
|
1072
|
-
}
|
|
1073
|
-
interface BulkUpdateCardsResponse {
|
|
1074
|
-
/**
|
|
1075
|
-
* List of cards updated by the bulk operation.
|
|
1076
|
-
* @minSize 1
|
|
1077
|
-
* @maxSize 100
|
|
1078
|
-
*/
|
|
1079
|
-
results?: BulkUpdateCardsResponseBulkCardResult[];
|
|
1080
|
-
/** Bulk operation metadata. */
|
|
1081
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1082
|
-
}
|
|
1083
|
-
interface BulkUpdateCardsResponseBulkCardResult {
|
|
1084
|
-
/** Information about the card that was updated. */
|
|
1085
|
-
itemMetadata?: ItemMetadata;
|
|
1086
|
-
/**
|
|
1087
|
-
* Updated card.
|
|
1088
|
-
*
|
|
1089
|
-
* Only returned if `returnEntity` was set to `true` in the request.
|
|
1090
|
-
*/
|
|
1091
|
-
item?: Card;
|
|
1092
|
-
}
|
|
1093
|
-
interface BulkDeleteCardsRequest {
|
|
1094
|
-
/**
|
|
1095
|
-
* Card IDs to delete.
|
|
1096
|
-
* @minSize 1
|
|
1097
|
-
* @maxSize 100
|
|
1098
|
-
* @format GUID
|
|
1099
|
-
*/
|
|
1100
|
-
cardIds: string[];
|
|
1101
|
-
}
|
|
1102
|
-
interface BulkDeleteCardsResponse {
|
|
1103
|
-
/**
|
|
1104
|
-
* List of cards deleted by the bulk operation.
|
|
1105
|
-
* @minSize 1
|
|
1106
|
-
* @maxSize 100
|
|
1107
|
-
*/
|
|
1108
|
-
results?: BulkDeleteCardsResponseBulkCardResult[];
|
|
1109
|
-
/** Bulk operation metadata. */
|
|
1110
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1111
|
-
}
|
|
1112
|
-
interface BulkDeleteCardsResponseBulkCardResult {
|
|
1113
|
-
/** Information about the card that was deleted. */
|
|
1114
|
-
itemMetadata?: ItemMetadata;
|
|
1115
|
-
}
|
|
1116
|
-
interface BulkUpdateCardTagsRequest {
|
|
1117
|
-
/**
|
|
1118
|
-
* List of card IDs whose tags will be updated.
|
|
1119
|
-
* @minSize 1
|
|
1120
|
-
* @maxSize 100
|
|
1121
|
-
* @format GUID
|
|
1122
|
-
*/
|
|
1123
|
-
cardIds: string[];
|
|
1124
|
-
/** List of tags to assign. */
|
|
1125
|
-
assignTags?: PrivateTags;
|
|
1126
|
-
/** List of tags to unassign. */
|
|
1127
|
-
unassignTags?: PrivateTags;
|
|
1128
|
-
/**
|
|
1129
|
-
* Whether to return the updated cards in the response.
|
|
1130
|
-
*
|
|
1131
|
-
* Default: `false`
|
|
1132
|
-
*/
|
|
1133
|
-
returnEntity?: boolean;
|
|
1134
|
-
}
|
|
1135
|
-
interface BulkUpdateCardTagsResponse {
|
|
1136
|
-
/**
|
|
1137
|
-
* List of cards whose tags were updated.
|
|
1138
|
-
* @minSize 1
|
|
1139
|
-
* @maxSize 100
|
|
1140
|
-
*/
|
|
1141
|
-
results?: BulkUpdateCardTagsResult[];
|
|
1142
|
-
/** Bulk operation metadata. */
|
|
1143
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1144
|
-
}
|
|
1145
|
-
interface BulkUpdateCardTagsResult {
|
|
1146
|
-
/** Information about the card that was updated. */
|
|
1147
|
-
itemMetadata?: ItemMetadata;
|
|
1148
|
-
}
|
|
1149
|
-
interface BulkUpdateCardTagsByFilterRequest {
|
|
1150
|
-
/** Filter object. */
|
|
1151
|
-
filter: Record<string, any> | null;
|
|
1152
|
-
/** List of tags to assign. */
|
|
1153
|
-
assignTags?: PrivateTags;
|
|
1154
|
-
/** List of tags to unassign. */
|
|
1155
|
-
unassignTags?: PrivateTags;
|
|
1156
|
-
}
|
|
1157
|
-
interface BulkUpdateCardTagsByFilterResponse {
|
|
1158
|
-
/**
|
|
1159
|
-
* Job ID.
|
|
1160
|
-
* @format GUID
|
|
1161
|
-
*/
|
|
1162
|
-
jobId?: string;
|
|
1163
|
-
}
|
|
1164
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1165
|
-
createdEvent?: EntityCreatedEvent;
|
|
1166
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1167
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1168
|
-
actionEvent?: ActionEvent;
|
|
1169
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1170
|
-
_id?: string;
|
|
1171
|
-
/**
|
|
1172
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1173
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1174
|
-
*/
|
|
1175
|
-
entityFqdn?: string;
|
|
1176
|
-
/**
|
|
1177
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1178
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1179
|
-
*/
|
|
1180
|
-
slug?: string;
|
|
1181
|
-
/** ID of the entity associated with the event. */
|
|
1182
|
-
entityId?: string;
|
|
1183
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1184
|
-
eventTime?: Date | null;
|
|
1185
|
-
/**
|
|
1186
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1187
|
-
* (for example, GDPR).
|
|
1188
|
-
*/
|
|
1189
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1190
|
-
/** If present, indicates the action that triggered the event. */
|
|
1191
|
-
originatedFrom?: string | null;
|
|
1192
|
-
/**
|
|
1193
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1194
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1195
|
-
*/
|
|
1196
|
-
entityEventSequence?: string | null;
|
|
1197
|
-
}
|
|
1198
|
-
/** @oneof */
|
|
1199
|
-
interface DomainEventBodyOneOf {
|
|
1200
|
-
createdEvent?: EntityCreatedEvent;
|
|
1201
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1202
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1203
|
-
actionEvent?: ActionEvent;
|
|
1204
|
-
}
|
|
1205
|
-
interface EntityCreatedEvent {
|
|
1206
|
-
entity?: string;
|
|
1207
|
-
}
|
|
1208
|
-
interface RestoreInfo {
|
|
1209
|
-
deletedDate?: Date | null;
|
|
1210
|
-
}
|
|
1211
|
-
interface EntityUpdatedEvent {
|
|
1212
|
-
/**
|
|
1213
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1214
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1215
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1216
|
-
*/
|
|
1217
|
-
currentEntity?: string;
|
|
1218
|
-
}
|
|
1219
|
-
interface EntityDeletedEvent {
|
|
1220
|
-
/** Entity that was deleted. */
|
|
1221
|
-
deletedEntity?: string | null;
|
|
1222
|
-
}
|
|
1223
|
-
interface ActionEvent {
|
|
1224
|
-
body?: string;
|
|
1225
|
-
}
|
|
1226
|
-
interface Empty {
|
|
1227
|
-
}
|
|
1228
|
-
interface MessageEnvelope {
|
|
1229
|
-
/**
|
|
1230
|
-
* App instance ID.
|
|
1231
|
-
* @format GUID
|
|
1232
|
-
*/
|
|
1233
|
-
instanceId?: string | null;
|
|
1234
|
-
/**
|
|
1235
|
-
* Event type.
|
|
1236
|
-
* @maxLength 150
|
|
1237
|
-
*/
|
|
1238
|
-
eventType?: string;
|
|
1239
|
-
/** The identification type and identity data. */
|
|
1240
|
-
identity?: IdentificationData;
|
|
1241
|
-
/** Stringify payload. */
|
|
1242
|
-
data?: string;
|
|
1243
|
-
/** Details related to the account */
|
|
1244
|
-
accountInfo?: AccountInfo;
|
|
1245
|
-
}
|
|
1246
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1247
|
-
/**
|
|
1248
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1249
|
-
* @format GUID
|
|
1250
|
-
*/
|
|
1251
|
-
anonymousVisitorId?: string;
|
|
1252
|
-
/**
|
|
1253
|
-
* ID of a site visitor that has logged in to the site.
|
|
1254
|
-
* @format GUID
|
|
1255
|
-
*/
|
|
1256
|
-
memberId?: string;
|
|
1257
|
-
/**
|
|
1258
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1259
|
-
* @format GUID
|
|
1260
|
-
*/
|
|
1261
|
-
wixUserId?: string;
|
|
1262
|
-
/**
|
|
1263
|
-
* ID of an app.
|
|
1264
|
-
* @format GUID
|
|
1265
|
-
*/
|
|
1266
|
-
appId?: string;
|
|
1267
|
-
/** @readonly */
|
|
1268
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1269
|
-
}
|
|
1270
|
-
/** @oneof */
|
|
1271
|
-
interface IdentificationDataIdOneOf {
|
|
1272
|
-
/**
|
|
1273
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1274
|
-
* @format GUID
|
|
1275
|
-
*/
|
|
1276
|
-
anonymousVisitorId?: string;
|
|
1277
|
-
/**
|
|
1278
|
-
* ID of a site visitor that has logged in to the site.
|
|
1279
|
-
* @format GUID
|
|
1280
|
-
*/
|
|
1281
|
-
memberId?: string;
|
|
1282
|
-
/**
|
|
1283
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1284
|
-
* @format GUID
|
|
1285
|
-
*/
|
|
1286
|
-
wixUserId?: string;
|
|
1287
|
-
/**
|
|
1288
|
-
* ID of an app.
|
|
1289
|
-
* @format GUID
|
|
1290
|
-
*/
|
|
1291
|
-
appId?: string;
|
|
1292
|
-
}
|
|
1293
|
-
declare enum WebhookIdentityType {
|
|
1294
|
-
UNKNOWN = "UNKNOWN",
|
|
1295
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1296
|
-
MEMBER = "MEMBER",
|
|
1297
|
-
WIX_USER = "WIX_USER",
|
|
1298
|
-
APP = "APP"
|
|
1299
|
-
}
|
|
1300
|
-
/** @enumType */
|
|
1301
|
-
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1302
|
-
interface AccountInfo {
|
|
1303
|
-
/**
|
|
1304
|
-
* ID of the Wix account associated with the event.
|
|
1305
|
-
* @format GUID
|
|
1306
|
-
*/
|
|
1307
|
-
accountId?: string | null;
|
|
1308
|
-
/**
|
|
1309
|
-
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
1310
|
-
* @format GUID
|
|
1311
|
-
*/
|
|
1312
|
-
parentAccountId?: string | null;
|
|
1313
|
-
/**
|
|
1314
|
-
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
1315
|
-
* @format GUID
|
|
1316
|
-
*/
|
|
1317
|
-
siteId?: string | null;
|
|
1318
|
-
}
|
|
1319
|
-
/** @docsIgnore */
|
|
1320
|
-
type CreateCardApplicationErrors = {
|
|
1321
|
-
code?: 'PIPELINE_NOT_FOUND';
|
|
1322
|
-
description?: string;
|
|
1323
|
-
data?: Record<string, any>;
|
|
1324
|
-
} | {
|
|
1325
|
-
code?: 'STAGE_NOT_FOUND';
|
|
1326
|
-
description?: string;
|
|
1327
|
-
data?: Record<string, any>;
|
|
1328
|
-
} | {
|
|
1329
|
-
code?: 'ASSIGNEE_NOT_FOUND';
|
|
1330
|
-
description?: string;
|
|
1331
|
-
data?: Record<string, any>;
|
|
1332
|
-
} | {
|
|
1333
|
-
code?: 'CONTACTS_NOT_FOUND';
|
|
1334
|
-
description?: string;
|
|
1335
|
-
data?: ContactsNotFound;
|
|
1336
|
-
} | {
|
|
1337
|
-
code?: 'INVALID_OUTCOME';
|
|
1338
|
-
description?: string;
|
|
1339
|
-
data?: Record<string, any>;
|
|
1340
|
-
} | {
|
|
1341
|
-
code?: 'ADDITIONAL_CONTACTS_WITHOUT_MAIN_CONTACT';
|
|
1342
|
-
description?: string;
|
|
1343
|
-
data?: Record<string, any>;
|
|
1344
|
-
};
|
|
1345
|
-
/** @docsIgnore */
|
|
1346
|
-
type UpdateCardApplicationErrors = {
|
|
1347
|
-
code?: 'REVISION_MISSING';
|
|
1348
|
-
description?: string;
|
|
1349
|
-
data?: Record<string, any>;
|
|
1350
|
-
} | {
|
|
1351
|
-
code?: 'STAGE_NOT_FOUND';
|
|
1352
|
-
description?: string;
|
|
1353
|
-
data?: Record<string, any>;
|
|
1354
|
-
} | {
|
|
1355
|
-
code?: 'INVALID_OUTCOME';
|
|
1356
|
-
description?: string;
|
|
1357
|
-
data?: Record<string, any>;
|
|
1358
|
-
} | {
|
|
1359
|
-
code?: 'CANNOT_REMOVE_NAME';
|
|
1360
|
-
description?: string;
|
|
1361
|
-
data?: Record<string, any>;
|
|
1362
|
-
} | {
|
|
1363
|
-
code?: 'INVALID_ASSIGNEE_ID';
|
|
1364
|
-
description?: string;
|
|
1365
|
-
data?: Record<string, any>;
|
|
1366
|
-
} | {
|
|
1367
|
-
code?: 'INVALID_CONTACT_ID';
|
|
1368
|
-
description?: string;
|
|
1369
|
-
data?: Record<string, any>;
|
|
1370
|
-
} | {
|
|
1371
|
-
code?: 'CANNOT_CHANGE_CURRENCY';
|
|
1372
|
-
description?: string;
|
|
1373
|
-
data?: Record<string, any>;
|
|
1374
|
-
} | {
|
|
1375
|
-
code?: 'INSUFFICIENT_CARD_DATA';
|
|
1376
|
-
description?: string;
|
|
1377
|
-
data?: Record<string, any>;
|
|
1378
|
-
} | {
|
|
1379
|
-
code?: 'CONTACTS_NOT_FOUND';
|
|
1380
|
-
description?: string;
|
|
1381
|
-
data?: ContactsNotFound;
|
|
1382
|
-
} | {
|
|
1383
|
-
code?: 'ADDITIONAL_CONTACTS_WITHOUT_MAIN_CONTACT';
|
|
1384
|
-
description?: string;
|
|
1385
|
-
data?: Record<string, any>;
|
|
1386
|
-
};
|
|
1387
|
-
/** @docsIgnore */
|
|
1388
|
-
type MoveCardApplicationErrors = {
|
|
1389
|
-
code?: 'STAGE_NOT_FOUND';
|
|
1390
|
-
description?: string;
|
|
1391
|
-
data?: Record<string, any>;
|
|
1392
|
-
} | {
|
|
1393
|
-
code?: 'INVALID_OUTCOME';
|
|
1394
|
-
description?: string;
|
|
1395
|
-
data?: Record<string, any>;
|
|
1396
|
-
};
|
|
1397
|
-
/** @docsIgnore */
|
|
1398
|
-
type BulkUpdateCardTagsApplicationErrors = {
|
|
1399
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1400
|
-
description?: string;
|
|
1401
|
-
data?: Record<string, any>;
|
|
1402
|
-
};
|
|
1403
|
-
/** @docsIgnore */
|
|
1404
|
-
type BulkUpdateCardTagsByFilterApplicationErrors = {
|
|
1405
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1406
|
-
description?: string;
|
|
1407
|
-
data?: Record<string, any>;
|
|
1408
|
-
};
|
|
1409
|
-
interface BaseEventMetadata {
|
|
1410
|
-
/**
|
|
1411
|
-
* App instance ID.
|
|
1412
|
-
* @format GUID
|
|
1413
|
-
*/
|
|
1414
|
-
instanceId?: string | null;
|
|
1415
|
-
/**
|
|
1416
|
-
* Event type.
|
|
1417
|
-
* @maxLength 150
|
|
1418
|
-
*/
|
|
1419
|
-
eventType?: string;
|
|
1420
|
-
/** The identification type and identity data. */
|
|
1421
|
-
identity?: IdentificationData;
|
|
1422
|
-
/** Details related to the account */
|
|
1423
|
-
accountInfo?: AccountInfo;
|
|
1424
|
-
}
|
|
1425
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
1426
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1427
|
-
_id?: string;
|
|
1428
|
-
/**
|
|
1429
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1430
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1431
|
-
*/
|
|
1432
|
-
entityFqdn?: string;
|
|
1433
|
-
/**
|
|
1434
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1435
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1436
|
-
*/
|
|
1437
|
-
slug?: string;
|
|
1438
|
-
/** ID of the entity associated with the event. */
|
|
1439
|
-
entityId?: string;
|
|
1440
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1441
|
-
eventTime?: Date | null;
|
|
1442
|
-
/**
|
|
1443
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1444
|
-
* (for example, GDPR).
|
|
1445
|
-
*/
|
|
1446
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1447
|
-
/** If present, indicates the action that triggered the event. */
|
|
1448
|
-
originatedFrom?: string | null;
|
|
1449
|
-
/**
|
|
1450
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1451
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1452
|
-
*/
|
|
1453
|
-
entityEventSequence?: string | null;
|
|
1454
|
-
accountInfo?: AccountInfoMetadata;
|
|
1455
|
-
}
|
|
1456
|
-
interface AccountInfoMetadata {
|
|
1457
|
-
/** ID of the Wix account associated with the event */
|
|
1458
|
-
accountId: string;
|
|
1459
|
-
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
1460
|
-
siteId?: string;
|
|
1461
|
-
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
1462
|
-
parentAccountId?: string;
|
|
1463
|
-
}
|
|
1464
|
-
interface CardAssignedEnvelope {
|
|
1465
|
-
data: CardAssigned;
|
|
1466
|
-
metadata: EventMetadata;
|
|
1467
|
-
}
|
|
1468
|
-
/**
|
|
1469
|
-
* Triggered when a card is assigned.
|
|
1470
|
-
* @permissionScope Manage Pipelines
|
|
1471
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1472
|
-
* @permissionScope Read Pipelines
|
|
1473
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1474
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1475
|
-
* @webhook
|
|
1476
|
-
* @eventType wix.crm.pipelines.v1.card_assigned
|
|
1477
|
-
* @slug assigned
|
|
1478
|
-
* @documentationMaturity preview
|
|
1479
|
-
*/
|
|
1480
|
-
declare function onCardAssigned(handler: (event: CardAssignedEnvelope) => void | Promise<void>): void;
|
|
1481
|
-
interface CardCreatedEnvelope {
|
|
1482
|
-
entity: Card;
|
|
1483
|
-
metadata: EventMetadata;
|
|
1484
|
-
}
|
|
1485
|
-
/**
|
|
1486
|
-
* Triggered when a card is created.
|
|
1487
|
-
* @permissionScope Manage Pipelines
|
|
1488
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1489
|
-
* @permissionScope Read Pipelines
|
|
1490
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1491
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1492
|
-
* @webhook
|
|
1493
|
-
* @eventType wix.crm.pipelines.v1.card_created
|
|
1494
|
-
* @slug created
|
|
1495
|
-
* @documentationMaturity preview
|
|
1496
|
-
*/
|
|
1497
|
-
declare function onCardCreated(handler: (event: CardCreatedEnvelope) => void | Promise<void>): void;
|
|
1498
|
-
interface CardDeletedEnvelope {
|
|
1499
|
-
entity: Card;
|
|
1500
|
-
metadata: EventMetadata;
|
|
1501
|
-
}
|
|
1502
|
-
/**
|
|
1503
|
-
* Triggered when a card is deleted.
|
|
1504
|
-
* @permissionScope Manage Pipelines
|
|
1505
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1506
|
-
* @permissionScope Read Pipelines
|
|
1507
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1508
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1509
|
-
* @webhook
|
|
1510
|
-
* @eventType wix.crm.pipelines.v1.card_deleted
|
|
1511
|
-
* @slug deleted
|
|
1512
|
-
* @documentationMaturity preview
|
|
1513
|
-
*/
|
|
1514
|
-
declare function onCardDeleted(handler: (event: CardDeletedEnvelope) => void | Promise<void>): void;
|
|
1515
|
-
interface CardMovedEnvelope {
|
|
1516
|
-
data: CardMoved;
|
|
1517
|
-
metadata: EventMetadata;
|
|
1518
|
-
}
|
|
1519
|
-
/**
|
|
1520
|
-
* Triggered when a card is moved from one stage to another.
|
|
1521
|
-
* @permissionScope Manage Pipelines
|
|
1522
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1523
|
-
* @permissionScope Read Pipelines
|
|
1524
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1525
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1526
|
-
* @webhook
|
|
1527
|
-
* @eventType wix.crm.pipelines.v1.card_moved
|
|
1528
|
-
* @slug moved
|
|
1529
|
-
* @documentationMaturity preview
|
|
1530
|
-
*/
|
|
1531
|
-
declare function onCardMoved(handler: (event: CardMovedEnvelope) => void | Promise<void>): void;
|
|
1532
|
-
interface CardOverdueEnvelope {
|
|
1533
|
-
data: CardOverdue;
|
|
1534
|
-
metadata: EventMetadata;
|
|
1535
|
-
}
|
|
1536
|
-
/**
|
|
1537
|
-
* Triggered when a card's `dueDate` passes.
|
|
1538
|
-
* @permissionScope Manage Pipelines
|
|
1539
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1540
|
-
* @permissionScope Read Pipelines
|
|
1541
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1542
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1543
|
-
* @webhook
|
|
1544
|
-
* @eventType wix.crm.pipelines.v1.card_overdue
|
|
1545
|
-
* @slug overdue
|
|
1546
|
-
* @documentationMaturity preview
|
|
1547
|
-
*/
|
|
1548
|
-
declare function onCardOverdue(handler: (event: CardOverdueEnvelope) => void | Promise<void>): void;
|
|
1549
|
-
interface CardStaleEnvelope {
|
|
1550
|
-
data: CardStale;
|
|
1551
|
-
metadata: EventMetadata;
|
|
1552
|
-
}
|
|
1553
|
-
/**
|
|
1554
|
-
* Triggered when a card's `staleDate` passes.
|
|
1555
|
-
* @permissionScope Manage Pipelines
|
|
1556
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1557
|
-
* @permissionScope Read Pipelines
|
|
1558
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1559
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1560
|
-
* @webhook
|
|
1561
|
-
* @eventType wix.crm.pipelines.v1.card_stale
|
|
1562
|
-
* @slug stale
|
|
1563
|
-
* @documentationMaturity preview
|
|
1564
|
-
*/
|
|
1565
|
-
declare function onCardStale(handler: (event: CardStaleEnvelope) => void | Promise<void>): void;
|
|
1566
|
-
interface CardUpdatedEnvelope {
|
|
1567
|
-
entity: Card;
|
|
1568
|
-
metadata: EventMetadata;
|
|
1569
|
-
/** @hidden */
|
|
1570
|
-
modifiedFields: Record<string, any>;
|
|
1571
|
-
}
|
|
1572
|
-
/**
|
|
1573
|
-
* Triggered when a card is updated.
|
|
1574
|
-
* @permissionScope Manage Pipelines
|
|
1575
|
-
* @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES
|
|
1576
|
-
* @permissionScope Read Pipelines
|
|
1577
|
-
* @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES
|
|
1578
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1579
|
-
* @webhook
|
|
1580
|
-
* @eventType wix.crm.pipelines.v1.card_updated
|
|
1581
|
-
* @slug updated
|
|
1582
|
-
* @documentationMaturity preview
|
|
1583
|
-
*/
|
|
1584
|
-
declare function onCardUpdated(handler: (event: CardUpdatedEnvelope) => void | Promise<void>): void;
|
|
1585
|
-
/**
|
|
1586
|
-
* Creates a card in a specific pipeline stage.
|
|
1587
|
-
* @public
|
|
1588
|
-
* @documentationMaturity preview
|
|
1589
|
-
* @requiredField options.card.name
|
|
1590
|
-
* @requiredField options.card.pipelineId
|
|
1591
|
-
* @requiredField options.card.stageId
|
|
1592
|
-
* @permissionId PIPELINE_CARDS.CARD_CREATE
|
|
1593
|
-
* @applicableIdentity APP
|
|
1594
|
-
* @returns Created card.
|
|
1595
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.CreateCard
|
|
1596
|
-
*/
|
|
1597
|
-
declare function createCard(options?: NonNullablePaths<CreateCardOptions, `card.name` | `card.pipelineId` | `card.stageId`, 3>): Promise<NonNullablePaths<Card, `priority` | `value.value` | `value.currency` | `outcome` | `additionalContacts` | `linkedEntities` | `linkedEntities.${number}.entityId` | `linkedEntities.${number}.referencedEntity` | `tags.privateTags.tagIds`, 4> & {
|
|
1598
|
-
__applicationErrorsType?: CreateCardApplicationErrors;
|
|
1599
|
-
}>;
|
|
1600
|
-
interface CreateCardOptions {
|
|
1601
|
-
/** Card to create. */
|
|
1602
|
-
card?: Card;
|
|
1603
|
-
}
|
|
1604
|
-
/**
|
|
1605
|
-
* Retrieves a card by ID.
|
|
1606
|
-
* @param cardId - Card ID to retrieve.
|
|
1607
|
-
* @public
|
|
1608
|
-
* @documentationMaturity preview
|
|
1609
|
-
* @requiredField cardId
|
|
1610
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1611
|
-
* @applicableIdentity APP
|
|
1612
|
-
* @returns Retrieved card.
|
|
1613
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.GetCard
|
|
1614
|
-
*/
|
|
1615
|
-
declare function getCard(cardId: string): Promise<NonNullablePaths<Card, `priority` | `value.value` | `value.currency` | `outcome` | `additionalContacts` | `linkedEntities` | `linkedEntities.${number}.entityId` | `linkedEntities.${number}.referencedEntity` | `tags.privateTags.tagIds`, 4>>;
|
|
1616
|
-
/**
|
|
1617
|
-
* Updates a card by ID.
|
|
1618
|
-
*
|
|
1619
|
-
* Each time the card is updated, `revision` increments by 1. The current `revision` must be specified when updating the card. This ensures you're working with the latest card and prevents unintended overwrites.
|
|
1620
|
-
*
|
|
1621
|
-
* The card's `pipelineId` and `currency` fields can't be updated.
|
|
1622
|
-
* @param _id - Card ID.
|
|
1623
|
-
* @public
|
|
1624
|
-
* @documentationMaturity preview
|
|
1625
|
-
* @requiredField _id
|
|
1626
|
-
* @permissionId PIPELINE_CARDS.CARD_UPDATE
|
|
1627
|
-
* @permissionId PIPELINE_CARDS.CARD_UPDATE_WITHOUT_REVISION
|
|
1628
|
-
* @applicableIdentity APP
|
|
1629
|
-
* @returns Updated card.
|
|
1630
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.UpdateCard
|
|
1631
|
-
*/
|
|
1632
|
-
declare function updateCard(_id: string, options?: UpdateCardOptions): Promise<NonNullablePaths<Card, `priority` | `value.value` | `value.currency` | `outcome` | `additionalContacts` | `linkedEntities` | `linkedEntities.${number}.entityId` | `linkedEntities.${number}.referencedEntity` | `tags.privateTags.tagIds`, 4> & {
|
|
1633
|
-
__applicationErrorsType?: UpdateCardApplicationErrors;
|
|
1634
|
-
}>;
|
|
1635
|
-
interface UpdateCardOptions {
|
|
1636
|
-
card: {
|
|
1637
|
-
/**
|
|
1638
|
-
* Card ID.
|
|
1639
|
-
* @format GUID
|
|
1640
|
-
* @readonly
|
|
1641
|
-
*/
|
|
1642
|
-
_id?: string | null;
|
|
1643
|
-
/**
|
|
1644
|
-
* Revision number, which increments by 1 each time the card is updated.
|
|
1645
|
-
* To prevent conflicting changes, the current revision must be passed when updating the card.
|
|
1646
|
-
* @readonly
|
|
1647
|
-
*/
|
|
1648
|
-
revision?: string | null;
|
|
1649
|
-
/**
|
|
1650
|
-
* Date and time the card was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
1651
|
-
* @readonly
|
|
1652
|
-
*/
|
|
1653
|
-
_createdDate?: Date | null;
|
|
1654
|
-
/**
|
|
1655
|
-
* Date and time the card was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
1656
|
-
* @readonly
|
|
1657
|
-
*/
|
|
1658
|
-
_updatedDate?: Date | null;
|
|
1659
|
-
/**
|
|
1660
|
-
* ID of the pipeline containing this card.
|
|
1661
|
-
* @format GUID
|
|
1662
|
-
* @readonly
|
|
1663
|
-
*/
|
|
1664
|
-
pipelineId?: string | null;
|
|
1665
|
-
/**
|
|
1666
|
-
* ID of the cards' current.
|
|
1667
|
-
* @format GUID
|
|
1668
|
-
*/
|
|
1669
|
-
stageId?: string | null;
|
|
1670
|
-
/**
|
|
1671
|
-
* Date and time when the card last moved between stagesin [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
1672
|
-
* @readonly
|
|
1673
|
-
*/
|
|
1674
|
-
stageUpdatedDate?: Date | null;
|
|
1675
|
-
/**
|
|
1676
|
-
* How the card was moved to its current stage.
|
|
1677
|
-
* @readonly
|
|
1678
|
-
*/
|
|
1679
|
-
stageUpdateSource?: CardSource;
|
|
1680
|
-
/**
|
|
1681
|
-
* The Card name.
|
|
1682
|
-
* @minLength 1
|
|
1683
|
-
* @maxLength 100
|
|
1684
|
-
*/
|
|
1685
|
-
name?: string | null;
|
|
1686
|
-
/**
|
|
1687
|
-
* Card description.
|
|
1688
|
-
* @maxLength 1000
|
|
1689
|
-
*/
|
|
1690
|
-
description?: string | null;
|
|
1691
|
-
/**
|
|
1692
|
-
* Priority level of the card for task management.
|
|
1693
|
-
*
|
|
1694
|
-
* Default: `P3_MEDIUM`
|
|
1695
|
-
*/
|
|
1696
|
-
priority?: PriorityWithLiterals;
|
|
1697
|
-
/**
|
|
1698
|
-
* ID of the Wix user assigned to manage the card.
|
|
1699
|
-
* @format GUID
|
|
1700
|
-
*/
|
|
1701
|
-
assigneeId?: string | null;
|
|
1702
|
-
/**
|
|
1703
|
-
* Date and time when the card is expected to moved to the done stage in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
1704
|
-
* If the card remains active past this date, it becomes overdue.
|
|
1705
|
-
*/
|
|
1706
|
-
dueDate?: Date | null;
|
|
1707
|
-
/**
|
|
1708
|
-
* Date and time when the card becomes stale based on the stage's stale duration setting in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.
|
|
1709
|
-
* This date is automatically calculated and updated when the card moves to a new stage.
|
|
1710
|
-
* @readonly
|
|
1711
|
-
*/
|
|
1712
|
-
staleDate?: Date | null;
|
|
1713
|
-
/** Monetary value assigned to the card. */
|
|
1714
|
-
value?: Money;
|
|
1715
|
-
/**
|
|
1716
|
-
* Final outcome of the card when moved to the done stage.
|
|
1717
|
-
*
|
|
1718
|
-
* Default: `NONE`
|
|
1719
|
-
*/
|
|
1720
|
-
outcome?: OutcomeWithLiterals;
|
|
1721
|
-
/** Primary contact associated with the card. */
|
|
1722
|
-
mainContact?: ContactInfo;
|
|
1723
|
-
/**
|
|
1724
|
-
* Secondary contacts associated with the card.
|
|
1725
|
-
* @maxSize 10
|
|
1726
|
-
*/
|
|
1727
|
-
additionalContacts?: ContactInfo[];
|
|
1728
|
-
/**
|
|
1729
|
-
* Other entities linked to the card.
|
|
1730
|
-
*
|
|
1731
|
-
* For example, orders, invoices, activities, or other relevant entities.
|
|
1732
|
-
* @maxSize 20
|
|
1733
|
-
*/
|
|
1734
|
-
linkedEntities?: LinkedEntity[];
|
|
1735
|
-
/** Extended fields data. */
|
|
1736
|
-
extendedFields?: ExtendedFields;
|
|
1737
|
-
/** Tags for organizing and categorizing the card. */
|
|
1738
|
-
tags?: PrivateTags;
|
|
1739
|
-
};
|
|
1740
|
-
}
|
|
1741
|
-
/**
|
|
1742
|
-
* Moves a card to a different stage within the same pipeline.
|
|
1743
|
-
*
|
|
1744
|
-
* Cards can only be moved between stages within the same pipeline.
|
|
1745
|
-
*
|
|
1746
|
-
* Each time a card is moved, its `revision` increments by 1.
|
|
1747
|
-
* @param cardId - Card ID to move.
|
|
1748
|
-
* @param stageId - ID of the stage to move the card to.
|
|
1749
|
-
* @public
|
|
1750
|
-
* @documentationMaturity preview
|
|
1751
|
-
* @requiredField cardId
|
|
1752
|
-
* @requiredField options.revision
|
|
1753
|
-
* @requiredField stageId
|
|
1754
|
-
* @permissionId PIPELINE_CARDS.CARD_UPDATE
|
|
1755
|
-
* @applicableIdentity APP
|
|
1756
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.MoveCard
|
|
1757
|
-
*/
|
|
1758
|
-
declare function moveCard(cardId: string, stageId: string, options?: NonNullablePaths<MoveCardOptions, `revision`, 2>): Promise<NonNullablePaths<MoveCardResponse, `card.priority` | `card.value.value` | `card.value.currency` | `card.outcome` | `card.additionalContacts` | `card.linkedEntities` | `card.linkedEntities.${number}.entityId` | `card.linkedEntities.${number}.referencedEntity` | `card.tags.privateTags.tagIds`, 5> & {
|
|
1759
|
-
__applicationErrorsType?: MoveCardApplicationErrors;
|
|
1760
|
-
}>;
|
|
1761
|
-
interface MoveCardOptions {
|
|
1762
|
-
/** Revision of the card to move. Moving the card changes the `stageId` on the card and increases `revision` by 1. */
|
|
1763
|
-
revision: string | null;
|
|
1764
|
-
/** New card outcome. */
|
|
1765
|
-
outcome?: OutcomeWithLiterals;
|
|
1766
|
-
}
|
|
1767
|
-
/**
|
|
1768
|
-
* Deletes a card.
|
|
1769
|
-
*
|
|
1770
|
-
* Deleting a card permanently removes it from a site.
|
|
1771
|
-
* @param cardId - Card ID to delete.
|
|
1772
|
-
* @public
|
|
1773
|
-
* @documentationMaturity preview
|
|
1774
|
-
* @requiredField cardId
|
|
1775
|
-
* @permissionId PIPELINE_CARDS.CARD_DELETE
|
|
1776
|
-
* @applicableIdentity APP
|
|
1777
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.DeleteCard
|
|
1778
|
-
*/
|
|
1779
|
-
declare function deleteCard(cardId: string): Promise<void>;
|
|
1780
|
-
/**
|
|
1781
|
-
* Retrieves a list of up to 100 cards, given the provided paging, filtering, and sorting.
|
|
1782
|
-
*
|
|
1783
|
-
* By default, 50 cards are returned and sorted by `updatedDate` in descending order.
|
|
1784
|
-
*
|
|
1785
|
-
* For a detailed list of supported operations, see [Cards: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines/card-v1/supported-filters-sorting-and-search).
|
|
1786
|
-
*
|
|
1787
|
-
* To learn more about working with _Query_ methods, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
1788
|
-
* @public
|
|
1789
|
-
* @documentationMaturity preview
|
|
1790
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
1791
|
-
* @applicableIdentity APP
|
|
1792
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.QueryCards
|
|
1793
|
-
*/
|
|
1794
|
-
declare function queryCards(): CardsQueryBuilder;
|
|
1795
|
-
interface QueryCursorResult {
|
|
1796
|
-
cursors: Cursors;
|
|
1797
|
-
hasNext: () => boolean;
|
|
1798
|
-
hasPrev: () => boolean;
|
|
1799
|
-
length: number;
|
|
1800
|
-
pageSize: number;
|
|
1801
|
-
}
|
|
1802
|
-
interface CardsQueryResult extends QueryCursorResult {
|
|
1803
|
-
items: Card[];
|
|
1804
|
-
query: CardsQueryBuilder;
|
|
1805
|
-
next: () => Promise<CardsQueryResult>;
|
|
1806
|
-
prev: () => Promise<CardsQueryResult>;
|
|
1807
|
-
}
|
|
1808
|
-
interface CardsQueryBuilder {
|
|
1809
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1810
|
-
* @param value - Value to compare against.
|
|
1811
|
-
* @documentationMaturity preview
|
|
1812
|
-
*/
|
|
1813
|
-
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'pipelineId' | 'stageId', value: any) => CardsQueryBuilder;
|
|
1814
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1815
|
-
* @param value - Value to compare against.
|
|
1816
|
-
* @documentationMaturity preview
|
|
1817
|
-
*/
|
|
1818
|
-
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'pipelineId' | 'stageId', value: any) => CardsQueryBuilder;
|
|
1819
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1820
|
-
* @param value - Value to compare against.
|
|
1821
|
-
* @documentationMaturity preview
|
|
1822
|
-
*/
|
|
1823
|
-
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => CardsQueryBuilder;
|
|
1824
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1825
|
-
* @param value - Value to compare against.
|
|
1826
|
-
* @documentationMaturity preview
|
|
1827
|
-
*/
|
|
1828
|
-
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CardsQueryBuilder;
|
|
1829
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1830
|
-
* @param value - Value to compare against.
|
|
1831
|
-
* @documentationMaturity preview
|
|
1832
|
-
*/
|
|
1833
|
-
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => CardsQueryBuilder;
|
|
1834
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1835
|
-
* @param value - Value to compare against.
|
|
1836
|
-
* @documentationMaturity preview
|
|
1837
|
-
*/
|
|
1838
|
-
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CardsQueryBuilder;
|
|
1839
|
-
/** @documentationMaturity preview */
|
|
1840
|
-
in: (propertyName: '_id' | 'pipelineId' | 'stageId', value: any) => CardsQueryBuilder;
|
|
1841
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1842
|
-
* @documentationMaturity preview
|
|
1843
|
-
*/
|
|
1844
|
-
ascending: (...propertyNames: Array<'_createdDate'>) => CardsQueryBuilder;
|
|
1845
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1846
|
-
* @documentationMaturity preview
|
|
1847
|
-
*/
|
|
1848
|
-
descending: (...propertyNames: Array<'_updatedDate'>) => CardsQueryBuilder;
|
|
1849
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1850
|
-
* @documentationMaturity preview
|
|
1851
|
-
*/
|
|
1852
|
-
limit: (limit: number) => CardsQueryBuilder;
|
|
1853
|
-
/** @param cursor - A pointer to specific record
|
|
1854
|
-
* @documentationMaturity preview
|
|
1855
|
-
*/
|
|
1856
|
-
skipTo: (cursor: string) => CardsQueryBuilder;
|
|
1857
|
-
/** @documentationMaturity preview */
|
|
1858
|
-
find: () => Promise<CardsQueryResult>;
|
|
1859
|
-
}
|
|
1860
|
-
/**
|
|
1861
|
-
* @hidden
|
|
1862
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.QueryCards
|
|
1863
|
-
* @requiredField query
|
|
1864
|
-
*/
|
|
1865
|
-
declare function typedQueryCards(query: CardQuery): Promise<NonNullablePaths<QueryCardsResponse, `cards` | `cards.${number}.priority` | `cards.${number}.value.value` | `cards.${number}.value.currency` | `cards.${number}.outcome`, 5>>;
|
|
1866
|
-
interface CardQuerySpec extends QuerySpec {
|
|
1867
|
-
paging: 'cursor';
|
|
1868
|
-
wql: [
|
|
1869
|
-
{
|
|
1870
|
-
fields: ['_id', 'pipelineId', 'stageId'];
|
|
1871
|
-
operators: ['$eq', '$in', '$ne', '$nin'];
|
|
1872
|
-
sort: 'NONE';
|
|
1873
|
-
},
|
|
1874
|
-
{
|
|
1875
|
-
fields: ['_createdDate'];
|
|
1876
|
-
operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
|
|
1877
|
-
sort: 'ASC';
|
|
1878
|
-
},
|
|
1879
|
-
{
|
|
1880
|
-
fields: ['_updatedDate'];
|
|
1881
|
-
operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
|
|
1882
|
-
sort: 'DESC';
|
|
1883
|
-
}
|
|
1884
|
-
];
|
|
1885
|
-
}
|
|
1886
|
-
type CommonQueryWithEntityContext = Query<Card, CardQuerySpec>;
|
|
1887
|
-
type CardQuery = {
|
|
1888
|
-
/**
|
|
1889
|
-
Cursor paging options.
|
|
1890
|
-
|
|
1891
|
-
Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1892
|
-
*/
|
|
1893
|
-
cursorPaging?: {
|
|
1894
|
-
/**
|
|
1895
|
-
Maximum number of items to return in the results. Default is 50.
|
|
1896
|
-
@max: 100
|
|
1897
|
-
*/
|
|
1898
|
-
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
1899
|
-
/**
|
|
1900
|
-
Pointer to the next or previous page in the list of results.
|
|
1901
|
-
|
|
1902
|
-
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1903
|
-
Not relevant for the first request.
|
|
1904
|
-
@maxLength: 16000
|
|
1905
|
-
*/
|
|
1906
|
-
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
1907
|
-
};
|
|
1908
|
-
/**
|
|
1909
|
-
Filter object.
|
|
1910
|
-
|
|
1911
|
-
Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1912
|
-
*/
|
|
1913
|
-
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
1914
|
-
/**
|
|
1915
|
-
Sort object.
|
|
1916
|
-
|
|
1917
|
-
Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1918
|
-
@maxSize: 5
|
|
1919
|
-
*/
|
|
1920
|
-
sort?: {
|
|
1921
|
-
/**
|
|
1922
|
-
Name of the field to sort by.
|
|
1923
|
-
@maxLength: 512
|
|
1924
|
-
*/
|
|
1925
|
-
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
1926
|
-
/**
|
|
1927
|
-
Sort order.
|
|
1928
|
-
*/
|
|
1929
|
-
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1930
|
-
}[];
|
|
1931
|
-
};
|
|
1932
|
-
declare const utils: {
|
|
1933
|
-
query: {
|
|
1934
|
-
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Card, CardQuerySpec, CardQuery>;
|
|
1935
|
-
Filter: _wix_sdk_types.FilterFactory<Card, CardQuerySpec>;
|
|
1936
|
-
Sort: _wix_sdk_types.SortFactory<CardQuerySpec>;
|
|
1937
|
-
};
|
|
1938
|
-
search: {
|
|
1939
|
-
SearchBuilder: () => _wix_sdk_types.SearchBuilder<Card, CardSearchSpec, CardSearch>;
|
|
1940
|
-
Filter: _wix_sdk_types.FilterFactory<Card, CardSearchSpec>;
|
|
1941
|
-
Sort: _wix_sdk_types.SortFactory<CardSearchSpec>;
|
|
1942
|
-
SearchParams: _wix_sdk_types.SearchParamsFactory<CardSearchSpec>;
|
|
1943
|
-
Aggregation: _wix_sdk_types.AggregationFactory<CardSearchSpec>;
|
|
1944
|
-
};
|
|
1945
|
-
};
|
|
1946
|
-
interface SearchCardsOptions {
|
|
1947
|
-
/**
|
|
1948
|
-
* Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.
|
|
1949
|
-
* By default, names are ordered by first name followed by last name.
|
|
1950
|
-
* When set to `"BY_LAST_NAME"`, names are ordered by last name followed by first name.
|
|
1951
|
-
*/
|
|
1952
|
-
nameFormat?: NameFormatWithLiterals;
|
|
1953
|
-
}
|
|
1954
|
-
interface CardSearchSpec extends SearchSpec {
|
|
1955
|
-
searchable: [
|
|
1956
|
-
'additionalContacts.email',
|
|
1957
|
-
'additionalContacts.fullName',
|
|
1958
|
-
'additionalContacts.phone',
|
|
1959
|
-
'description',
|
|
1960
|
-
'mainContact.email',
|
|
1961
|
-
'mainContact.fullName',
|
|
1962
|
-
'mainContact.phone',
|
|
1963
|
-
'name'
|
|
1964
|
-
];
|
|
1965
|
-
aggregatable: [
|
|
1966
|
-
'_createdDate',
|
|
1967
|
-
'_id',
|
|
1968
|
-
'_updatedDate',
|
|
1969
|
-
'additionalContacts',
|
|
1970
|
-
'additionalContacts.contactId',
|
|
1971
|
-
'assigneeId',
|
|
1972
|
-
'description',
|
|
1973
|
-
'dueDate',
|
|
1974
|
-
'linkedEntities',
|
|
1975
|
-
'linkedEntities.entityId',
|
|
1976
|
-
'linkedEntities.referencedEntity',
|
|
1977
|
-
'mainContact.contactId',
|
|
1978
|
-
'name',
|
|
1979
|
-
'outcome',
|
|
1980
|
-
'pipelineId',
|
|
1981
|
-
'priority',
|
|
1982
|
-
'stageId',
|
|
1983
|
-
'stageUpdatedDate',
|
|
1984
|
-
'staleDate',
|
|
1985
|
-
'tags.privateTags.tagIds',
|
|
1986
|
-
'value.value'
|
|
1987
|
-
];
|
|
1988
|
-
paging: 'cursor';
|
|
1989
|
-
wql: [
|
|
1990
|
-
{
|
|
1991
|
-
operators: ['$eq', '$in', '$ne', '$nin'];
|
|
1992
|
-
fields: ['_id', 'pipelineId', 'stageId'];
|
|
1993
|
-
sort: 'ASC';
|
|
1994
|
-
},
|
|
1995
|
-
{
|
|
1996
|
-
operators: ['$eq', '$exists', '$in', '$ne', '$nin'];
|
|
1997
|
-
fields: ['assigneeId', 'mainContact.contactId'];
|
|
1998
|
-
sort: 'ASC';
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];
|
|
2002
|
-
fields: ['_createdDate', '_updatedDate', 'stageUpdatedDate'];
|
|
2003
|
-
sort: 'BOTH';
|
|
2004
|
-
},
|
|
2005
|
-
{
|
|
2006
|
-
operators: ['$eq', '$exists', '$gt', '$gte', '$lt', '$lte'];
|
|
2007
|
-
fields: ['dueDate', 'staleDate', 'value.value'];
|
|
2008
|
-
sort: 'BOTH';
|
|
2009
|
-
},
|
|
2010
|
-
{
|
|
2011
|
-
operators: ['$hasAll', '$hasSome', '$isEmpty'];
|
|
2012
|
-
fields: ['tags.privateTags.tagIds'];
|
|
2013
|
-
sort: 'NONE';
|
|
2014
|
-
},
|
|
2015
|
-
{
|
|
2016
|
-
operators: ['$isEmpty', '$matchItems'];
|
|
2017
|
-
fields: ['additionalContacts'];
|
|
2018
|
-
sort: 'NONE';
|
|
2019
|
-
},
|
|
2020
|
-
{
|
|
2021
|
-
operators: ['$matchItems'];
|
|
2022
|
-
fields: ['linkedEntities'];
|
|
2023
|
-
sort: 'NONE';
|
|
2024
|
-
},
|
|
2025
|
-
{
|
|
2026
|
-
operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];
|
|
2027
|
-
fields: ['description'];
|
|
2028
|
-
sort: 'NONE';
|
|
2029
|
-
},
|
|
2030
|
-
{
|
|
2031
|
-
operators: ['$eq', '$in', '$ne', '$nin', '$startsWith'];
|
|
2032
|
-
fields: ['mainContact.email', 'mainContact.phone', 'name'];
|
|
2033
|
-
sort: 'BOTH';
|
|
2034
|
-
},
|
|
2035
|
-
{
|
|
2036
|
-
operators: ['$eq', '$in', '$ne', '$nin'];
|
|
2037
|
-
fields: ['outcome', 'priority'];
|
|
2038
|
-
sort: 'BOTH';
|
|
2039
|
-
}
|
|
2040
|
-
];
|
|
2041
|
-
}
|
|
2042
|
-
type CommonSearchWithEntityContext = Search<Card, CardSearchSpec>;
|
|
2043
|
-
type CardSearch = {
|
|
2044
|
-
/**
|
|
2045
|
-
Cursor paging options.
|
|
2046
|
-
|
|
2047
|
-
Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2048
|
-
*/
|
|
2049
|
-
cursorPaging?: {
|
|
2050
|
-
/**
|
|
2051
|
-
Maximum number of items to return in the results. Default is 50.
|
|
2052
|
-
@max: 100
|
|
2053
|
-
*/
|
|
2054
|
-
limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
|
|
2055
|
-
/**
|
|
2056
|
-
Pointer to the next or previous page in the list of results.
|
|
2057
|
-
|
|
2058
|
-
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
2059
|
-
Not relevant for the first request.
|
|
2060
|
-
@maxLength: 16000
|
|
2061
|
-
*/
|
|
2062
|
-
cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
2063
|
-
};
|
|
2064
|
-
/**
|
|
2065
|
-
Filter object.
|
|
2066
|
-
|
|
2067
|
-
Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2068
|
-
*/
|
|
2069
|
-
filter?: CommonSearchWithEntityContext['filter'] | null;
|
|
2070
|
-
/**
|
|
2071
|
-
List of sort objects.
|
|
2072
|
-
|
|
2073
|
-
Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
2074
|
-
@maxSize: 10
|
|
2075
|
-
*/
|
|
2076
|
-
sort?: {
|
|
2077
|
-
/**
|
|
2078
|
-
Name of the field to sort by.
|
|
2079
|
-
@maxLength: 512
|
|
2080
|
-
*/
|
|
2081
|
-
fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
|
|
2082
|
-
/**
|
|
2083
|
-
Sort order.
|
|
2084
|
-
*/
|
|
2085
|
-
order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
|
|
2086
|
-
}[];
|
|
2087
|
-
/**
|
|
2088
|
-
Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
2089
|
-
@maxSize: 10
|
|
2090
|
-
*/
|
|
2091
|
-
aggregations?: {
|
|
2092
|
-
/**
|
|
2093
|
-
Value aggregation.
|
|
2094
|
-
*/
|
|
2095
|
-
value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
|
|
2096
|
-
/**
|
|
2097
|
-
Range aggregation.
|
|
2098
|
-
*/
|
|
2099
|
-
range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
|
|
2100
|
-
/**
|
|
2101
|
-
Scalar aggregation.
|
|
2102
|
-
*/
|
|
2103
|
-
scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
|
|
2104
|
-
/**
|
|
2105
|
-
Date histogram aggregation.
|
|
2106
|
-
*/
|
|
2107
|
-
dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
|
|
2108
|
-
/**
|
|
2109
|
-
Nested aggregation.
|
|
2110
|
-
*/
|
|
2111
|
-
nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
|
|
2112
|
-
/**
|
|
2113
|
-
User-defined name of aggregation, should be unique, will appear in aggregation results.
|
|
2114
|
-
@maxLength: 100
|
|
2115
|
-
*/
|
|
2116
|
-
name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
|
|
2117
|
-
/**
|
|
2118
|
-
Type of aggregation, client must provide matching aggregation field below.
|
|
2119
|
-
*/
|
|
2120
|
-
type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
|
|
2121
|
-
/**
|
|
2122
|
-
Field to aggregate by, use dot notation to specify json path.
|
|
2123
|
-
@maxLength: 200
|
|
2124
|
-
*/
|
|
2125
|
-
fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
|
|
2126
|
-
}[];
|
|
2127
|
-
/**
|
|
2128
|
-
Free text to match in searchable fields.
|
|
2129
|
-
*/
|
|
2130
|
-
search?: {
|
|
2131
|
-
/**
|
|
2132
|
-
Defines how separate search terms in `expression` are combined.
|
|
2133
|
-
*/
|
|
2134
|
-
mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
|
|
2135
|
-
/**
|
|
2136
|
-
Search term or expression.
|
|
2137
|
-
@maxLength: 100
|
|
2138
|
-
*/
|
|
2139
|
-
expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
|
|
2140
|
-
/**
|
|
2141
|
-
Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
|
|
2142
|
-
@maxLength: 200,
|
|
2143
|
-
@maxSize: 20
|
|
2144
|
-
*/
|
|
2145
|
-
fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
|
|
2146
|
-
/**
|
|
2147
|
-
Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm).
|
|
2148
|
-
*/
|
|
2149
|
-
fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
|
|
2150
|
-
};
|
|
2151
|
-
/**
|
|
2152
|
-
UTC offset or IANA time zone. Valid values are
|
|
2153
|
-
ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
2154
|
-
and IANA time zone IDs, such as Europe/Rome.
|
|
2155
|
-
|
|
2156
|
-
Affects all filters and aggregations returned values.
|
|
2157
|
-
You may override this behavior in a specific filter by providing
|
|
2158
|
-
timestamps including time zone. For example, `"2023-12-20T10:52:34.795Z"`.
|
|
2159
|
-
@maxLength: 50
|
|
2160
|
-
*/
|
|
2161
|
-
timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
|
|
2162
|
-
};
|
|
2163
|
-
/**
|
|
2164
|
-
* Retrieves a list of cards by the pipeline's stage, given the provided free-text search expression, filtering, and sorting.
|
|
2165
|
-
*
|
|
2166
|
-
* By default, cards are sorted by `updatedDate` in descending order.
|
|
2167
|
-
*
|
|
2168
|
-
* For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).
|
|
2169
|
-
*
|
|
2170
|
-
* To learn more about working with _Search_ methods, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
2171
|
-
* @param pipelineId - ID of the pipeline in which to look for cards.
|
|
2172
|
-
* @public
|
|
2173
|
-
* @documentationMaturity preview
|
|
2174
|
-
* @requiredField options.stageIds
|
|
2175
|
-
* @requiredField pipelineId
|
|
2176
|
-
* @permissionId PIPELINE_CARDS.CARD_READ
|
|
2177
|
-
* @applicableIdentity APP
|
|
2178
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.SearchCardsByStage
|
|
2179
|
-
*/
|
|
2180
|
-
declare function searchCardsByStage(pipelineId: string, options?: NonNullablePaths<SearchCardsByStageOptions, `stageIds`, 2>): Promise<NonNullablePaths<SearchCardsByStageResponse, `results`, 2>>;
|
|
2181
|
-
interface SearchCardsByStageOptions {
|
|
2182
|
-
/**
|
|
2183
|
-
* Stage IDs to filter by.
|
|
2184
|
-
* @format GUID
|
|
2185
|
-
* @minSize 1
|
|
2186
|
-
* @maxSize 35
|
|
2187
|
-
*/
|
|
2188
|
-
stageIds: string[];
|
|
2189
|
-
/** Search options. `search.cursorPaging.cursor` is not supported in this request and is ignored. */
|
|
2190
|
-
search?: CursorSearch;
|
|
2191
|
-
/**
|
|
2192
|
-
* Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.
|
|
2193
|
-
* By default, names are ordered by first name followed by last name.
|
|
2194
|
-
* When set to `"BY_LAST_NAME"`, names are ordered by last name followed by first name.
|
|
2195
|
-
*/
|
|
2196
|
-
nameFormat?: NameFormatWithLiterals;
|
|
2197
|
-
}
|
|
2198
|
-
interface BulkCreateCardsOptions {
|
|
2199
|
-
/**
|
|
2200
|
-
* Whether to return the created cards in the response.
|
|
2201
|
-
*
|
|
2202
|
-
* Default: `false`
|
|
2203
|
-
*/
|
|
2204
|
-
returnEntity?: boolean;
|
|
2205
|
-
}
|
|
2206
|
-
interface BulkUpdateCardsOptions {
|
|
2207
|
-
/**
|
|
2208
|
-
* Whether to return the updated cards in the response.
|
|
2209
|
-
*
|
|
2210
|
-
* Default: `false`
|
|
2211
|
-
*/
|
|
2212
|
-
returnEntity?: boolean;
|
|
2213
|
-
}
|
|
2214
|
-
/**
|
|
2215
|
-
* Updates tags on multiple cards by specified card IDs.
|
|
2216
|
-
*
|
|
2217
|
-
* If you specify a tag that in both `assignTags` and `unassignTags`, the tag is assigned to the cards.
|
|
2218
|
-
* @param cardIds - List of card IDs whose tags will be updated.
|
|
2219
|
-
* @public
|
|
2220
|
-
* @documentationMaturity preview
|
|
2221
|
-
* @requiredField cardIds
|
|
2222
|
-
* @permissionId PIPELINE_CARDS.CARD_UPDATE_TAGS
|
|
2223
|
-
* @applicableIdentity APP
|
|
2224
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTags
|
|
2225
|
-
*/
|
|
2226
|
-
declare function bulkUpdateCardTags(cardIds: string[], options?: BulkUpdateCardTagsOptions): Promise<NonNullablePaths<BulkUpdateCardTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
2227
|
-
__applicationErrorsType?: BulkUpdateCardTagsApplicationErrors;
|
|
2228
|
-
}>;
|
|
2229
|
-
interface BulkUpdateCardTagsOptions {
|
|
2230
|
-
/** List of tags to assign. */
|
|
2231
|
-
assignTags?: PrivateTags;
|
|
2232
|
-
/** List of tags to unassign. */
|
|
2233
|
-
unassignTags?: PrivateTags;
|
|
2234
|
-
/**
|
|
2235
|
-
* Whether to return the updated cards in the response.
|
|
2236
|
-
*
|
|
2237
|
-
* Default: `false`
|
|
2238
|
-
*/
|
|
2239
|
-
returnEntity?: boolean;
|
|
2240
|
-
}
|
|
2241
|
-
/**
|
|
2242
|
-
* Asynchronously updates tags on multiple cards using a filter to specify which cards to update.
|
|
2243
|
-
*
|
|
2244
|
-
* An empty filter updates all cards in the pipeline.
|
|
2245
|
-
*
|
|
2246
|
-
* If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the cards.
|
|
2247
|
-
* @param filter - Filter object.
|
|
2248
|
-
* @public
|
|
2249
|
-
* @documentationMaturity preview
|
|
2250
|
-
* @requiredField filter
|
|
2251
|
-
* @permissionId PIPELINE_CARDS.CARD_UPDATE_TAGS
|
|
2252
|
-
* @applicableIdentity APP
|
|
2253
|
-
* @fqn wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTagsByFilter
|
|
2254
|
-
*/
|
|
2255
|
-
declare function bulkUpdateCardTagsByFilter(filter: Record<string, any>, options?: BulkUpdateCardTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateCardTagsByFilterResponse, `jobId`, 2> & {
|
|
2256
|
-
__applicationErrorsType?: BulkUpdateCardTagsByFilterApplicationErrors;
|
|
2257
|
-
}>;
|
|
2258
|
-
interface BulkUpdateCardTagsByFilterOptions {
|
|
2259
|
-
/** List of tags to assign. */
|
|
2260
|
-
assignTags?: PrivateTags;
|
|
2261
|
-
/** List of tags to unassign. */
|
|
2262
|
-
unassignTags?: PrivateTags;
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
export { type CreateCardRequest as $, SortDirection as A, type BulkUpdateCardTagsOptions as B, type CreateCardOptions as C, MissingValues as D, ScalarType as E, AggregationType as F, Mode as G, NameFormat as H, Interval as I, type CardSource as J, type Money as K, type ContactInfo as L, type MoveCardOptions as M, NestedAggregationType as N, Outcome as O, Priority as P, type LinkedEntity as Q, type ExtendedFields as R, type SearchCardsOptions as S, type PrivateTags as T, type UpdateCardOptions as U, type TagList as V, WebhookIdentityType as W, type CardMoved as X, type CardAssigned as Y, type CardOverdue as Z, type CardStale as _, type Card as a, type MaskedCard as a$, type CreateCardResponse as a0, type ContactsNotFound as a1, type GetCardRequest as a2, type GetCardResponse as a3, type UpdateCardRequest as a4, type UpdateCardResponse as a5, type MoveCardRequest as a6, type DeleteCardRequest as a7, type DeleteCardResponse as a8, type QueryCardsRequest as a9, type NestedAggregationResults as aA, type NestedAggregationResultsResultOneOf as aB, type ValueResults as aC, type RangeResults as aD, type AggregationResultsScalarResult as aE, type NestedValueAggregationResult as aF, type ValueResult as aG, type RangeResult as aH, type ScalarResult as aI, type NestedResultValue as aJ, type NestedResultValueResultOneOf as aK, type Results as aL, type DateHistogramResult as aM, type GroupByValueResults as aN, type DateHistogramResults as aO, type NestedResults as aP, type AggregationResults as aQ, type AggregationResultsResultOneOf as aR, type SearchCardsByStageRequest as aS, type BulkSearchCardsResult as aT, type BulkCreateCardsRequest as aU, type BulkCreateCardsResponse as aV, type ItemMetadata as aW, type ApplicationError as aX, type BulkCardResult as aY, type BulkActionMetadata as aZ, type BulkUpdateCardsRequest as a_, type CursorQuery as aa, type CursorQueryPagingMethodOneOf as ab, type Sorting as ac, type CursorPaging as ad, type QueryCardsResponse as ae, type CursorPagingMetadata as af, type Cursors as ag, type SearchCardsRequest as ah, type CursorSearch as ai, type CursorSearchPagingMethodOneOf as aj, type Aggregation as ak, type AggregationKindOneOf as al, type RangeBucket as am, type IncludeMissingValuesOptions as an, type ValueAggregation as ao, type ValueAggregationOptionsOneOf as ap, type RangeAggregation as aq, type ScalarAggregation as ar, type DateHistogramAggregation as as, type NestedAggregationItem as at, type NestedAggregationItemKindOneOf as au, type NestedAggregation as av, type SearchDetails as aw, type AggregationData as ax, type ValueAggregationResult as ay, type RangeAggregationResult as az, type CreateCardApplicationErrors as b, type BulkUpdateCardsResponse as b0, type BulkUpdateCardsResponseBulkCardResult as b1, type BulkDeleteCardsRequest as b2, type BulkDeleteCardsResponse as b3, type BulkDeleteCardsResponseBulkCardResult as b4, type BulkUpdateCardTagsRequest as b5, type BulkUpdateCardTagsResult as b6, type BulkUpdateCardTagsByFilterRequest as b7, type DomainEvent as b8, type DomainEventBodyOneOf as b9, type NestedAggregationTypeWithLiterals as bA, type IntervalWithLiterals as bB, type AggregationTypeWithLiterals as bC, type ModeWithLiterals as bD, type NameFormatWithLiterals as bE, type WebhookIdentityTypeWithLiterals as bF, type CommonQueryWithEntityContext as bG, type CommonSearchWithEntityContext as bH, onCardAssigned as bI, onCardCreated as bJ, onCardDeleted as bK, onCardMoved as bL, onCardOverdue as bM, onCardStale as bN, onCardUpdated as bO, createCard as bP, getCard as bQ, updateCard as bR, moveCard as bS, deleteCard as bT, queryCards as bU, searchCardsByStage as bV, bulkUpdateCardTags as bW, bulkUpdateCardTagsByFilter as bX, type EntityCreatedEvent as ba, type RestoreInfo as bb, type EntityUpdatedEvent as bc, type EntityDeletedEvent as bd, type ActionEvent as be, type Empty as bf, type MessageEnvelope as bg, type IdentificationData as bh, type IdentificationDataIdOneOf as bi, type AccountInfo as bj, type BaseEventMetadata as bk, type EventMetadata as bl, type AccountInfoMetadata as bm, type CardsQueryResult as bn, type CardQuerySpec as bo, type CardSearchSpec as bp, type BulkCreateCardsOptions as bq, type BulkUpdateCardsOptions as br, utils as bs, type PriorityWithLiterals as bt, type OutcomeWithLiterals as bu, type SortOrderWithLiterals as bv, type SortTypeWithLiterals as bw, type SortDirectionWithLiterals as bx, type MissingValuesWithLiterals as by, type ScalarTypeWithLiterals as bz, type UpdateCardApplicationErrors as c, type MoveCardResponse as d, type MoveCardApplicationErrors as e, type CardSearch as f, type SearchCardsResponse as g, type SearchCardsByStageOptions as h, type SearchCardsByStageResponse as i, type BulkUpdateCardTagsResponse as j, type BulkUpdateCardTagsApplicationErrors as k, type BulkUpdateCardTagsByFilterOptions as l, type BulkUpdateCardTagsByFilterResponse as m, type BulkUpdateCardTagsByFilterApplicationErrors as n, type CardAssignedEnvelope as o, type CardCreatedEnvelope as p, type CardDeletedEnvelope as q, type CardMovedEnvelope as r, type CardOverdueEnvelope as s, type CardStaleEnvelope as t, type CardUpdatedEnvelope as u, type CardsQueryBuilder as v, type CardQuery as w, typedQueryCards as x, SortOrder as y, SortType as z };
|