@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,456 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.movePhase = exports.deletePhase = exports.createPhase = exports.updatePhase = exports.getPhase = exports.listPhases = exports.SortOrder = exports.AttachmentType = exports.__debug = void 0;
32
- const velo_1 = require("@wix/metro-runtime/velo");
33
- const ambassadorWixWorkflowsV1Phase = __importStar(require("./workflows-v1-phase.http"));
34
- let __verbose = false;
35
- function __log(...args) {
36
- __verbose && console.log(...args);
37
- }
38
- function __inspect(obj) {
39
- return obj;
40
- }
41
- exports.__debug = {
42
- verboseLogging: {
43
- on: () => (__verbose = true),
44
- off: () => (__verbose = false),
45
- },
46
- };
47
- const _toVeloEntity = '$';
48
- const _fromVeloEntity = '$';
49
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
50
- var AttachmentType;
51
- (function (AttachmentType) {
52
- AttachmentType["ContactType"] = "ContactType";
53
- })(AttachmentType = exports.AttachmentType || (exports.AttachmentType = {}));
54
- var SortOrder;
55
- (function (SortOrder) {
56
- SortOrder["ASC"] = "ASC";
57
- SortOrder["DESC"] = "DESC";
58
- })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
59
- const _createPhaseRequest = {};
60
- const _createPhaseResponse = {};
61
- const _deletePhaseRequest = {};
62
- const _deletePhaseResponse = {};
63
- const _getPhaseRequest = {};
64
- const _getPhaseResponse = {};
65
- const _listPhasesRequest = {};
66
- const _listPhasesResponse = {};
67
- const _movePhaseRequest = {};
68
- const _movePhaseResponse = {};
69
- const _updatePhaseRequest = {};
70
- const _updatePhaseResponse = {};
71
- /**
72
- * Retrieves a list of a workflow's phases.
73
- *
74
- *
75
- * The `listPhases()` function returns a Promise that resolves to a list containing information about the specified workflow's phases.
76
- *
77
- *
78
- * 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.
79
- *
80
- *
81
- * 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).
82
- * @param workflowId - ID of the workflow whose phases will be listed.
83
- * @public
84
- * @requiredField workflowId
85
- * @param options - Options to use when retrieving the list of workflow phases.
86
- */
87
- function listPhases(workflowId, options) {
88
- var _a, _b, _c;
89
- return __awaiter(this, arguments, void 0, function* () {
90
- const requestTransformation = {
91
- workflowId: '$[0]',
92
- limit: '$[1].limit',
93
- offset: '$[1].offset',
94
- sort: '$[1].sort',
95
- };
96
- const responseTransformation = '$';
97
- // @ts-ignore
98
- const { httpClient, sideEffects } = arguments[2];
99
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
100
- rootSchema: _listPhasesRequest,
101
- depSchemas: {},
102
- fqdnTransformation: {
103
- paths: [],
104
- transformation: _fromVeloEntity,
105
- },
106
- customTransformation: requestTransformation,
107
- });
108
- const { fromJSON } = (0, velo_1.serializer)({
109
- rootSchema: _listPhasesResponse,
110
- depSchemas: {},
111
- fqdnTransformation: {
112
- paths: [...['Array#phases']],
113
- transformation: _toVeloEntity,
114
- },
115
- customTransformation: responseTransformation,
116
- });
117
- const payload = toAmbassadorRequest([workflowId, options]);
118
- const reqOpts = ambassadorWixWorkflowsV1Phase.listPhases(payload);
119
- __log(`"ListPhases" sending request with: ${__inspect(reqOpts)}`);
120
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
121
- try {
122
- const result = yield httpClient.request(reqOpts);
123
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
124
- return fromJSON(result.data);
125
- }
126
- catch (err) {
127
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
128
- 'workflowId',
129
- 'options',
130
- ]);
131
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
132
- throw transformedError;
133
- }
134
- });
135
- }
136
- exports.listPhases = listPhases;
137
- /**
138
- * Retrieves a phase by ID.
139
- *
140
- *
141
- * The `getPhase()` function returns a Promise that resolves to the phase with the specified ID.
142
- *
143
- * 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).
144
- * @param _id - ID of the phase to retrieve.
145
- * @public
146
- * @requiredField _id
147
- * @returns Requested phase.
148
- */
149
- function getPhase(_id) {
150
- var _a, _b, _c;
151
- return __awaiter(this, arguments, void 0, function* () {
152
- const requestTransformation = { id: '$[0]' };
153
- const responseTransformation = '$.phase';
154
- // @ts-ignore
155
- const { httpClient, sideEffects } = arguments[1];
156
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
157
- rootSchema: _getPhaseRequest,
158
- depSchemas: {},
159
- fqdnTransformation: {
160
- paths: [],
161
- transformation: _fromVeloEntity,
162
- },
163
- customTransformation: requestTransformation,
164
- });
165
- const { fromJSON } = (0, velo_1.serializer)({
166
- rootSchema: _getPhaseResponse,
167
- depSchemas: {},
168
- fqdnTransformation: {
169
- paths: [...['phase']],
170
- transformation: _toVeloEntity,
171
- },
172
- customTransformation: responseTransformation,
173
- });
174
- const payload = toAmbassadorRequest([_id]);
175
- const reqOpts = ambassadorWixWorkflowsV1Phase.getPhase(payload);
176
- __log(`"GetPhase" sending request with: ${__inspect(reqOpts)}`);
177
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
178
- try {
179
- const result = yield httpClient.request(reqOpts);
180
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
181
- return fromJSON(result.data);
182
- }
183
- catch (err) {
184
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
185
- '_id',
186
- ]);
187
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
188
- throw transformedError;
189
- }
190
- });
191
- }
192
- exports.getPhase = getPhase;
193
- /**
194
- * Updates an existing workflow phase.
195
- *
196
- *
197
- * The `updatePhase()` function returns a Promise that resolves when the phase has been updated with the specified values.
198
- *
199
- *
200
- * Only the properties passed in the `phase` object will be updated. All other properties will remain the same.
201
- *
202
- *
203
- * 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).
204
- * @param _id - ID of the phase to update.
205
- * @param phase - Phase details to update.
206
- * @public
207
- * @requiredField _id
208
- * @requiredField phase
209
- * @param options - Phase information to update.
210
- */
211
- function updatePhase(_id, phase) {
212
- var _a, _b, _c;
213
- return __awaiter(this, arguments, void 0, function* () {
214
- const requestTransformation = { id: '$[0]', phase: '$[1]' };
215
- const responseTransformation = '$';
216
- // @ts-ignore
217
- const { httpClient, sideEffects } = arguments[2];
218
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
219
- rootSchema: _updatePhaseRequest,
220
- depSchemas: {},
221
- fqdnTransformation: {
222
- paths: [],
223
- transformation: _fromVeloEntity,
224
- },
225
- customTransformation: requestTransformation,
226
- });
227
- const { fromJSON } = (0, velo_1.serializer)({
228
- rootSchema: _updatePhaseResponse,
229
- depSchemas: {},
230
- fqdnTransformation: {
231
- paths: [],
232
- transformation: _toVeloEntity,
233
- },
234
- customTransformation: responseTransformation,
235
- });
236
- const payload = toAmbassadorRequest([_id, phase]);
237
- const reqOpts = ambassadorWixWorkflowsV1Phase.updatePhase(payload);
238
- __log(`"UpdatePhase" sending request with: ${__inspect(reqOpts)}`);
239
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
240
- try {
241
- const result = yield httpClient.request(reqOpts);
242
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
243
- return fromJSON(result.data);
244
- }
245
- catch (err) {
246
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
247
- '_id',
248
- 'phase',
249
- ]);
250
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
251
- throw transformedError;
252
- }
253
- });
254
- }
255
- exports.updatePhase = updatePhase;
256
- /**
257
- * Creates a new workflow phase.
258
- *
259
- *
260
- * The `createPhase()` function returns a Promise that resolves to the created phase ID when the phase is created in the specified workflow.
261
- *
262
- *
263
- * 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`.
264
- *
265
- *
266
- * When omitted, the newly created phase is added as the last non-win phase.
267
- *
268
- *
269
- * 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).
270
- * @param workflowId - ID of the workflow to create the phase in.
271
- * @param phase - Phase details.
272
- * @public
273
- * @requiredField phase
274
- * @requiredField phase.name
275
- * @requiredField workflowId
276
- * @param options - Options to use when creating workflow phases.
277
- */
278
- function createPhase(workflowId, phase, options) {
279
- var _a, _b, _c;
280
- return __awaiter(this, arguments, void 0, function* () {
281
- const requestTransformation = {
282
- workflowId: '$[0]',
283
- phase: '$[1]',
284
- position: '$[2].position',
285
- };
286
- const responseTransformation = '$';
287
- // @ts-ignore
288
- const { httpClient, sideEffects } = arguments[3];
289
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
290
- rootSchema: _createPhaseRequest,
291
- depSchemas: {},
292
- fqdnTransformation: {
293
- paths: [],
294
- transformation: _fromVeloEntity,
295
- },
296
- customTransformation: requestTransformation,
297
- });
298
- const { fromJSON } = (0, velo_1.serializer)({
299
- rootSchema: _createPhaseResponse,
300
- depSchemas: {},
301
- fqdnTransformation: {
302
- paths: [],
303
- transformation: _toVeloEntity,
304
- },
305
- customTransformation: responseTransformation,
306
- });
307
- const payload = toAmbassadorRequest([workflowId, phase, options]);
308
- const reqOpts = ambassadorWixWorkflowsV1Phase.createPhase(payload);
309
- __log(`"CreatePhase" sending request with: ${__inspect(reqOpts)}`);
310
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
311
- try {
312
- const result = yield httpClient.request(reqOpts);
313
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
314
- return fromJSON(result.data);
315
- }
316
- catch (err) {
317
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
318
- 'workflowId',
319
- 'phase',
320
- 'options',
321
- ]);
322
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
323
- throw transformedError;
324
- }
325
- });
326
- }
327
- exports.createPhase = createPhase;
328
- /**
329
- * Deletes a workflow phase.
330
- *
331
- *
332
- * The `deletePhase()` function returns a Promise when the specified phase has been deleted.
333
- *
334
- *
335
- * 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).
336
- * @param _id - ID of the phase to delete.
337
- * @public
338
- * @requiredField _id
339
- */
340
- function deletePhase(_id) {
341
- var _a, _b, _c;
342
- return __awaiter(this, arguments, void 0, function* () {
343
- const requestTransformation = { id: '$[0]' };
344
- const responseTransformation = '$';
345
- // @ts-ignore
346
- const { httpClient, sideEffects } = arguments[1];
347
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
348
- rootSchema: _deletePhaseRequest,
349
- depSchemas: {},
350
- fqdnTransformation: {
351
- paths: [],
352
- transformation: _fromVeloEntity,
353
- },
354
- customTransformation: requestTransformation,
355
- });
356
- const { fromJSON } = (0, velo_1.serializer)({
357
- rootSchema: _deletePhaseResponse,
358
- depSchemas: {},
359
- fqdnTransformation: {
360
- paths: [],
361
- transformation: _toVeloEntity,
362
- },
363
- customTransformation: responseTransformation,
364
- });
365
- const payload = toAmbassadorRequest([_id]);
366
- const reqOpts = ambassadorWixWorkflowsV1Phase.deletePhase(payload);
367
- __log(`"DeletePhase" sending request with: ${__inspect(reqOpts)}`);
368
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
369
- try {
370
- const result = yield httpClient.request(reqOpts);
371
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
372
- return fromJSON(result.data);
373
- }
374
- catch (err) {
375
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
376
- '_id',
377
- ]);
378
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
379
- throw transformedError;
380
- }
381
- });
382
- }
383
- exports.deletePhase = deletePhase;
384
- /**
385
- * Moves a phase to a new position with a workflow.
386
- *
387
- *
388
- * The `movePhase()` function returns a Promise when the specified phase has been moved to the new position.
389
- *
390
- *
391
- * 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`.
392
- *
393
- *
394
- * 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).
395
- * @param newPosition - New phase position, where the first phase is `0`.
396
- *
397
- * If a phase already occupies the specified position,
398
- * that phase and any subsequent phases
399
- * are shifted to the right by 1.
400
- * @public
401
- * @documentationMaturity preview
402
- * @requiredField identifiers
403
- * @requiredField identifiers.id
404
- * @requiredField identifiers.workflowId
405
- * @requiredField newPosition
406
- */
407
- function movePhase(identifiers, newPosition) {
408
- var _a, _b, _c;
409
- return __awaiter(this, arguments, void 0, function* () {
410
- const requestTransformation = {
411
- workflowId: '$[0].workflowId',
412
- id: '$[0]._id',
413
- newPosition: '$[1]',
414
- };
415
- const responseTransformation = '$';
416
- // @ts-ignore
417
- const { httpClient, sideEffects } = arguments[2];
418
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
419
- rootSchema: _movePhaseRequest,
420
- depSchemas: {},
421
- fqdnTransformation: {
422
- paths: [],
423
- transformation: _fromVeloEntity,
424
- },
425
- customTransformation: requestTransformation,
426
- });
427
- const { fromJSON } = (0, velo_1.serializer)({
428
- rootSchema: _movePhaseResponse,
429
- depSchemas: {},
430
- fqdnTransformation: {
431
- paths: [],
432
- transformation: _toVeloEntity,
433
- },
434
- customTransformation: responseTransformation,
435
- });
436
- const payload = toAmbassadorRequest([identifiers, newPosition]);
437
- const reqOpts = ambassadorWixWorkflowsV1Phase.movePhase(payload);
438
- __log(`"MovePhase" sending request with: ${__inspect(reqOpts)}`);
439
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
440
- try {
441
- const result = yield httpClient.request(reqOpts);
442
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
443
- return fromJSON(result.data);
444
- }
445
- catch (err) {
446
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
447
- 'identifiers',
448
- 'newPosition',
449
- ]);
450
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
451
- throw transformedError;
452
- }
453
- });
454
- }
455
- exports.movePhase = movePhase;
456
- //# 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,kDAAqE;AAErE,yFAA2E;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;AAEY,QAAA,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,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,6CAA2B,CAAA;AAC7B,CAAC,EAFW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAEzB;AAqCD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAgKD,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,iB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AC;SACxB;;CACF;AA1DD,8BA0DC"}
@@ -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>;