@wix/auto_sdk_automations_action-catalog 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/build/{internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts → cjs/automations-actioncatalog-v1-action-action-catalog.universal-CrVo0pBg.d.ts} +77 -218
  2. package/build/cjs/index.d.ts +94 -1
  3. package/build/cjs/index.js +814 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +496 -1
  6. package/build/cjs/meta.js +534 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts → es/automations-actioncatalog-v1-action-action-catalog.universal-CrVo0pBg.d.mts} +77 -218
  9. package/build/es/index.d.mts +94 -0
  10. package/build/es/index.mjs +779 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/{src/automations-actioncatalog-v1-action-action-catalog.types.d.ts → meta.d.mts} +72 -279
  13. package/build/es/meta.mjs +502 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/{es/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts → internal/cjs/automations-actioncatalog-v1-action-action-catalog.universal-CrVo0pBg.d.ts} +77 -218
  16. package/build/internal/cjs/index.d.ts +94 -1
  17. package/build/internal/cjs/index.js +814 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +496 -1
  20. package/build/internal/cjs/meta.js +534 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/{src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts → automations-actioncatalog-v1-action-action-catalog.universal-CrVo0pBg.d.mts} +77 -218
  23. package/build/internal/es/index.d.mts +94 -0
  24. package/build/internal/es/index.mjs +779 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/{cjs/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts → internal/es/meta.d.mts} +72 -279
  27. package/build/internal/es/meta.mjs +502 -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-actioncatalog-v1-action-action-catalog.context.d.ts +0 -13
  34. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js +0 -22
  35. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +0 -1
  36. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +0 -27
  37. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js +0 -349
  38. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +0 -1
  39. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +0 -26
  40. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js +0 -199
  41. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +0 -1
  42. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +0 -84
  43. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js +0 -67
  44. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +0 -1
  45. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js +0 -51
  46. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +0 -1
  47. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js +0 -490
  48. package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +0 -13
  59. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.js +0 -13
  60. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +0 -1
  61. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +0 -27
  62. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.js +0 -337
  63. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +0 -1
  64. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +0 -26
  65. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js +0 -164
  66. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +0 -1
  67. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +0 -84
  68. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.js +0 -49
  69. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +0 -1
  70. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.types.js +0 -48
  71. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +0 -1
  72. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js +0 -455
  73. package/build/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +0 -1
  74. package/build/internal/cjs/index.typings.d.ts +0 -1
  75. package/build/internal/cjs/index.typings.js +0 -18
  76. package/build/internal/cjs/index.typings.js.map +0 -1
  77. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +0 -13
  78. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js +0 -22
  79. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +0 -1
  80. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +0 -27
  81. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js +0 -349
  82. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +0 -1
  83. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +0 -26
  84. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js +0 -199
  85. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +0 -1
  86. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +0 -84
  87. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js +0 -67
  88. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +0 -1
  89. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +0 -703
  90. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js +0 -51
  91. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +0 -1
  92. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js +0 -490
  93. package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +0 -13
  104. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.js +0 -13
  105. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +0 -1
  106. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +0 -27
  107. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.js +0 -337
  108. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +0 -1
  109. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +0 -26
  110. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js +0 -164
  111. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +0 -1
  112. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +0 -84
  113. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.js +0 -49
  114. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +0 -1
  115. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +0 -703
  116. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.js +0 -48
  117. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +0 -1
  118. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js +0 -455
  119. package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +0 -1
