@wix/auto_sdk_automations_activations 1.0.91 → 1.0.93

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 (37) hide show
  1. package/build/cjs/index.d.ts +17 -3
  2. package/build/cjs/index.js +69 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +56 -2
  5. package/build/cjs/index.typings.js +61 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +21 -3
  8. package/build/cjs/meta.js +47 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +17 -3
  11. package/build/es/index.mjs +68 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +56 -2
  14. package/build/es/index.typings.mjs +60 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +21 -3
  17. package/build/es/meta.mjs +46 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +17 -3
  20. package/build/internal/cjs/index.js +69 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +56 -2
  23. package/build/internal/cjs/index.typings.js +61 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +21 -3
  26. package/build/internal/cjs/meta.js +47 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +17 -3
  29. package/build/internal/es/index.mjs +68 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +56 -2
  32. package/build/internal/es/index.typings.mjs +60 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +21 -3
  35. package/build/internal/es/meta.mjs +46 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { ReportEventOptions, ReportEventResponse, ReportEventApplicationErrors, EventInfo, BulkReportEventResponse, BulkCancelEventResponse } from './index.typings.js';
3
- export { AIMetadata, AccountDetails, Action, ActionActionOneOf, ActionAttributes, ActionCodeSnippet, ActionCompletedRequest, ActionData, ActionEvent, ActionRetryRequest, ActionSettings, ActionSplitAction, ActionsData, Activation, ActivationActionStatusChanged, ActivationActionStatusChangedInfoOneOf, ActivationActionStatusChangedStatus, ActivationActionStatusChangedStatusInfoOneOf, ActivationActionStatusChangedStatusWithLiterals, ActivationContext, ActivationContinuedAfterSchedule, ActivationInitiationSource, ActivationInitiationSourceInfo, ActivationInitiationSourceInfoInitiationSourceInfoOneOf, ActivationInitiationSourceWithLiterals, ActivationRequest, ActivationResumeAfterDelay, ActivationScheduleCompleted, ActivationSource, ActivationSourceOfOneOf, ActivationStatusChanged, ActivationStatusChangedFailedStatusInfo, ActivationStatusChangedStartedStatusInfo, ActivationStatusChangedStatus, ActivationStatusChangedStatusInfoOneOf, ActivationStatusChangedStatusWithLiterals, AppDefinedAction, AppDefinedActionInfo, ApplicationError, ApplicationOrigin, AsyncAction, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, Automation, AutomationConfiguration, AutomationConfigurationAction, AutomationConfigurationActionInfoOneOf, AutomationConfigurationStatus, AutomationConfigurationStatusWithLiterals, AutomationIdentifier, AutomationInfo, AutomationInfoOriginInfoOneOf, AutomationInfoTriggerInfo, AutomationOriginInfoOneOf, AutomationSettings, BatchActivationRequest, BlockType, BlockTypeWithLiterals, BulkActionMetadata, BulkCancelEventRequest, BulkCancelEventResult, BulkReportEventRequest, BulkReportEventResult, CancelEventRequest, CancelEventResponse, CancelPendingScheduleRequest, CancelPendingScheduleRequestByOneOf, CancelPendingScheduleResponse, CancellationReason, CancellationReasonWithLiterals, CancelledStatusInfo, Case, CodeConditionAction, CodeConditionActionInfo, CodeConditionFilter, CodeSnippet, CodeSnippetLanguage, CodeSnippetLanguageWithLiterals, ConditionAction, ConditionActionInfo, ConditionBlock, ConditionExpressionGroup, ConditionFilter, ConsumeReportEventRequest, Delay, DelayAction, DelayActionInfo, DelayHelper, DelayOfOneOf, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, Empty, EndedStatusInfo, EndedStatusInfoAppDefinedActionInfo, EndedStatusInfoTypeInfoOneOf, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorReason, ErrorReasonWithLiterals, ExecuteFromActionRequest, ExecuteFromActionResponse, ExpressionEvaluationResult, ExtendedFields, FailedStatusInfo, FailureInfo, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GetScheduleRequest, GetScheduleResponse, Idempotency, IdentificationData, IdentificationDataIdOneOf, IdentifierType, IdentifierTypeWithLiterals, Identity, IfFilter, InitiatedStatusInfo, InvokedAsyncStatusInfo, InvokedAsyncStatusInfoAppDefinedActionInfo, InvokedAsyncStatusInfoTypeInfoOneOf, ItemMetadata, Language, LanguageWithLiterals, ManualActivationInfo, MessageEnvelope, Metadata, Note, Notes, Offset, Operator, OperatorWithLiterals, Origin, OriginWithLiterals, Output, OutputAction, Path, Position, PreinstalledIdentifier, PreinstalledOrigin, RateLimit, RateLimitAction, RateLimitActionInfo, RateLimiting, RefreshPayloadRequest, RefreshPayloadResponse, ReportAccountLevelEventRequest, ReportAccountLevelEventResponse, ReportActionInvocationCompletedRequest, ReportActionInvocationCompletedRequestStatusInfoOneOf, ReportActionInvocationCompletedResponse, ReportDomainEventRequest, ReportDomainEventResponse, ReportEventRequest, RestoreInfo, ResumeAfterAsyncActionCompleted, ResumeAfterAsyncActionCompletedStatusInfoOneOf, RetryInfo, RunAutomationRequest, RunAutomationResponse, Runtime, RuntimeStatus, RuntimeStatusWithLiterals, Schedule, ScheduleActivationRequested, ScheduleRequest, ScheduleResponse, ScheduleStatus, ScheduleStatusWithLiterals, ScheduledAction, ScheduledStatusInfo, Scheduler, Service, ServiceMapping, SetVariables, SetVariablesAction, SetVariablesActionInfo, SimpleDelay, SkipReason, SkipReasonWithLiterals, SkippedStatusInfo, SpiAction, SplitAction, SplitActionPath, StartedStatusInfo, StartedStatusInfoAppDefinedActionInfo, StartedStatusInfoDelayActionInfo, StartedStatusInfoTypeInfoOneOf, Status, StatusWithLiterals, SuccessInfo, SwitchFilter, SystemHelper, SystemHelperHelperOneOf, Target, TargetWithLiterals, TestAutomationRequest, TestAutomationRequestIdentifierOneOf, TestAutomationResponse, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerInfo, TriggerSettings, Type, TypeWithLiterals, Units, UnitsWithLiterals, UpdatePendingSchedulesPayloadRequest, UpdatePendingSchedulesPayloadResponse, UpdateScheduleStatusRequest, UpdateScheduleStatusResponse, V1RunAutomationRequest, V1RunAutomationRequestIdentifierOneOf, V1RunAutomationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
2
+ import { ReportEventOptions, ReportEventResponse, ReportEventApplicationErrors, EventInfo, BulkReportEventResponse, BulkCancelEventResponse, ReportActionInvocationCompletedOptions } from './index.typings.js';
3
+ export { AIMetadata, AccountDetails, AccountInfo, Action, ActionActionOneOf, ActionAttributes, ActionCodeSnippet, ActionCompletedRequest, ActionData, ActionEvent, ActionRetryRequest, ActionSettings, ActionSplitAction, ActionsData, Activation, ActivationActionStatusChanged, ActivationActionStatusChangedInfoOneOf, ActivationActionStatusChangedStatus, ActivationActionStatusChangedStatusInfoOneOf, ActivationActionStatusChangedStatusWithLiterals, ActivationContext, ActivationContinuedAfterSchedule, ActivationInitiationSource, ActivationInitiationSourceInfo, ActivationInitiationSourceInfoInitiationSourceInfoOneOf, ActivationInitiationSourceWithLiterals, ActivationRequest, ActivationResumeAfterDelay, ActivationScheduleCompleted, ActivationSource, ActivationSourceOfOneOf, ActivationStatusChanged, ActivationStatusChangedFailedStatusInfo, ActivationStatusChangedStartedStatusInfo, ActivationStatusChangedStatus, ActivationStatusChangedStatusInfoOneOf, ActivationStatusChangedStatusWithLiterals, AppDefinedAction, AppDefinedActionInfo, ApplicationError, ApplicationOrigin, AsyncAction, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, Automation, AutomationConfiguration, AutomationConfigurationAction, AutomationConfigurationActionInfoOneOf, AutomationConfigurationStatus, AutomationConfigurationStatusWithLiterals, AutomationIdentifier, AutomationInfo, AutomationInfoOriginInfoOneOf, AutomationInfoTriggerInfo, AutomationOriginInfoOneOf, AutomationSettings, BatchActivationRequest, BlockType, BlockTypeWithLiterals, BulkActionMetadata, BulkCancelEventRequest, BulkCancelEventResult, BulkReportEventRequest, BulkReportEventResult, CancelEventRequest, CancelEventResponse, CancelPendingScheduleRequest, CancelPendingScheduleRequestByOneOf, CancelPendingScheduleResponse, CancellationReason, CancellationReasonWithLiterals, CancelledStatusInfo, Case, CodeConditionAction, CodeConditionActionInfo, CodeConditionFilter, CodeSnippet, CodeSnippetLanguage, CodeSnippetLanguageWithLiterals, ConditionAction, ConditionActionInfo, ConditionBlock, ConditionExpressionGroup, ConditionFilter, ConsumeReportEventRequest, Delay, DelayAction, DelayActionInfo, DelayHelper, DelayOfOneOf, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, Empty, EndedStatusInfo, EndedStatusInfoAppDefinedActionInfo, EndedStatusInfoTypeInfoOneOf, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorReason, ErrorReasonWithLiterals, ExecuteFromActionRequest, ExecuteFromActionResponse, ExpressionEvaluationResult, ExtendedFields, FailedStatusInfo, FailureInfo, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GetScheduleRequest, GetScheduleResponse, Idempotency, IdentificationData, IdentificationDataIdOneOf, IdentifierType, IdentifierTypeWithLiterals, Identity, IfFilter, InitiatedStatusInfo, InvokedAsyncStatusInfo, InvokedAsyncStatusInfoAppDefinedActionInfo, InvokedAsyncStatusInfoTypeInfoOneOf, ItemMetadata, Language, LanguageWithLiterals, ManualActivationInfo, MessageEnvelope, Metadata, Note, Notes, Offset, Operator, OperatorWithLiterals, Origin, OriginWithLiterals, Output, OutputAction, Path, Position, PreinstalledIdentifier, PreinstalledOrigin, RateLimit, RateLimitAction, RateLimitActionInfo, RateLimiting, RefreshPayloadRequest, RefreshPayloadResponse, ReportAccountLevelEventRequest, ReportAccountLevelEventResponse, ReportActionInvocationCompletedOptionsStatusInfoOneOf, ReportActionInvocationCompletedRequest, ReportActionInvocationCompletedRequestStatusInfoOneOf, ReportActionInvocationCompletedResponse, ReportDomainEventRequest, ReportDomainEventResponse, ReportEventRequest, RestoreInfo, ResumeAfterAsyncActionCompleted, ResumeAfterAsyncActionCompletedStatusInfoOneOf, RetryInfo, RunAutomationRequest, RunAutomationResponse, Runtime, RuntimeStatus, RuntimeStatusWithLiterals, Schedule, ScheduleActivationRequested, ScheduleRequest, ScheduleResponse, ScheduleStatus, ScheduleStatusWithLiterals, ScheduledAction, ScheduledStatusInfo, Scheduler, Service, ServiceMapping, SetVariables, SetVariablesAction, SetVariablesActionInfo, SimpleDelay, SkipReason, SkipReasonWithLiterals, SkippedStatusInfo, SpiAction, SplitAction, SplitActionPath, StartedStatusInfo, StartedStatusInfoAppDefinedActionInfo, StartedStatusInfoDelayActionInfo, StartedStatusInfoTypeInfoOneOf, Status, StatusWithLiterals, SuccessInfo, SwitchFilter, SystemHelper, SystemHelperHelperOneOf, Target, TargetWithLiterals, TestAutomationRequest, TestAutomationRequestIdentifierOneOf, TestAutomationResponse, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerInfo, TriggerSettings, Type, TypeWithLiterals, Units, UnitsWithLiterals, UpdatePendingSchedulesPayloadRequest, UpdatePendingSchedulesPayloadResponse, UpdateScheduleStatusRequest, UpdateScheduleStatusResponse, V1RunAutomationRequest, V1RunAutomationRequestIdentifierOneOf, V1RunAutomationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function reportEvent$1(httpClient: HttpClient): ReportEventSignature;
6
6
  interface ReportEventSignature {
@@ -71,10 +71,24 @@ interface CancelEventSignature {
71
71
  */
72
72
  (triggerKey: string, externalEntityId: string): Promise<void>;
73
73
  }
74
+ declare function reportActionInvocationCompleted$1(httpClient: HttpClient): ReportActionInvocationCompletedSignature;
75
+ interface ReportActionInvocationCompletedSignature {
76
+ /**
77
+ * > **Note**: Call this method when using the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction) to run an action with a timeout.
78
+ *
79
+ * Reports to Wix that your action has completed.
80
+ *
81
+ * When Wix calls [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke) to run your [action that has a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction#action-timeouts), it pauses the automation until you call this method or until the timeout period ends. If your action has an [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions#the-output-schema), include your action's results.
82
+ *
83
+ * If you don't call this method in the timeout period, Wix [marks the action as failed](https://support.wix.com/en/article/wix-automations-understanding-run-logs#understanding-statuses) and continues to the next step in the automation. Subsequent actions may fail if they rely on your action's output.
84
+ */
85
+ (options?: NonNullablePaths<ReportActionInvocationCompletedOptions, `invocationToken`, 2>): Promise<void>;
86
+ }
74
87
 
75
88
  declare const reportEvent: MaybeContext<BuildRESTFunction<typeof reportEvent$1> & typeof reportEvent$1>;
76
89
  declare const bulkReportEvent: MaybeContext<BuildRESTFunction<typeof bulkReportEvent$1> & typeof bulkReportEvent$1>;
77
90
  declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
78
91
  declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
92
+ declare const reportActionInvocationCompleted: MaybeContext<BuildRESTFunction<typeof reportActionInvocationCompleted$1> & typeof reportActionInvocationCompleted$1>;
79
93
 
80
- export { BulkCancelEventResponse, BulkReportEventResponse, EventInfo, ReportEventApplicationErrors, ReportEventOptions, ReportEventResponse, bulkCancelEvent, bulkReportEvent, cancelEvent, reportEvent };
94
+ export { BulkCancelEventResponse, BulkReportEventResponse, EventInfo, ReportActionInvocationCompletedOptions, ReportEventApplicationErrors, ReportEventOptions, ReportEventResponse, bulkCancelEvent, bulkReportEvent, cancelEvent, reportActionInvocationCompleted, reportEvent };
@@ -45,6 +45,7 @@ __export(index_exports, {
45
45
  bulkCancelEvent: () => bulkCancelEvent4,
46
46
  bulkReportEvent: () => bulkReportEvent4,
47
47
  cancelEvent: () => cancelEvent4,
48
+ reportActionInvocationCompleted: () => reportActionInvocationCompleted4,
48
49
  reportEvent: () => reportEvent4
49
50
  });
50
51
  module.exports = __toCommonJS(index_exports);
@@ -55,6 +56,10 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
55
56
 
56
57
  // src/automations-v2-activation-activations.http.ts
57
58
  var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
59
+ function resolveComWixpressEsbRuntimeEsbRuntimeServiceUrl(opts) {
60
+ const domainToMappings = {};
61
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
62
+ }
58
63
  function resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl(opts) {
59
64
  const domainToMappings = {
60
65
  "manage._base_domain_": [
@@ -211,6 +216,27 @@ function cancelEvent(payload) {
211
216
  }
212
217
  return __cancelEvent;
213
218
  }
219
+ function reportActionInvocationCompleted(payload) {
220
+ function __reportActionInvocationCompleted({ host }) {
221
+ const metadata = {
222
+ entityFqdn: "wix.automations.v2.activation",
223
+ method: "POST",
224
+ methodFqn: "com.wixpress.esb.runtime.EsbRuntimeService.ReportActionInvocationCompleted",
225
+ packageName: PACKAGE_NAME,
226
+ migrationOptions: {
227
+ optInTransformResponse: true
228
+ },
229
+ url: resolveComWixpressEsbRuntimeEsbRuntimeServiceUrl({
230
+ protoPath: "/v1/report-action-invocation-completed",
231
+ data: payload,
232
+ host
233
+ }),
234
+ data: payload
235
+ };
236
+ return metadata;
237
+ }
238
+ return __reportActionInvocationCompleted;
239
+ }
214
240
 
215
241
  // src/automations-v2-activation-activations.universal.ts
216
242
  var Domain = /* @__PURE__ */ ((Domain2) => {
@@ -494,6 +520,40 @@ async function cancelEvent2(triggerKey, externalEntityId) {
494
520
  throw transformedError;
495
521
  }
496
522
  }
523
+ async function reportActionInvocationCompleted2(options) {
524
+ const { httpClient, sideEffects } = arguments[1];
525
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
526
+ status: options?.status,
527
+ successInfo: options?.successInfo,
528
+ failureInfo: options?.failureInfo,
529
+ invocationToken: options?.invocationToken
530
+ });
531
+ const reqOpts = reportActionInvocationCompleted(
532
+ payload
533
+ );
534
+ sideEffects?.onSiteCall?.();
535
+ try {
536
+ const result = await httpClient.request(reqOpts);
537
+ sideEffects?.onSuccess?.(result);
538
+ } catch (err) {
539
+ const transformedError = (0, import_transform_error.transformError)(
540
+ err,
541
+ {
542
+ spreadPathsToArguments: {},
543
+ explicitPathsToArguments: {
544
+ status: "$[0].status",
545
+ successInfo: "$[0].successInfo",
546
+ failureInfo: "$[0].failureInfo",
547
+ invocationToken: "$[0].invocationToken"
548
+ },
549
+ singleArgumentUnchanged: false
550
+ },
551
+ ["options"]
552
+ );
553
+ sideEffects?.onError?.(err);
554
+ throw transformedError;
555
+ }
556
+ }
497
557
 
498
558
  // src/automations-v2-activation-activations.public.ts
499
559
  function reportEvent3(httpClient) {
@@ -528,6 +588,13 @@ function cancelEvent3(httpClient) {
528
588
  { httpClient }
529
589
  );
530
590
  }
591
+ function reportActionInvocationCompleted3(httpClient) {
592
+ return (options) => reportActionInvocationCompleted2(
593
+ options,
594
+ // @ts-ignore
595
+ { httpClient }
596
+ );
597
+ }
531
598
 
532
599
  // src/automations-v2-activation-activations.context.ts
533
600
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
@@ -535,6 +602,7 @@ var reportEvent4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(re
535
602
  var bulkReportEvent4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkReportEvent3);
536
603
  var bulkCancelEvent4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkCancelEvent3);
537
604
  var cancelEvent4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(cancelEvent3);
605
+ var reportActionInvocationCompleted4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(reportActionInvocationCompleted3);
538
606
  // Annotate the CommonJS export names for ESM import in node:
539
607
  0 && (module.exports = {
540
608
  ActivationActionStatusChangedStatus,
@@ -562,6 +630,7 @@ var cancelEvent4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(ca
562
630
  bulkCancelEvent,
563
631
  bulkReportEvent,
564
632
  cancelEvent,
633
+ reportActionInvocationCompleted,
565
634
  reportEvent
566
635
  });
567
636
  //# sourceMappingURL=index.js.map