@wix/auto_sdk_automations_automations-v-2 1.0.4 → 1.0.6

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