@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,435 +0,0 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
export interface Phase {
|
|
8
|
-
/** Phase information. */
|
|
9
|
-
info?: PhaseInfo;
|
|
10
|
-
/** Cards contained in the phase. */
|
|
11
|
-
cardsList?: CardsList;
|
|
12
|
-
}
|
|
13
|
-
export interface PhaseInfo {
|
|
14
|
-
/**
|
|
15
|
-
* Phase ID.
|
|
16
|
-
* @readonly
|
|
17
|
-
*/
|
|
18
|
-
_id?: string | null;
|
|
19
|
-
/** Display name shown at the top of the phase. */
|
|
20
|
-
name?: string | null;
|
|
21
|
-
}
|
|
22
|
-
/** a list of cards (a page) along with the total number */
|
|
23
|
-
export interface CardsList {
|
|
24
|
-
/** Total number of cards in the phase. */
|
|
25
|
-
total?: number;
|
|
26
|
-
/**
|
|
27
|
-
* List of cards in the phase.
|
|
28
|
-
* Sorted according to the card display order, from top to bottom.
|
|
29
|
-
*/
|
|
30
|
-
cards?: Card[];
|
|
31
|
-
}
|
|
32
|
-
export interface Card {
|
|
33
|
-
/** Card details. */
|
|
34
|
-
info?: CardInfo;
|
|
35
|
-
}
|
|
36
|
-
/** entity representing a card-info */
|
|
37
|
-
export interface CardInfo {
|
|
38
|
-
/**
|
|
39
|
-
* Card ID.
|
|
40
|
-
* @readonly
|
|
41
|
-
*/
|
|
42
|
-
_id?: string | null;
|
|
43
|
-
/** Display name shown at the top of the card. */
|
|
44
|
-
name?: string | null;
|
|
45
|
-
/** Card description. */
|
|
46
|
-
description?: string | null;
|
|
47
|
-
/** Details about the contact attached to the card. */
|
|
48
|
-
primaryAttachment?: Attachment;
|
|
49
|
-
/** Due date. */
|
|
50
|
-
dueDate?: Date;
|
|
51
|
-
/** Name of the app or service that created the contact. */
|
|
52
|
-
source?: string | null;
|
|
53
|
-
/**
|
|
54
|
-
* @internal
|
|
55
|
-
* @internal
|
|
56
|
-
* @readonly
|
|
57
|
-
*/
|
|
58
|
-
createdAt?: Date;
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
* @internal
|
|
62
|
-
* @readonly
|
|
63
|
-
*/
|
|
64
|
-
updatedAt?: Date;
|
|
65
|
-
/**
|
|
66
|
-
* ID of the phase that currently holds the card.
|
|
67
|
-
* @readonly
|
|
68
|
-
*/
|
|
69
|
-
phaseId?: string | null;
|
|
70
|
-
/**
|
|
71
|
-
* Date and time the card was created.
|
|
72
|
-
* @readonly
|
|
73
|
-
*/
|
|
74
|
-
_createdDate?: Date;
|
|
75
|
-
/**
|
|
76
|
-
* Date and time the card was updated.
|
|
77
|
-
* @readonly
|
|
78
|
-
*/
|
|
79
|
-
_updatedDate?: Date;
|
|
80
|
-
}
|
|
81
|
-
export interface Attachment {
|
|
82
|
-
/**
|
|
83
|
-
* Attachment ID. For internal use.
|
|
84
|
-
* @readonly
|
|
85
|
-
*/
|
|
86
|
-
attachmentId?: string;
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
* @internal */
|
|
90
|
-
value?: string;
|
|
91
|
-
/**
|
|
92
|
-
* @internal
|
|
93
|
-
* @internal */
|
|
94
|
-
attachmentType?: AttachmentType;
|
|
95
|
-
/** ID of the contact attached to the card. */
|
|
96
|
-
contactId?: string;
|
|
97
|
-
}
|
|
98
|
-
/** describes the supported types of attachments (currently only supports Contact which is the default type) */
|
|
99
|
-
export declare enum AttachmentType {
|
|
100
|
-
ContactType = "ContactType"
|
|
101
|
-
}
|
|
102
|
-
export interface QueryPhasesRequest {
|
|
103
|
-
/** Query, sort, and paging options. */
|
|
104
|
-
query?: Query;
|
|
105
|
-
}
|
|
106
|
-
export interface Query {
|
|
107
|
-
/**
|
|
108
|
-
* Filter object in the following format:
|
|
109
|
-
* `"filter" : {
|
|
110
|
-
* "fieldName1": "value1",
|
|
111
|
-
* "fieldName2":{"$operator":"value2"}
|
|
112
|
-
* }`
|
|
113
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
114
|
-
*/
|
|
115
|
-
filter?: any;
|
|
116
|
-
/**
|
|
117
|
-
* Sort object in the following format:
|
|
118
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
119
|
-
*/
|
|
120
|
-
sort?: Sorting[];
|
|
121
|
-
/** Paging options to limit and skip the number of items. */
|
|
122
|
-
paging?: Paging;
|
|
123
|
-
/** 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. */
|
|
124
|
-
fields?: string[];
|
|
125
|
-
/** 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. */
|
|
126
|
-
fieldsets?: string[];
|
|
127
|
-
}
|
|
128
|
-
export interface Sorting {
|
|
129
|
-
/** Name of the field to sort by. */
|
|
130
|
-
fieldName?: string;
|
|
131
|
-
/** Sort order. */
|
|
132
|
-
order?: SortOrder;
|
|
133
|
-
}
|
|
134
|
-
export declare enum SortOrder {
|
|
135
|
-
ASC = "ASC",
|
|
136
|
-
DESC = "DESC"
|
|
137
|
-
}
|
|
138
|
-
export interface Paging {
|
|
139
|
-
/** Number of items to load. */
|
|
140
|
-
limit?: number | null;
|
|
141
|
-
/** Number of items to skip in the current sort order. */
|
|
142
|
-
offset?: number | null;
|
|
143
|
-
}
|
|
144
|
-
export interface QueryPhasesResponse {
|
|
145
|
-
/** List of phases that matched the query criteria. */
|
|
146
|
-
phases?: Phase[];
|
|
147
|
-
/** Metadata for the page of results. */
|
|
148
|
-
pagination?: PaginationResponse;
|
|
149
|
-
}
|
|
150
|
-
export interface PaginationResponse {
|
|
151
|
-
/** Number of items that were skipped in the current sort order. */
|
|
152
|
-
offset?: number;
|
|
153
|
-
/** Total number of items that matched the filter. */
|
|
154
|
-
total?: number;
|
|
155
|
-
/** Number of returned items. */
|
|
156
|
-
count?: number;
|
|
157
|
-
}
|
|
158
|
-
export interface ListPhasesRequest {
|
|
159
|
-
/** ID of the workflow whose phases will be listed. */
|
|
160
|
-
workflowId: string;
|
|
161
|
-
/** Number of items to return. */
|
|
162
|
-
limit?: number | null;
|
|
163
|
-
/**
|
|
164
|
-
* Number of items to skip in the current sort order.
|
|
165
|
-
*
|
|
166
|
-
* Defaults to `0`.
|
|
167
|
-
*/
|
|
168
|
-
offset?: number | null;
|
|
169
|
-
/**
|
|
170
|
-
* Supported fields:
|
|
171
|
-
* `id`, `name`
|
|
172
|
-
*
|
|
173
|
-
* List of fields to sort by.
|
|
174
|
-
* Formatted as `field:direction`,
|
|
175
|
-
* where field is the field name
|
|
176
|
-
* and direction is `asc` (ascending) or `desc` (descending).
|
|
177
|
-
*
|
|
178
|
-
* Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
|
|
179
|
-
*/
|
|
180
|
-
sort?: string[];
|
|
181
|
-
}
|
|
182
|
-
export interface ListPhasesResponse {
|
|
183
|
-
/** List of phases. */
|
|
184
|
-
phases?: Phase[];
|
|
185
|
-
/** Metadata for the page of results. */
|
|
186
|
-
pagination?: PaginationResponse;
|
|
187
|
-
}
|
|
188
|
-
export interface GetPhaseRequest {
|
|
189
|
-
/** ID of the phase to retrieve. */
|
|
190
|
-
_id: string;
|
|
191
|
-
}
|
|
192
|
-
export interface GetPhaseResponse {
|
|
193
|
-
/** Requested phase. */
|
|
194
|
-
phase?: Phase;
|
|
195
|
-
}
|
|
196
|
-
export interface UpdatePhaseRequest {
|
|
197
|
-
/** ID of the phase to update. */
|
|
198
|
-
_id: string;
|
|
199
|
-
/** Phase details to update. */
|
|
200
|
-
phase?: PhaseInfo;
|
|
201
|
-
}
|
|
202
|
-
export interface UpdatePhaseResponse {
|
|
203
|
-
}
|
|
204
|
-
export interface CreatePhaseRequest {
|
|
205
|
-
/** ID of the workflow to create the phase in. */
|
|
206
|
-
workflowId: string;
|
|
207
|
-
/** Phase details. */
|
|
208
|
-
phase?: PhaseInfo;
|
|
209
|
-
/**
|
|
210
|
-
* Phase position, where the first phase is `0`.
|
|
211
|
-
*
|
|
212
|
-
* If a phase already occupies the specified position,
|
|
213
|
-
* that phase and any subsequent phases
|
|
214
|
-
* are shifted to the right by 1.
|
|
215
|
-
*
|
|
216
|
-
* Defaults to the last position,
|
|
217
|
-
* which is displayed before the win phase.
|
|
218
|
-
*/
|
|
219
|
-
position?: number | null;
|
|
220
|
-
}
|
|
221
|
-
export interface CreatePhaseResponse {
|
|
222
|
-
/** ID of the newly created phase. */
|
|
223
|
-
_id?: string | null;
|
|
224
|
-
}
|
|
225
|
-
export interface DeletePhaseRequest {
|
|
226
|
-
/** ID of the phase to delete. */
|
|
227
|
-
_id: string;
|
|
228
|
-
}
|
|
229
|
-
export interface DeletePhaseResponse {
|
|
230
|
-
}
|
|
231
|
-
export interface MovePhaseRequest {
|
|
232
|
-
/** ID of the workflow that contains the phase to move. */
|
|
233
|
-
workflowId: string;
|
|
234
|
-
/** ID of the phase to move. */
|
|
235
|
-
_id: string;
|
|
236
|
-
/**
|
|
237
|
-
* New phase position, where the first phase is `0`.
|
|
238
|
-
*
|
|
239
|
-
* If a phase already occupies the specified position,
|
|
240
|
-
* that phase and any subsequent phases
|
|
241
|
-
* are shifted to the right by 1.
|
|
242
|
-
*/
|
|
243
|
-
newPosition: number | null;
|
|
244
|
-
}
|
|
245
|
-
export interface MovePhaseResponse {
|
|
246
|
-
}
|
|
247
|
-
export interface ListPhasesResponseNonNullableFields {
|
|
248
|
-
phases: {
|
|
249
|
-
cardsList?: {
|
|
250
|
-
total: number;
|
|
251
|
-
cards: {
|
|
252
|
-
info?: {
|
|
253
|
-
primaryAttachment?: {
|
|
254
|
-
attachmentId: string;
|
|
255
|
-
value: string;
|
|
256
|
-
attachmentType: AttachmentType;
|
|
257
|
-
contactId: string;
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
}[];
|
|
261
|
-
};
|
|
262
|
-
}[];
|
|
263
|
-
pagination?: {
|
|
264
|
-
offset: number;
|
|
265
|
-
total: number;
|
|
266
|
-
count: number;
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
export interface GetPhaseResponseNonNullableFields {
|
|
270
|
-
phase?: {
|
|
271
|
-
cardsList?: {
|
|
272
|
-
total: number;
|
|
273
|
-
cards: {
|
|
274
|
-
info?: {
|
|
275
|
-
primaryAttachment?: {
|
|
276
|
-
attachmentId: string;
|
|
277
|
-
value: string;
|
|
278
|
-
attachmentType: AttachmentType;
|
|
279
|
-
contactId: string;
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
}[];
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Retrieves a list of a workflow's phases.
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
* The `listPhases()` function returns a Promise that resolves to a list containing information about the specified workflow's phases.
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* Use the `options` parameter to specify which phases to retrieve and in which order to retrieve them. Phases can be sorted based on their `"id"`, `"name"`, and `"position"`. If no `limit` parameter is passed, the first 50 cards are returned. Sort order defaults to by `"position"` ascending.
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
* 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).
|
|
297
|
-
* @param workflowId - ID of the workflow whose phases will be listed.
|
|
298
|
-
* @public
|
|
299
|
-
* @requiredField workflowId
|
|
300
|
-
* @param options - Options to use when retrieving the list of workflow phases.
|
|
301
|
-
*/
|
|
302
|
-
export declare function listPhases(workflowId: string, options?: ListPhasesOptions): Promise<ListPhasesResponse & ListPhasesResponseNonNullableFields>;
|
|
303
|
-
export interface ListPhasesOptions {
|
|
304
|
-
/** Number of items to return. */
|
|
305
|
-
limit?: number | null;
|
|
306
|
-
/**
|
|
307
|
-
* Number of items to skip in the current sort order.
|
|
308
|
-
*
|
|
309
|
-
* Defaults to `0`.
|
|
310
|
-
*/
|
|
311
|
-
offset?: number | null;
|
|
312
|
-
/**
|
|
313
|
-
* Supported fields:
|
|
314
|
-
* `id`, `name`
|
|
315
|
-
*
|
|
316
|
-
* List of fields to sort by.
|
|
317
|
-
* Formatted as `field:direction`,
|
|
318
|
-
* where field is the field name
|
|
319
|
-
* and direction is `asc` (ascending) or `desc` (descending).
|
|
320
|
-
*
|
|
321
|
-
* Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
|
|
322
|
-
*/
|
|
323
|
-
sort?: string[];
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Retrieves a phase by ID.
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* The `getPhase()` function returns a Promise that resolves to the phase with the specified ID.
|
|
330
|
-
*
|
|
331
|
-
* This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
332
|
-
* @param _id - ID of the phase to retrieve.
|
|
333
|
-
* @public
|
|
334
|
-
* @requiredField _id
|
|
335
|
-
* @returns Requested phase.
|
|
336
|
-
*/
|
|
337
|
-
export declare function getPhase(_id: string): Promise<Phase & NonNullable<GetPhaseResponseNonNullableFields>['phase']>;
|
|
338
|
-
/**
|
|
339
|
-
* Updates an existing workflow phase.
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* The `updatePhase()` function returns a Promise that resolves when the phase has been updated with the specified values.
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* Only the properties passed in the `phase` object will be updated. All other properties will remain the same.
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
* This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
349
|
-
* @param _id - ID of the phase to update.
|
|
350
|
-
* @param phase - Phase details to update.
|
|
351
|
-
* @public
|
|
352
|
-
* @requiredField _id
|
|
353
|
-
* @requiredField phase
|
|
354
|
-
* @param options - Phase information to update.
|
|
355
|
-
*/
|
|
356
|
-
export declare function updatePhase(_id: string, phase: PhaseInfo): Promise<void>;
|
|
357
|
-
/**
|
|
358
|
-
* Creates a new workflow phase.
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
* The `createPhase()` function returns a Promise that resolves to the created phase ID when the phase is created in the specified workflow.
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* Pass a value for the `position` parameter to specify the newly created phase's position within the specified workflow. Positions are zero-based, meaning the first position is `0`.
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* When omitted, the newly created phase is added as the last non-win phase.
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
* 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).
|
|
371
|
-
* @param workflowId - ID of the workflow to create the phase in.
|
|
372
|
-
* @param phase - Phase details.
|
|
373
|
-
* @public
|
|
374
|
-
* @requiredField phase
|
|
375
|
-
* @requiredField phase.name
|
|
376
|
-
* @requiredField workflowId
|
|
377
|
-
* @param options - Options to use when creating workflow phases.
|
|
378
|
-
*/
|
|
379
|
-
export declare function createPhase(workflowId: string, phase: PhaseInfo, options?: CreatePhaseOptions): Promise<CreatePhaseResponse>;
|
|
380
|
-
export interface CreatePhaseOptions {
|
|
381
|
-
/**
|
|
382
|
-
* Phase position, where the first phase is `0`.
|
|
383
|
-
*
|
|
384
|
-
* If a phase already occupies the specified position,
|
|
385
|
-
* that phase and any subsequent phases
|
|
386
|
-
* are shifted to the right by 1.
|
|
387
|
-
*
|
|
388
|
-
* Defaults to the last position,
|
|
389
|
-
* which is displayed before the win phase.
|
|
390
|
-
*/
|
|
391
|
-
position?: number | null;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Deletes a workflow phase.
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
* The `deletePhase()` function returns a Promise when the specified phase has been deleted.
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
* This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
401
|
-
* @param _id - ID of the phase to delete.
|
|
402
|
-
* @public
|
|
403
|
-
* @requiredField _id
|
|
404
|
-
*/
|
|
405
|
-
export declare function deletePhase(_id: string): Promise<void>;
|
|
406
|
-
/**
|
|
407
|
-
* Moves a phase to a new position with a workflow.
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* The `movePhase()` function returns a Promise when the specified phase has been moved to the new position.
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
* Use the `newPosition` parameter to specify the new phase position within the workflow. Any non-win phase can be moved to any non-win position. The win phase cannot be moved. Positions are zero-based, meaning the first position is `0`.
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
|
|
417
|
-
* @param newPosition - New phase position, where the first phase is `0`.
|
|
418
|
-
*
|
|
419
|
-
* If a phase already occupies the specified position,
|
|
420
|
-
* that phase and any subsequent phases
|
|
421
|
-
* are shifted to the right by 1.
|
|
422
|
-
* @public
|
|
423
|
-
* @documentationMaturity preview
|
|
424
|
-
* @requiredField identifiers
|
|
425
|
-
* @requiredField identifiers.id
|
|
426
|
-
* @requiredField identifiers.workflowId
|
|
427
|
-
* @requiredField newPosition
|
|
428
|
-
*/
|
|
429
|
-
export declare function movePhase(identifiers: MovePhaseIdentifiers, newPosition: number | null): Promise<void>;
|
|
430
|
-
export interface MovePhaseIdentifiers {
|
|
431
|
-
/** ID of the workflow that contains the phase to move. */
|
|
432
|
-
workflowId: string;
|
|
433
|
-
/** ID of the phase to move. */
|
|
434
|
-
_id: string;
|
|
435
|
-
}
|