@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.
- 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
- 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
- package/build/index.d.mts +202 -0
- package/build/index.d.ts +202 -0
- package/build/index.js +1562 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1498 -0
- package/build/index.mjs.map +1 -0
- 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
- 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
- package/build/internal/index.d.mts +202 -0
- package/build/internal/index.d.ts +202 -0
- package/build/internal/index.js +1562 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1498 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +1167 -0
- package/build/internal/meta.d.ts +1167 -0
- package/build/internal/meta.js +963 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +920 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +1167 -0
- package/build/meta.d.ts +1167 -0
- package/build/meta.js +963 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +920 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
- package/build/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
- package/build/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
- package/build/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
- package/build/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
- package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
- package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
- package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
- package/build/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
- package/build/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
- package/build/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
- package/build/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
- package/build/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
- package/build/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
- package/build/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
- package/build/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
- package/build/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
- package/build/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
- package/build/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
- package/build/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
- package/build/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
- package/build/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
- package/build/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
- package/build/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
- package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
- package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
- package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
- package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
- package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
package/build/index.js
ADDED
|
@@ -0,0 +1,1562 @@
|
|
|
1
|
+
"use strict";
|
|
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 });
|
|
9
|
+
};
|
|
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(options) {
|
|
1001
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1002
|
+
return (0, import_query_builder.queryBuilder)({
|
|
1003
|
+
func: async (payload) => {
|
|
1004
|
+
const reqOpts = queryAutomations({
|
|
1005
|
+
...payload,
|
|
1006
|
+
...options ?? {}
|
|
1007
|
+
});
|
|
1008
|
+
sideEffects?.onSiteCall?.();
|
|
1009
|
+
try {
|
|
1010
|
+
const result = await httpClient.request(reqOpts);
|
|
1011
|
+
sideEffects?.onSuccess?.(result);
|
|
1012
|
+
return result;
|
|
1013
|
+
} catch (err) {
|
|
1014
|
+
sideEffects?.onError?.(err);
|
|
1015
|
+
throw err;
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
requestTransformer: (query) => {
|
|
1019
|
+
const args = [query, options];
|
|
1020
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1021
|
+
...args?.[1],
|
|
1022
|
+
query: args?.[0]
|
|
1023
|
+
});
|
|
1024
|
+
},
|
|
1025
|
+
responseTransformer: ({ data }) => {
|
|
1026
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1027
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
1028
|
+
);
|
|
1029
|
+
return {
|
|
1030
|
+
items: transformedData?.automations,
|
|
1031
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
1032
|
+
};
|
|
1033
|
+
},
|
|
1034
|
+
errorTransformer: (err) => {
|
|
1035
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
1036
|
+
spreadPathsToArguments: {},
|
|
1037
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1038
|
+
singleArgumentUnchanged: false
|
|
1039
|
+
});
|
|
1040
|
+
throw transformedError;
|
|
1041
|
+
},
|
|
1042
|
+
pagingMethod: "CURSOR",
|
|
1043
|
+
transformationPaths: {}
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
async function copyAutomation2(automationId, options) {
|
|
1047
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1048
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1049
|
+
automationId,
|
|
1050
|
+
origin: options?.origin,
|
|
1051
|
+
automation: options?.automation
|
|
1052
|
+
});
|
|
1053
|
+
const reqOpts = copyAutomation(payload);
|
|
1054
|
+
sideEffects?.onSiteCall?.();
|
|
1055
|
+
try {
|
|
1056
|
+
const result = await httpClient.request(reqOpts);
|
|
1057
|
+
sideEffects?.onSuccess?.(result);
|
|
1058
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1059
|
+
} catch (err) {
|
|
1060
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1061
|
+
err,
|
|
1062
|
+
{
|
|
1063
|
+
spreadPathsToArguments: {},
|
|
1064
|
+
explicitPathsToArguments: {
|
|
1065
|
+
automationId: "$[0]",
|
|
1066
|
+
origin: "$[1].origin",
|
|
1067
|
+
automation: "$[1].automation"
|
|
1068
|
+
},
|
|
1069
|
+
singleArgumentUnchanged: false
|
|
1070
|
+
},
|
|
1071
|
+
["automationId", "options"]
|
|
1072
|
+
);
|
|
1073
|
+
sideEffects?.onError?.(err);
|
|
1074
|
+
throw transformedError;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
async function createDraftAutomation2(options) {
|
|
1078
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1079
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1080
|
+
automation: options?.automation
|
|
1081
|
+
});
|
|
1082
|
+
const reqOpts = createDraftAutomation(payload);
|
|
1083
|
+
sideEffects?.onSiteCall?.();
|
|
1084
|
+
try {
|
|
1085
|
+
const result = await httpClient.request(reqOpts);
|
|
1086
|
+
sideEffects?.onSuccess?.(result);
|
|
1087
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1088
|
+
} catch (err) {
|
|
1089
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1090
|
+
err,
|
|
1091
|
+
{
|
|
1092
|
+
spreadPathsToArguments: {},
|
|
1093
|
+
explicitPathsToArguments: { automation: "$[0].automation" },
|
|
1094
|
+
singleArgumentUnchanged: false
|
|
1095
|
+
},
|
|
1096
|
+
["options"]
|
|
1097
|
+
);
|
|
1098
|
+
sideEffects?.onError?.(err);
|
|
1099
|
+
throw transformedError;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
async function getOrCreateDraftAutomation2(originalAutomationId) {
|
|
1103
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1104
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1105
|
+
originalAutomationId
|
|
1106
|
+
});
|
|
1107
|
+
const reqOpts = getOrCreateDraftAutomation(payload);
|
|
1108
|
+
sideEffects?.onSiteCall?.();
|
|
1109
|
+
try {
|
|
1110
|
+
const result = await httpClient.request(reqOpts);
|
|
1111
|
+
sideEffects?.onSuccess?.(result);
|
|
1112
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1113
|
+
} catch (err) {
|
|
1114
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1115
|
+
err,
|
|
1116
|
+
{
|
|
1117
|
+
spreadPathsToArguments: {},
|
|
1118
|
+
explicitPathsToArguments: { originalAutomationId: "$[0]" },
|
|
1119
|
+
singleArgumentUnchanged: false
|
|
1120
|
+
},
|
|
1121
|
+
["originalAutomationId"]
|
|
1122
|
+
);
|
|
1123
|
+
sideEffects?.onError?.(err);
|
|
1124
|
+
throw transformedError;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
async function updateDraftAutomation2(_id, automation) {
|
|
1128
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1129
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1130
|
+
automation: { ...automation, id: _id }
|
|
1131
|
+
});
|
|
1132
|
+
const reqOpts = updateDraftAutomation(payload);
|
|
1133
|
+
sideEffects?.onSiteCall?.();
|
|
1134
|
+
try {
|
|
1135
|
+
const result = await httpClient.request(reqOpts);
|
|
1136
|
+
sideEffects?.onSuccess?.(result);
|
|
1137
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1138
|
+
} catch (err) {
|
|
1139
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1140
|
+
err,
|
|
1141
|
+
{
|
|
1142
|
+
spreadPathsToArguments: { automation: "$[1]" },
|
|
1143
|
+
explicitPathsToArguments: { "automation.id": "$[0]" },
|
|
1144
|
+
singleArgumentUnchanged: false
|
|
1145
|
+
},
|
|
1146
|
+
["_id", "automation"]
|
|
1147
|
+
);
|
|
1148
|
+
sideEffects?.onError?.(err);
|
|
1149
|
+
throw transformedError;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
async function queryAutomationsWithDrafts2(options) {
|
|
1153
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1154
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1155
|
+
query: options?.query
|
|
1156
|
+
});
|
|
1157
|
+
const reqOpts = queryAutomationsWithDrafts(payload);
|
|
1158
|
+
sideEffects?.onSiteCall?.();
|
|
1159
|
+
try {
|
|
1160
|
+
const result = await httpClient.request(reqOpts);
|
|
1161
|
+
sideEffects?.onSuccess?.(result);
|
|
1162
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1163
|
+
} catch (err) {
|
|
1164
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1165
|
+
err,
|
|
1166
|
+
{
|
|
1167
|
+
spreadPathsToArguments: {},
|
|
1168
|
+
explicitPathsToArguments: { query: "$[0].query" },
|
|
1169
|
+
singleArgumentUnchanged: false
|
|
1170
|
+
},
|
|
1171
|
+
["options"]
|
|
1172
|
+
);
|
|
1173
|
+
sideEffects?.onError?.(err);
|
|
1174
|
+
throw transformedError;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
async function deleteDraftAutomation2(automationId) {
|
|
1178
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1179
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1180
|
+
automationId
|
|
1181
|
+
});
|
|
1182
|
+
const reqOpts = deleteDraftAutomation(payload);
|
|
1183
|
+
sideEffects?.onSiteCall?.();
|
|
1184
|
+
try {
|
|
1185
|
+
const result = await httpClient.request(reqOpts);
|
|
1186
|
+
sideEffects?.onSuccess?.(result);
|
|
1187
|
+
} catch (err) {
|
|
1188
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1189
|
+
err,
|
|
1190
|
+
{
|
|
1191
|
+
spreadPathsToArguments: {},
|
|
1192
|
+
explicitPathsToArguments: { automationId: "$[0]" },
|
|
1193
|
+
singleArgumentUnchanged: false
|
|
1194
|
+
},
|
|
1195
|
+
["automationId"]
|
|
1196
|
+
);
|
|
1197
|
+
sideEffects?.onError?.(err);
|
|
1198
|
+
throw transformedError;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
async function publishDraftAutomation2(automationId) {
|
|
1202
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1203
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1204
|
+
automationId
|
|
1205
|
+
});
|
|
1206
|
+
const reqOpts = publishDraftAutomation(payload);
|
|
1207
|
+
sideEffects?.onSiteCall?.();
|
|
1208
|
+
try {
|
|
1209
|
+
const result = await httpClient.request(reqOpts);
|
|
1210
|
+
sideEffects?.onSuccess?.(result);
|
|
1211
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1212
|
+
} catch (err) {
|
|
1213
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1214
|
+
err,
|
|
1215
|
+
{
|
|
1216
|
+
spreadPathsToArguments: {},
|
|
1217
|
+
explicitPathsToArguments: { automationId: "$[0]" },
|
|
1218
|
+
singleArgumentUnchanged: false
|
|
1219
|
+
},
|
|
1220
|
+
["automationId"]
|
|
1221
|
+
);
|
|
1222
|
+
sideEffects?.onError?.(err);
|
|
1223
|
+
throw transformedError;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
async function validateAutomation2(automation, options) {
|
|
1227
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1228
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1229
|
+
automation,
|
|
1230
|
+
validationSettings: options?.validationSettings
|
|
1231
|
+
});
|
|
1232
|
+
const reqOpts = validateAutomation(payload);
|
|
1233
|
+
sideEffects?.onSiteCall?.();
|
|
1234
|
+
try {
|
|
1235
|
+
const result = await httpClient.request(reqOpts);
|
|
1236
|
+
sideEffects?.onSuccess?.(result);
|
|
1237
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1238
|
+
} catch (err) {
|
|
1239
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1240
|
+
err,
|
|
1241
|
+
{
|
|
1242
|
+
spreadPathsToArguments: {},
|
|
1243
|
+
explicitPathsToArguments: {
|
|
1244
|
+
automation: "$[0]",
|
|
1245
|
+
validationSettings: "$[1].validationSettings"
|
|
1246
|
+
},
|
|
1247
|
+
singleArgumentUnchanged: false
|
|
1248
|
+
},
|
|
1249
|
+
["automation", "options"]
|
|
1250
|
+
);
|
|
1251
|
+
sideEffects?.onError?.(err);
|
|
1252
|
+
throw transformedError;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
async function validateAutomationById2(automationId, options) {
|
|
1256
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1257
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1258
|
+
automationId,
|
|
1259
|
+
validationSettings: options?.validationSettings
|
|
1260
|
+
});
|
|
1261
|
+
const reqOpts = validateAutomationById(payload);
|
|
1262
|
+
sideEffects?.onSiteCall?.();
|
|
1263
|
+
try {
|
|
1264
|
+
const result = await httpClient.request(reqOpts);
|
|
1265
|
+
sideEffects?.onSuccess?.(result);
|
|
1266
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1267
|
+
} catch (err) {
|
|
1268
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1269
|
+
err,
|
|
1270
|
+
{
|
|
1271
|
+
spreadPathsToArguments: {},
|
|
1272
|
+
explicitPathsToArguments: {
|
|
1273
|
+
automationId: "$[0]",
|
|
1274
|
+
validationSettings: "$[1].validationSettings"
|
|
1275
|
+
},
|
|
1276
|
+
singleArgumentUnchanged: false
|
|
1277
|
+
},
|
|
1278
|
+
["automationId", "options"]
|
|
1279
|
+
);
|
|
1280
|
+
sideEffects?.onError?.(err);
|
|
1281
|
+
throw transformedError;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1285
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1286
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1287
|
+
automationId,
|
|
1288
|
+
revision: options?.revision,
|
|
1289
|
+
fields: options?.fields
|
|
1290
|
+
});
|
|
1291
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1292
|
+
sideEffects?.onSiteCall?.();
|
|
1293
|
+
try {
|
|
1294
|
+
const result = await httpClient.request(reqOpts);
|
|
1295
|
+
sideEffects?.onSuccess?.(result);
|
|
1296
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1297
|
+
} catch (err) {
|
|
1298
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1299
|
+
err,
|
|
1300
|
+
{
|
|
1301
|
+
spreadPathsToArguments: {},
|
|
1302
|
+
explicitPathsToArguments: {
|
|
1303
|
+
automationId: "$[0]",
|
|
1304
|
+
revision: "$[1].revision",
|
|
1305
|
+
fields: "$[1].fields"
|
|
1306
|
+
},
|
|
1307
|
+
singleArgumentUnchanged: false
|
|
1308
|
+
},
|
|
1309
|
+
["automationId", "options"]
|
|
1310
|
+
);
|
|
1311
|
+
sideEffects?.onError?.(err);
|
|
1312
|
+
throw transformedError;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1317
|
+
function createAutomation3(httpClient) {
|
|
1318
|
+
return (automation) => createAutomation2(
|
|
1319
|
+
automation,
|
|
1320
|
+
// @ts-ignore
|
|
1321
|
+
{ httpClient }
|
|
1322
|
+
);
|
|
1323
|
+
}
|
|
1324
|
+
function getAutomation3(httpClient) {
|
|
1325
|
+
return (automationId) => getAutomation2(
|
|
1326
|
+
automationId,
|
|
1327
|
+
// @ts-ignore
|
|
1328
|
+
{ httpClient }
|
|
1329
|
+
);
|
|
1330
|
+
}
|
|
1331
|
+
function updateAutomation3(httpClient) {
|
|
1332
|
+
return (_id, automation) => updateAutomation2(
|
|
1333
|
+
_id,
|
|
1334
|
+
automation,
|
|
1335
|
+
// @ts-ignore
|
|
1336
|
+
{ httpClient }
|
|
1337
|
+
);
|
|
1338
|
+
}
|
|
1339
|
+
function deleteAutomation3(httpClient) {
|
|
1340
|
+
return (automationId) => deleteAutomation2(
|
|
1341
|
+
automationId,
|
|
1342
|
+
// @ts-ignore
|
|
1343
|
+
{ httpClient }
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
function bulkDeleteAutomations3(httpClient) {
|
|
1347
|
+
return (automationIds) => bulkDeleteAutomations2(
|
|
1348
|
+
automationIds,
|
|
1349
|
+
// @ts-ignore
|
|
1350
|
+
{ httpClient }
|
|
1351
|
+
);
|
|
1352
|
+
}
|
|
1353
|
+
function generatePreinstalledAutomation3(httpClient) {
|
|
1354
|
+
return (automation, options) => generatePreinstalledAutomation2(
|
|
1355
|
+
automation,
|
|
1356
|
+
options,
|
|
1357
|
+
// @ts-ignore
|
|
1358
|
+
{ httpClient }
|
|
1359
|
+
);
|
|
1360
|
+
}
|
|
1361
|
+
function queryAutomations3(httpClient) {
|
|
1362
|
+
return (options) => queryAutomations2(
|
|
1363
|
+
options,
|
|
1364
|
+
// @ts-ignore
|
|
1365
|
+
{ httpClient }
|
|
1366
|
+
);
|
|
1367
|
+
}
|
|
1368
|
+
function copyAutomation3(httpClient) {
|
|
1369
|
+
return (automationId, options) => copyAutomation2(
|
|
1370
|
+
automationId,
|
|
1371
|
+
options,
|
|
1372
|
+
// @ts-ignore
|
|
1373
|
+
{ httpClient }
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
function createDraftAutomation3(httpClient) {
|
|
1377
|
+
return (options) => createDraftAutomation2(
|
|
1378
|
+
options,
|
|
1379
|
+
// @ts-ignore
|
|
1380
|
+
{ httpClient }
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
function getOrCreateDraftAutomation3(httpClient) {
|
|
1384
|
+
return (originalAutomationId) => getOrCreateDraftAutomation2(
|
|
1385
|
+
originalAutomationId,
|
|
1386
|
+
// @ts-ignore
|
|
1387
|
+
{ httpClient }
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
function updateDraftAutomation3(httpClient) {
|
|
1391
|
+
return (_id, automation) => updateDraftAutomation2(
|
|
1392
|
+
_id,
|
|
1393
|
+
automation,
|
|
1394
|
+
// @ts-ignore
|
|
1395
|
+
{ httpClient }
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
function queryAutomationsWithDrafts3(httpClient) {
|
|
1399
|
+
return (options) => queryAutomationsWithDrafts2(
|
|
1400
|
+
options,
|
|
1401
|
+
// @ts-ignore
|
|
1402
|
+
{ httpClient }
|
|
1403
|
+
);
|
|
1404
|
+
}
|
|
1405
|
+
function deleteDraftAutomation3(httpClient) {
|
|
1406
|
+
return (automationId) => deleteDraftAutomation2(
|
|
1407
|
+
automationId,
|
|
1408
|
+
// @ts-ignore
|
|
1409
|
+
{ httpClient }
|
|
1410
|
+
);
|
|
1411
|
+
}
|
|
1412
|
+
function publishDraftAutomation3(httpClient) {
|
|
1413
|
+
return (automationId) => publishDraftAutomation2(
|
|
1414
|
+
automationId,
|
|
1415
|
+
// @ts-ignore
|
|
1416
|
+
{ httpClient }
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
function validateAutomation3(httpClient) {
|
|
1420
|
+
return (automation, options) => validateAutomation2(
|
|
1421
|
+
automation,
|
|
1422
|
+
options,
|
|
1423
|
+
// @ts-ignore
|
|
1424
|
+
{ httpClient }
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
function validateAutomationById3(httpClient) {
|
|
1428
|
+
return (automationId, options) => validateAutomationById2(
|
|
1429
|
+
automationId,
|
|
1430
|
+
options,
|
|
1431
|
+
// @ts-ignore
|
|
1432
|
+
{ httpClient }
|
|
1433
|
+
);
|
|
1434
|
+
}
|
|
1435
|
+
function getAutomationRevision3(httpClient) {
|
|
1436
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1437
|
+
automationId,
|
|
1438
|
+
options,
|
|
1439
|
+
// @ts-ignore
|
|
1440
|
+
{ httpClient }
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
var onAutomationCreated = (0, import_sdk_types.EventDefinition)(
|
|
1444
|
+
"wix.automations.v2.automation_created",
|
|
1445
|
+
true,
|
|
1446
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1447
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
1448
|
+
{
|
|
1449
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1450
|
+
paths: [
|
|
1451
|
+
{ path: "entity.createdDate" },
|
|
1452
|
+
{ path: "entity.updatedDate" },
|
|
1453
|
+
{ path: "entity.draftUpdatedDate" },
|
|
1454
|
+
{ path: "metadata.eventTime" }
|
|
1455
|
+
]
|
|
1456
|
+
}
|
|
1457
|
+
])
|
|
1458
|
+
)
|
|
1459
|
+
)();
|
|
1460
|
+
var onAutomationDeleted = (0, import_sdk_types.EventDefinition)(
|
|
1461
|
+
"wix.automations.v2.automation_deleted",
|
|
1462
|
+
true,
|
|
1463
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1464
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
1465
|
+
{
|
|
1466
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1467
|
+
paths: [
|
|
1468
|
+
{ path: "entity.createdDate" },
|
|
1469
|
+
{ path: "entity.updatedDate" },
|
|
1470
|
+
{ path: "entity.draftUpdatedDate" },
|
|
1471
|
+
{ path: "metadata.eventTime" }
|
|
1472
|
+
]
|
|
1473
|
+
}
|
|
1474
|
+
])
|
|
1475
|
+
)
|
|
1476
|
+
)();
|
|
1477
|
+
var onAutomationUpdated = (0, import_sdk_types.EventDefinition)(
|
|
1478
|
+
"wix.automations.v2.automation_updated",
|
|
1479
|
+
true,
|
|
1480
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1481
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
1482
|
+
{
|
|
1483
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1484
|
+
paths: [
|
|
1485
|
+
{ path: "entity.createdDate" },
|
|
1486
|
+
{ path: "entity.updatedDate" },
|
|
1487
|
+
{ path: "entity.draftUpdatedDate" },
|
|
1488
|
+
{ path: "metadata.eventTime" }
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
])
|
|
1492
|
+
)
|
|
1493
|
+
)();
|
|
1494
|
+
|
|
1495
|
+
// src/automations-v2-automation-automations-v-2.context.ts
|
|
1496
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1497
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
1498
|
+
var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
|
|
1499
|
+
var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
|
|
1500
|
+
var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
|
|
1501
|
+
var deleteAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAutomation3);
|
|
1502
|
+
var bulkDeleteAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteAutomations3);
|
|
1503
|
+
var generatePreinstalledAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generatePreinstalledAutomation3);
|
|
1504
|
+
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryAutomations3);
|
|
1505
|
+
var copyAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(copyAutomation3);
|
|
1506
|
+
var createDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDraftAutomation3);
|
|
1507
|
+
var getOrCreateDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrCreateDraftAutomation3);
|
|
1508
|
+
var updateDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDraftAutomation3);
|
|
1509
|
+
var queryAutomationsWithDrafts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryAutomationsWithDrafts3);
|
|
1510
|
+
var deleteDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDraftAutomation3);
|
|
1511
|
+
var publishDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftAutomation3);
|
|
1512
|
+
var validateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomation3);
|
|
1513
|
+
var validateAutomationById4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomationById3);
|
|
1514
|
+
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1515
|
+
var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(onAutomationCreated);
|
|
1516
|
+
var onAutomationDeleted2 = (0, import_event_definition_modules.createEventModule)(onAutomationDeleted);
|
|
1517
|
+
var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule)(onAutomationUpdated);
|
|
1518
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1519
|
+
0 && (module.exports = {
|
|
1520
|
+
ActionErrorType,
|
|
1521
|
+
AutomationErrorType,
|
|
1522
|
+
AutomationValidationErrorValidationErrorType,
|
|
1523
|
+
DeleteStatus,
|
|
1524
|
+
Domain,
|
|
1525
|
+
Language,
|
|
1526
|
+
Namespace,
|
|
1527
|
+
Operator,
|
|
1528
|
+
Origin,
|
|
1529
|
+
RequestedFields,
|
|
1530
|
+
SiteCreatedContext,
|
|
1531
|
+
SortOrder,
|
|
1532
|
+
State,
|
|
1533
|
+
Status,
|
|
1534
|
+
TimeUnit,
|
|
1535
|
+
TriggerErrorType,
|
|
1536
|
+
TriggerValidationErrorValidationErrorType,
|
|
1537
|
+
Type,
|
|
1538
|
+
ValidationErrorSeverity,
|
|
1539
|
+
ValidationErrorType,
|
|
1540
|
+
WebhookIdentityType,
|
|
1541
|
+
bulkDeleteAutomations,
|
|
1542
|
+
copyAutomation,
|
|
1543
|
+
createAutomation,
|
|
1544
|
+
createDraftAutomation,
|
|
1545
|
+
deleteAutomation,
|
|
1546
|
+
deleteDraftAutomation,
|
|
1547
|
+
generatePreinstalledAutomation,
|
|
1548
|
+
getAutomation,
|
|
1549
|
+
getAutomationRevision,
|
|
1550
|
+
getOrCreateDraftAutomation,
|
|
1551
|
+
onAutomationCreated,
|
|
1552
|
+
onAutomationDeleted,
|
|
1553
|
+
onAutomationUpdated,
|
|
1554
|
+
publishDraftAutomation,
|
|
1555
|
+
queryAutomations,
|
|
1556
|
+
queryAutomationsWithDrafts,
|
|
1557
|
+
updateAutomation,
|
|
1558
|
+
updateDraftAutomation,
|
|
1559
|
+
validateAutomation,
|
|
1560
|
+
validateAutomationById
|
|
1561
|
+
});
|
|
1562
|
+
//# sourceMappingURL=index.js.map
|