@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,366 +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
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.deleteWorkflow = exports.createWorkflow = exports.updateWorkflow = exports.getWorkflow = exports.listWorkflows = exports.SortOrder = exports.AttachmentType = void 0;
36
- const velo_1 = require("@wix/metro-runtime/velo");
37
- const transform_error_1 = require("@wix/sdk-runtime/transform-error");
38
- const ambassadorWixWorkflowsV1Workflow = __importStar(require("./workflows-v1-workflow.http"));
39
- const _toVeloEntity = '$';
40
- const _fromVeloEntity = '$';
41
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
42
- var AttachmentType;
43
- (function (AttachmentType) {
44
- AttachmentType["ContactType"] = "ContactType";
45
- })(AttachmentType || (exports.AttachmentType = AttachmentType = {}));
46
- var SortOrder;
47
- (function (SortOrder) {
48
- SortOrder["ASC"] = "ASC";
49
- SortOrder["DESC"] = "DESC";
50
- })(SortOrder || (exports.SortOrder = SortOrder = {}));
51
- const _createWorkflowRequest = {};
52
- const _createWorkflowResponse = {};
53
- const _deleteWorkflowRequest = {};
54
- const _deleteWorkflowResponse = {};
55
- const _getWorkflowRequest = {};
56
- const _getWorkflowResponse = {};
57
- const _listWorkflowsRequest = {};
58
- const _listWorkflowsResponse = {};
59
- const _updateWorkflowRequest = {};
60
- const _updateWorkflowResponse = {};
61
- /**
62
- * Retrieves a list of the site's workflows info.
63
- *
64
- *
65
- * The `listWorkflows()` function returns a Promise that resolves to a list containing information about the site's workflows.
66
- *
67
- *
68
- * 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"`.
69
- *
70
- *
71
- * If no `limit` parameter is passed, the first 100 workflows are returned. Sort order defaults to by `"name"` ascending.
72
- * @public
73
- * @param options - Options to use when retrieving a list of workflows.
74
- */
75
- function listWorkflows(options) {
76
- var _a, _b, _c;
77
- return __awaiter(this, arguments, void 0, function* () {
78
- const requestTransformation = {
79
- limit: '$[0].limit',
80
- offset: '$[0].offset',
81
- sort: '$[0].sort',
82
- };
83
- const responseTransformation = '$';
84
- // @ts-ignore
85
- const { httpClient, sideEffects } = arguments[1];
86
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
87
- rootSchema: _listWorkflowsRequest,
88
- depSchemas: {},
89
- fqdnTransformation: {
90
- paths: [],
91
- transformation: _fromVeloEntity,
92
- },
93
- customTransformation: requestTransformation,
94
- });
95
- const { fromJSON } = (0, velo_1.serializer)({
96
- rootSchema: _listWorkflowsResponse,
97
- depSchemas: {},
98
- fqdnTransformation: {
99
- paths: [],
100
- transformation: _toVeloEntity,
101
- },
102
- customTransformation: responseTransformation,
103
- });
104
- const payload = toAmbassadorRequest([options]);
105
- const reqOpts = ambassadorWixWorkflowsV1Workflow.listWorkflows(payload);
106
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
107
- try {
108
- const result = yield httpClient.request(reqOpts);
109
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
110
- return fromJSON(result.data);
111
- }
112
- catch (err) {
113
- const transformedError = (0, transform_error_1.transformError)(err, {
114
- spreadPathsToArguments: {},
115
- explicitPathsToArguments: {
116
- limit: '$[0].limit',
117
- offset: '$[0].offset',
118
- sort: '$[0].sort',
119
- },
120
- singleArgumentUnchanged: false,
121
- }, ['options']);
122
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
123
- throw transformedError;
124
- }
125
- });
126
- }
127
- exports.listWorkflows = listWorkflows;
128
- /**
129
- * Retrieves a workflow by ID.
130
- *
131
- *
132
- * The `getWorkflow()` function returns a Promise that resolves to the workflow info with the specified ID.
133
- *
134
- *
135
- * 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).
136
- * @param _id - ID of the workflow to retrieve.
137
- * @param cardsPerPhase - Maximum number of cards to return per phase.
138
- * To retrieve additional pages of cards, use
139
- * [List Cards](../cards/listCards)
140
- * (in the Cards API).
141
- * @public
142
- * @requiredField _id
143
- * @requiredField cardsPerPhase
144
- * @param options - Options to use when retrieving a workflow.
145
- * @returns Requested workflow.
146
- */
147
- function getWorkflow(_id, cardsPerPhase) {
148
- var _a, _b, _c;
149
- return __awaiter(this, arguments, void 0, function* () {
150
- const requestTransformation = { id: '$[0]', cardsPerPhase: '$[1]' };
151
- const responseTransformation = '$.workflow';
152
- // @ts-ignore
153
- const { httpClient, sideEffects } = arguments[2];
154
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
155
- rootSchema: _getWorkflowRequest,
156
- depSchemas: {},
157
- fqdnTransformation: {
158
- paths: [],
159
- transformation: _fromVeloEntity,
160
- },
161
- customTransformation: requestTransformation,
162
- });
163
- const { fromJSON } = (0, velo_1.serializer)({
164
- rootSchema: _getWorkflowResponse,
165
- depSchemas: {},
166
- fqdnTransformation: {
167
- paths: [...['workflow']],
168
- transformation: _toVeloEntity,
169
- },
170
- customTransformation: responseTransformation,
171
- });
172
- const payload = toAmbassadorRequest([_id, cardsPerPhase]);
173
- const reqOpts = ambassadorWixWorkflowsV1Workflow.getWorkflow(payload);
174
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
175
- try {
176
- const result = yield httpClient.request(reqOpts);
177
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
178
- return fromJSON(result.data);
179
- }
180
- catch (err) {
181
- const transformedError = (0, transform_error_1.transformError)(err, {
182
- spreadPathsToArguments: {},
183
- explicitPathsToArguments: { id: '$[0]', cardsPerPhase: '$[1]' },
184
- singleArgumentUnchanged: false,
185
- }, ['_id', 'cardsPerPhase']);
186
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
187
- throw transformedError;
188
- }
189
- });
190
- }
191
- exports.getWorkflow = getWorkflow;
192
- /**
193
- * Updates an existing workflow.
194
- *
195
- *
196
- * The `updateWorkflow()` function returns a Promise that resolves when the workflow has been updated with the specified values.
197
- *
198
- *
199
- * Only the properties passed in the `workflow` object will be updated. All other properties will remain the same.
200
- *
201
- *
202
- * 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).
203
- * @param _id - ID of the workflow to update.
204
- * @param workflow - Workflow info.
205
- * @public
206
- * @requiredField _id
207
- * @requiredField workflow
208
- * @param options - Options to use when updating a workflow.
209
- */
210
- function updateWorkflow(_id, workflow) {
211
- var _a, _b, _c;
212
- return __awaiter(this, arguments, void 0, function* () {
213
- const requestTransformation = { id: '$[0]', workflow: '$[1]' };
214
- const responseTransformation = '$';
215
- // @ts-ignore
216
- const { httpClient, sideEffects } = arguments[2];
217
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
218
- rootSchema: _updateWorkflowRequest,
219
- depSchemas: {},
220
- fqdnTransformation: {
221
- paths: [],
222
- transformation: _fromVeloEntity,
223
- },
224
- customTransformation: requestTransformation,
225
- });
226
- const { fromJSON } = (0, velo_1.serializer)({
227
- rootSchema: _updateWorkflowResponse,
228
- depSchemas: {},
229
- fqdnTransformation: {
230
- paths: [],
231
- transformation: _toVeloEntity,
232
- },
233
- customTransformation: responseTransformation,
234
- });
235
- const payload = toAmbassadorRequest([_id, workflow]);
236
- const reqOpts = ambassadorWixWorkflowsV1Workflow.updateWorkflow(payload);
237
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
238
- try {
239
- const result = yield httpClient.request(reqOpts);
240
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
241
- }
242
- catch (err) {
243
- const transformedError = (0, transform_error_1.transformError)(err, {
244
- spreadPathsToArguments: {},
245
- explicitPathsToArguments: { id: '$[0]', workflow: '$[1]' },
246
- singleArgumentUnchanged: false,
247
- }, ['_id', 'workflow']);
248
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
249
- throw transformedError;
250
- }
251
- });
252
- }
253
- exports.updateWorkflow = updateWorkflow;
254
- /**
255
- * Creates a new workflow.
256
- *
257
- *
258
- * The `createWorkflow()` function returns a Promise that resolves to the created workflow ID.
259
- * @param workflow - Workflow details.
260
- * @public
261
- * @requiredField workflow
262
- * @requiredField workflow.name
263
- * @param options - Options to use when creating a workflow.
264
- */
265
- function createWorkflow(workflow) {
266
- var _a, _b, _c;
267
- return __awaiter(this, arguments, void 0, function* () {
268
- const requestTransformation = { workflow: '$[0]' };
269
- const responseTransformation = '$';
270
- // @ts-ignore
271
- const { httpClient, sideEffects } = arguments[1];
272
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
273
- rootSchema: _createWorkflowRequest,
274
- depSchemas: {},
275
- fqdnTransformation: {
276
- paths: [],
277
- transformation: _fromVeloEntity,
278
- },
279
- customTransformation: requestTransformation,
280
- });
281
- const { fromJSON } = (0, velo_1.serializer)({
282
- rootSchema: _createWorkflowResponse,
283
- depSchemas: {},
284
- fqdnTransformation: {
285
- paths: [],
286
- transformation: _toVeloEntity,
287
- },
288
- customTransformation: responseTransformation,
289
- });
290
- const payload = toAmbassadorRequest([workflow]);
291
- const reqOpts = ambassadorWixWorkflowsV1Workflow.createWorkflow(payload);
292
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
293
- try {
294
- const result = yield httpClient.request(reqOpts);
295
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
296
- return fromJSON(result.data);
297
- }
298
- catch (err) {
299
- const transformedError = (0, transform_error_1.transformError)(err, {
300
- spreadPathsToArguments: {},
301
- explicitPathsToArguments: { workflow: '$[0]' },
302
- singleArgumentUnchanged: false,
303
- }, ['workflow']);
304
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
305
- throw transformedError;
306
- }
307
- });
308
- }
309
- exports.createWorkflow = createWorkflow;
310
- /**
311
- * Deletes a workflow.
312
- *
313
- *
314
- * The `deleteWorkflow()` function returns a Promise when the specified workflow has been deleted.
315
- *
316
- *
317
- * 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).
318
- * @param _id - ID of the workflow to delete.
319
- * @public
320
- * @requiredField _id
321
- */
322
- function deleteWorkflow(_id) {
323
- var _a, _b, _c;
324
- return __awaiter(this, arguments, void 0, function* () {
325
- const requestTransformation = { id: '$[0]' };
326
- const responseTransformation = '$';
327
- // @ts-ignore
328
- const { httpClient, sideEffects } = arguments[1];
329
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
330
- rootSchema: _deleteWorkflowRequest,
331
- depSchemas: {},
332
- fqdnTransformation: {
333
- paths: [],
334
- transformation: _fromVeloEntity,
335
- },
336
- customTransformation: requestTransformation,
337
- });
338
- const { fromJSON } = (0, velo_1.serializer)({
339
- rootSchema: _deleteWorkflowResponse,
340
- depSchemas: {},
341
- fqdnTransformation: {
342
- paths: [],
343
- transformation: _toVeloEntity,
344
- },
345
- customTransformation: responseTransformation,
346
- });
347
- const payload = toAmbassadorRequest([_id]);
348
- const reqOpts = ambassadorWixWorkflowsV1Workflow.deleteWorkflow(payload);
349
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
350
- try {
351
- const result = yield httpClient.request(reqOpts);
352
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
353
- }
354
- catch (err) {
355
- const transformedError = (0, transform_error_1.transformError)(err, {
356
- spreadPathsToArguments: {},
357
- explicitPathsToArguments: { id: '$[0]' },
358
- singleArgumentUnchanged: false,
359
- }, ['_id']);
360
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
361
- throw transformedError;
362
- }
363
- });
364
- }
365
- exports.deleteWorkflow = deleteWorkflow;
366
- //# sourceMappingURL=workflows-v1-workflow.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflows-v1-workflow.universal.js","sourceRoot":"","sources":["../../../src/workflows-v1-workflow.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqD;AACrD,sEAAuF;AAEvF,+FAAiF;AAEjF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAkJ5B,+GAA+G;AAC/G,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,6CAA2B,CAAA;AAC7B,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AA0FD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA0GD,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AACH,SAAsB,aAAa,CACjC,OAA8B;;;QAE9B,MAAM,qBAAqB,GAAG;YAC5B,KAAK,EAAE,YA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AM,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;gBACxC,uBAAuB,EAAE,KAAK;aAC/B,EACD,CAAC,KAAK,CAAC,CACR,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AApDD,wCAoDC"}
@@ -1,3 +0,0 @@
1
- export * as cards from './src/workflows-v1-card.universal';
2
- export * as phases from './src/workflows-v1-phase.universal';
3
- export * as workflows from './src/workflows-v1-workflow.universal';
@@ -1,4 +0,0 @@
1
- export * as cards from './src/workflows-v1-card.universal';
2
- export * as phases from './src/workflows-v1-phase.universal';
3
- export * as workflows from './src/workflows-v1-workflow.universal';
4
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAC7D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { listCards as publicListCards, getCard as publicGetCard, updateCard as publicUpdateCard, createCard as publicCreateCard, deleteCard as publicDeleteCard, moveCard as publicMoveCard, restoreCard as publicRestoreCard, archiveCard as publicArchiveCard } from './workflows-v1-card.public';
2
- import { BuildRESTFunction } from '@wix/sdk-types';
3
- export declare const listCards: BuildRESTFunction<typeof publicListCards>;
4
- export declare const getCard: BuildRESTFunction<typeof publicGetCard>;
5
- export declare const updateCard: BuildRESTFunction<typeof publicUpdateCard>;
6
- export declare const createCard: BuildRESTFunction<typeof publicCreateCard>;
7
- export declare const deleteCard: BuildRESTFunction<typeof publicDeleteCard>;
8
- export declare const moveCard: BuildRESTFunction<typeof publicMoveCard>;
9
- export declare const restoreCard: BuildRESTFunction<typeof publicRestoreCard>;
10
- export declare const archiveCard: BuildRESTFunction<typeof publicArchiveCard>;
@@ -1,82 +0,0 @@
1
- import { listCards as publicListCards, getCard as publicGetCard, updateCard as publicUpdateCard, createCard as publicCreateCard, deleteCard as publicDeleteCard, moveCard as publicMoveCard, restoreCard as publicRestoreCard, archiveCard as publicArchiveCard, } from './workflows-v1-card.public';
2
- export const listCards = (...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(publicListCards)
10
- .apply(undefined, args);
11
- };
12
- export const getCard = (...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(publicGetCard)
20
- .apply(undefined, args);
21
- };
22
- export const updateCard = (...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(publicUpdateCard)
30
- .apply(undefined, args);
31
- };
32
- export const createCard = (...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(publicCreateCard)
40
- .apply(undefined, args);
41
- };
42
- export const deleteCard = (...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(publicDeleteCard)
50
- .apply(undefined, args);
51
- };
52
- export const moveCard = (...args) => {
53
- // @ts-expect-error
54
- if (!globalThis.__wix_context__) {
55
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
56
- }
57
- // @ts-expect-error
58
- return globalThis.__wix_context__
59
- .initWixModules(publicMoveCard)
60
- .apply(undefined, args);
61
- };
62
- export const restoreCard = (...args) => {
63
- // @ts-expect-error
64
- if (!globalThis.__wix_context__) {
65
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
66
- }
67
- // @ts-expect-error
68
- return globalThis.__wix_context__
69
- .initWixModules(publicRestoreCard)
70
- .apply(undefined, args);
71
- };
72
- export const archiveCard = (...args) => {
73
- // @ts-expect-error
74
- if (!globalThis.__wix_context__) {
75
- throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
76
- }
77
- // @ts-expect-error
78
- return globalThis.__wix_context__
79
- .initWixModules(publicArchiveCard)
80
- .apply(undefined, args);
81
- };
82
- //# sourceMappingURL=workflows-v1-card.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflows-v1-card.context.js","sourceRoot":"","sources":["../../../src/workflows-v1-card.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,OAAO,IAAI,aAAa,EACxB,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC9B,QAAQ,IAAI,cAAc,EAC1B,WAAW,IAAI,iBAAiB,EAChC,WAAW,IAAI,iBAAiB,GACjC,MAAM,4BAA4B,CAAC;AAGpC,MAAM,CAAC,MAAM,SAAS,GAA8C,CAClE,GAAG,IAAS,EACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG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IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -1,114 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- import { ArchiveCardRequest, ArchiveCardResponse, CreateCardRequest, CreateCardResponse, DeleteCardRequest, DeleteCardResponse, GetCardRequest, GetCardResponse, ListCardsRequest, ListCardsResponse, MoveCardRequest, MoveCardResponse, RestoreCardRequest, RestoreCardResponse, UpdateCardRequest, UpdateCardResponse, ListCardsResponseNonNullableFields, GetCardResponseNonNullableFields } from './workflows-v1-card.types';
3
- /**
4
- * Retrieves a list of a workflow's cards.
5
- *
6
- *
7
- * The `listCards()` function returns a Promise that resolves to a list of the specified workflow's cards.
8
- *
9
- *
10
- * Use the `options` parameter to specify which cards to retrieve and in which order to retrieve them. Must use either `phaseId` or `fetchOnlyArchived`.
11
- *
12
- *
13
- * Cards can be sorted based on their `"id"`, `"name"`, `"phaseId"`, `"createdDate"`, `"updatedDate"`, `"source"`, and `"position"`.
14
- *
15
- *
16
- * If no `limit` parameter is passed, the first 50 cards are returned.
17
- *
18
- *
19
- * Sort order defaults to by `"phaseId"` and then by `"position"` ascending.
20
- *
21
- *
22
- * 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).
23
- */
24
- export declare function listCards(payload: ListCardsRequest): RequestOptionsFactory<ListCardsResponse & ListCardsResponseNonNullableFields>;
25
- /**
26
- * Retrieves a workflow card by ID.
27
- *
28
- *
29
- * The `getCard()` function returns a Promise that resolves to the card with the specified ID.
30
- *
31
- *
32
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
33
- */
34
- export declare function getCard(payload: GetCardRequest): RequestOptionsFactory<GetCardResponse & GetCardResponseNonNullableFields>;
35
- /**
36
- * Updates an existing workflow card.
37
- *
38
- *
39
- * The `updateCard()` function returns a Promise that resolves when the card has been updated with the specified values.
40
- *
41
- *
42
- * `contactId` is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact.
43
- *
44
- *
45
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
46
- */
47
- export declare function updateCard(payload: UpdateCardRequest): RequestOptionsFactory<UpdateCardResponse>;
48
- /**
49
- * Creates a new workflow card.
50
- *
51
- *
52
- * The `createCard()` function returns a Promise that resolves to the created card's ID when the card is created in the specified workflow phase.
53
- *
54
- * Pass a value for the `position` parameter to specify the newly created card's position within the specified phase. Positions are zero-based, meaning the first position is `0`.
55
- *
56
- * When omitted, the newly created card is added to the specified phase as the top card within the phase.
57
- *
58
- *
59
- * This function requires you to specify the ID of a workflow and phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
60
- *
61
- * > **Note:**
62
- * > Each workflow is limited to 5,000 cards.
63
- * > If this limit is reached, `createCard()` throws an error.
64
- * > [Archive cards](#archivecard) when they're no longer needed
65
- * > to reduce card count and avoid hitting the limit.
66
- */
67
- export declare function createCard(payload: CreateCardRequest): RequestOptionsFactory<CreateCardResponse>;
68
- /**
69
- * Deletes a workflow card by ID.
70
- *
71
- *
72
- * The `deleteCard()` function returns a Promise when the specified card has been deleted.
73
- *
74
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
75
- */
76
- export declare function deleteCard(payload: DeleteCardRequest): RequestOptionsFactory<DeleteCardResponse>;
77
- /**
78
- * Moves a card to a new position within a workflow.
79
- *
80
- *
81
- * The `moveCard()` function returns a Promise when the specified card has been moved to the new position.
82
- *
83
- * Use the `options` parameter to specify the phase and position within that phase to move the card to. Positions are zero-based, meaning the first position is `0`.
84
- *
85
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
86
- */
87
- export declare function moveCard(payload: MoveCardRequest): RequestOptionsFactory<MoveCardResponse>;
88
- /**
89
- * Restores an archived workflow card.
90
- *
91
- *
92
- * The `restoreCard()` function returns a Promise that resolves when the archived card has been restored.
93
- *
94
- *
95
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
96
- *
97
- *
98
- * > **Note:**
99
- * > Each workflow is limited to 5,000 cards.
100
- * > If this limit is reached, `createCard()` throws an error.
101
- * > [Archive cards](#archivecard) when they're no longer needed
102
- * > to reduce card count and avoid hitting the limit.
103
- */
104
- export declare function restoreCard(payload: RestoreCardRequest): RequestOptionsFactory<RestoreCardResponse>;
105
- /**
106
- * Archives a workflow card.
107
- *
108
- *
109
- * The `archiveCard()` function returns a Promise that resolves when the card has been archived.
110
- *
111
- *
112
- * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
113
- */
114
- export declare function archiveCard(payload: ArchiveCardRequest): RequestOptionsFactory<ArchiveCardResponse>;