@wix/auto_sdk_automations_action-catalog 1.0.5 → 1.0.7

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