@wix/workflows 1.0.18 → 1.0.20
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/context.d.ts +3 -0
- package/build/cjs/{index.typings.js → context.js} +9 -5
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +3 -3
- package/build/cjs/index.js +8 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js +8 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +3 -0
- package/build/es/context.js +4 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +3 -3
- package/build/es/index.js +3 -3
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +3 -3
- package/build/es/meta.js +3 -3
- package/build/es/meta.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +17 -7
- package/build/cjs/index.typings.d.ts +0 -3
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/workflows-v1-card.http.d.ts +0 -114
- package/build/cjs/src/workflows-v1-card.http.js +0 -380
- package/build/cjs/src/workflows-v1-card.http.js.map +0 -1
- package/build/cjs/src/workflows-v1-card.meta.d.ts +0 -37
- package/build/cjs/src/workflows-v1-card.meta.js +0 -176
- package/build/cjs/src/workflows-v1-card.meta.js.map +0 -1
- package/build/cjs/src/workflows-v1-card.public.d.ts +0 -24
- package/build/cjs/src/workflows-v1-card.public.js +0 -57
- package/build/cjs/src/workflows-v1-card.public.js.map +0 -1
- package/build/cjs/src/workflows-v1-card.types.d.ts +0 -270
- package/build/cjs/src/workflows-v1-card.types.js +0 -14
- package/build/cjs/src/workflows-v1-card.types.js.map +0 -1
- package/build/cjs/src/workflows-v1-card.universal.d.ts +0 -500
- package/build/cjs/src/workflows-v1-card.universal.js +0 -596
- package/build/cjs/src/workflows-v1-card.universal.js.map +0 -1
- package/build/cjs/src/workflows-v1-phase.http.d.ts +0 -76
- package/build/cjs/src/workflows-v1-phase.http.js +0 -296
- package/build/cjs/src/workflows-v1-phase.http.js.map +0 -1
- package/build/cjs/src/workflows-v1-phase.meta.d.ts +0 -31
- package/build/cjs/src/workflows-v1-phase.meta.js +0 -138
- package/build/cjs/src/workflows-v1-phase.meta.js.map +0 -1
- package/build/cjs/src/workflows-v1-phase.public.d.ts +0 -27
- package/build/cjs/src/workflows-v1-phase.public.js +0 -45
- package/build/cjs/src/workflows-v1-phase.public.js.map +0 -1
- package/build/cjs/src/workflows-v1-phase.types.d.ts +0 -274
- package/build/cjs/src/workflows-v1-phase.types.js +0 -14
- package/build/cjs/src/workflows-v1-phase.types.js.map +0 -1
- package/build/cjs/src/workflows-v1-phase.universal.d.ts +0 -435
- package/build/cjs/src/workflows-v1-phase.universal.js +0 -456
- package/build/cjs/src/workflows-v1-phase.universal.js.map +0 -1
- package/build/cjs/src/workflows-v1-workflow.http.d.ts +0 -55
- package/build/cjs/src/workflows-v1-workflow.http.js +0 -262
- package/build/cjs/src/workflows-v1-workflow.http.js.map +0 -1
- package/build/cjs/src/workflows-v1-workflow.meta.d.ts +0 -23
- package/build/cjs/src/workflows-v1-workflow.meta.js +0 -119
- package/build/cjs/src/workflows-v1-workflow.meta.js.map +0 -1
- package/build/cjs/src/workflows-v1-workflow.public.d.ts +0 -46
- package/build/cjs/src/workflows-v1-workflow.public.js +0 -39
- package/build/cjs/src/workflows-v1-workflow.public.js.map +0 -1
- package/build/cjs/src/workflows-v1-workflow.types.d.ts +0 -319
- package/build/cjs/src/workflows-v1-workflow.types.js +0 -14
- package/build/cjs/src/workflows-v1-workflow.types.js.map +0 -1
- package/build/cjs/src/workflows-v1-workflow.universal.d.ts +0 -433
- package/build/cjs/src/workflows-v1-workflow.universal.js +0 -369
- package/build/cjs/src/workflows-v1-workflow.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -3
- package/build/es/index.typings.js +0 -4
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/workflows-v1-card.http.d.ts +0 -114
- package/build/es/src/workflows-v1-card.http.js +0 -369
- package/build/es/src/workflows-v1-card.http.js.map +0 -1
- package/build/es/src/workflows-v1-card.meta.d.ts +0 -37
- package/build/es/src/workflows-v1-card.meta.js +0 -146
- package/build/es/src/workflows-v1-card.meta.js.map +0 -1
- package/build/es/src/workflows-v1-card.public.d.ts +0 -24
- package/build/es/src/workflows-v1-card.public.js +0 -44
- package/build/es/src/workflows-v1-card.public.js.map +0 -1
- package/build/es/src/workflows-v1-card.types.d.ts +0 -270
- package/build/es/src/workflows-v1-card.types.js +0 -11
- package/build/es/src/workflows-v1-card.types.js.map +0 -1
- package/build/es/src/workflows-v1-card.universal.d.ts +0 -500
- package/build/es/src/workflows-v1-card.universal.js +0 -566
- package/build/es/src/workflows-v1-card.universal.js.map +0 -1
- package/build/es/src/workflows-v1-phase.http.d.ts +0 -76
- package/build/es/src/workflows-v1-phase.http.js +0 -287
- package/build/es/src/workflows-v1-phase.http.js.map +0 -1
- package/build/es/src/workflows-v1-phase.meta.d.ts +0 -31
- package/build/es/src/workflows-v1-phase.meta.js +0 -110
- package/build/es/src/workflows-v1-phase.meta.js.map +0 -1
- package/build/es/src/workflows-v1-phase.public.d.ts +0 -27
- package/build/es/src/workflows-v1-phase.public.js +0 -34
- package/build/es/src/workflows-v1-phase.public.js.map +0 -1
- package/build/es/src/workflows-v1-phase.types.d.ts +0 -274
- package/build/es/src/workflows-v1-phase.types.js +0 -11
- package/build/es/src/workflows-v1-phase.types.js.map +0 -1
- package/build/es/src/workflows-v1-phase.universal.d.ts +0 -435
- package/build/es/src/workflows-v1-phase.universal.js +0 -428
- package/build/es/src/workflows-v1-phase.universal.js.map +0 -1
- package/build/es/src/workflows-v1-workflow.http.d.ts +0 -55
- package/build/es/src/workflows-v1-workflow.http.js +0 -254
- package/build/es/src/workflows-v1-workflow.http.js.map +0 -1
- package/build/es/src/workflows-v1-workflow.meta.d.ts +0 -23
- package/build/es/src/workflows-v1-workflow.meta.js +0 -92
- package/build/es/src/workflows-v1-workflow.meta.js.map +0 -1
- package/build/es/src/workflows-v1-workflow.public.d.ts +0 -46
- package/build/es/src/workflows-v1-workflow.public.js +0 -29
- package/build/es/src/workflows-v1-workflow.public.js.map +0 -1
- package/build/es/src/workflows-v1-workflow.types.d.ts +0 -319
- package/build/es/src/workflows-v1-workflow.types.js +0 -11
- package/build/es/src/workflows-v1-workflow.types.js.map +0 -1
- package/build/es/src/workflows-v1-workflow.universal.d.ts +0 -433
- package/build/es/src/workflows-v1-workflow.universal.js +0 -342
- package/build/es/src/workflows-v1-workflow.universal.js.map +0 -1
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export interface Card {
|
|
8
|
-
/** Card details. */
|
|
9
|
-
info?: CardInfo;
|
|
10
|
-
}
|
|
11
|
-
/** entity representing a card-info */
|
|
12
|
-
export interface CardInfo {
|
|
13
|
-
/**
|
|
14
|
-
* Card ID.
|
|
15
|
-
* @readonly
|
|
16
|
-
*/
|
|
17
|
-
_id?: string | null;
|
|
18
|
-
/** Display name shown at the top of the card. */
|
|
19
|
-
name?: string | null;
|
|
20
|
-
/** Card description. */
|
|
21
|
-
description?: string | null;
|
|
22
|
-
/** Details about the contact attached to the card. */
|
|
23
|
-
primaryAttachment?: Attachment;
|
|
24
|
-
/** Due date. */
|
|
25
|
-
dueDate?: Date;
|
|
26
|
-
/** Name of the app or service that created the contact. */
|
|
27
|
-
source?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* @internal
|
|
30
|
-
* @internal
|
|
31
|
-
* @readonly
|
|
32
|
-
*/
|
|
33
|
-
createdAt?: Date;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
* @internal
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
updatedAt?: Date;
|
|
40
|
-
/**
|
|
41
|
-
* ID of the phase that currently holds the card.
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
phaseId?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Date and time the card was created.
|
|
47
|
-
* @readonly
|
|
48
|
-
*/
|
|
49
|
-
_createdDate?: Date;
|
|
50
|
-
/**
|
|
51
|
-
* Date and time the card was updated.
|
|
52
|
-
* @readonly
|
|
53
|
-
*/
|
|
54
|
-
_updatedDate?: Date;
|
|
55
|
-
}
|
|
56
|
-
export interface Attachment {
|
|
57
|
-
/**
|
|
58
|
-
* Attachment ID. For internal use.
|
|
59
|
-
* @readonly
|
|
60
|
-
*/
|
|
61
|
-
attachmentId?: string;
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
* @internal */
|
|
65
|
-
value?: string;
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
* @internal */
|
|
69
|
-
attachmentType?: AttachmentType;
|
|
70
|
-
/** ID of the contact attached to the card. */
|
|
71
|
-
contactId?: string;
|
|
72
|
-
}
|
|
73
|
-
/** describes the supported types of attachments (currently only supports Contact which is the default type) */
|
|
74
|
-
export declare enum AttachmentType {
|
|
75
|
-
ContactType = "ContactType"
|
|
76
|
-
}
|
|
77
|
-
export interface QueryCardsRequest {
|
|
78
|
-
/** Query, sort, and paging options. */
|
|
79
|
-
query?: Query;
|
|
80
|
-
}
|
|
81
|
-
export interface Query {
|
|
82
|
-
/**
|
|
83
|
-
* Filter object in the following format:
|
|
84
|
-
* `"filter" : {
|
|
85
|
-
* "fieldName1": "value1",
|
|
86
|
-
* "fieldName2":{"$operator":"value2"}
|
|
87
|
-
* }`
|
|
88
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
89
|
-
*/
|
|
90
|
-
filter?: any;
|
|
91
|
-
/**
|
|
92
|
-
* Sort object in the following format:
|
|
93
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
94
|
-
*/
|
|
95
|
-
sort?: Sorting[];
|
|
96
|
-
/** Paging options to limit and skip the number of items. */
|
|
97
|
-
paging?: Paging;
|
|
98
|
-
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
99
|
-
fields?: string[];
|
|
100
|
-
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
101
|
-
fieldsets?: string[];
|
|
102
|
-
}
|
|
103
|
-
export interface Sorting {
|
|
104
|
-
/** Name of the field to sort by. */
|
|
105
|
-
fieldName?: string;
|
|
106
|
-
/** Sort order. */
|
|
107
|
-
order?: SortOrder;
|
|
108
|
-
}
|
|
109
|
-
export declare enum SortOrder {
|
|
110
|
-
ASC = "ASC",
|
|
111
|
-
DESC = "DESC"
|
|
112
|
-
}
|
|
113
|
-
export interface Paging {
|
|
114
|
-
/** Number of items to load. */
|
|
115
|
-
limit?: number | null;
|
|
116
|
-
/** Number of items to skip in the current sort order. */
|
|
117
|
-
offset?: number | null;
|
|
118
|
-
}
|
|
119
|
-
export interface QueryCardsResponse {
|
|
120
|
-
/** List of cards that matched the query criteria. */
|
|
121
|
-
cards?: Card[];
|
|
122
|
-
/** Metadata for the page of results. */
|
|
123
|
-
pagination?: PaginationResponse;
|
|
124
|
-
}
|
|
125
|
-
export interface PaginationResponse {
|
|
126
|
-
/** Number of items that were skipped in the current sort order. */
|
|
127
|
-
offset?: number;
|
|
128
|
-
/** Total number of items that matched the filter. */
|
|
129
|
-
total?: number;
|
|
130
|
-
/** Number of returned items. */
|
|
131
|
-
count?: number;
|
|
132
|
-
}
|
|
133
|
-
export interface ListCardsRequest {
|
|
134
|
-
/** ID of the workflow whose cards will be listed. */
|
|
135
|
-
workflowId: string;
|
|
136
|
-
/** Filters for cards in the specified phase. */
|
|
137
|
-
phaseId?: string | null;
|
|
138
|
-
/**
|
|
139
|
-
* Number of items to return.
|
|
140
|
-
*
|
|
141
|
-
* Defaults to `50`.
|
|
142
|
-
*/
|
|
143
|
-
limit?: number | null;
|
|
144
|
-
/**
|
|
145
|
-
* Number of items to skip in the current sort order.
|
|
146
|
-
*
|
|
147
|
-
* Defaults to `0`.
|
|
148
|
-
*/
|
|
149
|
-
offset?: number | null;
|
|
150
|
-
/** Filters for cards with the specified contact ID. */
|
|
151
|
-
attachmentValue?: string | null;
|
|
152
|
-
/**
|
|
153
|
-
* Filters for archived cards.
|
|
154
|
-
* If set to `true`,
|
|
155
|
-
* only archived cards are returned.
|
|
156
|
-
* If set to `false`,
|
|
157
|
-
* only cards that are not archived are returned.
|
|
158
|
-
*
|
|
159
|
-
* Defaults to `false`.
|
|
160
|
-
*/
|
|
161
|
-
fetchArchived?: boolean | null;
|
|
162
|
-
/**
|
|
163
|
-
* Supported fields:
|
|
164
|
-
* `id`, `name`, `createdDate`, `updatedDate`, `phaseId`
|
|
165
|
-
*
|
|
166
|
-
* List of fields to sort by.
|
|
167
|
-
* Formatted as `field:direction`,
|
|
168
|
-
* where field is the field name
|
|
169
|
-
* and direction is `asc` (ascending) or `desc` (descending).
|
|
170
|
-
*
|
|
171
|
-
* Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
|
|
172
|
-
*/
|
|
173
|
-
sort?: string[];
|
|
174
|
-
}
|
|
175
|
-
export interface ListCardsResponse {
|
|
176
|
-
/** List of cards. */
|
|
177
|
-
cards?: Card[];
|
|
178
|
-
/** Metadata for the page of results. */
|
|
179
|
-
pagination?: PaginationResponse;
|
|
180
|
-
}
|
|
181
|
-
export interface GetCardRequest {
|
|
182
|
-
/** ID of the card to retrieve. */
|
|
183
|
-
_id: string;
|
|
184
|
-
}
|
|
185
|
-
export interface GetCardResponse {
|
|
186
|
-
/** Requested card. */
|
|
187
|
-
card?: Card;
|
|
188
|
-
}
|
|
189
|
-
export interface UpdateCardRequest {
|
|
190
|
-
/** ID of the card to update. */
|
|
191
|
-
_id: string;
|
|
192
|
-
/** Card details. */
|
|
193
|
-
cardInfo?: CardInfo;
|
|
194
|
-
}
|
|
195
|
-
export interface UpdateCardResponse {
|
|
196
|
-
}
|
|
197
|
-
export interface CreateCardRequest {
|
|
198
|
-
/** ID of the workflow to create the card in. */
|
|
199
|
-
workflowId: string;
|
|
200
|
-
/** ID of the phase to create the card in. */
|
|
201
|
-
phaseId: string;
|
|
202
|
-
/** Card details. */
|
|
203
|
-
card?: CardInfo;
|
|
204
|
-
/**
|
|
205
|
-
* Card position, where the first card is `0`.
|
|
206
|
-
*
|
|
207
|
-
* If a card already occupies the specified position,
|
|
208
|
-
* that card and any subsequent cards are shifted to the right by 1.
|
|
209
|
-
*
|
|
210
|
-
* Defaults to the last position.
|
|
211
|
-
*/
|
|
212
|
-
position?: number | null;
|
|
213
|
-
}
|
|
214
|
-
export interface CreateCardResponse {
|
|
215
|
-
/** ID of the newly created card. */
|
|
216
|
-
_id?: string | null;
|
|
217
|
-
}
|
|
218
|
-
export interface DeleteCardRequest {
|
|
219
|
-
/** ID of the card to delete. */
|
|
220
|
-
_id: string;
|
|
221
|
-
}
|
|
222
|
-
export interface DeleteCardResponse {
|
|
223
|
-
}
|
|
224
|
-
export interface MoveCardRequest {
|
|
225
|
-
/** ID of the card to move. */
|
|
226
|
-
_id: string;
|
|
227
|
-
/** ID of the phase to move the card to. */
|
|
228
|
-
newPhaseId?: string | null;
|
|
229
|
-
/** Position of the card in the phase, where the first card is `0`. */
|
|
230
|
-
newPosition?: number | null;
|
|
231
|
-
}
|
|
232
|
-
export interface MoveCardResponse {
|
|
233
|
-
}
|
|
234
|
-
export interface RestoreCardRequest {
|
|
235
|
-
/** ID of the card to restore. */
|
|
236
|
-
_id: string;
|
|
237
|
-
/** ID of the phase to restore the card to. */
|
|
238
|
-
newPhaseId: string;
|
|
239
|
-
/**
|
|
240
|
-
* Position of the restored card in the phase,
|
|
241
|
-
* where the first card is `0`.
|
|
242
|
-
*/
|
|
243
|
-
newPosition?: number | null;
|
|
244
|
-
}
|
|
245
|
-
export interface RestoreCardResponse {
|
|
246
|
-
}
|
|
247
|
-
export interface ArchiveCardRequest {
|
|
248
|
-
/** ID of the card to archive. */
|
|
249
|
-
_id: string;
|
|
250
|
-
}
|
|
251
|
-
export interface ArchiveCardResponse {
|
|
252
|
-
}
|
|
253
|
-
export interface ListCardsResponseNonNullableFields {
|
|
254
|
-
cards: {
|
|
255
|
-
info?: {
|
|
256
|
-
primaryAttachment?: {
|
|
257
|
-
attachmentId: string;
|
|
258
|
-
value: string;
|
|
259
|
-
attachmentType: AttachmentType;
|
|
260
|
-
contactId: string;
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
}[];
|
|
264
|
-
pagination?: {
|
|
265
|
-
offset: number;
|
|
266
|
-
total: number;
|
|
267
|
-
count: number;
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
export interface GetCardResponseNonNullableFields {
|
|
271
|
-
card?: {
|
|
272
|
-
info?: {
|
|
273
|
-
primaryAttachment?: {
|
|
274
|
-
attachmentId: string;
|
|
275
|
-
value: string;
|
|
276
|
-
attachmentType: AttachmentType;
|
|
277
|
-
contactId: string;
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Retrieves a list of a workflow's cards.
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* The `listCards()` function returns a Promise that resolves to a list of the specified workflow's cards.
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* Use the `options` parameter to specify which cards to retrieve and in which order to retrieve them. Must use either `phaseId` or `fetchOnlyArchived`.
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* Cards can be sorted based on their `"id"`, `"name"`, `"phaseId"`, `"createdDate"`, `"updatedDate"`, `"source"`, and `"position"`.
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* If no `limit` parameter is passed, the first 50 cards are returned.
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
* Sort order defaults to by `"phaseId"` and then by `"position"` ascending.
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
* This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
302
|
-
* @param workflowId - ID of the workflow whose cards will be listed.
|
|
303
|
-
* @public
|
|
304
|
-
* @requiredField workflowId
|
|
305
|
-
* @param options - Options to use when retrieving the list of cards.
|
|
306
|
-
*/
|
|
307
|
-
export declare function listCards(workflowId: string, options?: ListCardsOptions): Promise<ListCardsResponse & ListCardsResponseNonNullableFields>;
|
|
308
|
-
export interface ListCardsOptions {
|
|
309
|
-
/** Filters for cards in the specified phase. */
|
|
310
|
-
phaseId?: string | null;
|
|
311
|
-
/**
|
|
312
|
-
* Number of items to return.
|
|
313
|
-
*
|
|
314
|
-
* Defaults to `50`.
|
|
315
|
-
*/
|
|
316
|
-
limit?: number | null;
|
|
317
|
-
/**
|
|
318
|
-
* Number of items to skip in the current sort order.
|
|
319
|
-
*
|
|
320
|
-
* Defaults to `0`.
|
|
321
|
-
*/
|
|
322
|
-
offset?: number | null;
|
|
323
|
-
/** Filters for cards with the specified contact ID. */
|
|
324
|
-
attachmentValue?: string | null;
|
|
325
|
-
/**
|
|
326
|
-
* Filters for archived cards.
|
|
327
|
-
* If set to `true`,
|
|
328
|
-
* only archived cards are returned.
|
|
329
|
-
* If set to `false`,
|
|
330
|
-
* only cards that are not archived are returned.
|
|
331
|
-
*
|
|
332
|
-
* Defaults to `false`.
|
|
333
|
-
*/
|
|
334
|
-
fetchArchived?: boolean | null;
|
|
335
|
-
/**
|
|
336
|
-
* Supported fields:
|
|
337
|
-
* `id`, `name`, `createdDate`, `updatedDate`, `phaseId`
|
|
338
|
-
*
|
|
339
|
-
* List of fields to sort by.
|
|
340
|
-
* Formatted as `field:direction`,
|
|
341
|
-
* where field is the field name
|
|
342
|
-
* and direction is `asc` (ascending) or `desc` (descending).
|
|
343
|
-
*
|
|
344
|
-
* Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
|
|
345
|
-
*/
|
|
346
|
-
sort?: string[];
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Retrieves a workflow card by ID.
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* The `getCard()` function returns a Promise that resolves to the card with the specified ID.
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
356
|
-
* @param _id - ID of the card to retrieve.
|
|
357
|
-
* @public
|
|
358
|
-
* @requiredField _id
|
|
359
|
-
* @returns Requested card.
|
|
360
|
-
*/
|
|
361
|
-
export declare function getCard(_id: string): Promise<Card & NonNullable<GetCardResponseNonNullableFields>['card']>;
|
|
362
|
-
/**
|
|
363
|
-
* Updates an existing workflow card.
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
* The `updateCard()` function returns a Promise that resolves when the card has been updated with the specified values.
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* `contactId` is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact.
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
373
|
-
* @param _id - ID of the card to update.
|
|
374
|
-
* @param cardInfo - Card details.
|
|
375
|
-
* @public
|
|
376
|
-
* @requiredField _id
|
|
377
|
-
* @requiredField cardInfo
|
|
378
|
-
* @param options - Options to use when updating a card.
|
|
379
|
-
*/
|
|
380
|
-
export declare function updateCard(_id: string, cardInfo: CardInfo): Promise<void>;
|
|
381
|
-
/**
|
|
382
|
-
* Creates a new workflow card.
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* The `createCard()` function returns a Promise that resolves to the created card's ID when the card is created in the specified workflow phase.
|
|
386
|
-
*
|
|
387
|
-
* Pass a value for the `position` parameter to specify the newly created card's position within the specified phase. Positions are zero-based, meaning the first position is `0`.
|
|
388
|
-
*
|
|
389
|
-
* When omitted, the newly created card is added to the specified phase as the top card within the phase.
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
* This function requires you to specify the ID of a workflow and phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
393
|
-
*
|
|
394
|
-
* > **Note:**
|
|
395
|
-
* > Each workflow is limited to 5,000 cards.
|
|
396
|
-
* > If this limit is reached, `createCard()` throws an error.
|
|
397
|
-
* > [Archive cards](#archivecard) when they're no longer needed
|
|
398
|
-
* > to reduce card count and avoid hitting the limit.
|
|
399
|
-
* @param card - Card details.
|
|
400
|
-
* @public
|
|
401
|
-
* @requiredField card
|
|
402
|
-
* @requiredField identifiers
|
|
403
|
-
* @requiredField identifiers.phaseId
|
|
404
|
-
* @requiredField identifiers.workflowId
|
|
405
|
-
* @param options - Options to use when creating a card.
|
|
406
|
-
*/
|
|
407
|
-
export declare function createCard(identifiers: CreateCardIdentifiers, card: CardInfo, options?: CreateCardOptions): Promise<CreateCardResponse>;
|
|
408
|
-
export interface CreateCardIdentifiers {
|
|
409
|
-
/** ID of the workflow to create the card in. */
|
|
410
|
-
workflowId: string;
|
|
411
|
-
/** ID of the phase to create the card in. */
|
|
412
|
-
phaseId: string;
|
|
413
|
-
}
|
|
414
|
-
export interface CreateCardOptions {
|
|
415
|
-
/**
|
|
416
|
-
* Card position, where the first card is `0`.
|
|
417
|
-
*
|
|
418
|
-
* If a card already occupies the specified position,
|
|
419
|
-
* that card and any subsequent cards are shifted to the right by 1.
|
|
420
|
-
*
|
|
421
|
-
* Defaults to the last position.
|
|
422
|
-
*/
|
|
423
|
-
position?: number | null;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Deletes a workflow card by ID.
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
* The `deleteCard()` function returns a Promise when the specified card has been deleted.
|
|
430
|
-
*
|
|
431
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
432
|
-
* @param _id - ID of the card to delete.
|
|
433
|
-
* @public
|
|
434
|
-
* @requiredField _id
|
|
435
|
-
*/
|
|
436
|
-
export declare function deleteCard(_id: string): Promise<void>;
|
|
437
|
-
/**
|
|
438
|
-
* Moves a card to a new position within a workflow.
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* The `moveCard()` function returns a Promise when the specified card has been moved to the new position.
|
|
442
|
-
*
|
|
443
|
-
* Use the `options` parameter to specify the phase and position within that phase to move the card to. Positions are zero-based, meaning the first position is `0`.
|
|
444
|
-
*
|
|
445
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
446
|
-
* @param _id - ID of the card to move.
|
|
447
|
-
* @public
|
|
448
|
-
* @requiredField _id
|
|
449
|
-
* @param options - Information about where to move the card.
|
|
450
|
-
*/
|
|
451
|
-
export declare function moveCard(_id: string, options?: MoveCardOptions): Promise<void>;
|
|
452
|
-
export interface MoveCardOptions {
|
|
453
|
-
/** ID of the phase to move the card to. */
|
|
454
|
-
newPhaseId?: string | null;
|
|
455
|
-
/** Position of the card in the phase, where the first card is `0`. */
|
|
456
|
-
newPosition?: number | null;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Restores an archived workflow card.
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
* The `restoreCard()` function returns a Promise that resolves when the archived card has been restored.
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
* > **Note:**
|
|
469
|
-
* > Each workflow is limited to 5,000 cards.
|
|
470
|
-
* > If this limit is reached, `createCard()` throws an error.
|
|
471
|
-
* > [Archive cards](#archivecard) when they're no longer needed
|
|
472
|
-
* > to reduce card count and avoid hitting the limit.
|
|
473
|
-
* @param _id - ID of the card to restore.
|
|
474
|
-
* @param newPhaseId - ID of the phase to restore the card to.
|
|
475
|
-
* @public
|
|
476
|
-
* @requiredField _id
|
|
477
|
-
* @requiredField newPhaseId
|
|
478
|
-
* @param options - Options to use when restoring a card.
|
|
479
|
-
*/
|
|
480
|
-
export declare function restoreCard(_id: string, newPhaseId: string, options?: RestoreCardOptions): Promise<void>;
|
|
481
|
-
export interface RestoreCardOptions {
|
|
482
|
-
/**
|
|
483
|
-
* Position of the restored card in the phase,
|
|
484
|
-
* where the first card is `0`.
|
|
485
|
-
*/
|
|
486
|
-
newPosition?: number | null;
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Archives a workflow card.
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
* The `archiveCard()` function returns a Promise that resolves when the card has been archived.
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
* This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
496
|
-
* @param _id - ID of the card to archive.
|
|
497
|
-
* @public
|
|
498
|
-
* @requiredField _id
|
|
499
|
-
*/
|
|
500
|
-
export declare function archiveCard(_id: string): Promise<void>;
|