@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.
Files changed (115) hide show
  1. package/build/cjs/context.d.ts +3 -0
  2. package/build/cjs/{index.typings.js → context.js} +9 -5
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +3 -3
  5. package/build/cjs/index.js +8 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -3
  8. package/build/cjs/meta.js +8 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +3 -0
  11. package/build/es/context.js +4 -0
  12. package/build/es/context.js.map +1 -0
  13. package/build/es/index.d.ts +3 -3
  14. package/build/es/index.js +3 -3
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +3 -3
  17. package/build/es/meta.js +3 -3
  18. package/build/es/meta.js.map +1 -1
  19. package/context/package.json +6 -0
  20. package/package.json +17 -7
  21. package/build/cjs/index.typings.d.ts +0 -3
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/workflows-v1-card.http.d.ts +0 -114
  24. package/build/cjs/src/workflows-v1-card.http.js +0 -380
  25. package/build/cjs/src/workflows-v1-card.http.js.map +0 -1
  26. package/build/cjs/src/workflows-v1-card.meta.d.ts +0 -37
  27. package/build/cjs/src/workflows-v1-card.meta.js +0 -176
  28. package/build/cjs/src/workflows-v1-card.meta.js.map +0 -1
  29. package/build/cjs/src/workflows-v1-card.public.d.ts +0 -24
  30. package/build/cjs/src/workflows-v1-card.public.js +0 -57
  31. package/build/cjs/src/workflows-v1-card.public.js.map +0 -1
  32. package/build/cjs/src/workflows-v1-card.types.d.ts +0 -270
  33. package/build/cjs/src/workflows-v1-card.types.js +0 -14
  34. package/build/cjs/src/workflows-v1-card.types.js.map +0 -1
  35. package/build/cjs/src/workflows-v1-card.universal.d.ts +0 -500
  36. package/build/cjs/src/workflows-v1-card.universal.js +0 -596
  37. package/build/cjs/src/workflows-v1-card.universal.js.map +0 -1
  38. package/build/cjs/src/workflows-v1-phase.http.d.ts +0 -76
  39. package/build/cjs/src/workflows-v1-phase.http.js +0 -296
  40. package/build/cjs/src/workflows-v1-phase.http.js.map +0 -1
  41. package/build/cjs/src/workflows-v1-phase.meta.d.ts +0 -31
  42. package/build/cjs/src/workflows-v1-phase.meta.js +0 -138
  43. package/build/cjs/src/workflows-v1-phase.meta.js.map +0 -1
  44. package/build/cjs/src/workflows-v1-phase.public.d.ts +0 -27
  45. package/build/cjs/src/workflows-v1-phase.public.js +0 -45
  46. package/build/cjs/src/workflows-v1-phase.public.js.map +0 -1
  47. package/build/cjs/src/workflows-v1-phase.types.d.ts +0 -274
  48. package/build/cjs/src/workflows-v1-phase.types.js +0 -14
  49. package/build/cjs/src/workflows-v1-phase.types.js.map +0 -1
  50. package/build/cjs/src/workflows-v1-phase.universal.d.ts +0 -435
  51. package/build/cjs/src/workflows-v1-phase.universal.js +0 -456
  52. package/build/cjs/src/workflows-v1-phase.universal.js.map +0 -1
  53. package/build/cjs/src/workflows-v1-workflow.http.d.ts +0 -55
  54. package/build/cjs/src/workflows-v1-workflow.http.js +0 -262
  55. package/build/cjs/src/workflows-v1-workflow.http.js.map +0 -1
  56. package/build/cjs/src/workflows-v1-workflow.meta.d.ts +0 -23
  57. package/build/cjs/src/workflows-v1-workflow.meta.js +0 -119
  58. package/build/cjs/src/workflows-v1-workflow.meta.js.map +0 -1
  59. package/build/cjs/src/workflows-v1-workflow.public.d.ts +0 -46
  60. package/build/cjs/src/workflows-v1-workflow.public.js +0 -39
  61. package/build/cjs/src/workflows-v1-workflow.public.js.map +0 -1
  62. package/build/cjs/src/workflows-v1-workflow.types.d.ts +0 -319
  63. package/build/cjs/src/workflows-v1-workflow.types.js +0 -14
  64. package/build/cjs/src/workflows-v1-workflow.types.js.map +0 -1
  65. package/build/cjs/src/workflows-v1-workflow.universal.d.ts +0 -433
  66. package/build/cjs/src/workflows-v1-workflow.universal.js +0 -369
  67. package/build/cjs/src/workflows-v1-workflow.universal.js.map +0 -1
  68. package/build/es/index.typings.d.ts +0 -3
  69. package/build/es/index.typings.js +0 -4
  70. package/build/es/index.typings.js.map +0 -1
  71. package/build/es/src/workflows-v1-card.http.d.ts +0 -114
  72. package/build/es/src/workflows-v1-card.http.js +0 -369
  73. package/build/es/src/workflows-v1-card.http.js.map +0 -1
  74. package/build/es/src/workflows-v1-card.meta.d.ts +0 -37
  75. package/build/es/src/workflows-v1-card.meta.js +0 -146
  76. package/build/es/src/workflows-v1-card.meta.js.map +0 -1
  77. package/build/es/src/workflows-v1-card.public.d.ts +0 -24
  78. package/build/es/src/workflows-v1-card.public.js +0 -44
  79. package/build/es/src/workflows-v1-card.public.js.map +0 -1
  80. package/build/es/src/workflows-v1-card.types.d.ts +0 -270
  81. package/build/es/src/workflows-v1-card.types.js +0 -11
  82. package/build/es/src/workflows-v1-card.types.js.map +0 -1
  83. package/build/es/src/workflows-v1-card.universal.d.ts +0 -500
  84. package/build/es/src/workflows-v1-card.universal.js +0 -566
  85. package/build/es/src/workflows-v1-card.universal.js.map +0 -1
  86. package/build/es/src/workflows-v1-phase.http.d.ts +0 -76
  87. package/build/es/src/workflows-v1-phase.http.js +0 -287
  88. package/build/es/src/workflows-v1-phase.http.js.map +0 -1
  89. package/build/es/src/workflows-v1-phase.meta.d.ts +0 -31
  90. package/build/es/src/workflows-v1-phase.meta.js +0 -110
  91. package/build/es/src/workflows-v1-phase.meta.js.map +0 -1
  92. package/build/es/src/workflows-v1-phase.public.d.ts +0 -27
  93. package/build/es/src/workflows-v1-phase.public.js +0 -34
  94. package/build/es/src/workflows-v1-phase.public.js.map +0 -1
  95. package/build/es/src/workflows-v1-phase.types.d.ts +0 -274
  96. package/build/es/src/workflows-v1-phase.types.js +0 -11
  97. package/build/es/src/workflows-v1-phase.types.js.map +0 -1
  98. package/build/es/src/workflows-v1-phase.universal.d.ts +0 -435
  99. package/build/es/src/workflows-v1-phase.universal.js +0 -428
  100. package/build/es/src/workflows-v1-phase.universal.js.map +0 -1
  101. package/build/es/src/workflows-v1-workflow.http.d.ts +0 -55
  102. package/build/es/src/workflows-v1-workflow.http.js +0 -254
  103. package/build/es/src/workflows-v1-workflow.http.js.map +0 -1
  104. package/build/es/src/workflows-v1-workflow.meta.d.ts +0 -23
  105. package/build/es/src/workflows-v1-workflow.meta.js +0 -92
  106. package/build/es/src/workflows-v1-workflow.meta.js.map +0 -1
  107. package/build/es/src/workflows-v1-workflow.public.d.ts +0 -46
  108. package/build/es/src/workflows-v1-workflow.public.js +0 -29
  109. package/build/es/src/workflows-v1-workflow.public.js.map +0 -1
  110. package/build/es/src/workflows-v1-workflow.types.d.ts +0 -319
  111. package/build/es/src/workflows-v1-workflow.types.js +0 -11
  112. package/build/es/src/workflows-v1-workflow.types.js.map +0 -1
  113. package/build/es/src/workflows-v1-workflow.universal.d.ts +0 -433
  114. package/build/es/src/workflows-v1-workflow.universal.js +0 -342
  115. package/build/es/src/workflows-v1-workflow.universal.js.map +0 -1
