@getlatedev/node 0.2.1770 → 0.2.1771

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.
@@ -5831,6 +5831,35 @@ export type AutomationTemplateTargetResult = {
5831
5831
 
5832
5832
  export type status11 = 'created' | 'failed';
5833
5833
 
5834
+ /**
5835
+ * What the automation would do with the sample, decided by the code its live runs use.
5836
+ */
5837
+ export type AutomationTestDecision = {
5838
+ wouldRun: boolean;
5839
+ /**
5840
+ * Why it would not run: keyword_miss, keyword_excluded, other_post, trigger_miss, not_first_message, account_not_listened, filter_miss, no_match, subject_not_matched, post_not_matched, no_accounts, no_subscribed_channel, unsubscribed, already_enrolled, runs_paused, paused or draft.
5841
+ */
5842
+ reason?: string;
5843
+ /**
5844
+ * What the sample met, such as a keyword, a filter condition, the trigger, a post or an ad.
5845
+ */
5846
+ matched: Array<{
5847
+ type: string;
5848
+ value: string;
5849
+ }>;
5850
+ /**
5851
+ * The steps it would take, in order. A flow lists its first steps up to the first branch.
5852
+ */
5853
+ plannedSteps: Array<{
5854
+ type: string;
5855
+ summary: string;
5856
+ }>;
5857
+ /**
5858
+ * A scheduled automation's next check.
5859
+ */
5860
+ nextRunAt?: (string) | null;
5861
+ };
5862
+
5834
5863
  /**
5835
5864
  * When the automation runs. Its shape decides the kind:
5836
5865
  *
@@ -67381,6 +67410,55 @@ export type GetAutomationRunError = (ErrorResponse | {
67381
67410
  error?: string;
67382
67411
  });
67383
67412
 
67413
+ export type TestAutomationData = {
67414
+ body?: {
67415
+ /**
67416
+ * The sample event, shaped by the automation's kind.
67417
+ */
67418
+ event?: {
67419
+ [key: string]: unknown;
67420
+ };
67421
+ /**
67422
+ * A sequence's contact, a scheduled automation's post or an ad rule's object.
67423
+ */
67424
+ subjectId?: string;
67425
+ };
67426
+ path: {
67427
+ automationId: string;
67428
+ };
67429
+ };
67430
+
67431
+ export type TestAutomationResponse = ({
67432
+ decision: AutomationTestDecision;
67433
+ });
67434
+
67435
+ export type TestAutomationError = ((ErrorResponse & {
67436
+ details?: AutomationProblems;
67437
+ }) | ErrorResponse | {
67438
+ error?: string;
67439
+ });
67440
+
67441
+ export type GetAutomationTestSampleData = {
67442
+ path: {
67443
+ automationId: string;
67444
+ };
67445
+ };
67446
+
67447
+ export type GetAutomationTestSampleResponse = ({
67448
+ kind: 'ad_rule' | 'event' | 'scheduled' | 'sequence' | 'comment' | 'workflow';
67449
+ sample: {
67450
+ event?: {
67451
+ [key: string]: unknown;
67452
+ };
67453
+ subjectId?: string;
67454
+ description: string;
67455
+ };
67456
+ });
67457
+
67458
+ export type GetAutomationTestSampleError = (ErrorResponse | {
67459
+ error?: string;
67460
+ });
67461
+
67384
67462
  export type PreviewAutomationDraftData = {
67385
67463
  body: AutomationDefinition;
67386
67464
  query?: {