@wix/auto_sdk_data_scheduled-workflows 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +98 -0
- package/build/cjs/index.js +723 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1035 -0
- package/build/cjs/index.typings.js +594 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +839 -0
- package/build/cjs/meta.js +531 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +595 -0
- package/build/cjs/schemas.js +1090 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +98 -0
- package/build/es/index.mjs +681 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1035 -0
- package/build/es/index.typings.mjs +555 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +839 -0
- package/build/es/meta.mjs +489 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +595 -0
- package/build/es/schemas.mjs +1040 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +98 -0
- package/build/internal/cjs/index.js +723 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1046 -0
- package/build/internal/cjs/index.typings.js +594 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +839 -0
- package/build/internal/cjs/meta.js +531 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +595 -0
- package/build/internal/cjs/schemas.js +1090 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +98 -0
- package/build/internal/es/index.mjs +681 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1046 -0
- package/build/internal/es/index.typings.mjs +555 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +839 -0
- package/build/internal/es/meta.mjs +489 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +595 -0
- package/build/internal/es/schemas.mjs +1040 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
// src/data-sync-v1-jobs-scheduled-workflows.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/data-sync-v1-jobs-scheduled-workflows.http.ts
|
|
9
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
11
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
13
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
14
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
15
|
+
function resolveWixHubV1DataMovementSchedulerServiceUrl(opts) {
|
|
16
|
+
const domainToMappings = {
|
|
17
|
+
"editor._base_domain_": [
|
|
18
|
+
{
|
|
19
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
20
|
+
destPath: ""
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"blocks._base_domain_": [
|
|
24
|
+
{
|
|
25
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
26
|
+
destPath: ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"create.editorx": [
|
|
30
|
+
{
|
|
31
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
32
|
+
destPath: ""
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
_: [
|
|
36
|
+
{
|
|
37
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
38
|
+
destPath: ""
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"manage._base_domain_": [
|
|
42
|
+
{
|
|
43
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
44
|
+
destPath: ""
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"www.wixapis.com": [
|
|
48
|
+
{
|
|
49
|
+
srcPath: "/data-move-scheduler",
|
|
50
|
+
destPath: ""
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"*.dev.wix-code.com": [
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
56
|
+
destPath: ""
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
};
|
|
60
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
61
|
+
}
|
|
62
|
+
var PACKAGE_NAME = "@wix/auto_sdk_data_scheduled-workflows";
|
|
63
|
+
function createScheduledDataWorkflow(payload) {
|
|
64
|
+
function __createScheduledDataWorkflow({ host }) {
|
|
65
|
+
const serializedData = transformPaths(payload, [
|
|
66
|
+
{
|
|
67
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
68
|
+
paths: [
|
|
69
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
70
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]);
|
|
74
|
+
const metadata = {
|
|
75
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
76
|
+
method: "POST",
|
|
77
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.CreateScheduledDataWorkflow",
|
|
78
|
+
packageName: PACKAGE_NAME,
|
|
79
|
+
migrationOptions: {
|
|
80
|
+
optInTransformResponse: true
|
|
81
|
+
},
|
|
82
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
83
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
84
|
+
data: serializedData,
|
|
85
|
+
host
|
|
86
|
+
}),
|
|
87
|
+
data: serializedData,
|
|
88
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
89
|
+
{
|
|
90
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
91
|
+
paths: [
|
|
92
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
93
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
])
|
|
97
|
+
};
|
|
98
|
+
return metadata;
|
|
99
|
+
}
|
|
100
|
+
return __createScheduledDataWorkflow;
|
|
101
|
+
}
|
|
102
|
+
function rescheduleScheduledDataWorkflow(payload) {
|
|
103
|
+
function __rescheduleScheduledDataWorkflow({ host }) {
|
|
104
|
+
const metadata = {
|
|
105
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
106
|
+
method: "POST",
|
|
107
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.RescheduleScheduledDataWorkflow",
|
|
108
|
+
packageName: PACKAGE_NAME,
|
|
109
|
+
migrationOptions: {
|
|
110
|
+
optInTransformResponse: true
|
|
111
|
+
},
|
|
112
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
113
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}/reschedule",
|
|
114
|
+
data: payload,
|
|
115
|
+
host
|
|
116
|
+
}),
|
|
117
|
+
data: payload,
|
|
118
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
119
|
+
{
|
|
120
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
121
|
+
paths: [{ path: "nextExecutionDate" }]
|
|
122
|
+
}
|
|
123
|
+
])
|
|
124
|
+
};
|
|
125
|
+
return metadata;
|
|
126
|
+
}
|
|
127
|
+
return __rescheduleScheduledDataWorkflow;
|
|
128
|
+
}
|
|
129
|
+
function triggerScheduledDataWorkflowNow(payload) {
|
|
130
|
+
function __triggerScheduledDataWorkflowNow({ host }) {
|
|
131
|
+
const metadata = {
|
|
132
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
133
|
+
method: "POST",
|
|
134
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.TriggerScheduledDataWorkflowNow",
|
|
135
|
+
packageName: PACKAGE_NAME,
|
|
136
|
+
migrationOptions: {
|
|
137
|
+
optInTransformResponse: true
|
|
138
|
+
},
|
|
139
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
140
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}/run-now",
|
|
141
|
+
data: payload,
|
|
142
|
+
host
|
|
143
|
+
}),
|
|
144
|
+
data: payload
|
|
145
|
+
};
|
|
146
|
+
return metadata;
|
|
147
|
+
}
|
|
148
|
+
return __triggerScheduledDataWorkflowNow;
|
|
149
|
+
}
|
|
150
|
+
function updateScheduledDataWorkflow(payload) {
|
|
151
|
+
function __updateScheduledDataWorkflow({ host }) {
|
|
152
|
+
const serializedData = transformPaths(payload, [
|
|
153
|
+
{
|
|
154
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
155
|
+
paths: [{ path: "mask" }]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
159
|
+
paths: [
|
|
160
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
161
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
]);
|
|
165
|
+
const metadata = {
|
|
166
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
167
|
+
method: "PATCH",
|
|
168
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.UpdateScheduledDataWorkflow",
|
|
169
|
+
packageName: PACKAGE_NAME,
|
|
170
|
+
migrationOptions: {
|
|
171
|
+
optInTransformResponse: true
|
|
172
|
+
},
|
|
173
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
174
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
175
|
+
data: serializedData,
|
|
176
|
+
host
|
|
177
|
+
}),
|
|
178
|
+
data: serializedData,
|
|
179
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
180
|
+
{
|
|
181
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
182
|
+
paths: [
|
|
183
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
184
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
])
|
|
188
|
+
};
|
|
189
|
+
return metadata;
|
|
190
|
+
}
|
|
191
|
+
return __updateScheduledDataWorkflow;
|
|
192
|
+
}
|
|
193
|
+
function deleteScheduledDataWorkflow(payload) {
|
|
194
|
+
function __deleteScheduledDataWorkflow({ host }) {
|
|
195
|
+
const metadata = {
|
|
196
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
197
|
+
method: "DELETE",
|
|
198
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.DeleteScheduledDataWorkflow",
|
|
199
|
+
packageName: PACKAGE_NAME,
|
|
200
|
+
migrationOptions: {
|
|
201
|
+
optInTransformResponse: true
|
|
202
|
+
},
|
|
203
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
204
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}",
|
|
205
|
+
data: payload,
|
|
206
|
+
host
|
|
207
|
+
}),
|
|
208
|
+
params: toURLSearchParams(payload)
|
|
209
|
+
};
|
|
210
|
+
return metadata;
|
|
211
|
+
}
|
|
212
|
+
return __deleteScheduledDataWorkflow;
|
|
213
|
+
}
|
|
214
|
+
function getScheduledDataWorkflow(payload) {
|
|
215
|
+
function __getScheduledDataWorkflow({ host }) {
|
|
216
|
+
const metadata = {
|
|
217
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
218
|
+
method: "GET",
|
|
219
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.GetScheduledDataWorkflow",
|
|
220
|
+
packageName: PACKAGE_NAME,
|
|
221
|
+
migrationOptions: {
|
|
222
|
+
optInTransformResponse: true
|
|
223
|
+
},
|
|
224
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
225
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}",
|
|
226
|
+
data: payload,
|
|
227
|
+
host
|
|
228
|
+
}),
|
|
229
|
+
params: toURLSearchParams(payload),
|
|
230
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
231
|
+
{
|
|
232
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
233
|
+
paths: [
|
|
234
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
235
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
])
|
|
239
|
+
};
|
|
240
|
+
return metadata;
|
|
241
|
+
}
|
|
242
|
+
return __getScheduledDataWorkflow;
|
|
243
|
+
}
|
|
244
|
+
function listScheduledDataWorkflows(payload) {
|
|
245
|
+
function __listScheduledDataWorkflows({ host }) {
|
|
246
|
+
const metadata = {
|
|
247
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
248
|
+
method: "GET",
|
|
249
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.ListScheduledDataWorkflows",
|
|
250
|
+
packageName: PACKAGE_NAME,
|
|
251
|
+
migrationOptions: {
|
|
252
|
+
optInTransformResponse: true
|
|
253
|
+
},
|
|
254
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
255
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
256
|
+
data: payload,
|
|
257
|
+
host
|
|
258
|
+
}),
|
|
259
|
+
params: toURLSearchParams(payload, true),
|
|
260
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
261
|
+
{
|
|
262
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
263
|
+
paths: [
|
|
264
|
+
{ path: "scheduledDataWorkflows.lastExecutionDate" },
|
|
265
|
+
{ path: "scheduledDataWorkflows.nextExecutionDate" }
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
])
|
|
269
|
+
};
|
|
270
|
+
return metadata;
|
|
271
|
+
}
|
|
272
|
+
return __listScheduledDataWorkflows;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// src/data-sync-v1-jobs-scheduled-workflows.universal.ts
|
|
276
|
+
var WixDataEnvironment = /* @__PURE__ */ ((WixDataEnvironment2) => {
|
|
277
|
+
WixDataEnvironment2["LIVE"] = "LIVE";
|
|
278
|
+
WixDataEnvironment2["SANDBOX"] = "SANDBOX";
|
|
279
|
+
return WixDataEnvironment2;
|
|
280
|
+
})(WixDataEnvironment || {});
|
|
281
|
+
var FileFormat = /* @__PURE__ */ ((FileFormat2) => {
|
|
282
|
+
FileFormat2["UNKNOWN"] = "UNKNOWN";
|
|
283
|
+
FileFormat2["CSV"] = "CSV";
|
|
284
|
+
FileFormat2["JSONL"] = "JSONL";
|
|
285
|
+
return FileFormat2;
|
|
286
|
+
})(FileFormat || {});
|
|
287
|
+
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
288
|
+
MediaType2["ALL"] = "ALL";
|
|
289
|
+
MediaType2["IMAGE"] = "IMAGE";
|
|
290
|
+
MediaType2["VIDEO"] = "VIDEO";
|
|
291
|
+
MediaType2["AUDIO"] = "AUDIO";
|
|
292
|
+
MediaType2["DOCUMENT"] = "DOCUMENT";
|
|
293
|
+
return MediaType2;
|
|
294
|
+
})(MediaType || {});
|
|
295
|
+
var WixDataDestinationWritePolicy = /* @__PURE__ */ ((WixDataDestinationWritePolicy2) => {
|
|
296
|
+
WixDataDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
297
|
+
WixDataDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
298
|
+
WixDataDestinationWritePolicy2["TRUNCATE_BEFORE"] = "TRUNCATE_BEFORE";
|
|
299
|
+
return WixDataDestinationWritePolicy2;
|
|
300
|
+
})(WixDataDestinationWritePolicy || {});
|
|
301
|
+
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
302
|
+
FieldType2["ANY"] = "ANY";
|
|
303
|
+
FieldType2["STRING"] = "STRING";
|
|
304
|
+
FieldType2["NUMBER"] = "NUMBER";
|
|
305
|
+
FieldType2["BOOLEAN"] = "BOOLEAN";
|
|
306
|
+
FieldType2["DATE"] = "DATE";
|
|
307
|
+
FieldType2["DATETIME"] = "DATETIME";
|
|
308
|
+
FieldType2["BINARY"] = "BINARY";
|
|
309
|
+
FieldType2["OBJECT"] = "OBJECT";
|
|
310
|
+
FieldType2["ARRAY"] = "ARRAY";
|
|
311
|
+
FieldType2["URL"] = "URL";
|
|
312
|
+
FieldType2["WIX_MEDIA_URL"] = "WIX_MEDIA_URL";
|
|
313
|
+
FieldType2["WIX_MEDIA_IMAGE_URL"] = "WIX_MEDIA_IMAGE_URL";
|
|
314
|
+
FieldType2["WIX_MEDIA_VIDEO_URL"] = "WIX_MEDIA_VIDEO_URL";
|
|
315
|
+
FieldType2["WIX_MEDIA_DOCUMENT_URL"] = "WIX_MEDIA_DOCUMENT_URL";
|
|
316
|
+
FieldType2["IMAGE_URL"] = "IMAGE_URL";
|
|
317
|
+
FieldType2["VIDEO_URL"] = "VIDEO_URL";
|
|
318
|
+
return FieldType2;
|
|
319
|
+
})(FieldType || {});
|
|
320
|
+
var WixMediaDestinationWritePolicy = /* @__PURE__ */ ((WixMediaDestinationWritePolicy2) => {
|
|
321
|
+
WixMediaDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
322
|
+
WixMediaDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
323
|
+
return WixMediaDestinationWritePolicy2;
|
|
324
|
+
})(WixMediaDestinationWritePolicy || {});
|
|
325
|
+
var WritePolicy = /* @__PURE__ */ ((WritePolicy2) => {
|
|
326
|
+
WritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
327
|
+
WritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
328
|
+
return WritePolicy2;
|
|
329
|
+
})(WritePolicy || {});
|
|
330
|
+
var Fields = /* @__PURE__ */ ((Fields2) => {
|
|
331
|
+
Fields2["NEXT_SCHEDULE_EXECUTION"] = "NEXT_SCHEDULE_EXECUTION";
|
|
332
|
+
return Fields2;
|
|
333
|
+
})(Fields || {});
|
|
334
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
335
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
336
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
337
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
338
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
339
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
340
|
+
return WebhookIdentityType2;
|
|
341
|
+
})(WebhookIdentityType || {});
|
|
342
|
+
async function createScheduledDataWorkflow2(scheduledDataWorkflow, options) {
|
|
343
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
344
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
345
|
+
scheduledDataWorkflow,
|
|
346
|
+
fields: options?.fields
|
|
347
|
+
});
|
|
348
|
+
const reqOpts = createScheduledDataWorkflow(payload);
|
|
349
|
+
sideEffects?.onSiteCall?.();
|
|
350
|
+
try {
|
|
351
|
+
const result = await httpClient.request(reqOpts);
|
|
352
|
+
sideEffects?.onSuccess?.(result);
|
|
353
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
354
|
+
} catch (err) {
|
|
355
|
+
const transformedError = sdkTransformError(
|
|
356
|
+
err,
|
|
357
|
+
{
|
|
358
|
+
spreadPathsToArguments: {},
|
|
359
|
+
explicitPathsToArguments: {
|
|
360
|
+
scheduledDataWorkflow: "$[0]",
|
|
361
|
+
fields: "$[1].fields"
|
|
362
|
+
},
|
|
363
|
+
singleArgumentUnchanged: false
|
|
364
|
+
},
|
|
365
|
+
["scheduledDataWorkflow", "options"]
|
|
366
|
+
);
|
|
367
|
+
sideEffects?.onError?.(err);
|
|
368
|
+
throw transformedError;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
async function rescheduleScheduledDataWorkflow2(scheduledDataWorkflowId, options) {
|
|
372
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
373
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
374
|
+
scheduledDataWorkflowId,
|
|
375
|
+
fields: options?.fields
|
|
376
|
+
});
|
|
377
|
+
const reqOpts = rescheduleScheduledDataWorkflow(payload);
|
|
378
|
+
sideEffects?.onSiteCall?.();
|
|
379
|
+
try {
|
|
380
|
+
const result = await httpClient.request(reqOpts);
|
|
381
|
+
sideEffects?.onSuccess?.(result);
|
|
382
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
383
|
+
} catch (err) {
|
|
384
|
+
const transformedError = sdkTransformError(
|
|
385
|
+
err,
|
|
386
|
+
{
|
|
387
|
+
spreadPathsToArguments: {},
|
|
388
|
+
explicitPathsToArguments: {
|
|
389
|
+
scheduledDataWorkflowId: "$[0]",
|
|
390
|
+
fields: "$[1].fields"
|
|
391
|
+
},
|
|
392
|
+
singleArgumentUnchanged: false
|
|
393
|
+
},
|
|
394
|
+
["scheduledDataWorkflowId", "options"]
|
|
395
|
+
);
|
|
396
|
+
sideEffects?.onError?.(err);
|
|
397
|
+
throw transformedError;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
async function triggerScheduledDataWorkflowNow2(scheduledDataWorkflowId) {
|
|
401
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
402
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
403
|
+
scheduledDataWorkflowId
|
|
404
|
+
});
|
|
405
|
+
const reqOpts = triggerScheduledDataWorkflowNow(payload);
|
|
406
|
+
sideEffects?.onSiteCall?.();
|
|
407
|
+
try {
|
|
408
|
+
const result = await httpClient.request(reqOpts);
|
|
409
|
+
sideEffects?.onSuccess?.(result);
|
|
410
|
+
} catch (err) {
|
|
411
|
+
const transformedError = sdkTransformError(
|
|
412
|
+
err,
|
|
413
|
+
{
|
|
414
|
+
spreadPathsToArguments: {},
|
|
415
|
+
explicitPathsToArguments: { scheduledDataWorkflowId: "$[0]" },
|
|
416
|
+
singleArgumentUnchanged: false
|
|
417
|
+
},
|
|
418
|
+
["scheduledDataWorkflowId"]
|
|
419
|
+
);
|
|
420
|
+
sideEffects?.onError?.(err);
|
|
421
|
+
throw transformedError;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
async function updateScheduledDataWorkflow2(scheduledDataWorkflow, options) {
|
|
425
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
426
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
427
|
+
scheduledDataWorkflow,
|
|
428
|
+
fields: options?.fields
|
|
429
|
+
});
|
|
430
|
+
const reqOpts = updateScheduledDataWorkflow(payload);
|
|
431
|
+
sideEffects?.onSiteCall?.();
|
|
432
|
+
try {
|
|
433
|
+
const result = await httpClient.request(reqOpts);
|
|
434
|
+
sideEffects?.onSuccess?.(result);
|
|
435
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
436
|
+
} catch (err) {
|
|
437
|
+
const transformedError = sdkTransformError(
|
|
438
|
+
err,
|
|
439
|
+
{
|
|
440
|
+
spreadPathsToArguments: {},
|
|
441
|
+
explicitPathsToArguments: {
|
|
442
|
+
scheduledDataWorkflow: "$[0]",
|
|
443
|
+
fields: "$[1].fields"
|
|
444
|
+
},
|
|
445
|
+
singleArgumentUnchanged: false
|
|
446
|
+
},
|
|
447
|
+
["scheduledDataWorkflow", "options"]
|
|
448
|
+
);
|
|
449
|
+
sideEffects?.onError?.(err);
|
|
450
|
+
throw transformedError;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
async function deleteScheduledDataWorkflow2(scheduledDataWorkflowId) {
|
|
454
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
455
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
456
|
+
scheduledDataWorkflowId
|
|
457
|
+
});
|
|
458
|
+
const reqOpts = deleteScheduledDataWorkflow(payload);
|
|
459
|
+
sideEffects?.onSiteCall?.();
|
|
460
|
+
try {
|
|
461
|
+
const result = await httpClient.request(reqOpts);
|
|
462
|
+
sideEffects?.onSuccess?.(result);
|
|
463
|
+
} catch (err) {
|
|
464
|
+
const transformedError = sdkTransformError(
|
|
465
|
+
err,
|
|
466
|
+
{
|
|
467
|
+
spreadPathsToArguments: {},
|
|
468
|
+
explicitPathsToArguments: { scheduledDataWorkflowId: "$[0]" },
|
|
469
|
+
singleArgumentUnchanged: false
|
|
470
|
+
},
|
|
471
|
+
["scheduledDataWorkflowId"]
|
|
472
|
+
);
|
|
473
|
+
sideEffects?.onError?.(err);
|
|
474
|
+
throw transformedError;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
async function getScheduledDataWorkflow2(scheduledDataWorkflowId, options) {
|
|
478
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
479
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
480
|
+
scheduledDataWorkflowId,
|
|
481
|
+
fields: options?.fields
|
|
482
|
+
});
|
|
483
|
+
const reqOpts = getScheduledDataWorkflow(payload);
|
|
484
|
+
sideEffects?.onSiteCall?.();
|
|
485
|
+
try {
|
|
486
|
+
const result = await httpClient.request(reqOpts);
|
|
487
|
+
sideEffects?.onSuccess?.(result);
|
|
488
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
489
|
+
} catch (err) {
|
|
490
|
+
const transformedError = sdkTransformError(
|
|
491
|
+
err,
|
|
492
|
+
{
|
|
493
|
+
spreadPathsToArguments: {},
|
|
494
|
+
explicitPathsToArguments: {
|
|
495
|
+
scheduledDataWorkflowId: "$[0]",
|
|
496
|
+
fields: "$[1].fields"
|
|
497
|
+
},
|
|
498
|
+
singleArgumentUnchanged: false
|
|
499
|
+
},
|
|
500
|
+
["scheduledDataWorkflowId", "options"]
|
|
501
|
+
);
|
|
502
|
+
sideEffects?.onError?.(err);
|
|
503
|
+
throw transformedError;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
async function listScheduledDataWorkflows2(options) {
|
|
507
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
508
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
509
|
+
fields: options?.fields,
|
|
510
|
+
paging: options?.paging,
|
|
511
|
+
filter: options?.filter
|
|
512
|
+
});
|
|
513
|
+
const reqOpts = listScheduledDataWorkflows(payload);
|
|
514
|
+
sideEffects?.onSiteCall?.();
|
|
515
|
+
try {
|
|
516
|
+
const result = await httpClient.request(reqOpts);
|
|
517
|
+
sideEffects?.onSuccess?.(result);
|
|
518
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
519
|
+
} catch (err) {
|
|
520
|
+
const transformedError = sdkTransformError(
|
|
521
|
+
err,
|
|
522
|
+
{
|
|
523
|
+
spreadPathsToArguments: {},
|
|
524
|
+
explicitPathsToArguments: {
|
|
525
|
+
fields: "$[0].fields",
|
|
526
|
+
paging: "$[0].paging",
|
|
527
|
+
filter: "$[0].filter"
|
|
528
|
+
},
|
|
529
|
+
singleArgumentUnchanged: false
|
|
530
|
+
},
|
|
531
|
+
["options"]
|
|
532
|
+
);
|
|
533
|
+
sideEffects?.onError?.(err);
|
|
534
|
+
throw transformedError;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
export {
|
|
538
|
+
FieldType,
|
|
539
|
+
Fields,
|
|
540
|
+
FileFormat,
|
|
541
|
+
MediaType,
|
|
542
|
+
WebhookIdentityType,
|
|
543
|
+
WixDataDestinationWritePolicy,
|
|
544
|
+
WixDataEnvironment,
|
|
545
|
+
WixMediaDestinationWritePolicy,
|
|
546
|
+
WritePolicy,
|
|
547
|
+
createScheduledDataWorkflow2 as createScheduledDataWorkflow,
|
|
548
|
+
deleteScheduledDataWorkflow2 as deleteScheduledDataWorkflow,
|
|
549
|
+
getScheduledDataWorkflow2 as getScheduledDataWorkflow,
|
|
550
|
+
listScheduledDataWorkflows2 as listScheduledDataWorkflows,
|
|
551
|
+
rescheduleScheduledDataWorkflow2 as rescheduleScheduledDataWorkflow,
|
|
552
|
+
triggerScheduledDataWorkflowNow2 as triggerScheduledDataWorkflowNow,
|
|
553
|
+
updateScheduledDataWorkflow2 as updateScheduledDataWorkflow
|
|
554
|
+
};
|
|
555
|
+
//# sourceMappingURL=index.typings.mjs.map
|