@wix/workflows 1.0.19 → 1.0.21

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 (133) hide show
  1. package/build/cjs/context.d.ts +3 -3
  2. package/build/cjs/context.js +3 -3
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +3 -3
  5. package/build/cjs/index.js +3 -3
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -3
  8. package/build/cjs/meta.js +3 -3
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +3 -3
  11. package/build/es/context.js +3 -3
  12. package/build/es/context.js.map +1 -1
  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/package.json +13 -9
  20. package/build/cjs/index.typings.d.ts +0 -3
  21. package/build/cjs/index.typings.js +0 -30
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/workflows-v1-card.context.d.ts +0 -10
  24. package/build/cjs/src/workflows-v1-card.context.js +0 -93
  25. package/build/cjs/src/workflows-v1-card.context.js.map +0 -1
  26. package/build/cjs/src/workflows-v1-card.http.d.ts +0 -114
  27. package/build/cjs/src/workflows-v1-card.http.js +0 -356
  28. package/build/cjs/src/workflows-v1-card.http.js.map +0 -1
  29. package/build/cjs/src/workflows-v1-card.meta.d.ts +0 -37
  30. package/build/cjs/src/workflows-v1-card.meta.js +0 -180
  31. package/build/cjs/src/workflows-v1-card.meta.js.map +0 -1
  32. package/build/cjs/src/workflows-v1-card.public.d.ts +0 -24
  33. package/build/cjs/src/workflows-v1-card.public.js +0 -57
  34. package/build/cjs/src/workflows-v1-card.public.js.map +0 -1
  35. package/build/cjs/src/workflows-v1-card.types.d.ts +0 -337
  36. package/build/cjs/src/workflows-v1-card.types.js +0 -14
  37. package/build/cjs/src/workflows-v1-card.types.js.map +0 -1
  38. package/build/cjs/src/workflows-v1-card.universal.d.ts +0 -569
  39. package/build/cjs/src/workflows-v1-card.universal.js +0 -605
  40. package/build/cjs/src/workflows-v1-card.universal.js.map +0 -1
  41. package/build/cjs/src/workflows-v1-phase.context.d.ts +0 -8
  42. package/build/cjs/src/workflows-v1-phase.context.js +0 -71
  43. package/build/cjs/src/workflows-v1-phase.context.js.map +0 -1
  44. package/build/cjs/src/workflows-v1-phase.http.d.ts +0 -76
  45. package/build/cjs/src/workflows-v1-phase.http.js +0 -259
  46. package/build/cjs/src/workflows-v1-phase.http.js.map +0 -1
  47. package/build/cjs/src/workflows-v1-phase.meta.d.ts +0 -31
  48. package/build/cjs/src/workflows-v1-phase.meta.js +0 -142
  49. package/build/cjs/src/workflows-v1-phase.meta.js.map +0 -1
  50. package/build/cjs/src/workflows-v1-phase.public.d.ts +0 -27
  51. package/build/cjs/src/workflows-v1-phase.public.js +0 -45
  52. package/build/cjs/src/workflows-v1-phase.public.js.map +0 -1
  53. package/build/cjs/src/workflows-v1-phase.types.d.ts +0 -274
  54. package/build/cjs/src/workflows-v1-phase.types.js +0 -14
  55. package/build/cjs/src/workflows-v1-phase.types.js.map +0 -1
  56. package/build/cjs/src/workflows-v1-phase.universal.d.ts +0 -429
  57. package/build/cjs/src/workflows-v1-phase.universal.js +0 -459
  58. package/build/cjs/src/workflows-v1-phase.universal.js.map +0 -1
  59. package/build/cjs/src/workflows-v1-workflow.context.d.ts +0 -7
  60. package/build/cjs/src/workflows-v1-workflow.context.js +0 -60
  61. package/build/cjs/src/workflows-v1-workflow.context.js.map +0 -1
  62. package/build/cjs/src/workflows-v1-workflow.http.d.ts +0 -55
  63. package/build/cjs/src/workflows-v1-workflow.http.js +0 -258
  64. package/build/cjs/src/workflows-v1-workflow.http.js.map +0 -1
  65. package/build/cjs/src/workflows-v1-workflow.meta.d.ts +0 -23
  66. package/build/cjs/src/workflows-v1-workflow.meta.js +0 -123
  67. package/build/cjs/src/workflows-v1-workflow.meta.js.map +0 -1
  68. package/build/cjs/src/workflows-v1-workflow.public.d.ts +0 -46
  69. package/build/cjs/src/workflows-v1-workflow.public.js +0 -39
  70. package/build/cjs/src/workflows-v1-workflow.public.js.map +0 -1
  71. package/build/cjs/src/workflows-v1-workflow.types.d.ts +0 -319
  72. package/build/cjs/src/workflows-v1-workflow.types.js +0 -14
  73. package/build/cjs/src/workflows-v1-workflow.types.js.map +0 -1
  74. package/build/cjs/src/workflows-v1-workflow.universal.d.ts +0 -427
  75. package/build/cjs/src/workflows-v1-workflow.universal.js +0 -366
  76. package/build/cjs/src/workflows-v1-workflow.universal.js.map +0 -1
  77. package/build/es/index.typings.d.ts +0 -3
  78. package/build/es/index.typings.js +0 -4
  79. package/build/es/index.typings.js.map +0 -1
  80. package/build/es/src/workflows-v1-card.context.d.ts +0 -10
  81. package/build/es/src/workflows-v1-card.context.js +0 -82
  82. package/build/es/src/workflows-v1-card.context.js.map +0 -1
  83. package/build/es/src/workflows-v1-card.http.d.ts +0 -114
  84. package/build/es/src/workflows-v1-card.http.js +0 -345
  85. package/build/es/src/workflows-v1-card.http.js.map +0 -1
  86. package/build/es/src/workflows-v1-card.meta.d.ts +0 -37
  87. package/build/es/src/workflows-v1-card.meta.js +0 -146
  88. package/build/es/src/workflows-v1-card.meta.js.map +0 -1
  89. package/build/es/src/workflows-v1-card.public.d.ts +0 -24
  90. package/build/es/src/workflows-v1-card.public.js +0 -44
  91. package/build/es/src/workflows-v1-card.public.js.map +0 -1
  92. package/build/es/src/workflows-v1-card.types.d.ts +0 -337
  93. package/build/es/src/workflows-v1-card.types.js +0 -11
  94. package/build/es/src/workflows-v1-card.types.js.map +0 -1
  95. package/build/es/src/workflows-v1-card.universal.d.ts +0 -569
  96. package/build/es/src/workflows-v1-card.universal.js +0 -571
  97. package/build/es/src/workflows-v1-card.universal.js.map +0 -1
  98. package/build/es/src/workflows-v1-phase.context.d.ts +0 -8
  99. package/build/es/src/workflows-v1-phase.context.js +0 -62
  100. package/build/es/src/workflows-v1-phase.context.js.map +0 -1
  101. package/build/es/src/workflows-v1-phase.http.d.ts +0 -76
  102. package/build/es/src/workflows-v1-phase.http.js +0 -250
  103. package/build/es/src/workflows-v1-phase.http.js.map +0 -1
  104. package/build/es/src/workflows-v1-phase.meta.d.ts +0 -31
  105. package/build/es/src/workflows-v1-phase.meta.js +0 -110
  106. package/build/es/src/workflows-v1-phase.meta.js.map +0 -1
  107. package/build/es/src/workflows-v1-phase.public.d.ts +0 -27
  108. package/build/es/src/workflows-v1-phase.public.js +0 -34
  109. package/build/es/src/workflows-v1-phase.public.js.map +0 -1
  110. package/build/es/src/workflows-v1-phase.types.d.ts +0 -274
  111. package/build/es/src/workflows-v1-phase.types.js +0 -11
  112. package/build/es/src/workflows-v1-phase.types.js.map +0 -1
  113. package/build/es/src/workflows-v1-phase.universal.d.ts +0 -429
  114. package/build/es/src/workflows-v1-phase.universal.js +0 -427
  115. package/build/es/src/workflows-v1-phase.universal.js.map +0 -1
  116. package/build/es/src/workflows-v1-workflow.context.d.ts +0 -7
  117. package/build/es/src/workflows-v1-workflow.context.js +0 -52
  118. package/build/es/src/workflows-v1-workflow.context.js.map +0 -1
  119. package/build/es/src/workflows-v1-workflow.http.d.ts +0 -55
  120. package/build/es/src/workflows-v1-workflow.http.js +0 -250
  121. package/build/es/src/workflows-v1-workflow.http.js.map +0 -1
  122. package/build/es/src/workflows-v1-workflow.meta.d.ts +0 -23
  123. package/build/es/src/workflows-v1-workflow.meta.js +0 -92
  124. package/build/es/src/workflows-v1-workflow.meta.js.map +0 -1
  125. package/build/es/src/workflows-v1-workflow.public.d.ts +0 -46
  126. package/build/es/src/workflows-v1-workflow.public.js +0 -29
  127. package/build/es/src/workflows-v1-workflow.public.js.map +0 -1
  128. package/build/es/src/workflows-v1-workflow.types.d.ts +0 -319
  129. package/build/es/src/workflows-v1-workflow.types.js +0 -11
  130. package/build/es/src/workflows-v1-workflow.types.js.map +0 -1
  131. package/build/es/src/workflows-v1-workflow.universal.d.ts +0 -427
  132. package/build/es/src/workflows-v1-workflow.universal.js +0 -335
  133. package/build/es/src/workflows-v1-workflow.universal.js.map +0 -1
