@wix/auto_sdk_automations_action-catalog 1.0.6 → 1.0.8

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,697 @@
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
+ export {
681
+ ExecutionType,
682
+ ExperimentActionType,
683
+ SortOrder,
684
+ SourceType,
685
+ Type,
686
+ WebhookIdentityType,
687
+ bulkGetActionDynamicOutputSchemas2 as bulkGetActionDynamicOutputSchemas,
688
+ copyInputMapping2 as copyInputMapping,
689
+ createAction2 as createAction,
690
+ deleteAction2 as deleteAction,
691
+ getActionDynamicInputSchema2 as getActionDynamicInputSchema,
692
+ getActionDynamicOutputSchema2 as getActionDynamicOutputSchema,
693
+ getRuntimeAction2 as getRuntimeAction,
694
+ resolveActions2 as resolveActions,
695
+ updateAction2 as updateAction
696
+ };
697
+ //# sourceMappingURL=index.typings.mjs.map