@wix/auto_sdk_automations_automations-v-2 1.0.4 → 1.0.5

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 (134) hide show
  1. package/build/{internal/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts → automations-v2-automation-automations-v-2.universal-BVuQcd6J.d.mts} +221 -566
  2. package/build/{cjs/src/automations-v2-automation-automations-v-2.universal.d.ts → automations-v2-automation-automations-v-2.universal-BVuQcd6J.d.ts} +221 -566
  3. package/build/index.d.mts +202 -0
  4. package/build/index.d.ts +202 -0
  5. package/build/index.js +1562 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1498 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/automations-v2-automation-automations-v-2.universal.d.ts → automations-v2-automation-automations-v-2.universal-BVuQcd6J.d.mts} +221 -566
  10. package/build/{es/src/automations-v2-automation-automations-v-2.universal.d.ts → internal/automations-v2-automation-automations-v-2.universal-BVuQcd6J.d.ts} +221 -566
  11. package/build/internal/index.d.mts +202 -0
  12. package/build/internal/index.d.ts +202 -0
  13. package/build/internal/index.js +1562 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1498 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +1167 -0
  18. package/build/internal/meta.d.ts +1167 -0
  19. package/build/internal/meta.js +963 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +920 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +1167 -0
  24. package/build/meta.d.ts +1167 -0
  25. package/build/meta.js +963 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +920 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  40. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
  41. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  42. package/build/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  43. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
  44. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  45. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  46. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
  47. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  48. package/build/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  49. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
  50. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  51. package/build/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  52. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
  53. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  54. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
  55. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  67. package/build/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
  68. package/build/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  69. package/build/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  70. package/build/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
  71. package/build/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  72. package/build/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  73. package/build/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
  74. package/build/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  75. package/build/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  76. package/build/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
  77. package/build/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  78. package/build/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  79. package/build/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
  80. package/build/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  81. package/build/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
  82. package/build/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  93. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
  94. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  95. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  96. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
  97. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  98. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  99. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
  100. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  101. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  102. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
  103. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  104. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  105. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
  106. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  107. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
  108. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  119. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
  120. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  121. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  122. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
  123. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  124. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  125. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
  126. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  127. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  128. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
  129. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  130. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  131. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
  132. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  133. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
  134. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