@@ -1,427 +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 } from '@wix/metro-runtime/velo';
11
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
12
- import * as ambassadorWixWorkflowsV1Phase from './workflows-v1-phase.http';
13
- const _toVeloEntity = '$';
14
- const _fromVeloEntity = '$';
15
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
16
- export var AttachmentType;
17
- (function (AttachmentType) {
18
- AttachmentType["ContactType"] = "ContactType";
19
- })(AttachmentType || (AttachmentType = {}));
20
- export var SortOrder;
21
- (function (SortOrder) {
22
- SortOrder["ASC"] = "ASC";
23
- SortOrder["DESC"] = "DESC";
24
- })(SortOrder || (SortOrder = {}));
25
- const _createPhaseRequest = {};
26
- const _createPhaseResponse = {};
27
- const _deletePhaseRequest = {};
28
- const _deletePhaseResponse = {};
29
- const _getPhaseRequest = {};
30
- const _getPhaseResponse = {};
31
- const _listPhasesRequest = {};
32
- const _listPhasesResponse = {};
33
- const _movePhaseRequest = {};
34
- const _movePhaseResponse = {};
35
- const _updatePhaseRequest = {};
36
- const _updatePhaseResponse = {};
37
- /**
38
- * Retrieves a list of a workflow's phases.
39
- *
40
- *
41
- * The `listPhases()` function returns a Promise that resolves to a list containing information about the specified workflow's phases.
42
- *
43
- *
44
- * 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.
45
- *
46
- *
47
- * 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).
48
- * @param workflowId - ID of the workflow whose phases will be listed.
49
- * @public
50
- * @requiredField workflowId
51
- * @param options - Options to use when retrieving the list of workflow phases.
52
- */
53
- export function listPhases(workflowId, options) {
54
- var _a, _b, _c;
55
- return __awaiter(this, arguments, void 0, function* () {
56
- const requestTransformation = {
57
- workflowId: '$[0]',
58
- limit: '$[1].limit',
59
- offset: '$[1].offset',
60
- sort: '$[1].sort',
61
- };
62
- const responseTransformation = '$';
63
- // @ts-ignore
64
- const { httpClient, sideEffects } = arguments[2];
65
- const { toAmbassadorRequest } = serializer({
66
- rootSchema: _listPhasesRequest,
67
- depSchemas: {},
68
- fqdnTransformation: {
69
- paths: [],
70
- transformation: _fromVeloEntity,
71
- },
72
- customTransformation: requestTransformation,
73
- });
74
- const { fromJSON } = serializer({
75
- rootSchema: _listPhasesResponse,
76
- depSchemas: {},
77
- fqdnTransformation: {
78
- paths: [...['Array#phases']],
79
- transformation: _toVeloEntity,
80
- },
81
- customTransformation: responseTransformation,
82
- });
83
- const payload = toAmbassadorRequest([workflowId, options]);
84
- const reqOpts = ambassadorWixWorkflowsV1Phase.listPhases(payload);
85
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
86
- try {
87
- const result = yield httpClient.request(reqOpts);
88
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
89
- return fromJSON(result.data);
90
- }
91
- catch (err) {
92
- const transformedError = sdkTransformError(err, {
93
- spreadPathsToArguments: {},
94
- explicitPathsToArguments: {
95
- workflowId: '$[0]',
96
- limit: '$[1].limit',
97
- offset: '$[1].offset',
98
- sort: '$[1].sort',
99
- },
100
- singleArgumentUnchanged: false,
101
- }, ['workflowId', 'options']);
102
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
103
- throw transformedError;
104
- }
105
- });
106
- }
107
- /**
108
- * Retrieves a phase by ID.
109
- *
110
- *
111
- * The `getPhase()` function returns a Promise that resolves to the phase with the specified ID.
112
- *
113
- * 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).
114
- * @param _id - ID of the phase to retrieve.
115
- * @public
116
- * @requiredField _id
117
- * @returns Requested phase.
118
- */
119
- export function getPhase(_id) {
120
- var _a, _b, _c;
121
- return __awaiter(this, arguments, void 0, function* () {
122
- const requestTransformation = { id: '$[0]' };
123
- const responseTransformation = '$.phase';
124
- // @ts-ignore
125
- const { httpClient, sideEffects } = arguments[1];
126
- const { toAmbassadorRequest } = serializer({
127
- rootSchema: _getPhaseRequest,
128
- depSchemas: {},
129
- fqdnTransformation: {
130
- paths: [],
131
- transformation: _fromVeloEntity,
132
- },
133
- customTransformation: requestTransformation,
134
- });
135
- const { fromJSON } = serializer({
136
- rootSchema: _getPhaseResponse,
137
- depSchemas: {},
138
- fqdnTransformation: {
139
- paths: [...['phase']],
140
- transformation: _toVeloEntity,
141
- },
142
- customTransformation: responseTransformation,
143
- });
144
- const payload = toAmbassadorRequest([_id]);
145
- const reqOpts = ambassadorWixWorkflowsV1Phase.getPhase(payload);
146
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
147
- try {
148
- const result = yield httpClient.request(reqOpts);
149
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
150
- return fromJSON(result.data);
151
- }
152
- catch (err) {
153
- const transformedError = sdkTransformError(err, {
154
- spreadPathsToArguments: {},
155
- explicitPathsToArguments: { id: '$[0]' },
156
- singleArgumentUnchanged: false,
157
- }, ['_id']);
158
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
159
- throw transformedError;
160
- }
161
- });
162
- }
163
- /**
164
- * Updates an existing workflow phase.
165
- *
166
- *
167
- * The `updatePhase()` function returns a Promise that resolves when the phase has been updated with the specified values.
168
- *
169
- *
170
- * Only the properties passed in the `phase` object will be updated. All other properties will remain the same.
171
- *
172
- *
173
- * 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).
174
- * @param _id - ID of the phase to update.
175
- * @param phase - Phase details to update.
176
- * @public
177
- * @requiredField _id
178
- * @requiredField phase
179
- * @param options - Phase information to update.
180
- */
181
- export function updatePhase(_id, phase) {
182
- var _a, _b, _c;
183
- return __awaiter(this, arguments, void 0, function* () {
184
- const requestTransformation = { id: '$[0]', phase: '$[1]' };
185
- const responseTransformation = '$';
186
- // @ts-ignore
187
- const { httpClient, sideEffects } = arguments[2];
188
- const { toAmbassadorRequest } = serializer({
189
- rootSchema: _updatePhaseRequest,
190
- depSchemas: {},
191
- fqdnTransformation: {
192
- paths: [],
193
- transformation: _fromVeloEntity,
194
- },
195
- customTransformation: requestTransformation,
196
- });
197
- const { fromJSON } = serializer({
198
- rootSchema: _updatePhaseResponse,
199
- depSchemas: {},
200
- fqdnTransformation: {
201
- paths: [],
202
- transformation: _toVeloEntity,
203
- },
204
- customTransformation: responseTransformation,
205
- });
206
- const payload = toAmbassadorRequest([_id, phase]);
207
- const reqOpts = ambassadorWixWorkflowsV1Phase.updatePhase(payload);
208
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
209
- try {
210
- const result = yield httpClient.request(reqOpts);
211
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
212
- }
213
- catch (err) {
214
- const transformedError = sdkTransformError(err, {
215
- spreadPathsToArguments: {},
216
- explicitPathsToArguments: { id: '$[0]', phase: '$[1]' },
217
- singleArgumentUnchanged: false,
218
- }, ['_id', 'phase']);
219
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
220
- throw transformedError;
221
- }
222
- });
223
- }
224
- /**
225
- * Creates a new workflow phase.
226
- *
227
- *
228
- * The `createPhase()` function returns a Promise that resolves to the created phase ID when the phase is created in the specified workflow.
229
- *
230
- *
231
- * 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`.
232
- *
233
- *
234
- * When omitted, the newly created phase is added as the last non-win phase.
235
- *
236
- *
237
- * 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).
238
- * @param workflowId - ID of the workflow to create the phase in.
239
- * @param phase - Phase details.
240
- * @public
241
- * @requiredField phase
242
- * @requiredField phase.name
243
- * @requiredField workflowId
244
- * @param options - Options to use when creating workflow phases.
245
- */
246
- export function createPhase(workflowId, phase, options) {
247
- var _a, _b, _c;
248
- return __awaiter(this, arguments, void 0, function* () {
249
- const requestTransformation = {
250
- workflowId: '$[0]',
251
- phase: '$[1]',
252
- position: '$[2].position',
253
- };
254
- const responseTransformation = '$';
255
- // @ts-ignore
256
- const { httpClient, sideEffects } = arguments[3];
257
- const { toAmbassadorRequest } = serializer({
258
- rootSchema: _createPhaseRequest,
259
- depSchemas: {},
260
- fqdnTransformation: {
261
- paths: [],
262
- transformation: _fromVeloEntity,
263
- },
264
- customTransformation: requestTransformation,
265
- });
266
- const { fromJSON } = serializer({
267
- rootSchema: _createPhaseResponse,
268
- depSchemas: {},
269
- fqdnTransformation: {
270
- paths: [],
271
- transformation: _toVeloEntity,
272
- },
273
- customTransformation: responseTransformation,
274
- });
275
- const payload = toAmbassadorRequest([workflowId, phase, options]);
276
- const reqOpts = ambassadorWixWorkflowsV1Phase.createPhase(payload);
277
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
278
- try {
279
- const result = yield httpClient.request(reqOpts);
280
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
281
- return fromJSON(result.data);
282
- }
283
- catch (err) {
284
- const transformedError = sdkTransformError(err, {
285
- spreadPathsToArguments: {},
286
- explicitPathsToArguments: {
287
- workflowId: '$[0]',
288
- phase: '$[1]',
289
- position: '$[2].position',
290
- },
291
- singleArgumentUnchanged: false,
292
- }, ['workflowId', 'phase', 'options']);
293
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
294
- throw transformedError;
295
- }
296
- });
297
- }
298
- /**
299
- * Deletes a workflow phase.
300
- *
301
- *
302
- * The `deletePhase()` function returns a Promise when the specified phase has been deleted.
303
- *
304
- *
305
- * 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).
306
- * @param _id - ID of the phase to delete.
307
- * @public
308
- * @requiredField _id
309
- */
310
- export function deletePhase(_id) {
311
- var _a, _b, _c;
312
- return __awaiter(this, arguments, void 0, function* () {
313
- const requestTransformation = { id: '$[0]' };
314
- const responseTransformation = '$';
315
- // @ts-ignore
316
- const { httpClient, sideEffects } = arguments[1];
317
- const { toAmbassadorRequest } = serializer({
318
- rootSchema: _deletePhaseRequest,
319
- depSchemas: {},
320
- fqdnTransformation: {
321
- paths: [],
322
- transformation: _fromVeloEntity,
323
- },
324
- customTransformation: requestTransformation,
325
- });
326
- const { fromJSON } = serializer({
327
- rootSchema: _deletePhaseResponse,
328
- depSchemas: {},
329
- fqdnTransformation: {
330
- paths: [],
331
- transformation: _toVeloEntity,
332
- },
333
- customTransformation: responseTransformation,
334
- });
335
- const payload = toAmbassadorRequest([_id]);
336
- const reqOpts = ambassadorWixWorkflowsV1Phase.deletePhase(payload);
337
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
338
- try {
339
- const result = yield httpClient.request(reqOpts);
340
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
341
- }
342
- catch (err) {
343
- const transformedError = sdkTransformError(err, {
344
- spreadPathsToArguments: {},
345
- explicitPathsToArguments: { id: '$[0]' },
346
- singleArgumentUnchanged: false,
347
- }, ['_id']);
348
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
349
- throw transformedError;
350
- }
351
- });
352
- }
353
- /**
354
- * Moves a phase to a new position with a workflow.
355
- *
356
- *
357
- * The `movePhase()` function returns a Promise when the specified phase has been moved to the new position.
358
- *
359
- *
360
- * 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`.
361
- *
362
- *
363
- * 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).
364
- * @param newPosition - New phase position, where the first phase is `0`.
365
- *
366
- * If a phase already occupies the specified position,
367
- * that phase and any subsequent phases
368
- * are shifted to the right by 1.
369
- * @public
370
- * @documentationMaturity preview
371
- * @requiredField identifiers
372
- * @requiredField identifiers.id
373
- * @requiredField identifiers.workflowId
374
- * @requiredField newPosition
375
- */
376
- export function movePhase(identifiers, newPosition) {
377
- var _a, _b, _c;
378
- return __awaiter(this, arguments, void 0, function* () {
379
- const requestTransformation = {
380
- workflowId: '$[0].workflowId',
381
- id: '$[0]._id',
382
- newPosition: '$[1]',
383
- };
384
- const responseTransformation = '$';
385
- // @ts-ignore
386
- const { httpClient, sideEffects } = arguments[2];
387
- const { toAmbassadorRequest } = serializer({
388
- rootSchema: _movePhaseRequest,
389
- depSchemas: {},
390
- fqdnTransformation: {
391
- paths: [],
392
- transformation: _fromVeloEntity,
393
- },
394
- customTransformation: requestTransformation,
395
- });
396
- const { fromJSON } = serializer({
397
- rootSchema: _movePhaseResponse,
398
- depSchemas: {},
399
- fqdnTransformation: {
400
- paths: [],
401
- transformation: _toVeloEntity,
402
- },
403
- customTransformation: responseTransformation,
404
- });
405
- const payload = toAmbassadorRequest([identifiers, newPosition]);
406
- const reqOpts = ambassadorWixWorkflowsV1Phase.movePhase(payload);
407
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
408
- try {
409
- const result = yield httpClient.request(reqOpts);
410
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
411
- }
412
- catch (err) {
413
- const transformedError = sdkTransformError(err, {
414
- spreadPathsToArguments: {},
415
- explicitPathsToArguments: {
416
- workflowId: '$[0].workflowId',
417
- id: '$[0]._id',
418
- newPosition: '$[1]',
419
- },
420
- singleArgumentUnchanged: false,
421
- }, ['identifiers', 'newPosition']);
422
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
423
- throw transformedError;
424
- }
425
- });
426
- }
427
- //# 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":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O,GAAG,6BAA6B,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAEjE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,2DAAI,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE;oBACxB,UAAU,EAAE,iBAAiB;oBAC7B,EAAE,EAAE,UAAU;oBACd,WAAW,EAAE,MAAM;iBACpB;gBACD,uBAAuB,EAAE,KAAK;aAC/B,EACD,CAAC,aAAa,EAAE,aAAa,CAAC,CAC/B,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF"}
@@ -1,7 +0,0 @@
1
- import { listWorkflows as publicListWorkflows, getWorkflow as publicGetWorkflow, updateWorkflow as publicUpdateWorkflow, createWorkflow as publicCreateWorkflow, deleteWorkflow as publicDeleteWorkflow } from './workflows-v1-workflow.public';
2
- import { BuildRESTFunction } from '@wix/sdk-types';
3
- export declare const listWorkflows: BuildRESTFunction<typeof publicListWorkflows>;
4
- export declare const getWorkflow: BuildRESTFunction<typeof publicGetWorkflow>;
5
- export declare const updateWorkflow: BuildRESTFunction<typeof publicUpdateWorkflow>;
6
- export declare const createWorkflow: BuildRESTFunction<typeof publicCreateWorkflow>;
7
- export declare const deleteWorkflow: BuildRESTFunction<typeof publicDeleteWorkflow>;
@@ -1,52 +0,0 @@
1
- import { listWorkflows as publicListWorkflows, getWorkflow as publicGetWorkflow, updateWorkflow as publicUpdateWorkflow, createWorkflow as publicCreateWorkflow, deleteWorkflow as publicDeleteWorkflow, } from './workflows-v1-workflow.public';
2
- export const listWorkflows = (...args) => {
3
- // @ts-expect-error
4
- if (!globalThis.__wix_context__) {
5
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
6
- }
7
- // @ts-expect-error
8
- return globalThis.__wix_context__
9
- .initWixModules(publicListWorkflows)
10
- .apply(undefined, args);
11
- };
12
- export const getWorkflow = (...args) => {
13
- // @ts-expect-error
14
- if (!globalThis.__wix_context__) {
15
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
16
- }
17
- // @ts-expect-error
18
- return globalThis.__wix_context__
19
- .initWixModules(publicGetWorkflow)
20
- .apply(undefined, args);
21
- };
22
- export const updateWorkflow = (...args) => {
23
- // @ts-expect-error
24
- if (!globalThis.__wix_context__) {
25
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
26
- }
27
- // @ts-expect-error
28
- return globalThis.__wix_context__
29
- .initWixModules(publicUpdateWorkflow)
30
- .apply(undefined, args);
31
- };
32
- export const createWorkflow = (...args) => {
33
- // @ts-expect-error
34
- if (!globalThis.__wix_context__) {
35
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
36
- }
37
- // @ts-expect-error
38
- return globalThis.__wix_context__
39
- .initWixModules(publicCreateWorkflow)
40
- .apply(undefined, args);
41
- };
42
- export const deleteWorkflow = (...args) => {
43
- // @ts-expect-error
44
- if (!globalThis.__wix_context__) {
45
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
46
- }
47
- // @ts-expect-error
48
- return globalThis.__wix_context__
49
- .initWixModules(publicDeleteWorkflow)
50
- .apply(undefined, args);
51
- };
52
- //# sourceMappingURL=workflows-v1-workflow.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflows-v1-workflow.context.js","sourceRoot":"","sources":["../../../src/workflows-v1-workflow.context.ts"],"names":[],"mappings":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ACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,oBAAoB,CAAC;SACpC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAmD,CAC5E,GAAG,IAAS,EACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,oBAAoB,CAAC;SACpC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -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>;