@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,681 @@
|
|
|
1
|
+
// src/data-sync-v1-jobs-scheduled-workflows.public.ts
|
|
2
|
+
import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
3
|
+
import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
|
|
4
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
5
|
+
import { EventDefinition } from "@wix/sdk-types";
|
|
6
|
+
|
|
7
|
+
// src/data-sync-v1-jobs-scheduled-workflows.universal.ts
|
|
8
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
9
|
+
import {
|
|
10
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
11
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
12
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
13
|
+
|
|
14
|
+
// src/data-sync-v1-jobs-scheduled-workflows.http.ts
|
|
15
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
17
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
18
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
19
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
20
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
21
|
+
function resolveWixHubV1DataMovementSchedulerServiceUrl(opts) {
|
|
22
|
+
const domainToMappings = {
|
|
23
|
+
"editor._base_domain_": [
|
|
24
|
+
{
|
|
25
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
26
|
+
destPath: ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"blocks._base_domain_": [
|
|
30
|
+
{
|
|
31
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
32
|
+
destPath: ""
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"create.editorx": [
|
|
36
|
+
{
|
|
37
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
38
|
+
destPath: ""
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
_: [
|
|
42
|
+
{
|
|
43
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
44
|
+
destPath: ""
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"manage._base_domain_": [
|
|
48
|
+
{
|
|
49
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
50
|
+
destPath: ""
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"www.wixapis.com": [
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/data-move-scheduler",
|
|
56
|
+
destPath: ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"*.dev.wix-code.com": [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/_api/wix-data-hub-scheduler",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
67
|
+
}
|
|
68
|
+
var PACKAGE_NAME = "@wix/auto_sdk_data_scheduled-workflows";
|
|
69
|
+
function createScheduledDataWorkflow(payload) {
|
|
70
|
+
function __createScheduledDataWorkflow({ host }) {
|
|
71
|
+
const serializedData = transformPaths(payload, [
|
|
72
|
+
{
|
|
73
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
74
|
+
paths: [
|
|
75
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
76
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]);
|
|
80
|
+
const metadata = {
|
|
81
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
82
|
+
method: "POST",
|
|
83
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.CreateScheduledDataWorkflow",
|
|
84
|
+
packageName: PACKAGE_NAME,
|
|
85
|
+
migrationOptions: {
|
|
86
|
+
optInTransformResponse: true
|
|
87
|
+
},
|
|
88
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
89
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
90
|
+
data: serializedData,
|
|
91
|
+
host
|
|
92
|
+
}),
|
|
93
|
+
data: serializedData,
|
|
94
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
95
|
+
{
|
|
96
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
97
|
+
paths: [
|
|
98
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
99
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
])
|
|
103
|
+
};
|
|
104
|
+
return metadata;
|
|
105
|
+
}
|
|
106
|
+
return __createScheduledDataWorkflow;
|
|
107
|
+
}
|
|
108
|
+
function rescheduleScheduledDataWorkflow(payload) {
|
|
109
|
+
function __rescheduleScheduledDataWorkflow({ host }) {
|
|
110
|
+
const metadata = {
|
|
111
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
112
|
+
method: "POST",
|
|
113
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.RescheduleScheduledDataWorkflow",
|
|
114
|
+
packageName: PACKAGE_NAME,
|
|
115
|
+
migrationOptions: {
|
|
116
|
+
optInTransformResponse: true
|
|
117
|
+
},
|
|
118
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
119
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}/reschedule",
|
|
120
|
+
data: payload,
|
|
121
|
+
host
|
|
122
|
+
}),
|
|
123
|
+
data: payload,
|
|
124
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
125
|
+
{
|
|
126
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
127
|
+
paths: [{ path: "nextExecutionDate" }]
|
|
128
|
+
}
|
|
129
|
+
])
|
|
130
|
+
};
|
|
131
|
+
return metadata;
|
|
132
|
+
}
|
|
133
|
+
return __rescheduleScheduledDataWorkflow;
|
|
134
|
+
}
|
|
135
|
+
function triggerScheduledDataWorkflowNow(payload) {
|
|
136
|
+
function __triggerScheduledDataWorkflowNow({ host }) {
|
|
137
|
+
const metadata = {
|
|
138
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
139
|
+
method: "POST",
|
|
140
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.TriggerScheduledDataWorkflowNow",
|
|
141
|
+
packageName: PACKAGE_NAME,
|
|
142
|
+
migrationOptions: {
|
|
143
|
+
optInTransformResponse: true
|
|
144
|
+
},
|
|
145
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
146
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}/run-now",
|
|
147
|
+
data: payload,
|
|
148
|
+
host
|
|
149
|
+
}),
|
|
150
|
+
data: payload
|
|
151
|
+
};
|
|
152
|
+
return metadata;
|
|
153
|
+
}
|
|
154
|
+
return __triggerScheduledDataWorkflowNow;
|
|
155
|
+
}
|
|
156
|
+
function updateScheduledDataWorkflow(payload) {
|
|
157
|
+
function __updateScheduledDataWorkflow({ host }) {
|
|
158
|
+
const serializedData = transformPaths(payload, [
|
|
159
|
+
{
|
|
160
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
161
|
+
paths: [{ path: "mask" }]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
165
|
+
paths: [
|
|
166
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
167
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
]);
|
|
171
|
+
const metadata = {
|
|
172
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
173
|
+
method: "PATCH",
|
|
174
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.UpdateScheduledDataWorkflow",
|
|
175
|
+
packageName: PACKAGE_NAME,
|
|
176
|
+
migrationOptions: {
|
|
177
|
+
optInTransformResponse: true
|
|
178
|
+
},
|
|
179
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
180
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
181
|
+
data: serializedData,
|
|
182
|
+
host
|
|
183
|
+
}),
|
|
184
|
+
data: serializedData,
|
|
185
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
186
|
+
{
|
|
187
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
188
|
+
paths: [
|
|
189
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
190
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
])
|
|
194
|
+
};
|
|
195
|
+
return metadata;
|
|
196
|
+
}
|
|
197
|
+
return __updateScheduledDataWorkflow;
|
|
198
|
+
}
|
|
199
|
+
function deleteScheduledDataWorkflow(payload) {
|
|
200
|
+
function __deleteScheduledDataWorkflow({ host }) {
|
|
201
|
+
const metadata = {
|
|
202
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
203
|
+
method: "DELETE",
|
|
204
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.DeleteScheduledDataWorkflow",
|
|
205
|
+
packageName: PACKAGE_NAME,
|
|
206
|
+
migrationOptions: {
|
|
207
|
+
optInTransformResponse: true
|
|
208
|
+
},
|
|
209
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
210
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}",
|
|
211
|
+
data: payload,
|
|
212
|
+
host
|
|
213
|
+
}),
|
|
214
|
+
params: toURLSearchParams(payload)
|
|
215
|
+
};
|
|
216
|
+
return metadata;
|
|
217
|
+
}
|
|
218
|
+
return __deleteScheduledDataWorkflow;
|
|
219
|
+
}
|
|
220
|
+
function getScheduledDataWorkflow(payload) {
|
|
221
|
+
function __getScheduledDataWorkflow({ host }) {
|
|
222
|
+
const metadata = {
|
|
223
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
224
|
+
method: "GET",
|
|
225
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.GetScheduledDataWorkflow",
|
|
226
|
+
packageName: PACKAGE_NAME,
|
|
227
|
+
migrationOptions: {
|
|
228
|
+
optInTransformResponse: true
|
|
229
|
+
},
|
|
230
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
231
|
+
protoPath: "/v1/scheduled-data-workflows/{scheduledDataWorkflowId}",
|
|
232
|
+
data: payload,
|
|
233
|
+
host
|
|
234
|
+
}),
|
|
235
|
+
params: toURLSearchParams(payload),
|
|
236
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
237
|
+
{
|
|
238
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
239
|
+
paths: [
|
|
240
|
+
{ path: "scheduledDataWorkflow.lastExecutionDate" },
|
|
241
|
+
{ path: "scheduledDataWorkflow.nextExecutionDate" }
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
])
|
|
245
|
+
};
|
|
246
|
+
return metadata;
|
|
247
|
+
}
|
|
248
|
+
return __getScheduledDataWorkflow;
|
|
249
|
+
}
|
|
250
|
+
function listScheduledDataWorkflows(payload) {
|
|
251
|
+
function __listScheduledDataWorkflows({ host }) {
|
|
252
|
+
const metadata = {
|
|
253
|
+
entityFqdn: "wix.data.sync.v1.jobs",
|
|
254
|
+
method: "GET",
|
|
255
|
+
methodFqn: "wix.hub.v1.DataMovementSchedulerService.ListScheduledDataWorkflows",
|
|
256
|
+
packageName: PACKAGE_NAME,
|
|
257
|
+
migrationOptions: {
|
|
258
|
+
optInTransformResponse: true
|
|
259
|
+
},
|
|
260
|
+
url: resolveWixHubV1DataMovementSchedulerServiceUrl({
|
|
261
|
+
protoPath: "/v1/scheduled-data-workflows",
|
|
262
|
+
data: payload,
|
|
263
|
+
host
|
|
264
|
+
}),
|
|
265
|
+
params: toURLSearchParams(payload, true),
|
|
266
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
267
|
+
{
|
|
268
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
269
|
+
paths: [
|
|
270
|
+
{ path: "scheduledDataWorkflows.lastExecutionDate" },
|
|
271
|
+
{ path: "scheduledDataWorkflows.nextExecutionDate" }
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
])
|
|
275
|
+
};
|
|
276
|
+
return metadata;
|
|
277
|
+
}
|
|
278
|
+
return __listScheduledDataWorkflows;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// src/data-sync-v1-jobs-scheduled-workflows.universal.ts
|
|
282
|
+
var WixDataEnvironment = /* @__PURE__ */ ((WixDataEnvironment2) => {
|
|
283
|
+
WixDataEnvironment2["LIVE"] = "LIVE";
|
|
284
|
+
WixDataEnvironment2["SANDBOX"] = "SANDBOX";
|
|
285
|
+
return WixDataEnvironment2;
|
|
286
|
+
})(WixDataEnvironment || {});
|
|
287
|
+
var FileFormat = /* @__PURE__ */ ((FileFormat2) => {
|
|
288
|
+
FileFormat2["UNKNOWN"] = "UNKNOWN";
|
|
289
|
+
FileFormat2["CSV"] = "CSV";
|
|
290
|
+
FileFormat2["JSONL"] = "JSONL";
|
|
291
|
+
return FileFormat2;
|
|
292
|
+
})(FileFormat || {});
|
|
293
|
+
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
294
|
+
MediaType2["ALL"] = "ALL";
|
|
295
|
+
MediaType2["IMAGE"] = "IMAGE";
|
|
296
|
+
MediaType2["VIDEO"] = "VIDEO";
|
|
297
|
+
MediaType2["AUDIO"] = "AUDIO";
|
|
298
|
+
MediaType2["DOCUMENT"] = "DOCUMENT";
|
|
299
|
+
return MediaType2;
|
|
300
|
+
})(MediaType || {});
|
|
301
|
+
var WixDataDestinationWritePolicy = /* @__PURE__ */ ((WixDataDestinationWritePolicy2) => {
|
|
302
|
+
WixDataDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
303
|
+
WixDataDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
304
|
+
WixDataDestinationWritePolicy2["TRUNCATE_BEFORE"] = "TRUNCATE_BEFORE";
|
|
305
|
+
return WixDataDestinationWritePolicy2;
|
|
306
|
+
})(WixDataDestinationWritePolicy || {});
|
|
307
|
+
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
308
|
+
FieldType2["ANY"] = "ANY";
|
|
309
|
+
FieldType2["STRING"] = "STRING";
|
|
310
|
+
FieldType2["NUMBER"] = "NUMBER";
|
|
311
|
+
FieldType2["BOOLEAN"] = "BOOLEAN";
|
|
312
|
+
FieldType2["DATE"] = "DATE";
|
|
313
|
+
FieldType2["DATETIME"] = "DATETIME";
|
|
314
|
+
FieldType2["BINARY"] = "BINARY";
|
|
315
|
+
FieldType2["OBJECT"] = "OBJECT";
|
|
316
|
+
FieldType2["ARRAY"] = "ARRAY";
|
|
317
|
+
FieldType2["URL"] = "URL";
|
|
318
|
+
FieldType2["WIX_MEDIA_URL"] = "WIX_MEDIA_URL";
|
|
319
|
+
FieldType2["WIX_MEDIA_IMAGE_URL"] = "WIX_MEDIA_IMAGE_URL";
|
|
320
|
+
FieldType2["WIX_MEDIA_VIDEO_URL"] = "WIX_MEDIA_VIDEO_URL";
|
|
321
|
+
FieldType2["WIX_MEDIA_DOCUMENT_URL"] = "WIX_MEDIA_DOCUMENT_URL";
|
|
322
|
+
FieldType2["IMAGE_URL"] = "IMAGE_URL";
|
|
323
|
+
FieldType2["VIDEO_URL"] = "VIDEO_URL";
|
|
324
|
+
return FieldType2;
|
|
325
|
+
})(FieldType || {});
|
|
326
|
+
var WixMediaDestinationWritePolicy = /* @__PURE__ */ ((WixMediaDestinationWritePolicy2) => {
|
|
327
|
+
WixMediaDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
328
|
+
WixMediaDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
329
|
+
return WixMediaDestinationWritePolicy2;
|
|
330
|
+
})(WixMediaDestinationWritePolicy || {});
|
|
331
|
+
var WritePolicy = /* @__PURE__ */ ((WritePolicy2) => {
|
|
332
|
+
WritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
|
|
333
|
+
WritePolicy2["OVERWRITE"] = "OVERWRITE";
|
|
334
|
+
return WritePolicy2;
|
|
335
|
+
})(WritePolicy || {});
|
|
336
|
+
var Fields = /* @__PURE__ */ ((Fields2) => {
|
|
337
|
+
Fields2["NEXT_SCHEDULE_EXECUTION"] = "NEXT_SCHEDULE_EXECUTION";
|
|
338
|
+
return Fields2;
|
|
339
|
+
})(Fields || {});
|
|
340
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
341
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
342
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
343
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
344
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
345
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
346
|
+
return WebhookIdentityType2;
|
|
347
|
+
})(WebhookIdentityType || {});
|
|
348
|
+
async function createScheduledDataWorkflow2(scheduledDataWorkflow, options) {
|
|
349
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
350
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
351
|
+
scheduledDataWorkflow,
|
|
352
|
+
fields: options?.fields
|
|
353
|
+
});
|
|
354
|
+
const reqOpts = createScheduledDataWorkflow(payload);
|
|
355
|
+
sideEffects?.onSiteCall?.();
|
|
356
|
+
try {
|
|
357
|
+
const result = await httpClient.request(reqOpts);
|
|
358
|
+
sideEffects?.onSuccess?.(result);
|
|
359
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
360
|
+
} catch (err) {
|
|
361
|
+
const transformedError = sdkTransformError(
|
|
362
|
+
err,
|
|
363
|
+
{
|
|
364
|
+
spreadPathsToArguments: {},
|
|
365
|
+
explicitPathsToArguments: {
|
|
366
|
+
scheduledDataWorkflow: "$[0]",
|
|
367
|
+
fields: "$[1].fields"
|
|
368
|
+
},
|
|
369
|
+
singleArgumentUnchanged: false
|
|
370
|
+
},
|
|
371
|
+
["scheduledDataWorkflow", "options"]
|
|
372
|
+
);
|
|
373
|
+
sideEffects?.onError?.(err);
|
|
374
|
+
throw transformedError;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
async function rescheduleScheduledDataWorkflow2(scheduledDataWorkflowId, options) {
|
|
378
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
379
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
380
|
+
scheduledDataWorkflowId,
|
|
381
|
+
fields: options?.fields
|
|
382
|
+
});
|
|
383
|
+
const reqOpts = rescheduleScheduledDataWorkflow(payload);
|
|
384
|
+
sideEffects?.onSiteCall?.();
|
|
385
|
+
try {
|
|
386
|
+
const result = await httpClient.request(reqOpts);
|
|
387
|
+
sideEffects?.onSuccess?.(result);
|
|
388
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
389
|
+
} catch (err) {
|
|
390
|
+
const transformedError = sdkTransformError(
|
|
391
|
+
err,
|
|
392
|
+
{
|
|
393
|
+
spreadPathsToArguments: {},
|
|
394
|
+
explicitPathsToArguments: {
|
|
395
|
+
scheduledDataWorkflowId: "$[0]",
|
|
396
|
+
fields: "$[1].fields"
|
|
397
|
+
},
|
|
398
|
+
singleArgumentUnchanged: false
|
|
399
|
+
},
|
|
400
|
+
["scheduledDataWorkflowId", "options"]
|
|
401
|
+
);
|
|
402
|
+
sideEffects?.onError?.(err);
|
|
403
|
+
throw transformedError;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
async function triggerScheduledDataWorkflowNow2(scheduledDataWorkflowId) {
|
|
407
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
408
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
409
|
+
scheduledDataWorkflowId
|
|
410
|
+
});
|
|
411
|
+
const reqOpts = triggerScheduledDataWorkflowNow(payload);
|
|
412
|
+
sideEffects?.onSiteCall?.();
|
|
413
|
+
try {
|
|
414
|
+
const result = await httpClient.request(reqOpts);
|
|
415
|
+
sideEffects?.onSuccess?.(result);
|
|
416
|
+
} catch (err) {
|
|
417
|
+
const transformedError = sdkTransformError(
|
|
418
|
+
err,
|
|
419
|
+
{
|
|
420
|
+
spreadPathsToArguments: {},
|
|
421
|
+
explicitPathsToArguments: { scheduledDataWorkflowId: "$[0]" },
|
|
422
|
+
singleArgumentUnchanged: false
|
|
423
|
+
},
|
|
424
|
+
["scheduledDataWorkflowId"]
|
|
425
|
+
);
|
|
426
|
+
sideEffects?.onError?.(err);
|
|
427
|
+
throw transformedError;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
async function updateScheduledDataWorkflow2(scheduledDataWorkflow, options) {
|
|
431
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
432
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
433
|
+
scheduledDataWorkflow,
|
|
434
|
+
fields: options?.fields
|
|
435
|
+
});
|
|
436
|
+
const reqOpts = updateScheduledDataWorkflow(payload);
|
|
437
|
+
sideEffects?.onSiteCall?.();
|
|
438
|
+
try {
|
|
439
|
+
const result = await httpClient.request(reqOpts);
|
|
440
|
+
sideEffects?.onSuccess?.(result);
|
|
441
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
442
|
+
} catch (err) {
|
|
443
|
+
const transformedError = sdkTransformError(
|
|
444
|
+
err,
|
|
445
|
+
{
|
|
446
|
+
spreadPathsToArguments: {},
|
|
447
|
+
explicitPathsToArguments: {
|
|
448
|
+
scheduledDataWorkflow: "$[0]",
|
|
449
|
+
fields: "$[1].fields"
|
|
450
|
+
},
|
|
451
|
+
singleArgumentUnchanged: false
|
|
452
|
+
},
|
|
453
|
+
["scheduledDataWorkflow", "options"]
|
|
454
|
+
);
|
|
455
|
+
sideEffects?.onError?.(err);
|
|
456
|
+
throw transformedError;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
async function deleteScheduledDataWorkflow2(scheduledDataWorkflowId) {
|
|
460
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
461
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
462
|
+
scheduledDataWorkflowId
|
|
463
|
+
});
|
|
464
|
+
const reqOpts = deleteScheduledDataWorkflow(payload);
|
|
465
|
+
sideEffects?.onSiteCall?.();
|
|
466
|
+
try {
|
|
467
|
+
const result = await httpClient.request(reqOpts);
|
|
468
|
+
sideEffects?.onSuccess?.(result);
|
|
469
|
+
} catch (err) {
|
|
470
|
+
const transformedError = sdkTransformError(
|
|
471
|
+
err,
|
|
472
|
+
{
|
|
473
|
+
spreadPathsToArguments: {},
|
|
474
|
+
explicitPathsToArguments: { scheduledDataWorkflowId: "$[0]" },
|
|
475
|
+
singleArgumentUnchanged: false
|
|
476
|
+
},
|
|
477
|
+
["scheduledDataWorkflowId"]
|
|
478
|
+
);
|
|
479
|
+
sideEffects?.onError?.(err);
|
|
480
|
+
throw transformedError;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
async function getScheduledDataWorkflow2(scheduledDataWorkflowId, options) {
|
|
484
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
485
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
486
|
+
scheduledDataWorkflowId,
|
|
487
|
+
fields: options?.fields
|
|
488
|
+
});
|
|
489
|
+
const reqOpts = getScheduledDataWorkflow(payload);
|
|
490
|
+
sideEffects?.onSiteCall?.();
|
|
491
|
+
try {
|
|
492
|
+
const result = await httpClient.request(reqOpts);
|
|
493
|
+
sideEffects?.onSuccess?.(result);
|
|
494
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.scheduledDataWorkflow;
|
|
495
|
+
} catch (err) {
|
|
496
|
+
const transformedError = sdkTransformError(
|
|
497
|
+
err,
|
|
498
|
+
{
|
|
499
|
+
spreadPathsToArguments: {},
|
|
500
|
+
explicitPathsToArguments: {
|
|
501
|
+
scheduledDataWorkflowId: "$[0]",
|
|
502
|
+
fields: "$[1].fields"
|
|
503
|
+
},
|
|
504
|
+
singleArgumentUnchanged: false
|
|
505
|
+
},
|
|
506
|
+
["scheduledDataWorkflowId", "options"]
|
|
507
|
+
);
|
|
508
|
+
sideEffects?.onError?.(err);
|
|
509
|
+
throw transformedError;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
async function listScheduledDataWorkflows2(options) {
|
|
513
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
514
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
515
|
+
fields: options?.fields,
|
|
516
|
+
paging: options?.paging,
|
|
517
|
+
filter: options?.filter
|
|
518
|
+
});
|
|
519
|
+
const reqOpts = listScheduledDataWorkflows(payload);
|
|
520
|
+
sideEffects?.onSiteCall?.();
|
|
521
|
+
try {
|
|
522
|
+
const result = await httpClient.request(reqOpts);
|
|
523
|
+
sideEffects?.onSuccess?.(result);
|
|
524
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
525
|
+
} catch (err) {
|
|
526
|
+
const transformedError = sdkTransformError(
|
|
527
|
+
err,
|
|
528
|
+
{
|
|
529
|
+
spreadPathsToArguments: {},
|
|
530
|
+
explicitPathsToArguments: {
|
|
531
|
+
fields: "$[0].fields",
|
|
532
|
+
paging: "$[0].paging",
|
|
533
|
+
filter: "$[0].filter"
|
|
534
|
+
},
|
|
535
|
+
singleArgumentUnchanged: false
|
|
536
|
+
},
|
|
537
|
+
["options"]
|
|
538
|
+
);
|
|
539
|
+
sideEffects?.onError?.(err);
|
|
540
|
+
throw transformedError;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
// src/data-sync-v1-jobs-scheduled-workflows.public.ts
|
|
545
|
+
function createScheduledDataWorkflow3(httpClient) {
|
|
546
|
+
return (scheduledDataWorkflow, options) => createScheduledDataWorkflow2(
|
|
547
|
+
scheduledDataWorkflow,
|
|
548
|
+
options,
|
|
549
|
+
// @ts-ignore
|
|
550
|
+
{ httpClient }
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
function rescheduleScheduledDataWorkflow3(httpClient) {
|
|
554
|
+
return (scheduledDataWorkflowId, options) => rescheduleScheduledDataWorkflow2(
|
|
555
|
+
scheduledDataWorkflowId,
|
|
556
|
+
options,
|
|
557
|
+
// @ts-ignore
|
|
558
|
+
{ httpClient }
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
function triggerScheduledDataWorkflowNow3(httpClient) {
|
|
562
|
+
return (scheduledDataWorkflowId) => triggerScheduledDataWorkflowNow2(
|
|
563
|
+
scheduledDataWorkflowId,
|
|
564
|
+
// @ts-ignore
|
|
565
|
+
{ httpClient }
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
function updateScheduledDataWorkflow3(httpClient) {
|
|
569
|
+
return (scheduledDataWorkflow, options) => updateScheduledDataWorkflow2(
|
|
570
|
+
scheduledDataWorkflow,
|
|
571
|
+
options,
|
|
572
|
+
// @ts-ignore
|
|
573
|
+
{ httpClient }
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
function deleteScheduledDataWorkflow3(httpClient) {
|
|
577
|
+
return (scheduledDataWorkflowId) => deleteScheduledDataWorkflow2(
|
|
578
|
+
scheduledDataWorkflowId,
|
|
579
|
+
// @ts-ignore
|
|
580
|
+
{ httpClient }
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
function getScheduledDataWorkflow3(httpClient) {
|
|
584
|
+
return (scheduledDataWorkflowId, options) => getScheduledDataWorkflow2(
|
|
585
|
+
scheduledDataWorkflowId,
|
|
586
|
+
options,
|
|
587
|
+
// @ts-ignore
|
|
588
|
+
{ httpClient }
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
function listScheduledDataWorkflows3(httpClient) {
|
|
592
|
+
return (options) => listScheduledDataWorkflows2(
|
|
593
|
+
options,
|
|
594
|
+
// @ts-ignore
|
|
595
|
+
{ httpClient }
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
var onJobsCreated = EventDefinition(
|
|
599
|
+
"wix.data.sync.v1.jobs_created",
|
|
600
|
+
true,
|
|
601
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
602
|
+
transformPaths2(event, [
|
|
603
|
+
{
|
|
604
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
605
|
+
paths: [
|
|
606
|
+
{ path: "entity.lastExecutionDate" },
|
|
607
|
+
{ path: "entity.nextExecutionDate" },
|
|
608
|
+
{ path: "metadata.eventTime" }
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
])
|
|
612
|
+
)
|
|
613
|
+
)();
|
|
614
|
+
var onJobsDeleted = EventDefinition(
|
|
615
|
+
"wix.data.sync.v1.jobs_deleted",
|
|
616
|
+
true,
|
|
617
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
618
|
+
transformPaths2(event, [
|
|
619
|
+
{
|
|
620
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
621
|
+
paths: [
|
|
622
|
+
{ path: "undefined.lastExecutionDate" },
|
|
623
|
+
{ path: "undefined.nextExecutionDate" },
|
|
624
|
+
{ path: "metadata.eventTime" }
|
|
625
|
+
]
|
|
626
|
+
}
|
|
627
|
+
])
|
|
628
|
+
)
|
|
629
|
+
)();
|
|
630
|
+
var onJobsUpdated = EventDefinition(
|
|
631
|
+
"wix.data.sync.v1.jobs_updated",
|
|
632
|
+
true,
|
|
633
|
+
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
634
|
+
transformPaths2(event, [
|
|
635
|
+
{
|
|
636
|
+
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
637
|
+
paths: [
|
|
638
|
+
{ path: "entity.lastExecutionDate" },
|
|
639
|
+
{ path: "entity.nextExecutionDate" },
|
|
640
|
+
{ path: "metadata.eventTime" }
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
])
|
|
644
|
+
)
|
|
645
|
+
)();
|
|
646
|
+
|
|
647
|
+
// src/data-sync-v1-jobs-scheduled-workflows.context.ts
|
|
648
|
+
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
649
|
+
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
650
|
+
var createScheduledDataWorkflow4 = /* @__PURE__ */ createRESTModule(createScheduledDataWorkflow3);
|
|
651
|
+
var rescheduleScheduledDataWorkflow4 = /* @__PURE__ */ createRESTModule(rescheduleScheduledDataWorkflow3);
|
|
652
|
+
var triggerScheduledDataWorkflowNow4 = /* @__PURE__ */ createRESTModule(triggerScheduledDataWorkflowNow3);
|
|
653
|
+
var updateScheduledDataWorkflow4 = /* @__PURE__ */ createRESTModule(updateScheduledDataWorkflow3);
|
|
654
|
+
var deleteScheduledDataWorkflow4 = /* @__PURE__ */ createRESTModule(deleteScheduledDataWorkflow3);
|
|
655
|
+
var getScheduledDataWorkflow4 = /* @__PURE__ */ createRESTModule(getScheduledDataWorkflow3);
|
|
656
|
+
var listScheduledDataWorkflows4 = /* @__PURE__ */ createRESTModule(listScheduledDataWorkflows3);
|
|
657
|
+
var onJobsCreated2 = createEventModule(onJobsCreated);
|
|
658
|
+
var onJobsDeleted2 = createEventModule(onJobsDeleted);
|
|
659
|
+
var onJobsUpdated2 = createEventModule(onJobsUpdated);
|
|
660
|
+
export {
|
|
661
|
+
FieldType,
|
|
662
|
+
Fields,
|
|
663
|
+
FileFormat,
|
|
664
|
+
MediaType,
|
|
665
|
+
WebhookIdentityType,
|
|
666
|
+
WixDataDestinationWritePolicy,
|
|
667
|
+
WixDataEnvironment,
|
|
668
|
+
WixMediaDestinationWritePolicy,
|
|
669
|
+
WritePolicy,
|
|
670
|
+
createScheduledDataWorkflow4 as createScheduledDataWorkflow,
|
|
671
|
+
deleteScheduledDataWorkflow4 as deleteScheduledDataWorkflow,
|
|
672
|
+
getScheduledDataWorkflow4 as getScheduledDataWorkflow,
|
|
673
|
+
listScheduledDataWorkflows4 as listScheduledDataWorkflows,
|
|
674
|
+
onJobsCreated2 as onJobsCreated,
|
|
675
|
+
onJobsDeleted2 as onJobsDeleted,
|
|
676
|
+
onJobsUpdated2 as onJobsUpdated,
|
|
677
|
+
rescheduleScheduledDataWorkflow4 as rescheduleScheduledDataWorkflow,
|
|
678
|
+
triggerScheduledDataWorkflowNow4 as triggerScheduledDataWorkflowNow,
|
|
679
|
+
updateScheduledDataWorkflow4 as updateScheduledDataWorkflow
|
|
680
|
+
};
|
|
681
|
+
//# sourceMappingURL=index.mjs.map
|