@@ -0,0 +1,779 @@
1
+ // src/automations-actioncatalog-v1-action-action-catalog.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/automations-actioncatalog-v1-action-action-catalog.http.ts
9
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
10
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
11
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
15
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
16
+ function resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl(opts) {
17
+ const domainToMappings = {
18
+ "bo._base_domain_": [
19
+ {
20
+ srcPath: "/_api/action-catalog-service",
21
+ destPath: ""
22
+ }
23
+ ],
24
+ "wixbo.ai": [
25
+ {
26
+ srcPath: "/_api/action-catalog-service",
27
+ destPath: ""
28
+ }
29
+ ],
30
+ "wix-bo.com": [
31
+ {
32
+ srcPath: "/_api/action-catalog-service",
33
+ destPath: ""
34
+ }
35
+ ],
36
+ "dev._base_domain_": [
37
+ {
38
+ srcPath: "/_api/action-catalog-service",
39
+ destPath: ""
40
+ }
41
+ ],
42
+ "manage._base_domain_": [
43
+ {
44
+ srcPath: "/_api/action-catalog-service",
45
+ destPath: ""
46
+ }
47
+ ],
48
+ "platform.rise.ai": [
49
+ {
50
+ srcPath: "/v1/actions",
51
+ destPath: "/v1/actions"
52
+ }
53
+ ],
54
+ "www.wixapis.com": [
55
+ {
56
+ srcPath: "/v1/actions",
57
+ destPath: "/v1/actions"
58
+ }
59
+ ]
60
+ };
61
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
62
+ }
63
+ var PACKAGE_NAME = "@wix/auto_sdk_automations_action-catalog";
64
+ function createAction(payload) {
65
+ function __createAction({ host }) {
66
+ const serializedData = transformPaths(payload, [
67
+ {
68
+ transformFn: transformSDKTimestampToRESTTimestamp,
69
+ paths: [
70
+ { path: "action.createdDate" },
71
+ { path: "action.updatedDate" },
72
+ { path: "action.icon.urlExpirationDate" }
73
+ ]
74
+ },
75
+ {
76
+ transformFn: transformSDKFloatToRESTFloat,
77
+ paths: [
78
+ { path: "action.icon.focalPoint.x" },
79
+ { path: "action.icon.focalPoint.y" }
80
+ ]
81
+ }
82
+ ]);
83
+ const metadata = {
84
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
85
+ method: "POST",
86
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.CreateAction",
87
+ packageName: PACKAGE_NAME,
88
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
89
+ protoPath: "/v1/actions",
90
+ data: serializedData,
91
+ host
92
+ }),
93
+ data: serializedData,
94
+ transformResponse: (payload2) => transformPaths(payload2, [
95
+ {
96
+ transformFn: transformRESTTimestampToSDKTimestamp,
97
+ paths: [
98
+ { path: "action.createdDate" },
99
+ { path: "action.updatedDate" },
100
+ { path: "action.icon.urlExpirationDate" }
101
+ ]
102
+ },
103
+ {
104
+ transformFn: transformRESTFloatToSDKFloat,
105
+ paths: [
106
+ { path: "action.icon.focalPoint.x" },
107
+ { path: "action.icon.focalPoint.y" }
108
+ ]
109
+ }
110
+ ])
111
+ };
112
+ return metadata;
113
+ }
114
+ return __createAction;
115
+ }
116
+ function updateAction(payload) {
117
+ function __updateAction({ host }) {
118
+ const serializedData = transformPaths(payload, [
119
+ {
120
+ transformFn: transformSDKTimestampToRESTTimestamp,
121
+ paths: [
122
+ { path: "action.createdDate" },
123
+ { path: "action.updatedDate" },
124
+ { path: "action.icon.urlExpirationDate" }
125
+ ]
126
+ },
127
+ {
128
+ transformFn: transformSDKFloatToRESTFloat,
129
+ paths: [
130
+ { path: "action.icon.focalPoint.x" },
131
+ { path: "action.icon.focalPoint.y" }
132
+ ]
133
+ }
134
+ ]);
135
+ const metadata = {
136
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
137
+ method: "PATCH",
138
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.UpdateAction",
139
+ packageName: PACKAGE_NAME,
140
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
141
+ protoPath: "/v1/action/{action.id}",
142
+ data: serializedData,
143
+ host
144
+ }),
145
+ data: serializedData,
146
+ transformResponse: (payload2) => transformPaths(payload2, [
147
+ {
148
+ transformFn: transformRESTTimestampToSDKTimestamp,
149
+ paths: [
150
+ { path: "updatedAction.createdDate" },
151
+ { path: "updatedAction.updatedDate" },
152
+ { path: "updatedAction.icon.urlExpirationDate" }
153
+ ]
154
+ },
155
+ {
156
+ transformFn: transformRESTFloatToSDKFloat,
157
+ paths: [
158
+ { path: "updatedAction.icon.focalPoint.x" },
159
+ { path: "updatedAction.icon.focalPoint.y" }
160
+ ]
161
+ }
162
+ ])
163
+ };
164
+ return metadata;
165
+ }
166
+ return __updateAction;
167
+ }
168
+ function deleteAction(payload) {
169
+ function __deleteAction({ host }) {
170
+ const metadata = {
171
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
172
+ method: "DELETE",
173
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.DeleteAction",
174
+ packageName: PACKAGE_NAME,
175
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
176
+ protoPath: "/v1/action",
177
+ data: payload,
178
+ host
179
+ }),
180
+ params: toURLSearchParams(payload)
181
+ };
182
+ return metadata;
183
+ }
184
+ return __deleteAction;
185
+ }
186
+ function getRuntimeAction(payload) {
187
+ function __getRuntimeAction({ host }) {
188
+ const metadata = {
189
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
190
+ method: "GET",
191
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.GetRuntimeAction",
192
+ packageName: PACKAGE_NAME,
193
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
194
+ protoPath: "/v1/actions/apps/{appId}/keys/{actionKey}",
195
+ data: payload,
196
+ host
197
+ }),
198
+ params: toURLSearchParams(payload),
199
+ transformResponse: (payload2) => transformPaths(payload2, [
200
+ {
201
+ transformFn: transformRESTTimestampToSDKTimestamp,
202
+ paths: [
203
+ { path: "action.createdDate" },
204
+ { path: "action.updatedDate" },
205
+ { path: "action.icon.urlExpirationDate" }
206
+ ]
207
+ },
208
+ {
209
+ transformFn: transformRESTFloatToSDKFloat,
210
+ paths: [
211
+ { path: "action.icon.focalPoint.x" },
212
+ { path: "action.icon.focalPoint.y" }
213
+ ]
214
+ }
215
+ ])
216
+ };
217
+ return metadata;
218
+ }
219
+ return __getRuntimeAction;
220
+ }
221
+ function getActionDynamicInputSchema(payload) {
222
+ function __getActionDynamicInputSchema({ host }) {
223
+ const metadata = {
224
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
225
+ method: "POST",
226
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicInputSchema",
227
+ packageName: PACKAGE_NAME,
228
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
229
+ protoPath: "/v1/actions/dynamic-input-schema",
230
+ data: payload,
231
+ host
232
+ }),
233
+ data: payload
234
+ };
235
+ return metadata;
236
+ }
237
+ return __getActionDynamicInputSchema;
238
+ }
239
+ function resolveActions(payload) {
240
+ function __resolveActions({ host }) {
241
+ const metadata = {
242
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
243
+ method: "POST",
244
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.ResolveActions",
245
+ packageName: PACKAGE_NAME,
246
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
247
+ protoPath: "/v1/actions/resolve",
248
+ data: payload,
249
+ host
250
+ }),
251
+ data: payload,
252
+ transformResponse: (payload2) => transformPaths(payload2, [
253
+ {
254
+ transformFn: transformRESTTimestampToSDKTimestamp,
255
+ paths: [
256
+ { path: "actions.createdDate" },
257
+ { path: "actions.updatedDate" },
258
+ { path: "actions.icon.urlExpirationDate" }
259
+ ]
260
+ },
261
+ {
262
+ transformFn: transformRESTFloatToSDKFloat,
263
+ paths: [
264
+ { path: "actions.icon.focalPoint.x" },
265
+ { path: "actions.icon.focalPoint.y" }
266
+ ]
267
+ }
268
+ ])
269
+ };
270
+ return metadata;
271
+ }
272
+ return __resolveActions;
273
+ }
274
+ function copyInputMapping(payload) {
275
+ function __copyInputMapping({ host }) {
276
+ const metadata = {
277
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
278
+ method: "POST",
279
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.CopyInputMapping",
280
+ packageName: PACKAGE_NAME,
281
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
282
+ protoPath: "/v1/actions/copy",
283
+ data: payload,
284
+ host
285
+ }),
286
+ data: payload
287
+ };
288
+ return metadata;
289
+ }
290
+ return __copyInputMapping;
291
+ }
292
+ function getActionDynamicOutputSchema(payload) {
293
+ function __getActionDynamicOutputSchema({ host }) {
294
+ const metadata = {
295
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
296
+ method: "POST",
297
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicOutputSchema",
298
+ packageName: PACKAGE_NAME,
299
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
300
+ protoPath: "/v1/actions/dynamic-output-schema",
301
+ data: payload,
302
+ host
303
+ }),
304
+ data: payload
305
+ };
306
+ return metadata;
307
+ }
308
+ return __getActionDynamicOutputSchema;
309
+ }
310
+ function bulkGetActionDynamicOutputSchemas(payload) {
311
+ function __bulkGetActionDynamicOutputSchemas({ host }) {
312
+ const metadata = {
313
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
314
+ method: "POST",
315
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.BulkGetActionDynamicOutputSchemas",
316
+ packageName: PACKAGE_NAME,
317
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
318
+ protoPath: "/v1/actions/bulk/dynamic-output-schema",
319
+ data: payload,
320
+ host
321
+ }),
322
+ data: payload
323
+ };
324
+ return metadata;
325
+ }
326
+ return __bulkGetActionDynamicOutputSchemas;
327
+ }
328
+
329
+ // src/automations-actioncatalog-v1-action-action-catalog.universal.ts
330
+ import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
331
+ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
332
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
333
+ var Type = /* @__PURE__ */ ((Type2) => {
334
+ Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
335
+ Type2["GENERIC"] = "GENERIC";
336
+ return Type2;
337
+ })(Type || {});
338
+ var SourceType = /* @__PURE__ */ ((SourceType2) => {
339
+ SourceType2["UNKNOWN_SOURCE_TYPE"] = "UNKNOWN_SOURCE_TYPE";
340
+ SourceType2["DEV_CENTER"] = "DEV_CENTER";
341
+ SourceType2["WIX_API"] = "WIX_API";
342
+ return SourceType2;
343
+ })(SourceType || {});
344
+ var ExecutionType = /* @__PURE__ */ ((ExecutionType2) => {
345
+ ExecutionType2["UNKNOWN_EXECUTION_TYPE"] = "UNKNOWN_EXECUTION_TYPE";
346
+ ExecutionType2["SYNC"] = "SYNC";
347
+ ExecutionType2["ASYNC"] = "ASYNC";
348
+ return ExecutionType2;
349
+ })(ExecutionType || {});
350
+ var ExperimentActionType = /* @__PURE__ */ ((ExperimentActionType2) => {
351
+ ExperimentActionType2["UNKNOWN_ACTION"] = "UNKNOWN_ACTION";
352
+ ExperimentActionType2["CREATE_COMPONENT"] = "CREATE_COMPONENT";
353
+ ExperimentActionType2["UPDATE_COMPONENT"] = "UPDATE_COMPONENT";
354
+ ExperimentActionType2["DELETE_COMPONENT"] = "DELETE_COMPONENT";
355
+ return ExperimentActionType2;
356
+ })(ExperimentActionType || {});
357
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
358
+ SortOrder2["ASC"] = "ASC";
359
+ SortOrder2["DESC"] = "DESC";
360
+ return SortOrder2;
361
+ })(SortOrder || {});
362
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
363
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
364
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
365
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
366
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
367
+ WebhookIdentityType2["APP"] = "APP";
368
+ return WebhookIdentityType2;
369
+ })(WebhookIdentityType || {});
370
+ async function createAction2(options) {
371
+ const { httpClient, sideEffects } = arguments[1];
372
+ const payload = transformPaths2(
373
+ renameKeysFromSDKRequestToRESTRequest({
374
+ action: options?.action,
375
+ actionSpecInfo: options?.actionSpecInfo,
376
+ baseUri: options?.baseUri
377
+ }),
378
+ [
379
+ {
380
+ transformFn: transformSDKImageToRESTImage,
381
+ paths: [{ path: "action.icon" }]
382
+ }
383
+ ]
384
+ );
385
+ const reqOpts = createAction(payload);
386
+ sideEffects?.onSiteCall?.();
387
+ try {
388
+ const result = await httpClient.request(reqOpts);
389
+ sideEffects?.onSuccess?.(result);
390
+ return renameKeysFromRESTResponseToSDKResponse(
391
+ transformPaths2(result.data, [
392
+ {
393
+ transformFn: transformRESTImageToSDKImage,
394
+ paths: [{ path: "action.icon" }]
395
+ }
396
+ ])
397
+ )?.action;
398
+ } catch (err) {
399
+ const transformedError = sdkTransformError(
400
+ err,
401
+ {
402
+ spreadPathsToArguments: {},
403
+ explicitPathsToArguments: {
404
+ action: "$[0].action",
405
+ actionSpecInfo: "$[0].actionSpecInfo",
406
+ baseUri: "$[0].baseUri"
407
+ },
408
+ singleArgumentUnchanged: false
409
+ },
410
+ ["options"]
411
+ );
412
+ sideEffects?.onError?.(err);
413
+ throw transformedError;
414
+ }
415
+ }
416
+ async function updateAction2(_id, options) {
417
+ const { httpClient, sideEffects } = arguments[2];
418
+ const payload = transformPaths2(
419
+ renameKeysFromSDKRequestToRESTRequest({
420
+ action: { ...options?.action, id: _id },
421
+ actionSpecInfo: options?.actionSpecInfo
422
+ }),
423
+ [
424
+ {
425
+ transformFn: transformSDKImageToRESTImage,
426
+ paths: [{ path: "action.icon" }]
427
+ }
428
+ ]
429
+ );
430
+ const reqOpts = updateAction(payload);
431
+ sideEffects?.onSiteCall?.();
432
+ try {
433
+ const result = await httpClient.request(reqOpts);
434
+ sideEffects?.onSuccess?.(result);
435
+ return renameKeysFromRESTResponseToSDKResponse(
436
+ transformPaths2(result.data, [
437
+ {
438
+ transformFn: transformRESTImageToSDKImage,
439
+ paths: [{ path: "updatedAction.icon" }]
440
+ }
441
+ ])
442
+ )?.updatedAction;
443
+ } catch (err) {
444
+ const transformedError = sdkTransformError(
445
+ err,
446
+ {
447
+ spreadPathsToArguments: { action: "$[1].action" },
448
+ explicitPathsToArguments: {
449
+ "action.id": "$[0]",
450
+ actionSpecInfo: "$[1].actionSpecInfo"
451
+ },
452
+ singleArgumentUnchanged: false
453
+ },
454
+ ["_id", "options"]
455
+ );
456
+ sideEffects?.onError?.(err);
457
+ throw transformedError;
458
+ }
459
+ }
460
+ async function deleteAction2(actionAppId, options) {
461
+ const { httpClient, sideEffects } = arguments[2];
462
+ const payload = renameKeysFromSDKRequestToRESTRequest({
463
+ actionAppId,
464
+ actionKey: options?.actionKey
465
+ });
466
+ const reqOpts = deleteAction(payload);
467
+ sideEffects?.onSiteCall?.();
468
+ try {
469
+ const result = await httpClient.request(reqOpts);
470
+ sideEffects?.onSuccess?.(result);
471
+ } catch (err) {
472
+ const transformedError = sdkTransformError(
473
+ err,
474
+ {
475
+ spreadPathsToArguments: {},
476
+ explicitPathsToArguments: {
477
+ actionAppId: "$[0]",
478
+ actionKey: "$[1].actionKey"
479
+ },
480
+ singleArgumentUnchanged: false
481
+ },
482
+ ["actionAppId", "options"]
483
+ );
484
+ sideEffects?.onError?.(err);
485
+ throw transformedError;
486
+ }
487
+ }
488
+ async function getRuntimeAction2(identifiers) {
489
+ const { httpClient, sideEffects } = arguments[1];
490
+ const payload = renameKeysFromSDKRequestToRESTRequest({
491
+ appId: identifiers?.appId,
492
+ actionKey: identifiers?.actionKey
493
+ });
494
+ const reqOpts = getRuntimeAction(payload);
495
+ sideEffects?.onSiteCall?.();
496
+ try {
497
+ const result = await httpClient.request(reqOpts);
498
+ sideEffects?.onSuccess?.(result);
499
+ return renameKeysFromRESTResponseToSDKResponse(
500
+ transformPaths2(result.data, [
501
+ {
502
+ transformFn: transformRESTImageToSDKImage,
503
+ paths: [{ path: "action.icon" }]
504
+ }
505
+ ])
506
+ )?.action;
507
+ } catch (err) {
508
+ const transformedError = sdkTransformError(
509
+ err,
510
+ {
511
+ spreadPathsToArguments: {},
512
+ explicitPathsToArguments: {
513
+ appId: "$[0].appId",
514
+ actionKey: "$[0].actionKey"
515
+ },
516
+ singleArgumentUnchanged: false
517
+ },
518
+ ["identifiers"]
519
+ );
520
+ sideEffects?.onError?.(err);
521
+ throw transformedError;
522
+ }
523
+ }
524
+ async function getActionDynamicInputSchema2(appId, options) {
525
+ const { httpClient, sideEffects } = arguments[2];
526
+ const payload = renameKeysFromSDKRequestToRESTRequest({
527
+ appId,
528
+ actionKey: options?.actionKey,
529
+ inputMapping: options?.inputMapping
530
+ });
531
+ const reqOpts = getActionDynamicInputSchema(
532
+ payload
533
+ );
534
+ sideEffects?.onSiteCall?.();
535
+ try {
536
+ const result = await httpClient.request(reqOpts);
537
+ sideEffects?.onSuccess?.(result);
538
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
539
+ } catch (err) {
540
+ const transformedError = sdkTransformError(
541
+ err,
542
+ {
543
+ spreadPathsToArguments: {},
544
+ explicitPathsToArguments: {
545
+ appId: "$[0]",
546
+ actionKey: "$[1].actionKey",
547
+ inputMapping: "$[1].inputMapping"
548
+ },
549
+ singleArgumentUnchanged: false
550
+ },
551
+ ["appId", "options"]
552
+ );
553
+ sideEffects?.onError?.(err);
554
+ throw transformedError;
555
+ }
556
+ }
557
+ async function resolveActions2(options) {
558
+ const { httpClient, sideEffects } = arguments[1];
559
+ const payload = renameKeysFromSDKRequestToRESTRequest({
560
+ query: options?.query
561
+ });
562
+ const reqOpts = resolveActions(payload);
563
+ sideEffects?.onSiteCall?.();
564
+ try {
565
+ const result = await httpClient.request(reqOpts);
566
+ sideEffects?.onSuccess?.(result);
567
+ return renameKeysFromRESTResponseToSDKResponse(
568
+ transformPaths2(result.data, [
569
+ {
570
+ transformFn: transformRESTImageToSDKImage,
571
+ paths: [{ path: "actions.icon" }]
572
+ }
573
+ ])
574
+ );
575
+ } catch (err) {
576
+ const transformedError = sdkTransformError(
577
+ err,
578
+ {
579
+ spreadPathsToArguments: {},
580
+ explicitPathsToArguments: { query: "$[0].query" },
581
+ singleArgumentUnchanged: false
582
+ },
583
+ ["options"]
584
+ );
585
+ sideEffects?.onError?.(err);
586
+ throw transformedError;
587
+ }
588
+ }
589
+ async function copyInputMapping2(appId, options) {
590
+ const { httpClient, sideEffects } = arguments[2];
591
+ const payload = renameKeysFromSDKRequestToRESTRequest({
592
+ appId,
593
+ actionKey: options?.actionKey,
594
+ inputMapping: options?.inputMapping
595
+ });
596
+ const reqOpts = copyInputMapping(payload);
597
+ sideEffects?.onSiteCall?.();
598
+ try {
599
+ const result = await httpClient.request(reqOpts);
600
+ sideEffects?.onSuccess?.(result);
601
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
602
+ } catch (err) {
603
+ const transformedError = sdkTransformError(
604
+ err,
605
+ {
606
+ spreadPathsToArguments: {},
607
+ explicitPathsToArguments: {
608
+ appId: "$[0]",
609
+ actionKey: "$[1].actionKey",
610
+ inputMapping: "$[1].inputMapping"
611
+ },
612
+ singleArgumentUnchanged: false
613
+ },
614
+ ["appId", "options"]
615
+ );
616
+ sideEffects?.onError?.(err);
617
+ throw transformedError;
618
+ }
619
+ }
620
+ async function getActionDynamicOutputSchema2(appId, options) {
621
+ const { httpClient, sideEffects } = arguments[2];
622
+ const payload = renameKeysFromSDKRequestToRESTRequest({
623
+ appId,
624
+ actionKey: options?.actionKey,
625
+ inputMapping: options?.inputMapping
626
+ });
627
+ const reqOpts = getActionDynamicOutputSchema(
628
+ payload
629
+ );
630
+ sideEffects?.onSiteCall?.();
631
+ try {
632
+ const result = await httpClient.request(reqOpts);
633
+ sideEffects?.onSuccess?.(result);
634
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
635
+ } catch (err) {
636
+ const transformedError = sdkTransformError(
637
+ err,
638
+ {
639
+ spreadPathsToArguments: {},
640
+ explicitPathsToArguments: {
641
+ appId: "$[0]",
642
+ actionKey: "$[1].actionKey",
643
+ inputMapping: "$[1].inputMapping"
644
+ },
645
+ singleArgumentUnchanged: false
646
+ },
647
+ ["appId", "options"]
648
+ );
649
+ sideEffects?.onError?.(err);
650
+ throw transformedError;
651
+ }
652
+ }
653
+ async function bulkGetActionDynamicOutputSchemas2(actionsInputMappings) {
654
+ const { httpClient, sideEffects } = arguments[1];
655
+ const payload = renameKeysFromSDKRequestToRESTRequest({
656
+ actionsInputMappings
657
+ });
658
+ const reqOpts = bulkGetActionDynamicOutputSchemas(
659
+ payload
660
+ );
661
+ sideEffects?.onSiteCall?.();
662
+ try {
663
+ const result = await httpClient.request(reqOpts);
664
+ sideEffects?.onSuccess?.(result);
665
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
666
+ } catch (err) {
667
+ const transformedError = sdkTransformError(
668
+ err,
669
+ {
670
+ spreadPathsToArguments: {},
671
+ explicitPathsToArguments: { actionsInputMappings: "$[0]" },
672
+ singleArgumentUnchanged: false
673
+ },
674
+ ["actionsInputMappings"]
675
+ );
676
+ sideEffects?.onError?.(err);
677
+ throw transformedError;
678
+ }
679
+ }
680
+
681
+ // src/automations-actioncatalog-v1-action-action-catalog.public.ts
682
+ function createAction3(httpClient) {
683
+ return (options) => createAction2(
684
+ options,
685
+ // @ts-ignore
686
+ { httpClient }
687
+ );
688
+ }
689
+ function updateAction3(httpClient) {
690
+ return (_id, options) => updateAction2(
691
+ _id,
692
+ options,
693
+ // @ts-ignore
694
+ { httpClient }
695
+ );
696
+ }
697
+ function deleteAction3(httpClient) {
698
+ return (actionAppId, options) => deleteAction2(
699
+ actionAppId,
700
+ options,
701
+ // @ts-ignore
702
+ { httpClient }
703
+ );
704
+ }
705
+ function getRuntimeAction3(httpClient) {
706
+ return (identifiers) => getRuntimeAction2(
707
+ identifiers,
708
+ // @ts-ignore
709
+ { httpClient }
710
+ );
711
+ }
712
+ function getActionDynamicInputSchema3(httpClient) {
713
+ return (appId, options) => getActionDynamicInputSchema2(
714
+ appId,
715
+ options,
716
+ // @ts-ignore
717
+ { httpClient }
718
+ );
719
+ }
720
+ function resolveActions3(httpClient) {
721
+ return (options) => resolveActions2(
722
+ options,
723
+ // @ts-ignore
724
+ { httpClient }
725
+ );
726
+ }
727
+ function copyInputMapping3(httpClient) {
728
+ return (appId, options) => copyInputMapping2(
729
+ appId,
730
+ options,
731
+ // @ts-ignore
732
+ { httpClient }
733
+ );
734
+ }
735
+ function getActionDynamicOutputSchema3(httpClient) {
736
+ return (appId, options) => getActionDynamicOutputSchema2(
737
+ appId,
738
+ options,
739
+ // @ts-ignore
740
+ { httpClient }
741
+ );
742
+ }
743
+ function bulkGetActionDynamicOutputSchemas3(httpClient) {
744
+ return (actionsInputMappings) => bulkGetActionDynamicOutputSchemas2(
745
+ actionsInputMappings,
746
+ // @ts-ignore
747
+ { httpClient }
748
+ );
749
+ }
750
+
751
+ // src/automations-actioncatalog-v1-action-action-catalog.context.ts
752
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
753
+ var createAction4 = /* @__PURE__ */ createRESTModule(createAction3);
754
+ var updateAction4 = /* @__PURE__ */ createRESTModule(updateAction3);
755
+ var deleteAction4 = /* @__PURE__ */ createRESTModule(deleteAction3);
756
+ var getRuntimeAction4 = /* @__PURE__ */ createRESTModule(getRuntimeAction3);
757
+ var getActionDynamicInputSchema4 = /* @__PURE__ */ createRESTModule(getActionDynamicInputSchema3);
758
+ var resolveActions4 = /* @__PURE__ */ createRESTModule(resolveActions3);
759
+ var copyInputMapping4 = /* @__PURE__ */ createRESTModule(copyInputMapping3);
760
+ var getActionDynamicOutputSchema4 = /* @__PURE__ */ createRESTModule(getActionDynamicOutputSchema3);
761
+ var bulkGetActionDynamicOutputSchemas4 = /* @__PURE__ */ createRESTModule(bulkGetActionDynamicOutputSchemas3);
762
+ export {
763
+ ExecutionType,
764
+ ExperimentActionType,
765
+ SortOrder,
766
+ SourceType,
767
+ Type,
768
+ WebhookIdentityType,
769
+ bulkGetActionDynamicOutputSchemas4 as bulkGetActionDynamicOutputSchemas,
770
+ copyInputMapping4 as copyInputMapping,
771
+ createAction4 as createAction,
772
+ deleteAction4 as deleteAction,
773
+ getActionDynamicInputSchema4 as getActionDynamicInputSchema,
774
+ getActionDynamicOutputSchema4 as getActionDynamicOutputSchema,
775
+ getRuntimeAction4 as getRuntimeAction,
776
+ resolveActions4 as resolveActions,
777
+ updateAction4 as updateAction
778
+ };
779
+ //# sourceMappingURL=index.mjs.map