@@ -1,428 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { serializer, transformError } from '@wix/metro-runtime/velo';
11
- import * as ambassadorWixWorkflowsV1Phase from './workflows-v1-phase.http';
12
- let __verbose = false;
13
- function __log(...args) {
14
- __verbose && console.log(...args);
15
- }
16
- function __inspect(obj) {
17
- return obj;
18
- }
19
- export const __debug = {
20
- verboseLogging: {
21
- on: () => (__verbose = true),
22
- off: () => (__verbose = false),
23
- },
24
- };
25
- const _toVeloEntity = '$';
26
- const _fromVeloEntity = '$';
27
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
28
- export var AttachmentType;
29
- (function (AttachmentType) {
30
- AttachmentType["ContactType"] = "ContactType";
31
- })(AttachmentType || (AttachmentType = {}));
32
- export var SortOrder;
33
- (function (SortOrder) {
34
- SortOrder["ASC"] = "ASC";
35
- SortOrder["DESC"] = "DESC";
36
- })(SortOrder || (SortOrder = {}));
37
- const _createPhaseRequest = {};
38
- const _createPhaseResponse = {};
39
- const _deletePhaseRequest = {};
40
- const _deletePhaseResponse = {};
41
- const _getPhaseRequest = {};
42
- const _getPhaseResponse = {};
43
- const _listPhasesRequest = {};
44
- const _listPhasesResponse = {};
45
- const _movePhaseRequest = {};
46
- const _movePhaseResponse = {};
47
- const _updatePhaseRequest = {};
48
- const _updatePhaseResponse = {};
49
- /**
50
- * Retrieves a list of a workflow's phases.
51
- *
52
- *
53
- * The `listPhases()` function returns a Promise that resolves to a list containing information about the specified workflow's phases.
54
- *
55
- *
56
- * 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.
57
- *
58
- *
59
- * 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).
60
- * @param workflowId - ID of the workflow whose phases will be listed.
61
- * @public
62
- * @requiredField workflowId
63
- * @param options - Options to use when retrieving the list of workflow phases.
64
- */
65
- export function listPhases(workflowId, options) {
66
- var _a, _b, _c;
67
- return __awaiter(this, arguments, void 0, function* () {
68
- const requestTransformation = {
69
- workflowId: '$[0]',
70
- limit: '$[1].limit',
71
- offset: '$[1].offset',
72
- sort: '$[1].sort',
73
- };
74
- const responseTransformation = '$';
75
- // @ts-ignore
76
- const { httpClient, sideEffects } = arguments[2];
77
- const { toAmbassadorRequest } = serializer({
78
- rootSchema: _listPhasesRequest,
79
- depSchemas: {},
80
- fqdnTransformation: {
81
- paths: [],
82
- transformation: _fromVeloEntity,
83
- },
84
- customTransformation: requestTransformation,
85
- });
86
- const { fromJSON } = serializer({
87
- rootSchema: _listPhasesResponse,
88
- depSchemas: {},
89
- fqdnTransformation: {
90
- paths: [...['Array#phases']],
91
- transformation: _toVeloEntity,
92
- },
93
- customTransformation: responseTransformation,
94
- });
95
- const payload = toAmbassadorRequest([workflowId, options]);
96
- const reqOpts = ambassadorWixWorkflowsV1Phase.listPhases(payload);
97
- __log(`"ListPhases" sending request with: ${__inspect(reqOpts)}`);
98
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
99
- try {
100
- const result = yield httpClient.request(reqOpts);
101
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
102
- return fromJSON(result.data);
103
- }
104
- catch (err) {
105
- const transformedError = transformError(err, requestTransformation, [
106
- 'workflowId',
107
- 'options',
108
- ]);
109
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
110
- throw transformedError;
111
- }
112
- });
113
- }
114
- /**
115
- * Retrieves a phase by ID.
116
- *
117
- *
118
- * The `getPhase()` function returns a Promise that resolves to the phase with the specified ID.
119
- *
120
- * 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).
121
- * @param _id - ID of the phase to retrieve.
122
- * @public
123
- * @requiredField _id
124
- * @returns Requested phase.
125
- */
126
- export function getPhase(_id) {
127
- var _a, _b, _c;
128
- return __awaiter(this, arguments, void 0, function* () {
129
- const requestTransformation = { id: '$[0]' };
130
- const responseTransformation = '$.phase';
131
- // @ts-ignore
132
- const { httpClient, sideEffects } = arguments[1];
133
- const { toAmbassadorRequest } = serializer({
134
- rootSchema: _getPhaseRequest,
135
- depSchemas: {},
136
- fqdnTransformation: {
137
- paths: [],
138
- transformation: _fromVeloEntity,
139
- },
140
- customTransformation: requestTransformation,
141
- });
142
- const { fromJSON } = serializer({
143
- rootSchema: _getPhaseResponse,
144
- depSchemas: {},
145
- fqdnTransformation: {
146
- paths: [...['phase']],
147
- transformation: _toVeloEntity,
148
- },
149
- customTransformation: responseTransformation,
150
- });
151
- const payload = toAmbassadorRequest([_id]);
152
- const reqOpts = ambassadorWixWorkflowsV1Phase.getPhase(payload);
153
- __log(`"GetPhase" sending request with: ${__inspect(reqOpts)}`);
154
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
155
- try {
156
- const result = yield httpClient.request(reqOpts);
157
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
158
- return fromJSON(result.data);
159
- }
160
- catch (err) {
161
- const transformedError = transformError(err, requestTransformation, [
162
- '_id',
163
- ]);
164
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
165
- throw transformedError;
166
- }
167
- });
168
- }
169
- /**
170
- * Updates an existing workflow phase.
171
- *
172
- *
173
- * The `updatePhase()` function returns a Promise that resolves when the phase has been updated with the specified values.
174
- *
175
- *
176
- * Only the properties passed in the `phase` object will be updated. All other properties will remain the same.
177
- *
178
- *
179
- * 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).
180
- * @param _id - ID of the phase to update.
181
- * @param phase - Phase details to update.
182
- * @public
183
- * @requiredField _id
184
- * @requiredField phase
185
- * @param options - Phase information to update.
186
- */
187
- export function updatePhase(_id, phase) {
188
- var _a, _b, _c;
189
- return __awaiter(this, arguments, void 0, function* () {
190
- const requestTransformation = { id: '$[0]', phase: '$[1]' };
191
- const responseTransformation = '$';
192
- // @ts-ignore
193
- const { httpClient, sideEffects } = arguments[2];
194
- const { toAmbassadorRequest } = serializer({
195
- rootSchema: _updatePhaseRequest,
196
- depSchemas: {},
197
- fqdnTransformation: {
198
- paths: [],
199
- transformation: _fromVeloEntity,
200
- },
201
- customTransformation: requestTransformation,
202
- });
203
- const { fromJSON } = serializer({
204
- rootSchema: _updatePhaseResponse,
205
- depSchemas: {},
206
- fqdnTransformation: {
207
- paths: [],
208
- transformation: _toVeloEntity,
209
- },
210
- customTransformation: responseTransformation,
211
- });
212
- const payload = toAmbassadorRequest([_id, phase]);
213
- const reqOpts = ambassadorWixWorkflowsV1Phase.updatePhase(payload);
214
- __log(`"UpdatePhase" sending request with: ${__inspect(reqOpts)}`);
215
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
216
- try {
217
- const result = yield httpClient.request(reqOpts);
218
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
219
- return fromJSON(result.data);
220
- }
221
- catch (err) {
222
- const transformedError = transformError(err, requestTransformation, [
223
- '_id',
224
- 'phase',
225
- ]);
226
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
227
- throw transformedError;
228
- }
229
- });
230
- }
231
- /**
232
- * Creates a new workflow phase.
233
- *
234
- *
235
- * The `createPhase()` function returns a Promise that resolves to the created phase ID when the phase is created in the specified workflow.
236
- *
237
- *
238
- * 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`.
239
- *
240
- *
241
- * When omitted, the newly created phase is added as the last non-win phase.
242
- *
243
- *
244
- * 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).
245
- * @param workflowId - ID of the workflow to create the phase in.
246
- * @param phase - Phase details.
247
- * @public
248
- * @requiredField phase
249
- * @requiredField phase.name
250
- * @requiredField workflowId
251
- * @param options - Options to use when creating workflow phases.
252
- */
253
- export function createPhase(workflowId, phase, options) {
254
- var _a, _b, _c;
255
- return __awaiter(this, arguments, void 0, function* () {
256
- const requestTransformation = {
257
- workflowId: '$[0]',
258
- phase: '$[1]',
259
- position: '$[2].position',
260
- };
261
- const responseTransformation = '$';
262
- // @ts-ignore
263
- const { httpClient, sideEffects } = arguments[3];
264
- const { toAmbassadorRequest } = serializer({
265
- rootSchema: _createPhaseRequest,
266
- depSchemas: {},
267
- fqdnTransformation: {
268
- paths: [],
269
- transformation: _fromVeloEntity,
270
- },
271
- customTransformation: requestTransformation,
272
- });
273
- const { fromJSON } = serializer({
274
- rootSchema: _createPhaseResponse,
275
- depSchemas: {},
276
- fqdnTransformation: {
277
- paths: [],
278
- transformation: _toVeloEntity,
279
- },
280
- customTransformation: responseTransformation,
281
- });
282
- const payload = toAmbassadorRequest([workflowId, phase, options]);
283
- const reqOpts = ambassadorWixWorkflowsV1Phase.createPhase(payload);
284
- __log(`"CreatePhase" sending request with: ${__inspect(reqOpts)}`);
285
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
286
- try {
287
- const result = yield httpClient.request(reqOpts);
288
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
289
- return fromJSON(result.data);
290
- }
291
- catch (err) {
292
- const transformedError = transformError(err, requestTransformation, [
293
- 'workflowId',
294
- 'phase',
295
- 'options',
296
- ]);
297
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
298
- throw transformedError;
299
- }
300
- });
301
- }
302
- /**
303
- * Deletes a workflow phase.
304
- *
305
- *
306
- * The `deletePhase()` function returns a Promise when the specified phase has been deleted.
307
- *
308
- *
309
- * 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).
310
- * @param _id - ID of the phase to delete.
311
- * @public
312
- * @requiredField _id
313
- */
314
- export function deletePhase(_id) {
315
- var _a, _b, _c;
316
- return __awaiter(this, arguments, void 0, function* () {
317
- const requestTransformation = { id: '$[0]' };
318
- const responseTransformation = '$';
319
- // @ts-ignore
320
- const { httpClient, sideEffects } = arguments[1];
321
- const { toAmbassadorRequest } = serializer({
322
- rootSchema: _deletePhaseRequest,
323
- depSchemas: {},
324
- fqdnTransformation: {
325
- paths: [],
326
- transformation: _fromVeloEntity,
327
- },
328
- customTransformation: requestTransformation,
329
- });
330
- const { fromJSON } = serializer({
331
- rootSchema: _deletePhaseResponse,
332
- depSchemas: {},
333
- fqdnTransformation: {
334
- paths: [],
335
- transformation: _toVeloEntity,
336
- },
337
- customTransformation: responseTransformation,
338
- });
339
- const payload = toAmbassadorRequest([_id]);
340
- const reqOpts = ambassadorWixWorkflowsV1Phase.deletePhase(payload);
341
- __log(`"DeletePhase" sending request with: ${__inspect(reqOpts)}`);
342
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
343
- try {
344
- const result = yield httpClient.request(reqOpts);
345
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
346
- return fromJSON(result.data);
347
- }
348
- catch (err) {
349
- const transformedError = transformError(err, requestTransformation, [
350
- '_id',
351
- ]);
352
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
353
- throw transformedError;
354
- }
355
- });
356
- }
357
- /**
358
- * Moves a phase to a new position with a workflow.
359
- *
360
- *
361
- * The `movePhase()` function returns a Promise when the specified phase has been moved to the new position.
362
- *
363
- *
364
- * 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`.
365
- *
366
- *
367
- * 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).
368
- * @param newPosition - New phase position, where the first phase is `0`.
369
- *
370
- * If a phase already occupies the specified position,
371
- * that phase and any subsequent phases
372
- * are shifted to the right by 1.
373
- * @public
374
- * @documentationMaturity preview
375
- * @requiredField identifiers
376
- * @requiredField identifiers.id
377
- * @requiredField identifiers.workflowId
378
- * @requiredField newPosition
379
- */
380
- export function movePhase(identifiers, newPosition) {
381
- var _a, _b, _c;
382
- return __awaiter(this, arguments, void 0, function* () {
383
- const requestTransformation = {
384
- workflowId: '$[0].workflowId',
385
- id: '$[0]._id',
386
- newPosition: '$[1]',
387
- };
388
- const responseTransformation = '$';
389
- // @ts-ignore
390
- const { httpClient, sideEffects } = arguments[2];
391
- const { toAmbassadorRequest } = serializer({
392
- rootSchema: _movePhaseRequest,
393
- depSchemas: {},
394
- fqdnTransformation: {
395
- paths: [],
396
- transformation: _fromVeloEntity,
397
- },
398
- customTransformation: requestTransformation,
399
- });
400
- const { fromJSON } = serializer({
401
- rootSchema: _movePhaseResponse,
402
- depSchemas: {},
403
- fqdnTransformation: {
404
- paths: [],
405
- transformation: _toVeloEntity,
406
- },
407
- customTransformation: responseTransformation,
408
- });
409
- const payload = toAmbassadorRequest([identifiers, newPosition]);
410
- const reqOpts = ambassadorWixWorkflowsV1Phase.movePhase(payload);
411
- __log(`"MovePhase" sending request with: ${__inspect(reqOpts)}`);
412
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
413
- try {
414
- const result = yield httpClient.request(reqOpts);
415
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
416
- return fromJSON(result.data);
417
- }
418
- catch (err) {
419
- const transformedError = transformError(err, requestTransformation, [
420
- 'identifiers',
421
- 'newPosition',
422
- ]);
423
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
424
- throw transformedError;
425
- }
426
- });
427
- }
428
- //# sourceMappingURL=workflows-v1-phase.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflows-v1-phase.universal.js","sourceRoot":"","sources":["../../../src/workflows-v1-phase.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,6BAA6B,MAAM,2BAA2B,CAAC;AAE3E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAmG5B,+GAA+G;AAC/G,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,6CAA2B,CAAA;AAC7B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAqCD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,S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AC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
@@ -1,55 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- import { CreateWorkflowRequest, CreateWorkflowResponse, DeleteWorkflowRequest, DeleteWorkflowResponse, GetWorkflowRequest, GetWorkflowResponse, ListWorkflowsRequest, ListWorkflowsResponse, UpdateWorkflowRequest, UpdateWorkflowResponse, ListWorkflowsResponseNonNullableFields, GetWorkflowResponseNonNullableFields } from './workflows-v1-workflow.types';
3
- /**
4
- * Retrieves a list of the site's workflows info.
5
- *
6
- *
7
- * The `listWorkflows()` function returns a Promise that resolves to a list containing information about the site's workflows.
8
- *
9
- *
10
- * Use the `options` parameter to specify which workflows to retrieve and in which order to retrieve them. Workflows can be sorted based on their `"name"`.
11
- *
12
- *
13
- * If no `limit` parameter is passed, the first 100 workflows are returned. Sort order defaults to by `"name"` ascending.
14
- */
15
- export declare function listWorkflows(payload: ListWorkflowsRequest): RequestOptionsFactory<ListWorkflowsResponse & ListWorkflowsResponseNonNullableFields>;
16
- /**
17
- * Retrieves a workflow by ID.
18
- *
19
- *
20
- * The `getWorkflow()` function returns a Promise that resolves to the workflow info with the specified ID.
21
- *
22
- *
23
- * 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).
24
- */
25
- export declare function getWorkflow(payload: GetWorkflowRequest): RequestOptionsFactory<GetWorkflowResponse & GetWorkflowResponseNonNullableFields>;
26
- /**
27
- * Updates an existing workflow.
28
- *
29
- *
30
- * The `updateWorkflow()` function returns a Promise that resolves when the workflow has been updated with the specified values.
31
- *
32
- *
33
- * Only the properties passed in the `workflow` object will be updated. All other properties will remain the same.
34
- *
35
- *
36
- * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflow API, see [Retrieving IDs](#retrieving-ids).
37
- */
38
- export declare function updateWorkflow(payload: UpdateWorkflowRequest): RequestOptionsFactory<UpdateWorkflowResponse>;
39
- /**
40
- * Creates a new workflow.
41
- *
42
- *
43
- * The `createWorkflow()` function returns a Promise that resolves to the created workflow ID.
44
- */
45
- export declare function createWorkflow(payload: CreateWorkflowRequest): RequestOptionsFactory<CreateWorkflowResponse>;
46
- /**
47
- * Deletes a workflow.
48
- *
49
- *
50
- * The `deleteWorkflow()` function returns a Promise when the specified workflow has been deleted.
51
- *
52
- *
53
- * 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).
54
- */
55
- export declare function deleteWorkflow(payload: DeleteWorkflowRequest): RequestOptionsFactory<DeleteWorkflowResponse>;