{"version":3,"sources":["../../src/automations-v2-activation-activations.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ReportEventRequest = z.object({\n  triggerKey: z\n    .string()\n    .describe(\n      \"Trigger key as defined in your app's trigger configuration\\nin the app dashboard.\\nFor example, `form_submitted` or `invoice_due`.\"\n    )\n    .min(1)\n    .max(100),\n  options: z\n    .object({\n      payload: z\n        .record(z.string(), z.any())\n        .describe(\n          'Event payload, formatted as key:value pairs.\\nMust comply with the payload schema\\nif you provided one when configuring your trigger.\\n\\nKey names can include only alphanumeric characters or underscores\\n(`A-Z`, `a-z`, `0-9`, `_`).\\nThey cannot start with an underscore.\\n\\nValues can be strings, numbers, integers, booleans, or arrays.\\nIf a value is an array, the array items must be objects,\\nand nested object properties must be\\nstrings, numbers, integers, or booleans only.'\n        )\n        .optional()\n        .nullable(),\n      externalEntityId: z\n        .string()\n        .describe(\n          'ID of the related resource in GUID format.\\nFor example, `fc81a355-3429-50fc-a4c7-def486e828f3`.\\n\\nRequired if your app needs to\\n[cancel the event](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/cancel-event)\\nif the automation becomes no longer relevant.\\n\\nTypically, this ID is defined in your system,\\nbut you can also use any Wix resource GUID,\\nsuch as contact ID, member ID, or invoice ID.\\nSee\\n[Choose the right `externalEntityId`](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/reporting-and-canceling-events#about-canceling-events)\\nfor more information.'\n        )\n        .regex(\n          /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n          'Must be a valid GUID'\n        )\n        .optional()\n        .nullable(),\n      idempotency: z\n        .object({\n          key: z\n            .string()\n            .describe(\n              'A unique identifier for the event.\\nIf you send the same idempotency key in multiple report event requests, for the same trigger key and app id,\\nconsecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires.'\n            )\n            .min(1)\n            .max(80)\n            .optional(),\n          ttlInMilliseconds: z\n            .string()\n            .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n            .describe(\n              'Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week.'\n            )\n            .optional()\n            .nullable(),\n        })\n        .describe('Idempotency information for the event.')\n        .optional(),\n    })\n    .optional(),\n});\nexport const ReportEventResponse = z.object({\n  activationIds: z.array(z.string()).max(100).optional(),\n});\nexport const BulkReportEventRequest = z.object({\n  triggerKey: z\n    .string()\n    .describe(\n      \"Trigger key as defined in your app's trigger configuration\\nin the app dashboard.\\nFor example, `form_submitted` or `invoice_due`.\"\n    )\n    .min(1)\n    .max(100),\n  eventsInfo: z\n    .array(\n      z.object({\n        payload: z\n          .record(z.string(), z.any())\n          .describe(\n            'Event payload, formatted as key:value pairs.\\nMust comply with the payload schema\\nif you provided one when configuring your trigger.'\n          )\n          .optional()\n          .nullable(),\n        externalEntityId: z\n          .string()\n          .describe('ID of the related resource in GUID format.')\n          .regex(\n            /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n            'Must be a valid GUID'\n          )\n          .optional()\n          .nullable(),\n        idempotency: z\n          .object({\n            key: z\n              .string()\n              .describe(\n                'A unique identifier for the event.\\nIf you send the same idempotency key in multiple report event requests, for the same trigger key and app id,\\nconsecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires.'\n              )\n              .min(1)\n              .max(80)\n              .optional(),\n            ttlInMilliseconds: z\n              .string()\n              .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n              .describe(\n                'Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week.'\n              )\n              .optional()\n              .nullable(),\n          })\n          .describe('Idempotency information for the event.')\n          .optional(),\n      })\n    )\n    .min(1)\n    .max(100),\n});\nexport const BulkReportEventResponse = z.object({\n  triggerKey: z\n    .string()\n    .describe('Trigger key associated with the event.')\n    .min(1)\n    .max(100)\n    .optional(),\n  results: z\n    .array(\n      z.object({\n        itemMetadata: z\n          .object({\n            _id: z\n              .string()\n              .describe(\n                \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\n              )\n              .optional()\n              .nullable(),\n            originalIndex: z\n              .number()\n              .int()\n              .describe(\n                'Index of the item within the request array. Allows for correlation between request and response items.'\n              )\n              .optional(),\n            success: z\n              .boolean()\n              .describe(\n                'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n              )\n              .optional(),\n            error: z\n              .object({\n                code: z.string().describe('Error code.').optional(),\n                description: z\n                  .string()\n                  .describe('Description of the error.')\n                  .optional(),\n                data: z\n                  .record(z.string(), z.any())\n                  .describe('Data related to the error.')\n                  .optional()\n                  .nullable(),\n              })\n              .describe('Details about the error in case of failure.')\n              .optional(),\n          })\n          .describe('Metadata for the individual item in the request.')\n          .optional(),\n        eventInfo: z\n          .object({\n            payload: z\n              .record(z.string(), z.any())\n              .describe(\n                'Event payload, formatted as key:value pairs.\\nMust comply with the payload schema\\nif you provided one when configuring your trigger.'\n              )\n              .optional()\n              .nullable(),\n            externalEntityId: z\n              .string()\n              .describe('ID of the related resource in GUID format.')\n              .regex(\n                /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                'Must be a valid GUID'\n              )\n              .optional()\n              .nullable(),\n            idempotency: z\n              .object({\n                key: z\n                  .string()\n                  .describe(\n                    'A unique identifier for the event.\\nIf you send the same idempotency key in multiple report event requests, for the same trigger key and app id,\\nconsecutive requests will be ignored after the first one. Note that the idempotency key is kept for a week before it expires.'\n                  )\n                  .min(1)\n                  .max(80)\n                  .optional(),\n                ttlInMilliseconds: z\n                  .string()\n                  .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n                  .describe(\n                    'Optional. The time to live (TTL) in milliseconds before the key will expire. Default is a week.'\n                  )\n                  .optional()\n                  .nullable(),\n              })\n              .describe('Idempotency information for the event.')\n              .optional(),\n          })\n          .describe('Event details for the item in the request.')\n          .optional(),\n        activationIds: z.array(z.string()).max(100).optional(),\n      })\n    )\n    .optional(),\n  bulkActionMetadata: z\n    .object({\n      totalSuccesses: z\n        .number()\n        .int()\n        .describe('Number of items that were successfully processed.')\n        .optional(),\n      totalFailures: z\n        .number()\n        .int()\n        .describe(\"Number of items that couldn't be processed.\")\n        .optional(),\n      undetailedFailures: z\n        .number()\n        .int()\n        .describe(\n          'Number of failures without details because detailed failure threshold was exceeded.'\n        )\n        .optional(),\n    })\n    .describe(\n      'Metadata for the overall bulk action, including success and failure counts.'\n    )\n    .optional(),\n});\nexport const BulkCancelEventRequest = z.object({\n  triggerKey: z\n    .string()\n    .describe(\n      'Trigger key whose events you want to cancel.\\nFor example, `form_submitted` or `invoice_due`.'\n    )\n    .min(1)\n    .max(100),\n  externalEntityIds: z.array(z.string()).min(1).max(100),\n});\nexport const BulkCancelEventResponse = z.object({\n  triggerKey: z\n    .string()\n    .describe('Trigger key related to the canceled event.')\n    .min(1)\n    .max(100)\n    .optional(),\n  results: z\n    .array(\n      z.object({\n        itemMetadata: z\n          .object({\n            _id: z\n              .string()\n              .describe(\n                \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\n              )\n              .optional()\n              .nullable(),\n            originalIndex: z\n              .number()\n              .int()\n              .describe(\n                'Index of the item within the request array. Allows for correlation between request and response items.'\n              )\n              .optional(),\n            success: z\n              .boolean()\n              .describe(\n                'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n              )\n              .optional(),\n            error: z\n              .object({\n                code: z.string().describe('Error code.').optional(),\n                description: z\n                  .string()\n                  .describe('Description of the error.')\n                  .optional(),\n                data: z\n                  .record(z.string(), z.any())\n                  .describe('Data related to the error.')\n                  .optional()\n                  .nullable(),\n              })\n              .describe('Details about the error in case of failure.')\n              .optional(),\n          })\n          .describe(\n            'Metadata of the item, including its ID and success or failure status.'\n          )\n          .optional(),\n        externalEntityId: z\n          .string()\n          .describe('ID of the related resource in GUID format.')\n          .regex(\n            /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n            'Must be a valid GUID'\n          )\n          .optional(),\n      })\n    )\n    .optional(),\n  bulkActionMetadata: z\n    .object({\n      totalSuccesses: z\n        .number()\n        .int()\n        .describe('Number of items that were successfully processed.')\n        .optional(),\n      totalFailures: z\n        .number()\n        .int()\n        .describe(\"Number of items that couldn't be processed.\")\n        .optional(),\n      undetailedFailures: z\n        .number()\n        .int()\n        .describe(\n          'Number of failures without details because detailed failure threshold was exceeded.'\n        )\n        .optional(),\n    })\n    .describe(\n      'Metadata for the overall bulk action, including success and failure counts.'\n    )\n    .optional(),\n});\nexport const CancelEventRequest = z.object({\n  triggerKey: z\n    .string()\n    .describe(\n      'Trigger key whose event you want to cancel.\\nFor example, `form_submitted` or `invoice_due`.'\n    )\n    .min(1)\n    .max(100),\n  externalEntityId: z\n    .string()\n    .describe(\n      'ID of the related resource in GUID format.\\nFor example, `fc81a355-3429-50fc-a4c7-def486e828f3`.\\n\\nTypically, this ID is defined in your system,\\nbut you can also use any Wix resource GUID,\\nsuch as contact ID, member ID, or invoice ID.\\nSee\\n[Choose the right `externalEntityId`](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/reporting-and-canceling-events#choose-the-right-externalentityid)\\nfor more information.'\n    )\n    .regex(\n      /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n      'Must be a valid GUID'\n    ),\n});\nexport const CancelEventResponse = z.object({});\nexport const ReportActionInvocationCompletedRequest = z.object({\n  status: z.enum(['UNKNOWN_STATUS', 'SUCCESS', 'FAILURE']),\n  invocationToken: z\n    .string()\n    .describe(\n      \"Invocation token from Wix's original call to [Invoke](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/invoke). Wix uses this token to match your results with the correct automation run.\\n\\nLearn more about [running an invoked action with a timeout](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/sample-flow#run-an-invoked-action-with-a-timeout).\"\n    )\n    .max(2048),\n  options: z\n    .intersection(\n      z.object({}),\n      z.xor([\n        z.object({\n          successInfo: z.never().optional(),\n          failureInfo: z.never().optional(),\n        }),\n        z.object({\n          failureInfo: z.never().optional(),\n          successInfo: z\n            .object({\n              result: z\n                .record(z.string(), z.any())\n                .describe(\n                  \"Your action's results as specified in its [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions#the-output-schema).\"\n                )\n                .optional()\n                .nullable(),\n            })\n            .describe(\"When the `status` is `SUCCESS`, your action's results.\"),\n        }),\n        z.object({\n          successInfo: z.never().optional(),\n          failureInfo: z\n            .object({\n              errorDescription: z\n                .string()\n                .describe('Why the action failed.')\n                .max(1000)\n                .optional(),\n            })\n            .describe('When the `status` is `FAILURE`, why the action failed.'),\n        }),\n      ])\n    )\n    .optional(),\n});\nexport const ReportActionInvocationCompletedResponse = z.object({});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,qBAAuB,SAAO;AAAA,EACzC,YACG,SAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SACG,SAAO;AAAA,IACN,SACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,kBACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,IACZ,aACG,SAAO;AAAA,MACN,KACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,MACZ,mBACG,SAAO,EACP,MAAM,WAAW,8BAA8B,EAC/C;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,IACd,CAAC,EACA,SA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