@@ -0,0 +1,1498 @@
1
+ // src/automations-v2-automation-automations-v-2.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 transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
5
+ import { EventDefinition } from "@wix/sdk-types";
6
+
7
+ // src/automations-v2-automation-automations-v-2.universal.ts
8
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
9
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
10
+ import {
11
+ renameKeysFromSDKRequestToRESTRequest,
12
+ renameKeysFromRESTResponseToSDKResponse
13
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
14
+
15
+ // src/automations-v2-automation-automations-v-2.http.ts
16
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
17
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
18
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
19
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
20
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
21
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
22
+ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
23
+ const domainToMappings = {
24
+ "manage._base_domain_": [
25
+ {
26
+ srcPath: "/automations-service",
27
+ destPath: ""
28
+ },
29
+ {
30
+ srcPath: "/_api/automations-service",
31
+ destPath: "/api"
32
+ }
33
+ ],
34
+ "platform.rise.ai": [
35
+ {
36
+ srcPath: "/v2/automations",
37
+ destPath: ""
38
+ }
39
+ ],
40
+ "www.wixapis.com": [
41
+ {
42
+ srcPath: "/automations-service",
43
+ destPath: ""
44
+ }
45
+ ],
46
+ "*.dev.wix-code.com": [
47
+ {
48
+ srcPath: "/automations-service",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ _: [
53
+ {
54
+ srcPath: "/automations-service",
55
+ destPath: ""
56
+ }
57
+ ]
58
+ };
59
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
62
+ const domainToMappings = {
63
+ "manage._base_domain_": [
64
+ {
65
+ srcPath: "/automations-service",
66
+ destPath: ""
67
+ },
68
+ {
69
+ srcPath: "/_api/automations-service",
70
+ destPath: "/api"
71
+ }
72
+ ],
73
+ "platform.rise.ai": [
74
+ {
75
+ srcPath: "/v2/automations",
76
+ destPath: ""
77
+ }
78
+ ],
79
+ "www.wixapis.com": [
80
+ {
81
+ srcPath: "/automations-service",
82
+ destPath: ""
83
+ }
84
+ ],
85
+ "*.dev.wix-code.com": [
86
+ {
87
+ srcPath: "/automations-service",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ _: [
92
+ {
93
+ srcPath: "/automations-service",
94
+ destPath: ""
95
+ }
96
+ ]
97
+ };
98
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
99
+ }
100
+ var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
101
+ function createAutomation(payload) {
102
+ function __createAutomation({ host }) {
103
+ const serializedData = transformPaths(payload, [
104
+ {
105
+ transformFn: transformSDKTimestampToRESTTimestamp,
106
+ paths: [
107
+ { path: "automation.createdDate" },
108
+ { path: "automation.updatedDate" },
109
+ { path: "automation.draftUpdatedDate" }
110
+ ]
111
+ }
112
+ ]);
113
+ const metadata = {
114
+ entityFqdn: "wix.automations.v2.automation",
115
+ method: "POST",
116
+ methodFqn: "wix.automations.v2.AutomationsService.CreateAutomation",
117
+ packageName: PACKAGE_NAME,
118
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
119
+ protoPath: "/v2/automations",
120
+ data: serializedData,
121
+ host
122
+ }),
123
+ data: serializedData,
124
+ transformResponse: (payload2) => transformPaths(payload2, [
125
+ {
126
+ transformFn: transformRESTTimestampToSDKTimestamp,
127
+ paths: [
128
+ { path: "automation.createdDate" },
129
+ { path: "automation.updatedDate" },
130
+ { path: "automation.draftUpdatedDate" }
131
+ ]
132
+ }
133
+ ])
134
+ };
135
+ return metadata;
136
+ }
137
+ return __createAutomation;
138
+ }
139
+ function getAutomation(payload) {
140
+ function __getAutomation({ host }) {
141
+ const metadata = {
142
+ entityFqdn: "wix.automations.v2.automation",
143
+ method: "GET",
144
+ methodFqn: "wix.automations.v2.AutomationsService.GetAutomation",
145
+ packageName: PACKAGE_NAME,
146
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
147
+ protoPath: "/v2/automations/{automationId}",
148
+ data: payload,
149
+ host
150
+ }),
151
+ params: toURLSearchParams(payload),
152
+ transformResponse: (payload2) => transformPaths(payload2, [
153
+ {
154
+ transformFn: transformRESTTimestampToSDKTimestamp,
155
+ paths: [
156
+ { path: "automation.createdDate" },
157
+ { path: "automation.updatedDate" },
158
+ { path: "automation.draftUpdatedDate" }
159
+ ]
160
+ }
161
+ ])
162
+ };
163
+ return metadata;
164
+ }
165
+ return __getAutomation;
166
+ }
167
+ function updateAutomation(payload) {
168
+ function __updateAutomation({ host }) {
169
+ const serializedData = transformPaths(payload, [
170
+ {
171
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
172
+ paths: [{ path: "fieldMask" }]
173
+ },
174
+ {
175
+ transformFn: transformSDKTimestampToRESTTimestamp,
176
+ paths: [
177
+ { path: "automation.createdDate" },
178
+ { path: "automation.updatedDate" },
179
+ { path: "automation.draftUpdatedDate" }
180
+ ]
181
+ }
182
+ ]);
183
+ const metadata = {
184
+ entityFqdn: "wix.automations.v2.automation",
185
+ method: "PATCH",
186
+ methodFqn: "wix.automations.v2.AutomationsService.UpdateAutomation",
187
+ packageName: PACKAGE_NAME,
188
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
189
+ protoPath: "/v2/automations/{automation.id}",
190
+ data: serializedData,
191
+ host
192
+ }),
193
+ data: serializedData,
194
+ transformResponse: (payload2) => transformPaths(payload2, [
195
+ {
196
+ transformFn: transformRESTTimestampToSDKTimestamp,
197
+ paths: [
198
+ { path: "automation.createdDate" },
199
+ { path: "automation.updatedDate" },
200
+ { path: "automation.draftUpdatedDate" }
201
+ ]
202
+ }
203
+ ])
204
+ };
205
+ return metadata;
206
+ }
207
+ return __updateAutomation;
208
+ }
209
+ function deleteAutomation(payload) {
210
+ function __deleteAutomation({ host }) {
211
+ const metadata = {
212
+ entityFqdn: "wix.automations.v2.automation",
213
+ method: "DELETE",
214
+ methodFqn: "wix.automations.v2.AutomationsService.DeleteAutomation",
215
+ packageName: PACKAGE_NAME,
216
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
217
+ protoPath: "/v2/automations/{automationId}",
218
+ data: payload,
219
+ host
220
+ }),
221
+ params: toURLSearchParams(payload)
222
+ };
223
+ return metadata;
224
+ }
225
+ return __deleteAutomation;
226
+ }
227
+ function bulkDeleteAutomations(payload) {
228
+ function __bulkDeleteAutomations({ host }) {
229
+ const metadata = {
230
+ entityFqdn: "wix.automations.v2.automation",
231
+ method: "POST",
232
+ methodFqn: "wix.automations.v2.AutomationsService.BulkDeleteAutomations",
233
+ packageName: PACKAGE_NAME,
234
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
235
+ protoPath: "/v2/bulk/automations/delete",
236
+ data: payload,
237
+ host
238
+ }),
239
+ data: payload
240
+ };
241
+ return metadata;
242
+ }
243
+ return __bulkDeleteAutomations;
244
+ }
245
+ function generatePreinstalledAutomation(payload) {
246
+ function __generatePreinstalledAutomation({ host }) {
247
+ const serializedData = transformPaths(payload, [
248
+ {
249
+ transformFn: transformSDKTimestampToRESTTimestamp,
250
+ paths: [
251
+ { path: "automation.createdDate" },
252
+ { path: "automation.updatedDate" },
253
+ { path: "automation.draftUpdatedDate" }
254
+ ]
255
+ }
256
+ ]);
257
+ const metadata = {
258
+ entityFqdn: "wix.automations.v2.automation",
259
+ method: "POST",
260
+ methodFqn: "wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation",
261
+ packageName: PACKAGE_NAME,
262
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
263
+ protoPath: "/v2/preinstalled-automation/generate",
264
+ data: serializedData,
265
+ host
266
+ }),
267
+ data: serializedData,
268
+ transformResponse: (payload2) => transformPaths(payload2, [
269
+ {
270
+ transformFn: transformRESTTimestampToSDKTimestamp,
271
+ paths: [
272
+ { path: "automation.createdDate" },
273
+ { path: "automation.updatedDate" },
274
+ { path: "automation.draftUpdatedDate" }
275
+ ]
276
+ }
277
+ ])
278
+ };
279
+ return metadata;
280
+ }
281
+ return __generatePreinstalledAutomation;
282
+ }
283
+ function queryAutomations(payload) {
284
+ function __queryAutomations({ host }) {
285
+ const metadata = {
286
+ entityFqdn: "wix.automations.v2.automation",
287
+ method: "POST",
288
+ methodFqn: "wix.automations.v2.AutomationsService.QueryAutomations",
289
+ packageName: PACKAGE_NAME,
290
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
291
+ protoPath: "/v2/automations/query",
292
+ data: payload,
293
+ host
294
+ }),
295
+ data: payload,
296
+ transformResponse: (payload2) => transformPaths(payload2, [
297
+ {
298
+ transformFn: transformRESTTimestampToSDKTimestamp,
299
+ paths: [
300
+ { path: "automations.createdDate" },
301
+ { path: "automations.updatedDate" },
302
+ { path: "automations.draftUpdatedDate" }
303
+ ]
304
+ }
305
+ ])
306
+ };
307
+ return metadata;
308
+ }
309
+ return __queryAutomations;
310
+ }
311
+ function copyAutomation(payload) {
312
+ function __copyAutomation({ host }) {
313
+ const serializedData = transformPaths(payload, [
314
+ {
315
+ transformFn: transformSDKTimestampToRESTTimestamp,
316
+ paths: [
317
+ { path: "automation.createdDate" },
318
+ { path: "automation.updatedDate" },
319
+ { path: "automation.draftUpdatedDate" }
320
+ ]
321
+ }
322
+ ]);
323
+ const metadata = {
324
+ entityFqdn: "wix.automations.v2.automation",
325
+ method: "POST",
326
+ methodFqn: "wix.automations.v2.AutomationsService.CopyAutomation",
327
+ packageName: PACKAGE_NAME,
328
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
329
+ protoPath: "/v2/automations/{automationId}/copy",
330
+ data: serializedData,
331
+ host
332
+ }),
333
+ data: serializedData,
334
+ transformResponse: (payload2) => transformPaths(payload2, [
335
+ {
336
+ transformFn: transformRESTTimestampToSDKTimestamp,
337
+ paths: [
338
+ { path: "automation.createdDate" },
339
+ { path: "automation.updatedDate" },
340
+ { path: "automation.draftUpdatedDate" }
341
+ ]
342
+ }
343
+ ])
344
+ };
345
+ return metadata;
346
+ }
347
+ return __copyAutomation;
348
+ }
349
+ function createDraftAutomation(payload) {
350
+ function __createDraftAutomation({ host }) {
351
+ const serializedData = transformPaths(payload, [
352
+ {
353
+ transformFn: transformSDKTimestampToRESTTimestamp,
354
+ paths: [
355
+ { path: "automation.createdDate" },
356
+ { path: "automation.updatedDate" },
357
+ { path: "automation.draftUpdatedDate" }
358
+ ]
359
+ }
360
+ ]);
361
+ const metadata = {
362
+ entityFqdn: "wix.automations.v2.automation",
363
+ method: "POST",
364
+ methodFqn: "wix.automations.v2.AutomationsService.CreateDraftAutomation",
365
+ packageName: PACKAGE_NAME,
366
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
367
+ protoPath: "/v2/automations/drafts",
368
+ data: serializedData,
369
+ host
370
+ }),
371
+ data: serializedData,
372
+ transformResponse: (payload2) => transformPaths(payload2, [
373
+ {
374
+ transformFn: transformRESTTimestampToSDKTimestamp,
375
+ paths: [
376
+ { path: "automation.createdDate" },
377
+ { path: "automation.updatedDate" },
378
+ { path: "automation.draftUpdatedDate" }
379
+ ]
380
+ }
381
+ ])
382
+ };
383
+ return metadata;
384
+ }
385
+ return __createDraftAutomation;
386
+ }
387
+ function getOrCreateDraftAutomation(payload) {
388
+ function __getOrCreateDraftAutomation({ host }) {
389
+ const metadata = {
390
+ entityFqdn: "wix.automations.v2.automation",
391
+ method: "POST",
392
+ methodFqn: "wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation",
393
+ packageName: PACKAGE_NAME,
394
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
395
+ protoPath: "/v2/automations/drafts/get-or-create/original-automation-id/{originalAutomationId}",
396
+ data: payload,
397
+ host
398
+ }),
399
+ data: payload,
400
+ transformResponse: (payload2) => transformPaths(payload2, [
401
+ {
402
+ transformFn: transformRESTTimestampToSDKTimestamp,
403
+ paths: [
404
+ { path: "automation.createdDate" },
405
+ { path: "automation.updatedDate" },
406
+ { path: "automation.draftUpdatedDate" }
407
+ ]
408
+ }
409
+ ])
410
+ };
411
+ return metadata;
412
+ }
413
+ return __getOrCreateDraftAutomation;
414
+ }
415
+ function updateDraftAutomation(payload) {
416
+ function __updateDraftAutomation({ host }) {
417
+ const serializedData = transformPaths(payload, [
418
+ {
419
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
420
+ paths: [{ path: "fieldMask" }]
421
+ },
422
+ {
423
+ transformFn: transformSDKTimestampToRESTTimestamp,
424
+ paths: [
425
+ { path: "automation.createdDate" },
426
+ { path: "automation.updatedDate" },
427
+ { path: "automation.draftUpdatedDate" }
428
+ ]
429
+ }
430
+ ]);
431
+ const metadata = {
432
+ entityFqdn: "wix.automations.v2.automation",
433
+ method: "PATCH",
434
+ methodFqn: "wix.automations.v2.AutomationsService.UpdateDraftAutomation",
435
+ packageName: PACKAGE_NAME,
436
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
437
+ protoPath: "/v2/automations/drafts/{automation.id}",
438
+ data: serializedData,
439
+ host
440
+ }),
441
+ data: serializedData,
442
+ transformResponse: (payload2) => transformPaths(payload2, [
443
+ {
444
+ transformFn: transformRESTTimestampToSDKTimestamp,
445
+ paths: [
446
+ { path: "automation.createdDate" },
447
+ { path: "automation.updatedDate" },
448
+ { path: "automation.draftUpdatedDate" }
449
+ ]
450
+ }
451
+ ])
452
+ };
453
+ return metadata;
454
+ }
455
+ return __updateDraftAutomation;
456
+ }
457
+ function queryAutomationsWithDrafts(payload) {
458
+ function __queryAutomationsWithDrafts({ host }) {
459
+ const metadata = {
460
+ entityFqdn: "wix.automations.v2.automation",
461
+ method: "POST",
462
+ methodFqn: "wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts",
463
+ packageName: PACKAGE_NAME,
464
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
465
+ protoPath: "/v2/automations/query-with-drafts",
466
+ data: payload,
467
+ host
468
+ }),
469
+ data: payload,
470
+ transformResponse: (payload2) => transformPaths(payload2, [
471
+ {
472
+ transformFn: transformRESTTimestampToSDKTimestamp,
473
+ paths: [
474
+ { path: "automations.createdDate" },
475
+ { path: "automations.updatedDate" },
476
+ { path: "automations.draftUpdatedDate" }
477
+ ]
478
+ }
479
+ ])
480
+ };
481
+ return metadata;
482
+ }
483
+ return __queryAutomationsWithDrafts;
484
+ }
485
+ function deleteDraftAutomation(payload) {
486
+ function __deleteDraftAutomation({ host }) {
487
+ const metadata = {
488
+ entityFqdn: "wix.automations.v2.automation",
489
+ method: "DELETE",
490
+ methodFqn: "wix.automations.v2.AutomationsService.DeleteDraftAutomation",
491
+ packageName: PACKAGE_NAME,
492
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
493
+ protoPath: "/v2/automations/drafts/{automationId}",
494
+ data: payload,
495
+ host
496
+ }),
497
+ params: toURLSearchParams(payload)
498
+ };
499
+ return metadata;
500
+ }
501
+ return __deleteDraftAutomation;
502
+ }
503
+ function publishDraftAutomation(payload) {
504
+ function __publishDraftAutomation({ host }) {
505
+ const metadata = {
506
+ entityFqdn: "wix.automations.v2.automation",
507
+ method: "POST",
508
+ methodFqn: "wix.automations.v2.AutomationsService.PublishDraftAutomation",
509
+ packageName: PACKAGE_NAME,
510
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
511
+ protoPath: "/v2/automations/drafts/{automationId}/publish",
512
+ data: payload,
513
+ host
514
+ }),
515
+ data: payload,
516
+ transformResponse: (payload2) => transformPaths(payload2, [
517
+ {
518
+ transformFn: transformRESTTimestampToSDKTimestamp,
519
+ paths: [
520
+ { path: "automation.createdDate" },
521
+ { path: "automation.updatedDate" },
522
+ { path: "automation.draftUpdatedDate" }
523
+ ]
524
+ }
525
+ ])
526
+ };
527
+ return metadata;
528
+ }
529
+ return __publishDraftAutomation;
530
+ }
531
+ function validateAutomation(payload) {
532
+ function __validateAutomation({ host }) {
533
+ const serializedData = transformPaths(payload, [
534
+ {
535
+ transformFn: transformSDKTimestampToRESTTimestamp,
536
+ paths: [
537
+ { path: "automation.createdDate" },
538
+ { path: "automation.updatedDate" },
539
+ { path: "automation.draftUpdatedDate" }
540
+ ]
541
+ }
542
+ ]);
543
+ const metadata = {
544
+ entityFqdn: "wix.automations.v2.automation",
545
+ method: "POST",
546
+ methodFqn: "wix.automations.v2.AutomationsService.ValidateAutomation",
547
+ packageName: PACKAGE_NAME,
548
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
549
+ protoPath: "/v2/automations/validate",
550
+ data: serializedData,
551
+ host
552
+ }),
553
+ data: serializedData
554
+ };
555
+ return metadata;
556
+ }
557
+ return __validateAutomation;
558
+ }
559
+ function validateAutomationById(payload) {
560
+ function __validateAutomationById({ host }) {
561
+ const metadata = {
562
+ entityFqdn: "wix.automations.v2.automation",
563
+ method: "POST",
564
+ methodFqn: "wix.automations.v2.AutomationsService.ValidateAutomationById",
565
+ packageName: PACKAGE_NAME,
566
+ url: resolveWixAutomationsV2AutomationsServiceUrl({
567
+ protoPath: "/v2/automations/{automationId}/validate",
568
+ data: payload,
569
+ host
570
+ }),
571
+ data: payload
572
+ };
573
+ return metadata;
574
+ }
575
+ return __validateAutomationById;
576
+ }
577
+ function getAutomationRevision(payload) {
578
+ function __getAutomationRevision({ host }) {
579
+ const metadata = {
580
+ entityFqdn: "wix.automations.v2.automation",
581
+ method: "GET",
582
+ methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
583
+ packageName: PACKAGE_NAME,
584
+ url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
585
+ protoPath: "/v1/automation-revisions/{automationId}",
586
+ data: payload,
587
+ host
588
+ }),
589
+ params: toURLSearchParams(payload),
590
+ transformResponse: (payload2) => transformPaths(payload2, [
591
+ {
592
+ transformFn: transformRESTTimestampToSDKTimestamp,
593
+ paths: [
594
+ { path: "automation.createdDate" },
595
+ { path: "automation.updatedDate" },
596
+ { path: "automation.draftUpdatedDate" }
597
+ ]
598
+ }
599
+ ])
600
+ };
601
+ return metadata;
602
+ }
603
+ return __getAutomationRevision;
604
+ }
605
+
606
+ // src/automations-v2-automation-automations-v-2.universal.ts
607
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
608
+ var Domain = /* @__PURE__ */ ((Domain2) => {
609
+ Domain2["USER"] = "USER";
610
+ Domain2["WIX"] = "WIX";
611
+ Domain2["WIX_ACCOUNT"] = "WIX_ACCOUNT";
612
+ return Domain2;
613
+ })(Domain || {});
614
+ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
615
+ TimeUnit2["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
616
+ TimeUnit2["MINUTES"] = "MINUTES";
617
+ TimeUnit2["HOURS"] = "HOURS";
618
+ TimeUnit2["DAYS"] = "DAYS";
619
+ TimeUnit2["WEEKS"] = "WEEKS";
620
+ TimeUnit2["MONTHS"] = "MONTHS";
621
+ return TimeUnit2;
622
+ })(TimeUnit || {});
623
+ var Operator = /* @__PURE__ */ ((Operator2) => {
624
+ Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
625
+ Operator2["OR"] = "OR";
626
+ Operator2["AND"] = "AND";
627
+ return Operator2;
628
+ })(Operator || {});
629
+ var Type = /* @__PURE__ */ ((Type2) => {
630
+ Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
631
+ Type2["APP_DEFINED"] = "APP_DEFINED";
632
+ Type2["CONDITION"] = "CONDITION";
633
+ Type2["DELAY"] = "DELAY";
634
+ Type2["RATE_LIMIT"] = "RATE_LIMIT";
635
+ return Type2;
636
+ })(Type || {});
637
+ var Status = /* @__PURE__ */ ((Status2) => {
638
+ Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
639
+ Status2["ACTIVE"] = "ACTIVE";
640
+ Status2["INACTIVE"] = "INACTIVE";
641
+ return Status2;
642
+ })(Status || {});
643
+ var Origin = /* @__PURE__ */ ((Origin2) => {
644
+ Origin2["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
645
+ Origin2["USER"] = "USER";
646
+ Origin2["APPLICATION"] = "APPLICATION";
647
+ Origin2["PREINSTALLED"] = "PREINSTALLED";
648
+ return Origin2;
649
+ })(Origin || {});
650
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
651
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
652
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
653
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
654
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
655
+ WebhookIdentityType2["APP"] = "APP";
656
+ return WebhookIdentityType2;
657
+ })(WebhookIdentityType || {});
658
+ var Language = /* @__PURE__ */ ((Language2) => {
659
+ Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
660
+ Language2["JAVASCRIPT"] = "JAVASCRIPT";
661
+ return Language2;
662
+ })(Language || {});
663
+ var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
664
+ RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
665
+ RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
666
+ return RequestedFields2;
667
+ })(RequestedFields || {});
668
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
669
+ SortOrder2["ASC"] = "ASC";
670
+ SortOrder2["DESC"] = "DESC";
671
+ return SortOrder2;
672
+ })(SortOrder || {});
673
+ var State = /* @__PURE__ */ ((State2) => {
674
+ State2["UNKNOWN"] = "UNKNOWN";
675
+ State2["ENABLED"] = "ENABLED";
676
+ State2["DISABLED"] = "DISABLED";
677
+ State2["PENDING"] = "PENDING";
678
+ State2["DEMO"] = "DEMO";
679
+ return State2;
680
+ })(State || {});
681
+ var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
682
+ SiteCreatedContext2["OTHER"] = "OTHER";
683
+ SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
684
+ SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
685
+ SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
686
+ SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
687
+ SiteCreatedContext2["FLASH"] = "FLASH";
688
+ return SiteCreatedContext2;
689
+ })(SiteCreatedContext || {});
690
+ var Namespace = /* @__PURE__ */ ((Namespace2) => {
691
+ Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
692
+ Namespace2["WIX"] = "WIX";
693
+ Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
694
+ Namespace2["ALBUMS"] = "ALBUMS";
695
+ Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
696
+ Namespace2["HOTELS"] = "HOTELS";
697
+ Namespace2["CLUBS"] = "CLUBS";
698
+ Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
699
+ Namespace2["DEV_SITE"] = "DEV_SITE";
700
+ Namespace2["LOGOS"] = "LOGOS";
701
+ Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
702
+ Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
703
+ Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
704
+ Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
705
+ Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
706
+ Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
707
+ Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
708
+ Namespace2["ANYWHERE"] = "ANYWHERE";
709
+ Namespace2["HEADLESS"] = "HEADLESS";
710
+ Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
711
+ Namespace2["RISE"] = "RISE";
712
+ Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
713
+ Namespace2["NOWNIA"] = "NOWNIA";
714
+ Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
715
+ Namespace2["CODUX"] = "CODUX";
716
+ Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
717
+ Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
718
+ Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
719
+ Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
720
+ Namespace2["MIMIR"] = "MIMIR";
721
+ return Namespace2;
722
+ })(Namespace || {});
723
+ var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
724
+ DeleteStatus2["UNKNOWN"] = "UNKNOWN";
725
+ DeleteStatus2["TRASH"] = "TRASH";
726
+ DeleteStatus2["DELETED"] = "DELETED";
727
+ DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
728
+ DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
729
+ return DeleteStatus2;
730
+ })(DeleteStatus || {});
731
+ var TriggerValidationErrorValidationErrorType = /* @__PURE__ */ ((TriggerValidationErrorValidationErrorType2) => {
732
+ TriggerValidationErrorValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
733
+ TriggerValidationErrorValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
734
+ TriggerValidationErrorValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
735
+ return TriggerValidationErrorValidationErrorType2;
736
+ })(TriggerValidationErrorValidationErrorType || {});
737
+ var TriggerErrorType = /* @__PURE__ */ ((TriggerErrorType2) => {
738
+ TriggerErrorType2["UNKNOWN_TRIGGER_ERROR_TYPE"] = "UNKNOWN_TRIGGER_ERROR_TYPE";
739
+ TriggerErrorType2["NOT_FOUND"] = "NOT_FOUND";
740
+ TriggerErrorType2["APP_NOT_INSTALLED"] = "APP_NOT_INSTALLED";
741
+ TriggerErrorType2["MODERATION_MISMATCH"] = "MODERATION_MISMATCH";
742
+ TriggerErrorType2["DEPRECATED"] = "DEPRECATED";
743
+ TriggerErrorType2["INVALID_TRIGGER_KEY"] = "INVALID_TRIGGER_KEY";
744
+ TriggerErrorType2["INVALID_FILTER_FIELD_KEY"] = "INVALID_FILTER_FIELD_KEY";
745
+ TriggerErrorType2["INVALID_FILTER_EXPRESSION"] = "INVALID_FILTER_EXPRESSION";
746
+ return TriggerErrorType2;
747
+ })(TriggerErrorType || {});
748
+ var ValidationErrorSeverity = /* @__PURE__ */ ((ValidationErrorSeverity2) => {
749
+ ValidationErrorSeverity2["UNKNOWN_VALIDATION_ERROR_SEVERITY"] = "UNKNOWN_VALIDATION_ERROR_SEVERITY";
750
+ ValidationErrorSeverity2["WARNING"] = "WARNING";
751
+ ValidationErrorSeverity2["ERROR"] = "ERROR";
752
+ return ValidationErrorSeverity2;
753
+ })(ValidationErrorSeverity || {});
754
+ var ValidationErrorType = /* @__PURE__ */ ((ValidationErrorType2) => {
755
+ ValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
756
+ ValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
757
+ ValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
758
+ return ValidationErrorType2;
759
+ })(ValidationErrorType || {});
760
+ var ActionErrorType = /* @__PURE__ */ ((ActionErrorType2) => {
761
+ ActionErrorType2["UNKNOWN_ACTION_ERROR_TYPE"] = "UNKNOWN_ACTION_ERROR_TYPE";
762
+ ActionErrorType2["NOT_FOUND"] = "NOT_FOUND";
763
+ ActionErrorType2["APP_NOT_INSTALLED"] = "APP_NOT_INSTALLED";
764
+ ActionErrorType2["MODERATION_MISMATCH"] = "MODERATION_MISMATCH";
765
+ ActionErrorType2["DEPRECATED"] = "DEPRECATED";
766
+ ActionErrorType2["INVALID_ACTION_KEY"] = "INVALID_ACTION_KEY";
767
+ ActionErrorType2["INVALID_MAPPING"] = "INVALID_MAPPING";
768
+ ActionErrorType2["MAPPING_TYPE_MISMATCH"] = "MAPPING_TYPE_MISMATCH";
769
+ ActionErrorType2["MAPPING_MISSING_REQUIRED_FIELD"] = "MAPPING_MISSING_REQUIRED_FIELD";
770
+ ActionErrorType2["MAPPING_SCHEMA_MISMATCH"] = "MAPPING_SCHEMA_MISMATCH";
771
+ ActionErrorType2["MAPPING_VARIABLE_MISSING_FROM_SCHEMA"] = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA";
772
+ ActionErrorType2["SAMPLE_CODE_RUN_FAILED"] = "SAMPLE_CODE_RUN_FAILED";
773
+ return ActionErrorType2;
774
+ })(ActionErrorType || {});
775
+ var AutomationValidationErrorValidationErrorType = /* @__PURE__ */ ((AutomationValidationErrorValidationErrorType2) => {
776
+ AutomationValidationErrorValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
777
+ AutomationValidationErrorValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
778
+ AutomationValidationErrorValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
779
+ return AutomationValidationErrorValidationErrorType2;
780
+ })(AutomationValidationErrorValidationErrorType || {});
781
+ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
782
+ AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
783
+ return AutomationErrorType2;
784
+ })(AutomationErrorType || {});
785
+ async function createAutomation2(automation) {
786
+ const { httpClient, sideEffects } = arguments[1];
787
+ const payload = renameKeysFromSDKRequestToRESTRequest({
788
+ automation
789
+ });
790
+ const reqOpts = createAutomation(payload);
791
+ sideEffects?.onSiteCall?.();
792
+ try {
793
+ const result = await httpClient.request(reqOpts);
794
+ sideEffects?.onSuccess?.(result);
795
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation;
796
+ } catch (err) {
797
+ const transformedError = sdkTransformError(
798
+ err,
799
+ {
800
+ spreadPathsToArguments: {},
801
+ explicitPathsToArguments: { automation: "$[0]" },
802
+ singleArgumentUnchanged: false
803
+ },
804
+ ["automation"]
805
+ );
806
+ sideEffects?.onError?.(err);
807
+ throw transformedError;
808
+ }
809
+ }
810
+ async function getAutomation2(automationId) {
811
+ const { httpClient, sideEffects } = arguments[1];
812
+ const payload = renameKeysFromSDKRequestToRESTRequest({
813
+ automationId
814
+ });
815
+ const reqOpts = getAutomation(payload);
816
+ sideEffects?.onSiteCall?.();
817
+ try {
818
+ const result = await httpClient.request(reqOpts);
819
+ sideEffects?.onSuccess?.(result);
820
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation;
821
+ } catch (err) {
822
+ const transformedError = sdkTransformError(
823
+ err,
824
+ {
825
+ spreadPathsToArguments: {},
826
+ explicitPathsToArguments: { automationId: "$[0]" },
827
+ singleArgumentUnchanged: false
828
+ },
829
+ ["automationId"]
830
+ );
831
+ sideEffects?.onError?.(err);
832
+ throw transformedError;
833
+ }
834
+ }
835
+ async function updateAutomation2(_id, automation) {
836
+ const { httpClient, sideEffects } = arguments[2];
837
+ const payload = renameKeysFromSDKRequestToRESTRequest({
838
+ automation: { ...automation, id: _id }
839
+ });
840
+ const reqOpts = updateAutomation(payload);
841
+ sideEffects?.onSiteCall?.();
842
+ try {
843
+ const result = await httpClient.request(reqOpts);
844
+ sideEffects?.onSuccess?.(result);
845
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.automation;
846
+ } catch (err) {
847
+ const transformedError = sdkTransformError(
848
+ err,
849
+ {
850
+ spreadPathsToArguments: { automation: "$[1]" },
851
+ explicitPathsToArguments: { "automation.id": "$[0]" },
852
+ singleArgumentUnchanged: false
853
+ },
854
+ ["_id", "automation"]
855
+ );
856
+ sideEffects?.onError?.(err);
857
+ throw transformedError;
858
+ }
859
+ }
860
+ async function deleteAutomation2(automationId) {
861
+ const { httpClient, sideEffects } = arguments[1];
862
+ const payload = renameKeysFromSDKRequestToRESTRequest({
863
+ automationId
864
+ });
865
+ const reqOpts = deleteAutomation(payload);
866
+ sideEffects?.onSiteCall?.();
867
+ try {
868
+ const result = await httpClient.request(reqOpts);
869
+ sideEffects?.onSuccess?.(result);
870
+ } catch (err) {
871
+ const transformedError = sdkTransformError(
872
+ err,
873
+ {
874
+ spreadPathsToArguments: {},
875
+ explicitPathsToArguments: { automationId: "$[0]" },
876
+ singleArgumentUnchanged: false
877
+ },
878
+ ["automationId"]
879
+ );
880
+ sideEffects?.onError?.(err);
881
+ throw transformedError;
882
+ }
883
+ }
884
+ async function bulkDeleteAutomations2(automationIds) {
885
+ const { httpClient, sideEffects } = arguments[1];
886
+ const payload = renameKeysFromSDKRequestToRESTRequest({
887
+ automationIds
888
+ });
889
+ const reqOpts = bulkDeleteAutomations(payload);
890
+ sideEffects?.onSiteCall?.();
891
+ try {
892
+ const result = await httpClient.request(reqOpts);
893
+ sideEffects?.onSuccess?.(result);
894
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
895
+ } catch (err) {
896
+ const transformedError = sdkTransformError(
897
+ err,
898
+ {
899
+ spreadPathsToArguments: {},
900
+ explicitPathsToArguments: { automationIds: "$[0]" },
901
+ singleArgumentUnchanged: false
902
+ },
903
+ ["automationIds"]
904
+ );
905
+ sideEffects?.onError?.(err);
906
+ throw transformedError;
907
+ }
908
+ }
909
+ async function generatePreinstalledAutomation2(automation, options) {
910
+ const { httpClient, sideEffects } = arguments[2];
911
+ const payload = renameKeysFromSDKRequestToRESTRequest({
912
+ automation,
913
+ appId: options?.appId
914
+ });
915
+ const reqOpts = generatePreinstalledAutomation(
916
+ payload
917
+ );
918
+ sideEffects?.onSiteCall?.();
919
+ try {
920
+ const result = await httpClient.request(reqOpts);
921
+ sideEffects?.onSuccess?.(result);
922
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
923
+ } catch (err) {
924
+ const transformedError = sdkTransformError(
925
+ err,
926
+ {
927
+ spreadPathsToArguments: {},
928
+ explicitPathsToArguments: { automation: "$[0]", appId: "$[1].appId" },
929
+ singleArgumentUnchanged: false
930
+ },
931
+ ["automation", "options"]
932
+ );
933
+ sideEffects?.onError?.(err);
934
+ throw transformedError;
935
+ }
936
+ }
937
+ function queryAutomations2(options) {
938
+ const { httpClient, sideEffects } = arguments[1];
939
+ return queryBuilder({
940
+ func: async (payload) => {
941
+ const reqOpts = queryAutomations({
942
+ ...payload,
943
+ ...options ?? {}
944
+ });
945
+ sideEffects?.onSiteCall?.();
946
+ try {
947
+ const result = await httpClient.request(reqOpts);
948
+ sideEffects?.onSuccess?.(result);
949
+ return result;
950
+ } catch (err) {
951
+ sideEffects?.onError?.(err);
952
+ throw err;
953
+ }
954
+ },
955
+ requestTransformer: (query) => {
956
+ const args = [query, options];
957
+ return renameKeysFromSDKRequestToRESTRequest({
958
+ ...args?.[1],
959
+ query: args?.[0]
960
+ });
961
+ },
962
+ responseTransformer: ({ data }) => {
963
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
964
+ transformPaths2(data, [])
965
+ );
966
+ return {
967
+ items: transformedData?.automations,
968
+ pagingMetadata: transformedData?.pagingMetadata
969
+ };
970
+ },
971
+ errorTransformer: (err) => {
972
+ const transformedError = sdkTransformError(err, {
973
+ spreadPathsToArguments: {},
974
+ explicitPathsToArguments: { query: "$[0]" },
975
+ singleArgumentUnchanged: false
976
+ });
977
+ throw transformedError;
978
+ },
979
+ pagingMethod: "CURSOR",
980
+ transformationPaths: {}
981
+ });
982
+ }
983
+ async function copyAutomation2(automationId, options) {
984
+ const { httpClient, sideEffects } = arguments[2];
985
+ const payload = renameKeysFromSDKRequestToRESTRequest({
986
+ automationId,
987
+ origin: options?.origin,
988
+ automation: options?.automation
989
+ });
990
+ const reqOpts = copyAutomation(payload);
991
+ sideEffects?.onSiteCall?.();
992
+ try {
993
+ const result = await httpClient.request(reqOpts);
994
+ sideEffects?.onSuccess?.(result);
995
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
996
+ } catch (err) {
997
+ const transformedError = sdkTransformError(
998
+ err,
999
+ {
1000
+ spreadPathsToArguments: {},
1001
+ explicitPathsToArguments: {
1002
+ automationId: "$[0]",
1003
+ origin: "$[1].origin",
1004
+ automation: "$[1].automation"
1005
+ },
1006
+ singleArgumentUnchanged: false
1007
+ },
1008
+ ["automationId", "options"]
1009
+ );
1010
+ sideEffects?.onError?.(err);
1011
+ throw transformedError;
1012
+ }
1013
+ }
1014
+ async function createDraftAutomation2(options) {
1015
+ const { httpClient, sideEffects } = arguments[1];
1016
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1017
+ automation: options?.automation
1018
+ });
1019
+ const reqOpts = createDraftAutomation(payload);
1020
+ sideEffects?.onSiteCall?.();
1021
+ try {
1022
+ const result = await httpClient.request(reqOpts);
1023
+ sideEffects?.onSuccess?.(result);
1024
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1025
+ } catch (err) {
1026
+ const transformedError = sdkTransformError(
1027
+ err,
1028
+ {
1029
+ spreadPathsToArguments: {},
1030
+ explicitPathsToArguments: { automation: "$[0].automation" },
1031
+ singleArgumentUnchanged: false
1032
+ },
1033
+ ["options"]
1034
+ );
1035
+ sideEffects?.onError?.(err);
1036
+ throw transformedError;
1037
+ }
1038
+ }
1039
+ async function getOrCreateDraftAutomation2(originalAutomationId) {
1040
+ const { httpClient, sideEffects } = arguments[1];
1041
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1042
+ originalAutomationId
1043
+ });
1044
+ const reqOpts = getOrCreateDraftAutomation(payload);
1045
+ sideEffects?.onSiteCall?.();
1046
+ try {
1047
+ const result = await httpClient.request(reqOpts);
1048
+ sideEffects?.onSuccess?.(result);
1049
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1050
+ } catch (err) {
1051
+ const transformedError = sdkTransformError(
1052
+ err,
1053
+ {
1054
+ spreadPathsToArguments: {},
1055
+ explicitPathsToArguments: { originalAutomationId: "$[0]" },
1056
+ singleArgumentUnchanged: false
1057
+ },
1058
+ ["originalAutomationId"]
1059
+ );
1060
+ sideEffects?.onError?.(err);
1061
+ throw transformedError;
1062
+ }
1063
+ }
1064
+ async function updateDraftAutomation2(_id, automation) {
1065
+ const { httpClient, sideEffects } = arguments[2];
1066
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1067
+ automation: { ...automation, id: _id }
1068
+ });
1069
+ const reqOpts = updateDraftAutomation(payload);
1070
+ sideEffects?.onSiteCall?.();
1071
+ try {
1072
+ const result = await httpClient.request(reqOpts);
1073
+ sideEffects?.onSuccess?.(result);
1074
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1075
+ } catch (err) {
1076
+ const transformedError = sdkTransformError(
1077
+ err,
1078
+ {
1079
+ spreadPathsToArguments: { automation: "$[1]" },
1080
+ explicitPathsToArguments: { "automation.id": "$[0]" },
1081
+ singleArgumentUnchanged: false
1082
+ },
1083
+ ["_id", "automation"]
1084
+ );
1085
+ sideEffects?.onError?.(err);
1086
+ throw transformedError;
1087
+ }
1088
+ }
1089
+ async function queryAutomationsWithDrafts2(options) {
1090
+ const { httpClient, sideEffects } = arguments[1];
1091
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1092
+ query: options?.query
1093
+ });
1094
+ const reqOpts = queryAutomationsWithDrafts(payload);
1095
+ sideEffects?.onSiteCall?.();
1096
+ try {
1097
+ const result = await httpClient.request(reqOpts);
1098
+ sideEffects?.onSuccess?.(result);
1099
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1100
+ } catch (err) {
1101
+ const transformedError = sdkTransformError(
1102
+ err,
1103
+ {
1104
+ spreadPathsToArguments: {},
1105
+ explicitPathsToArguments: { query: "$[0].query" },
1106
+ singleArgumentUnchanged: false
1107
+ },
1108
+ ["options"]
1109
+ );
1110
+ sideEffects?.onError?.(err);
1111
+ throw transformedError;
1112
+ }
1113
+ }
1114
+ async function deleteDraftAutomation2(automationId) {
1115
+ const { httpClient, sideEffects } = arguments[1];
1116
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1117
+ automationId
1118
+ });
1119
+ const reqOpts = deleteDraftAutomation(payload);
1120
+ sideEffects?.onSiteCall?.();
1121
+ try {
1122
+ const result = await httpClient.request(reqOpts);
1123
+ sideEffects?.onSuccess?.(result);
1124
+ } catch (err) {
1125
+ const transformedError = sdkTransformError(
1126
+ err,
1127
+ {
1128
+ spreadPathsToArguments: {},
1129
+ explicitPathsToArguments: { automationId: "$[0]" },
1130
+ singleArgumentUnchanged: false
1131
+ },
1132
+ ["automationId"]
1133
+ );
1134
+ sideEffects?.onError?.(err);
1135
+ throw transformedError;
1136
+ }
1137
+ }
1138
+ async function publishDraftAutomation2(automationId) {
1139
+ const { httpClient, sideEffects } = arguments[1];
1140
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1141
+ automationId
1142
+ });
1143
+ const reqOpts = publishDraftAutomation(payload);
1144
+ sideEffects?.onSiteCall?.();
1145
+ try {
1146
+ const result = await httpClient.request(reqOpts);
1147
+ sideEffects?.onSuccess?.(result);
1148
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1149
+ } catch (err) {
1150
+ const transformedError = sdkTransformError(
1151
+ err,
1152
+ {
1153
+ spreadPathsToArguments: {},
1154
+ explicitPathsToArguments: { automationId: "$[0]" },
1155
+ singleArgumentUnchanged: false
1156
+ },
1157
+ ["automationId"]
1158
+ );
1159
+ sideEffects?.onError?.(err);
1160
+ throw transformedError;
1161
+ }
1162
+ }
1163
+ async function validateAutomation2(automation, options) {
1164
+ const { httpClient, sideEffects } = arguments[2];
1165
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1166
+ automation,
1167
+ validationSettings: options?.validationSettings
1168
+ });
1169
+ const reqOpts = validateAutomation(payload);
1170
+ sideEffects?.onSiteCall?.();
1171
+ try {
1172
+ const result = await httpClient.request(reqOpts);
1173
+ sideEffects?.onSuccess?.(result);
1174
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1175
+ } catch (err) {
1176
+ const transformedError = sdkTransformError(
1177
+ err,
1178
+ {
1179
+ spreadPathsToArguments: {},
1180
+ explicitPathsToArguments: {
1181
+ automation: "$[0]",
1182
+ validationSettings: "$[1].validationSettings"
1183
+ },
1184
+ singleArgumentUnchanged: false
1185
+ },
1186
+ ["automation", "options"]
1187
+ );
1188
+ sideEffects?.onError?.(err);
1189
+ throw transformedError;
1190
+ }
1191
+ }
1192
+ async function validateAutomationById2(automationId, options) {
1193
+ const { httpClient, sideEffects } = arguments[2];
1194
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1195
+ automationId,
1196
+ validationSettings: options?.validationSettings
1197
+ });
1198
+ const reqOpts = validateAutomationById(payload);
1199
+ sideEffects?.onSiteCall?.();
1200
+ try {
1201
+ const result = await httpClient.request(reqOpts);
1202
+ sideEffects?.onSuccess?.(result);
1203
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1204
+ } catch (err) {
1205
+ const transformedError = sdkTransformError(
1206
+ err,
1207
+ {
1208
+ spreadPathsToArguments: {},
1209
+ explicitPathsToArguments: {
1210
+ automationId: "$[0]",
1211
+ validationSettings: "$[1].validationSettings"
1212
+ },
1213
+ singleArgumentUnchanged: false
1214
+ },
1215
+ ["automationId", "options"]
1216
+ );
1217
+ sideEffects?.onError?.(err);
1218
+ throw transformedError;
1219
+ }
1220
+ }
1221
+ async function getAutomationRevision2(automationId, options) {
1222
+ const { httpClient, sideEffects } = arguments[2];
1223
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1224
+ automationId,
1225
+ revision: options?.revision,
1226
+ fields: options?.fields
1227
+ });
1228
+ const reqOpts = getAutomationRevision(payload);
1229
+ sideEffects?.onSiteCall?.();
1230
+ try {
1231
+ const result = await httpClient.request(reqOpts);
1232
+ sideEffects?.onSuccess?.(result);
1233
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1234
+ } catch (err) {
1235
+ const transformedError = sdkTransformError(
1236
+ err,
1237
+ {
1238
+ spreadPathsToArguments: {},
1239
+ explicitPathsToArguments: {
1240
+ automationId: "$[0]",
1241
+ revision: "$[1].revision",
1242
+ fields: "$[1].fields"
1243
+ },
1244
+ singleArgumentUnchanged: false
1245
+ },
1246
+ ["automationId", "options"]
1247
+ );
1248
+ sideEffects?.onError?.(err);
1249
+ throw transformedError;
1250
+ }
1251
+ }
1252
+
1253
+ // src/automations-v2-automation-automations-v-2.public.ts
1254
+ function createAutomation3(httpClient) {
1255
+ return (automation) => createAutomation2(
1256
+ automation,
1257
+ // @ts-ignore
1258
+ { httpClient }
1259
+ );
1260
+ }
1261
+ function getAutomation3(httpClient) {
1262
+ return (automationId) => getAutomation2(
1263
+ automationId,
1264
+ // @ts-ignore
1265
+ { httpClient }
1266
+ );
1267
+ }
1268
+ function updateAutomation3(httpClient) {
1269
+ return (_id, automation) => updateAutomation2(
1270
+ _id,
1271
+ automation,
1272
+ // @ts-ignore
1273
+ { httpClient }
1274
+ );
1275
+ }
1276
+ function deleteAutomation3(httpClient) {
1277
+ return (automationId) => deleteAutomation2(
1278
+ automationId,
1279
+ // @ts-ignore
1280
+ { httpClient }
1281
+ );
1282
+ }
1283
+ function bulkDeleteAutomations3(httpClient) {
1284
+ return (automationIds) => bulkDeleteAutomations2(
1285
+ automationIds,
1286
+ // @ts-ignore
1287
+ { httpClient }
1288
+ );
1289
+ }
1290
+ function generatePreinstalledAutomation3(httpClient) {
1291
+ return (automation, options) => generatePreinstalledAutomation2(
1292
+ automation,
1293
+ options,
1294
+ // @ts-ignore
1295
+ { httpClient }
1296
+ );
1297
+ }
1298
+ function queryAutomations3(httpClient) {
1299
+ return (options) => queryAutomations2(
1300
+ options,
1301
+ // @ts-ignore
1302
+ { httpClient }
1303
+ );
1304
+ }
1305
+ function copyAutomation3(httpClient) {
1306
+ return (automationId, options) => copyAutomation2(
1307
+ automationId,
1308
+ options,
1309
+ // @ts-ignore
1310
+ { httpClient }
1311
+ );
1312
+ }
1313
+ function createDraftAutomation3(httpClient) {
1314
+ return (options) => createDraftAutomation2(
1315
+ options,
1316
+ // @ts-ignore
1317
+ { httpClient }
1318
+ );
1319
+ }
1320
+ function getOrCreateDraftAutomation3(httpClient) {
1321
+ return (originalAutomationId) => getOrCreateDraftAutomation2(
1322
+ originalAutomationId,
1323
+ // @ts-ignore
1324
+ { httpClient }
1325
+ );
1326
+ }
1327
+ function updateDraftAutomation3(httpClient) {
1328
+ return (_id, automation) => updateDraftAutomation2(
1329
+ _id,
1330
+ automation,
1331
+ // @ts-ignore
1332
+ { httpClient }
1333
+ );
1334
+ }
1335
+ function queryAutomationsWithDrafts3(httpClient) {
1336
+ return (options) => queryAutomationsWithDrafts2(
1337
+ options,
1338
+ // @ts-ignore
1339
+ { httpClient }
1340
+ );
1341
+ }
1342
+ function deleteDraftAutomation3(httpClient) {
1343
+ return (automationId) => deleteDraftAutomation2(
1344
+ automationId,
1345
+ // @ts-ignore
1346
+ { httpClient }
1347
+ );
1348
+ }
1349
+ function publishDraftAutomation3(httpClient) {
1350
+ return (automationId) => publishDraftAutomation2(
1351
+ automationId,
1352
+ // @ts-ignore
1353
+ { httpClient }
1354
+ );
1355
+ }
1356
+ function validateAutomation3(httpClient) {
1357
+ return (automation, options) => validateAutomation2(
1358
+ automation,
1359
+ options,
1360
+ // @ts-ignore
1361
+ { httpClient }
1362
+ );
1363
+ }
1364
+ function validateAutomationById3(httpClient) {
1365
+ return (automationId, options) => validateAutomationById2(
1366
+ automationId,
1367
+ options,
1368
+ // @ts-ignore
1369
+ { httpClient }
1370
+ );
1371
+ }
1372
+ function getAutomationRevision3(httpClient) {
1373
+ return (automationId, options) => getAutomationRevision2(
1374
+ automationId,
1375
+ options,
1376
+ // @ts-ignore
1377
+ { httpClient }
1378
+ );
1379
+ }
1380
+ var onAutomationCreated = EventDefinition(
1381
+ "wix.automations.v2.automation_created",
1382
+ true,
1383
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
1384
+ transformPaths3(event, [
1385
+ {
1386
+ transformFn: transformRESTTimestampToSDKTimestamp2,
1387
+ paths: [
1388
+ { path: "entity.createdDate" },
1389
+ { path: "entity.updatedDate" },
1390
+ { path: "entity.draftUpdatedDate" },
1391
+ { path: "metadata.eventTime" }
1392
+ ]
1393
+ }
1394
+ ])
1395
+ )
1396
+ )();
1397
+ var onAutomationDeleted = EventDefinition(
1398
+ "wix.automations.v2.automation_deleted",
1399
+ true,
1400
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
1401
+ transformPaths3(event, [
1402
+ {
1403
+ transformFn: transformRESTTimestampToSDKTimestamp2,
1404
+ paths: [
1405
+ { path: "entity.createdDate" },
1406
+ { path: "entity.updatedDate" },
1407
+ { path: "entity.draftUpdatedDate" },
1408
+ { path: "metadata.eventTime" }
1409
+ ]
1410
+ }
1411
+ ])
1412
+ )
1413
+ )();
1414
+ var onAutomationUpdated = EventDefinition(
1415
+ "wix.automations.v2.automation_updated",
1416
+ true,
1417
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
1418
+ transformPaths3(event, [
1419
+ {
1420
+ transformFn: transformRESTTimestampToSDKTimestamp2,
1421
+ paths: [
1422
+ { path: "entity.createdDate" },
1423
+ { path: "entity.updatedDate" },
1424
+ { path: "entity.draftUpdatedDate" },
1425
+ { path: "metadata.eventTime" }
1426
+ ]
1427
+ }
1428
+ ])
1429
+ )
1430
+ )();
1431
+
1432
+ // src/automations-v2-automation-automations-v-2.context.ts
1433
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1434
+ import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1435
+ var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
1436
+ var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
1437
+ var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
1438
+ var deleteAutomation4 = /* @__PURE__ */ createRESTModule(deleteAutomation3);
1439
+ var bulkDeleteAutomations4 = /* @__PURE__ */ createRESTModule(bulkDeleteAutomations3);
1440
+ var generatePreinstalledAutomation4 = /* @__PURE__ */ createRESTModule(generatePreinstalledAutomation3);
1441
+ var queryAutomations4 = /* @__PURE__ */ createRESTModule(queryAutomations3);
1442
+ var copyAutomation4 = /* @__PURE__ */ createRESTModule(copyAutomation3);
1443
+ var createDraftAutomation4 = /* @__PURE__ */ createRESTModule(createDraftAutomation3);
1444
+ var getOrCreateDraftAutomation4 = /* @__PURE__ */ createRESTModule(getOrCreateDraftAutomation3);
1445
+ var updateDraftAutomation4 = /* @__PURE__ */ createRESTModule(updateDraftAutomation3);
1446
+ var queryAutomationsWithDrafts4 = /* @__PURE__ */ createRESTModule(queryAutomationsWithDrafts3);
1447
+ var deleteDraftAutomation4 = /* @__PURE__ */ createRESTModule(deleteDraftAutomation3);
1448
+ var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutomation3);
1449
+ var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
1450
+ var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
1451
+ var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
1452
+ var onAutomationCreated2 = createEventModule(onAutomationCreated);
1453
+ var onAutomationDeleted2 = createEventModule(onAutomationDeleted);
1454
+ var onAutomationUpdated2 = createEventModule(onAutomationUpdated);
1455
+ export {
1456
+ ActionErrorType,
1457
+ AutomationErrorType,
1458
+ AutomationValidationErrorValidationErrorType,
1459
+ DeleteStatus,
1460
+ Domain,
1461
+ Language,
1462
+ Namespace,
1463
+ Operator,
1464
+ Origin,
1465
+ RequestedFields,
1466
+ SiteCreatedContext,
1467
+ SortOrder,
1468
+ State,
1469
+ Status,
1470
+ TimeUnit,
1471
+ TriggerErrorType,
1472
+ TriggerValidationErrorValidationErrorType,
1473
+ Type,
1474
+ ValidationErrorSeverity,
1475
+ ValidationErrorType,
1476
+ WebhookIdentityType,
1477
+ bulkDeleteAutomations4 as bulkDeleteAutomations,
1478
+ copyAutomation4 as copyAutomation,
1479
+ createAutomation4 as createAutomation,
1480
+ createDraftAutomation4 as createDraftAutomation,
1481
+ deleteAutomation4 as deleteAutomation,
1482
+ deleteDraftAutomation4 as deleteDraftAutomation,
1483
+ generatePreinstalledAutomation4 as generatePreinstalledAutomation,
1484
+ getAutomation4 as getAutomation,
1485
+ getAutomationRevision4 as getAutomationRevision,
1486
+ getOrCreateDraftAutomation4 as getOrCreateDraftAutomation,
1487
+ onAutomationCreated2 as onAutomationCreated,
1488
+ onAutomationDeleted2 as onAutomationDeleted,
1489
+ onAutomationUpdated2 as onAutomationUpdated,
1490
+ publishDraftAutomation4 as publishDraftAutomation,
1491
+ queryAutomations4 as queryAutomations,
1492
+ queryAutomationsWithDrafts4 as queryAutomationsWithDrafts,
1493
+ updateAutomation4 as updateAutomation,
1494
+ updateDraftAutomation4 as updateDraftAutomation,
1495
+ validateAutomation4 as validateAutomation,
1496
+ validateAutomationById4 as validateAutomationById
1497
+ };
1498
+ //# sourceMappingURL=index.mjs.map