@curviate/sdk 0.43.0 → 0.44.0

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.
package/dist/index.d.ts CHANGED
@@ -2131,7 +2131,7 @@ interface paths {
2131
2131
  };
2132
2132
  /**
2133
2133
  * Retrieve a Recruiter-enriched profile.
2134
- * @description Get a LinkedIn profile with Recruiter enrichment (recruiting_profile: notes, tags, events). The {user_id} is 'me', the target profile's public identifier, or a member ID. Request specific profile sections via with_sections (repeatable). Requires a Recruiter seat.
2134
+ * @description Get a LinkedIn profile with Recruiter enrichment (recruiting_profile: notes, tags, events). The {user_id} is 'me', the target profile's public identifier, or a member ID. Request specific profile sections via with_sections. Requires a Recruiter seat.
2135
2135
  */
2136
2136
  get: operations["getV1AccountIdRecruiterProfilesUserId"];
2137
2137
  put?: never;
@@ -2359,7 +2359,7 @@ interface paths {
2359
2359
  };
2360
2360
  /**
2361
2361
  * List Recruiter job postings
2362
- * @description List Recruiter job postings. Filter by state (default OPEN), sort, location, job_poster, contract, and workplace_type (all repeatable). Pagination is driven by the limit (1-100) and cursor query params. Requires a Recruiter seat.
2362
+ * @description List Recruiter job postings. Filter by state (default OPEN), sort, location, job_poster, contract, and workplace_type (each takes several values). Pagination is driven by the limit (1-100) and cursor query params. Requires a Recruiter seat.
2363
2363
  */
2364
2364
  get: operations["getV1AccountIdRecruiterJobs"];
2365
2365
  put?: never;
@@ -3135,7 +3135,7 @@ interface paths {
3135
3135
  };
3136
3136
  /**
3137
3137
  * List webhook event types
3138
- * @description Returns the complete canonical event catalogue (36 events) grouped by source: messaging (7), user (2), account_status (15), post (2), motion (7), plus 3 recruiter/sales_nav events. A local catalogue read: no platform call is made.
3138
+ * @description Returns the complete canonical event catalogue (40 events) grouped by source: messaging (7), user (2), account_status (15), post (2), motion (11), plus 3 recruiter/sales_nav events. A local catalogue read: no platform call is made.
3139
3139
  */
3140
3140
  get: operations["getV1WebhooksEvents"];
3141
3141
  put?: never;
@@ -3978,6 +3978,26 @@ interface paths {
3978
3978
  patch?: never;
3979
3979
  trace?: never;
3980
3980
  };
3981
+ "/v1/enrollments/{id}/pause": {
3982
+ parameters: {
3983
+ query?: never;
3984
+ header?: never;
3985
+ path?: never;
3986
+ cookie?: never;
3987
+ };
3988
+ get?: never;
3989
+ put?: never;
3990
+ /**
3991
+ * Pause an enrollment
3992
+ * @description Holds one pending, active or paused Enrollment until you resume it (waiting.kind paused_by_user), whatever else returns. Its waits freeze: on resume each continues with the time it had left. Replies and other events are still recorded; with stop_on_engagement on, a reply still ends it.
3993
+ */
3994
+ post: operations["postV1EnrollmentsIdPause"];
3995
+ delete?: never;
3996
+ options?: never;
3997
+ head?: never;
3998
+ patch?: never;
3999
+ trace?: never;
4000
+ };
3981
4001
  "/v1/enrollments/{id}/resume": {
3982
4002
  parameters: {
3983
4003
  query?: never;
@@ -3988,8 +4008,8 @@ interface paths {
3988
4008
  get?: never;
3989
4009
  put?: never;
3990
4010
  /**
3991
- * Resume an enrollment at a step
3992
- * @description Continues an active, paused or finished Enrollment at the Step you name, e.g. after an out-of-office reply. The reply rule is armed again. It stays paused while its account or its Motion is paused, then continues from that Step. Resuming in a completed Motion reactivates the Motion. Needs Automate.
4011
+ * Resume an enrollment
4012
+ * @description With at: re-enters the named Step of an active, paused or finished Enrollment (an out-of-office reply), arming the reply rule; it may send that Step again. To retry a failed Step, use the bulk retry action. Without at: lifts your own pause. Needs Automate.
3993
4013
  */
3994
4014
  post: operations["postV1EnrollmentsIdResume"];
3995
4015
  delete?: never;
@@ -3998,6 +4018,26 @@ interface paths {
3998
4018
  patch?: never;
3999
4019
  trace?: never;
4000
4020
  };
4021
+ "/v1/enrollments/{id}/events": {
4022
+ parameters: {
4023
+ query?: never;
4024
+ header?: never;
4025
+ path?: never;
4026
+ cookie?: never;
4027
+ };
4028
+ get?: never;
4029
+ put?: never;
4030
+ /**
4031
+ * Send a custom event to an enrollment
4032
+ * @description Sends a custom event to an active or paused Enrollment whose Sequence waits for it (`until event.<name>`), e.g. after you wrote the researched text to the Contact's extra fields. Input only: it fires no webhook. Needs Automate.
4033
+ */
4034
+ post: operations["postV1EnrollmentsIdEvents"];
4035
+ delete?: never;
4036
+ options?: never;
4037
+ head?: never;
4038
+ patch?: never;
4039
+ trace?: never;
4040
+ };
4001
4041
  "/v1/enrollments/{id}/signal": {
4002
4042
  parameters: {
4003
4043
  query?: never;
@@ -4008,8 +4048,8 @@ interface paths {
4008
4048
  get?: never;
4009
4049
  put?: never;
4010
4050
  /**
4011
- * Send a signal to an enrollment
4012
- * @description Records a signal for an active or paused Enrollment whose Sequence has a Step waiting for it (`until signal.<name>`). Typical use: write the researched text to the Contact's extra fields, then signal. A name no Step waits for is refused, with the awaited names in the message. Needs Automate.
4051
+ * Send a signal to an enrollment (deprecated)
4052
+ * @description Deprecated, accepted until 2027-01-19: use POST /v1/enrollments/{id}/events, which this answers identically, plus a Deprecation header and a W13 warning. Needs Automate.
4013
4053
  */
4014
4054
  post: operations["postV1EnrollmentsIdSignal"];
4015
4055
  delete?: never;
@@ -4018,6 +4058,46 @@ interface paths {
4018
4058
  patch?: never;
4019
4059
  trace?: never;
4020
4060
  };
4061
+ "/v1/enrollments/{id}/reassign": {
4062
+ parameters: {
4063
+ query?: never;
4064
+ header?: never;
4065
+ path?: never;
4066
+ cookie?: never;
4067
+ };
4068
+ get?: never;
4069
+ put?: never;
4070
+ /**
4071
+ * Move an enrollment to another account
4072
+ * @description Moves an Enrollment to another sending account of its Motion and restarts it there at the first Step of its Sequence version (variants kept). Refused, nothing changed, once its account contacted the person beyond a profile view. warnings names a Step that will be skipped. Needs Automate.
4073
+ */
4074
+ post: operations["postV1EnrollmentsIdReassign"];
4075
+ delete?: never;
4076
+ options?: never;
4077
+ head?: never;
4078
+ patch?: never;
4079
+ trace?: never;
4080
+ };
4081
+ "/v1/enrollments/bulk": {
4082
+ parameters: {
4083
+ query?: never;
4084
+ header?: never;
4085
+ path?: never;
4086
+ cookie?: never;
4087
+ };
4088
+ get?: never;
4089
+ put?: never;
4090
+ /**
4091
+ * Act on many enrollments
4092
+ * @description Pauses, resumes, stops, retries, sends an event to or reassigns up to 1000 Enrollments, by ids or by a filter (the list filters, motion_id required). Each is decided alone, as its single call, with its own result; not atomic. List with the same filter to see the matches.
4093
+ */
4094
+ post: operations["postV1EnrollmentsBulk"];
4095
+ delete?: never;
4096
+ options?: never;
4097
+ head?: never;
4098
+ patch?: never;
4099
+ trace?: never;
4100
+ };
4021
4101
  "/v1/analytics/motions": {
4022
4102
  parameters: {
4023
4103
  query?: never;
@@ -4228,13 +4308,36 @@ interface components {
4228
4308
  merged_into?: string;
4229
4309
  /** @description Present alongside row: whole seconds until that row is usable again. This response carries no Retry-After header and no delay retry_hint, deliberately: a paused row can be paused for an hour, and a client that sleeps that inside the call hangs. Do not retry this row before the wait elapses; switch to other work instead. Seconds, not milliseconds. */
4230
4310
  retry_after?: number;
4231
- /** @description Present on SEQUENCE_INVALID: every failure of the refused Sequence document, not only the first (the first 100; the message counts them all), in step order, so one fix round covers them all. Also on MOTION_NOT_STARTABLE: every gap that keeps the Motion from starting. path is relative to the document (for example opener.variants.opener_named.text or invite.with.withdraw_after); rule says what to change. The message repeats the first entry. */
4311
+ /** @description Present on SEQUENCE_INVALID: every failure of the refused Sequence document, not only the first (the first 100; the message counts them all), in step order, so one fix round covers them all, each compiler-style with code, message, pointer, hint and docs_url. Also on MOTION_NOT_STARTABLE: every gap that keeps the Motion from starting, as path and rule only. path is relative to the document (for example opener.variants.opener_named.text or invite.with.withdraw_after); rule says what to change. The message repeats the first entry. */
4232
4312
  errors?: {
4233
4313
  /** @description Where in the Sequence document: step id, then field. */
4234
4314
  path: string;
4235
4315
  /** @description The broken rule, phrased as the fix. */
4236
4316
  rule: string;
4317
+ /** @description On SEQUENCE_INVALID: the rule id, R1 to R24. */
4318
+ code?: string;
4319
+ /** @description On SEQUENCE_INVALID: equal to rule. */
4320
+ message?: string;
4321
+ /** @description On SEQUENCE_INVALID: an RFC 6901 JSON Pointer into the document you sent (for example /steps/5/with/withdraw_after), so a tool finds the line without parsing path. A missing key points at the object that lacks it. */
4322
+ pointer?: string;
4323
+ /** @description On SEQUENCE_INVALID: one sentence saying what to do. */
4324
+ hint?: string;
4325
+ /** @description On SEQUENCE_INVALID: the rule's entry on the Sequence rules page. */
4326
+ docs_url?: string;
4237
4327
  }[];
4328
+ /** @description Present on SEQUENCE_CONFLICT: the Motion's stored Sequence your PATCH was refused against, so you can merge or overwrite without a second read. To replace it with yours, send the PATCH again with if_sequence_revision set to current.sequence_revision. */
4329
+ current?: {
4330
+ /** @description The stored revision. */
4331
+ sequence_revision: number;
4332
+ /** @description The stored Sequence version. */
4333
+ sequence_version: number;
4334
+ /** @description The stored Sequence document, or null. */
4335
+ sequence: unknown;
4336
+ /** @description Who saved that revision. */
4337
+ sequence_updated_by_user_id: string | null;
4338
+ /** @description ISO 8601: when the Motion last changed. */
4339
+ updated_at: string;
4340
+ };
4238
4341
  /** @description Present when a structured search filter value matched several filter options and one has to be picked (422 FILTER_CANDIDATES_REQUIRED). One entry per offending value, so a single retry can fix them all. A value that matched no option at all is not listed here and is not an error: it is sent on as an id and reported in notices[] on the 200. */
4239
4342
  unresolved?: {
4240
4343
  /** @description The request body field the value came from. Dotted for nested filters, for example author.company. */
@@ -4416,7 +4519,7 @@ interface components {
4416
4519
  };
4417
4520
  /**
4418
4521
  * Sequence document v1
4419
- * @description A Motion's Sequence: a flat steps array run from the first step, ending explicitly in "end". Served documents use this key order: $schema, on_reply, steps; in a step id, the kind key, timeout, variants, with, then, else, next, note; in with post, newer_than, reaction, subject, text, note, note_fallback, fallback, withdraw_after; in a variant id, subject, text. A text holds at most 50 variables.
4522
+ * @description A Motion's Sequence: a flat steps array run from the first step, ending explicitly in "end". Served documents use this key order: $schema, on_reply, steps; in a step id, the kind key, timeout, variants, with, event, then, else, next, note; in with post, newer_than, reaction, subject, text, note, note_fallback, fallback, withdraw_after; in a variant id, subject, text. A text holds at most 50 variables. Variables: `{{first_name}}` (any standard Contact field), `{{my_first_name}}`, `{{my_last_name}}`, `{{my_full_name}}` (the sending Account), any other `{{<key>}}` is the custom field `contact.extra.<key>`; the long forms `{{contact.<field>}}`, `{{contact.extra.<key>}}` and `{{account.<name>}}` stay valid. Delays are about their duration: every wait and until timeout gets a small random spread that only ever adds time.
4420
4523
  */
4421
4524
  SequenceDocument: {
4422
4525
  /** @constant */
@@ -4429,6 +4532,8 @@ interface components {
4429
4532
  /** @constant */
4430
4533
  do: "profile.view";
4431
4534
  with?: Record<string, never>;
4535
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4536
+ event?: string;
4432
4537
  /** @description A step id, or "end". */
4433
4538
  next?: string;
4434
4539
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4441,6 +4546,8 @@ interface components {
4441
4546
  /** @constant */
4442
4547
  do: "profile.follow";
4443
4548
  with?: Record<string, never>;
4549
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4550
+ event?: string;
4444
4551
  /** @description A step id, or "end". */
4445
4552
  next?: string;
4446
4553
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4453,6 +4560,8 @@ interface components {
4453
4560
  /** @constant */
4454
4561
  do: "profile.unfollow";
4455
4562
  with?: Record<string, never>;
4563
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4564
+ event?: string;
4456
4565
  /** @description A step id, or "end". */
4457
4566
  next?: string;
4458
4567
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4472,12 +4581,14 @@ interface components {
4472
4581
  /** @description Withdraw the invitation if still pending after this long (14d to 180d). Absent: never. */
4473
4582
  withdraw_after?: string;
4474
4583
  };
4475
- /** @description A/B variants, split evenly and sticky per Enrollment. Exclusive with the text in with. */
4584
+ /** @description A/B variants: exactly 2, split evenly and sticky per Enrollment. Exclusive with the text in with. More than 2 (up to 5) is deprecated: accepted with warning W13 until 2027-01-19. */
4476
4585
  variants?: {
4477
4586
  /** @description Step id, unique in the document. "end" is reserved. */
4478
4587
  id: string;
4479
4588
  text: string;
4480
4589
  }[];
4590
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4591
+ event?: string;
4481
4592
  /** @description A step id, or "end". */
4482
4593
  next?: string;
4483
4594
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4490,6 +4601,8 @@ interface components {
4490
4601
  /** @constant */
4491
4602
  do: "invite.withdraw";
4492
4603
  with?: Record<string, never>;
4604
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4605
+ event?: string;
4493
4606
  /** @description A step id, or "end". */
4494
4607
  next?: string;
4495
4608
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4507,12 +4620,14 @@ interface components {
4507
4620
  /** @description Variable-free text used when a variable is missing. */
4508
4621
  fallback?: string;
4509
4622
  };
4510
- /** @description A/B variants, split evenly and sticky per Enrollment. Exclusive with the text in with. */
4623
+ /** @description A/B variants: exactly 2, split evenly and sticky per Enrollment. Exclusive with the text in with. More than 2 (up to 5) is deprecated: accepted with warning W13 until 2027-01-19. */
4511
4624
  variants?: {
4512
4625
  /** @description Step id, unique in the document. "end" is reserved. */
4513
4626
  id: string;
4514
4627
  text: string;
4515
4628
  }[];
4629
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4630
+ event?: string;
4516
4631
  /** @description A step id, or "end". */
4517
4632
  next?: string;
4518
4633
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4535,13 +4650,15 @@ interface components {
4535
4650
  text: string;
4536
4651
  };
4537
4652
  };
4538
- /** @description A/B variants, split evenly and sticky per Enrollment. Exclusive with the text in with. */
4653
+ /** @description A/B variants: exactly 2, split evenly and sticky per Enrollment. Exclusive with the text in with. More than 2 (up to 5) is deprecated: accepted with warning W13 until 2027-01-19. */
4539
4654
  variants?: {
4540
4655
  /** @description Step id, unique in the document. "end" is reserved. */
4541
4656
  id: string;
4542
4657
  subject: string;
4543
4658
  text: string;
4544
4659
  }[];
4660
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4661
+ event?: string;
4545
4662
  /** @description A step id, or "end". */
4546
4663
  next?: string;
4547
4664
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4564,6 +4681,8 @@ interface components {
4564
4681
  /** @enum {string} */
4565
4682
  reaction?: "like" | "celebrate" | "support" | "love" | "insightful" | "funny";
4566
4683
  };
4684
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4685
+ event?: string;
4567
4686
  /** @description A step id, or "end". */
4568
4687
  next?: string;
4569
4688
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4588,12 +4707,14 @@ interface components {
4588
4707
  /** @description Variable-free comment, or "skip" to skip the step when a variable is missing. */
4589
4708
  fallback?: string;
4590
4709
  };
4591
- /** @description A/B variants, split evenly and sticky per Enrollment. Exclusive with the text in with. */
4710
+ /** @description A/B variants: exactly 2, split evenly and sticky per Enrollment. Exclusive with the text in with. More than 2 (up to 5) is deprecated: accepted with warning W13 until 2027-01-19. */
4592
4711
  variants?: {
4593
4712
  /** @description Step id, unique in the document. "end" is reserved. */
4594
4713
  id: string;
4595
4714
  text: string;
4596
4715
  }[];
4716
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4717
+ event?: string;
4597
4718
  /** @description A step id, or "end". */
4598
4719
  next?: string;
4599
4720
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4606,6 +4727,8 @@ interface components {
4606
4727
  /** @constant */
4607
4728
  do: "skill.endorse";
4608
4729
  with?: Record<string, never>;
4730
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
4731
+ event?: string;
4609
4732
  /** @description A step id, or "end". */
4610
4733
  next?: string;
4611
4734
  /** @description Taken when the action cannot run or fails. Absent: same as success. */
@@ -4615,7 +4738,7 @@ interface components {
4615
4738
  } | {
4616
4739
  /** @description Step id, unique in the document. "end" is reserved. */
4617
4740
  id: string;
4618
- /** @description Calendar time to wait (1m to 365d). */
4741
+ /** @description Calendar time to wait, about this long (1m to 365d; a small random spread is added, never subtracted). */
4619
4742
  wait: string;
4620
4743
  /** @description A step id, or "end". */
4621
4744
  next?: string;
@@ -4624,9 +4747,9 @@ interface components {
4624
4747
  } | {
4625
4748
  /** @description Step id, unique in the document. "end" is reserved. */
4626
4749
  id: string;
4627
- /** @description `invite.accepted`, `message.replied`, `message.read`, or `signal.<name>`. */
4750
+ /** @description `invite.accepted`, `message.replied`, `message.read`, or `event.<name>` (a custom event an agent sends). `signal.<name>` is the deprecated spelling of `event.<name>`: accepted with warning W13 until 2027-01-19. */
4628
4751
  until: ("invite.accepted" | "message.replied" | "message.read") | string;
4629
- /** @description Give up waiting after this long (1h to 180d). */
4752
+ /** @description Give up waiting after about this long (1h to 180d; a small random spread is added, never subtracted). */
4630
4753
  timeout: string;
4631
4754
  /** @description A step id, or "end". */
4632
4755
  then: string;
@@ -4751,6 +4874,9 @@ interface components {
4751
4874
  };
4752
4875
  } | {
4753
4876
  "account.premium": boolean;
4877
+ } | {
4878
+ /** @description if only: the Enrollment's last message.send or inmail.send was seen (a read receipt, or a reply after it). False before any message. */
4879
+ "message.seen": boolean;
4754
4880
  } | {
4755
4881
  not: {
4756
4882
  "contact.connected": boolean;
@@ -4865,6 +4991,9 @@ interface components {
4865
4991
  };
4866
4992
  } | {
4867
4993
  "account.premium": boolean;
4994
+ } | {
4995
+ /** @description if only: the Enrollment's last message.send or inmail.send was seen (a read receipt, or a reply after it). False before any message. */
4996
+ "message.seen": boolean;
4868
4997
  };
4869
4998
  };
4870
4999
  /** @description A step id, or "end". */
@@ -4876,7 +5005,7 @@ interface components {
4876
5005
  } | {
4877
5006
  /** @description Step id, unique in the document. "end" is reserved. */
4878
5007
  id: string;
4879
- /** @description Signal name for the motion.signal webhook. */
5008
+ /** @description Legacy: a custom event name. New documents put event on the step that matters. */
4880
5009
  emit: string;
4881
5010
  /** @description A step id, or "end". */
4882
5011
  next?: string;
@@ -4887,6 +5016,8 @@ interface components {
4887
5016
  id: string;
4888
5017
  /** @description Tag added to the Contact. */
4889
5018
  tag: string;
5019
+ /** @description Custom event sent once each time this step runs (not when skipped or failed), for example invite_sent. */
5020
+ event?: string;
4890
5021
  /** @description A step id, or "end". */
4891
5022
  next?: string;
4892
5023
  /** @description Annotation shown in the builder graph. Never sent. */
@@ -4911,7 +5042,7 @@ interface operations {
4911
5042
  getV1AccountIdUsersUserId: {
4912
5043
  parameters: {
4913
5044
  query?: {
4914
- /** @description Profile sections to fetch, repeatable: linkedin_experience, linkedin_skills, and others (each has a _preview variant). Omit for base fields only. */
5045
+ /** @description Sections to fetch, e.g. linkedin_experience, linkedin_skills (plus _preview). Omit for base fields. Repeat the key, comma-separate or mix; empties ignored. */
4915
5046
  linkedin_sections?: string[];
4916
5047
  /** @description How willing this read is to reach LinkedIn: auto (default), live, refill, or cache_only. Details: /reference/getting-started/cache. */
4917
5048
  mode?: "live" | "auto" | "refill" | "cache_only";
@@ -8752,7 +8883,7 @@ interface operations {
8752
8883
  limit?: number;
8753
8884
  /** @description Opaque pagination cursor from a prior response's cursor. Omit for the first page. */
8754
8885
  cursor?: string;
8755
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
8886
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
8756
8887
  expand?: string;
8757
8888
  };
8758
8889
  header?: never;
@@ -8943,7 +9074,7 @@ interface operations {
8943
9074
  getV1AccountIdCompaniesIdentifierChatsChatId: {
8944
9075
  parameters: {
8945
9076
  query?: {
8946
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
9077
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
8947
9078
  expand?: string;
8948
9079
  };
8949
9080
  header?: never;
@@ -9130,7 +9261,7 @@ interface operations {
9130
9261
  limit?: number;
9131
9262
  /** @description Opaque pagination cursor from a prior response's cursor. Omit for the first page. */
9132
9263
  cursor?: string;
9133
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
9264
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
9134
9265
  expand?: string;
9135
9266
  };
9136
9267
  header?: never;
@@ -9481,7 +9612,7 @@ interface operations {
9481
9612
  getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId: {
9482
9613
  parameters: {
9483
9614
  query?: {
9484
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
9615
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
9485
9616
  expand?: string;
9486
9617
  };
9487
9618
  header?: never;
@@ -9655,7 +9786,7 @@ interface operations {
9655
9786
  limit?: number;
9656
9787
  /** @description Opaque pagination cursor from a prior response's cursor. Omit for the first page. */
9657
9788
  cursor?: string;
9658
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
9789
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
9659
9790
  expand?: string;
9660
9791
  };
9661
9792
  header?: never;
@@ -12251,7 +12382,7 @@ interface operations {
12251
12382
  limit?: number;
12252
12383
  /** @description An opaque cursor for pagination. Pass the `cursor` from the preceding response to fetch the next page. */
12253
12384
  cursor?: string;
12254
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
12385
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
12255
12386
  expand?: string;
12256
12387
  };
12257
12388
  header?: never;
@@ -12674,7 +12805,7 @@ interface operations {
12674
12805
  getV1AccountIdChatsChatId: {
12675
12806
  parameters: {
12676
12807
  query?: {
12677
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
12808
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
12678
12809
  expand?: string;
12679
12810
  /** @description How willing this read is to reach LinkedIn: auto (default), live, refill, or cache_only. Details: /reference/getting-started/cache. */
12680
12811
  mode?: "live" | "auto" | "refill" | "cache_only";
@@ -13081,7 +13212,7 @@ interface operations {
13081
13212
  limit?: number;
13082
13213
  /** @description An opaque cursor for pagination. Pass the `cursor` from the preceding response to fetch the next page. */
13083
13214
  cursor?: string;
13084
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
13215
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
13085
13216
  expand?: string;
13086
13217
  };
13087
13218
  header?: never;
@@ -13471,7 +13602,7 @@ interface operations {
13471
13602
  getV1AccountIdChatsChatIdMessagesMessageId: {
13472
13603
  parameters: {
13473
13604
  query?: {
13474
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
13605
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
13475
13606
  expand?: string;
13476
13607
  };
13477
13608
  header?: never;
@@ -14623,7 +14754,7 @@ interface operations {
14623
14754
  limit?: number;
14624
14755
  /** @description An opaque cursor for pagination. Pass the `cursor` from the preceding response to fetch the next page. */
14625
14756
  cursor?: string;
14626
- /** @description Extra fields to resolve, comma-separated in one value (expand=public_identifier). Present on every result as a value or null; repeating the key drops values. */
14757
+ /** @description Extra fields to resolve (expand=public_identifier). Present on every result as a value or null. Repeat the key, comma-separate or mix; empties ignored. */
14627
14758
  expand?: string;
14628
14759
  };
14629
14760
  header?: never;
@@ -18071,7 +18202,7 @@ interface operations {
18071
18202
  getV1NetworkConnections: {
18072
18203
  parameters: {
18073
18204
  query?: {
18074
- /** @description Only Connections of these accounts: a comma list of 1 to 50 account ids (acc_...). Omitted: every account you can operate. */
18205
+ /** @description Only these accounts' Connections: 1 to 50 account ids (acc_...). Omitted: all you can operate. Repeat the key, comma-separate or mix; empties ignored. */
18075
18206
  account_id?: string[];
18076
18207
  /** @description Case-insensitive text to find in the full name or the headline, 3 to 100 characters. */
18077
18208
  q?: string;
@@ -18157,7 +18288,7 @@ interface operations {
18157
18288
  };
18158
18289
  };
18159
18290
  };
18160
- /** @description INVALID_REQUEST, naming the field: q shorter than 3 or longer than 100 characters, more than 50 account ids or a malformed one, a malformed cursor, include_removed other than true or false, limit outside 1 to 1000, or a parameter given more than once. */
18291
+ /** @description INVALID_REQUEST, naming the field: q shorter than 3 or longer than 100 characters, more than 50 account ids or a malformed one, a malformed cursor, include_removed other than true or false, limit outside 1 to 1000, or a single-valued parameter given more than once. */
18161
18292
  400: {
18162
18293
  headers: {
18163
18294
  [name: string]: unknown;
@@ -18210,7 +18341,7 @@ interface operations {
18210
18341
  getV1NetworkSyncStatus: {
18211
18342
  parameters: {
18212
18343
  query?: {
18213
- /** @description Only these accounts: a comma list of 1 to 50 account ids (acc_...). Omitted: every account you can operate. */
18344
+ /** @description Only these accounts: 1 to 50 account ids (acc_...). Omitted: all you can operate. Repeat the key, comma-separate or mix; empties ignored. */
18214
18345
  account_id?: string[];
18215
18346
  };
18216
18347
  header?: never;
@@ -18306,7 +18437,7 @@ interface operations {
18306
18437
  };
18307
18438
  };
18308
18439
  };
18309
- /** @description INVALID_REQUEST, naming the field: more than 50 account ids, a malformed one, or account_id given more than once. */
18440
+ /** @description INVALID_REQUEST, naming the field: more than 50 account ids, or a malformed one. */
18310
18441
  400: {
18311
18442
  headers: {
18312
18443
  [name: string]: unknown;
@@ -18706,11 +18837,11 @@ interface operations {
18706
18837
  getV1UniboxChats: {
18707
18838
  parameters: {
18708
18839
  query?: {
18709
- /** @description Only chats of these accounts: a comma list of 1 to 50 account ids (acc_...). Omitted: every account you can operate. */
18840
+ /** @description Only chats of these accounts: 1 to 50 account ids (acc_...). Omitted: all you can operate. Repeat the key, comma-separate or mix; empties ignored. */
18710
18841
  account_ids?: string[];
18711
- /** @description Only chats linked to any of these Motions: a comma list of Motion ids. */
18842
+ /** @description Only chats linked to any of these Motions (Motion ids). Repeat the key, comma-separate or mix; empties ignored. */
18712
18843
  motion_ids?: string[];
18713
- /** @description Only chats whose Contact has any of these Tags (names, case-insensitive): a comma list. */
18844
+ /** @description Only chats whose Contact has any of these Tags (names, case-insensitive). Repeat the key, comma-separate or mix; empties ignored. */
18714
18845
  tags?: string[];
18715
18846
  /** @description true: only unread chats. false: only read chats. Omitted: both. */
18716
18847
  unread?: boolean;
@@ -19026,7 +19157,7 @@ interface operations {
19026
19157
  getV1UniboxUnreadCount: {
19027
19158
  parameters: {
19028
19159
  query?: {
19029
- /** @description Only chats of these accounts: a comma list of 1 to 50 account ids (acc_...). Omitted: every account you can operate. */
19160
+ /** @description Only chats of these accounts: 1 to 50 account ids (acc_...). Omitted: all you can operate. Repeat the key, comma-separate or mix; empties ignored. */
19030
19161
  account_ids?: string[];
19031
19162
  };
19032
19163
  header?: never;
@@ -19055,7 +19186,7 @@ interface operations {
19055
19186
  };
19056
19187
  };
19057
19188
  };
19058
- /** @description INVALID_REQUEST: account_ids is not a comma list of account ids. */
19189
+ /** @description INVALID_REQUEST: account_ids holds something that is not an account id. */
19059
19190
  400: {
19060
19191
  headers: {
19061
19192
  [name: string]: unknown;
@@ -19377,11 +19508,12 @@ interface operations {
19377
19508
  status: "pending" | "active" | "paused" | "finished" | "skipped";
19378
19509
  /** @description The Step it is at; null before it starts. */
19379
19510
  current_step_id: string | null;
19380
- /** @description What it waits for; null when nothing holds it. */
19511
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
19381
19512
  waiting: {
19382
19513
  /** @enum {string} */
19383
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
19384
- step_id: string;
19514
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
19515
+ /** @description The Step it waits at; null before it starts. */
19516
+ step_id: string | null;
19385
19517
  /** @description ISO 8601, when the wait ends; null when open-ended. */
19386
19518
  until: string | null;
19387
19519
  } | null;
@@ -19395,6 +19527,10 @@ interface operations {
19395
19527
  * @enum {string|null}
19396
19528
  */
19397
19529
  skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
19530
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
19531
+ finish_message: string | null;
19532
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
19533
+ skip_message: string | null;
19398
19534
  /** @description More on the skip, for example the index of the where filter that failed. */
19399
19535
  skip_detail: string | null;
19400
19536
  /** @description True once the Contact replied. */
@@ -19403,6 +19539,11 @@ interface operations {
19403
19539
  variants: {
19404
19540
  [key: string]: string;
19405
19541
  };
19542
+ /**
19543
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
19544
+ * @enum {string|null}
19545
+ */
19546
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
19406
19547
  /** @description ISO 8601. */
19407
19548
  created_at: string;
19408
19549
  /** @description When it started. */
@@ -19910,7 +20051,7 @@ interface operations {
19910
20051
  getV1AccountIdJobsJobId: {
19911
20052
  parameters: {
19912
20053
  query?: {
19913
- /** @description Sections to add, e.g. hiring_team,salary. Several: one comma-separated value; a repeated key keeps only the last. Omit for base fields only. */
20054
+ /** @description Sections to add, e.g. hiring_team, salary. Omit for base fields only. Repeat the key, comma-separate or mix; empties ignored. */
19914
20055
  with_sections?: string[];
19915
20056
  };
19916
20057
  header?: never;
@@ -23125,7 +23266,7 @@ interface operations {
23125
23266
  getV1Drafts: {
23126
23267
  parameters: {
23127
23268
  query?: {
23128
- /** @description Comma list of draft, scheduled, failed, published. Default draft,scheduled,failed. published items are publish records, never Drafts. */
23269
+ /** @description draft, scheduled, failed, published (publish records, not Drafts). Default: draft, scheduled, failed. Repeat the key, comma-separate or mix; empties ignored. */
23129
23270
  status?: ("draft" | "scheduled" | "failed" | "published")[];
23130
23271
  /** @description Only items on this account (acc_...), or none for Drafts with no account. Omitted: all of yours. */
23131
23272
  account_id?: string;
@@ -24529,7 +24670,7 @@ interface operations {
24529
24670
  getV1AccountIdRecruiterProfilesUserId: {
24530
24671
  parameters: {
24531
24672
  query?: {
24532
- /** @description Recruiter profile sections to fetch, repeatable: linkedin_experience, linkedin_skills, and others (each has a _preview variant). Omit for base fields only. */
24673
+ /** @description Recruiter sections, e.g. linkedin_experience, linkedin_skills (plus _preview). Omit for base fields. Repeat the key, comma-separate or mix; empties ignored. */
24533
24674
  with_sections?: ("linkedin_*" | "linkedin_experience" | "linkedin_education" | "linkedin_languages" | "linkedin_skills" | "linkedin_certifications" | "linkedin_volunteer_experience" | "linkedin_projects" | "linkedin_recommendations" | "linkedin_interests" | "linkedin_recruiting_activity" | "linkedin_*_preview" | "linkedin_experience_preview" | "linkedin_education_preview" | "linkedin_languages_preview" | "linkedin_skills_preview" | "linkedin_certifications_preview" | "linkedin_volunteer_experience_preview" | "linkedin_projects_preview" | "linkedin_recommendations_preview" | "linkedin_interests_preview" | "linkedin_recruiting_activity_preview")[];
24534
24675
  };
24535
24676
  header?: never;
@@ -25718,7 +25859,7 @@ interface operations {
25718
25859
  getV1AccountIdRecruiterProjects: {
25719
25860
  parameters: {
25720
25861
  query?: {
25721
- /** @description Filter by project status (repeatable, flat). One or more of: ACTIVE, CLOSED, DRAFT, REVIEW. */
25862
+ /** @description Filter by project status: ACTIVE, CLOSED, DRAFT, REVIEW. Repeat the key, comma-separate or mix; empties ignored. */
25722
25863
  status?: ("ACTIVE" | "CLOSED" | "DRAFT" | "REVIEW")[];
25723
25864
  /** @description Field to sort results by. Defaults to LAST_USED_BY_ME. */
25724
25865
  sort_by?: "LAST_USED_BY_ME" | "MOST_USED_BY_ME" | "LAST_VIEWED_BY_ME" | "NEWEST_TO_OLDEST" | "OLDEST_TO_NEWEST" | "ALPHABETICAL" | "REVERSE_ALPHABETICAL";
@@ -27754,17 +27895,17 @@ interface operations {
27754
27895
  getV1AccountIdRecruiterJobs: {
27755
27896
  parameters: {
27756
27897
  query?: {
27757
- /** @description Filter by posting lifecycle state (repeatable, flat). Defaults to OPEN. One or more of: DRAFT, OPEN, CLOSED, REVIEW, SUSPENDED. */
27898
+ /** @description Filter by posting lifecycle state: DRAFT, OPEN, CLOSED, REVIEW, SUSPENDED. Defaults to OPEN. Repeat the key, comma-separate or mix; empties ignored. */
27758
27899
  state?: ("DRAFT" | "OPEN" | "CLOSED" | "REVIEW" | "SUSPENDED")[];
27759
27900
  /** @description Field to sort results by. Defaults to LAST_ACCESS_TIME. */
27760
27901
  sort_by?: "LAST_ACCESS_TIME" | "CHRONOLOGICAL" | "REVERSE_CHRONOLOGICAL";
27761
- /** @description Resolved LOCATION parameter ids (repeatable, flat). */
27902
+ /** @description Resolved LOCATION parameter ids. Repeat the key, comma-separate or mix; empties ignored. */
27762
27903
  location?: string[];
27763
- /** @description Resolved job-poster (SEAT) parameter ids (repeatable, flat). */
27904
+ /** @description Resolved job-poster (SEAT) parameter ids. Repeat the key, comma-separate or mix; empties ignored. */
27764
27905
  job_poster?: string[];
27765
- /** @description Resolved CONTRACT parameter ids (repeatable, flat). */
27906
+ /** @description Resolved CONTRACT parameter ids. Repeat the key, comma-separate or mix; empties ignored. */
27766
27907
  contract?: string[];
27767
- /** @description Filter by workplace type (repeatable, flat). One or more of: ON_SITE, REMOTE, HYBRID. */
27908
+ /** @description Filter by workplace type: ON_SITE, REMOTE, HYBRID. Repeat the key, comma-separate or mix; empties ignored. */
27768
27909
  workplace_type?: ("ON_SITE" | "REMOTE" | "HYBRID")[];
27769
27910
  /** @description Number of results to return (1-100). Defaults to 10. */
27770
27911
  limit?: number;
@@ -29833,7 +29974,7 @@ interface operations {
29833
29974
  getV1AccountIdSalesNavigatorProfilesIdentifier: {
29834
29975
  parameters: {
29835
29976
  query?: {
29836
- /** @description Sales Navigator sections to fetch, repeatable: linkedin_experience, linkedin_skills, others (each has a _preview variant). Omit for base fields only. */
29977
+ /** @description Sales Nav sections, e.g. linkedin_experience, linkedin_skills (plus _preview). Omit for base fields. Repeat the key, comma-separate or mix; empties ignored. */
29837
29978
  with_sections?: ("linkedin_*" | "linkedin_experience" | "linkedin_education" | "linkedin_languages" | "linkedin_skills" | "linkedin_certifications" | "linkedin_volunteer_experience" | "linkedin_projects" | "linkedin_recommendations" | "linkedin_interests" | "linkedin_recruiting_activity" | "linkedin_*_preview" | "linkedin_experience_preview" | "linkedin_education_preview" | "linkedin_languages_preview" | "linkedin_skills_preview" | "linkedin_certifications_preview" | "linkedin_volunteer_experience_preview" | "linkedin_projects_preview" | "linkedin_recommendations_preview" | "linkedin_interests_preview" | "linkedin_recruiting_activity_preview")[];
29838
29979
  };
29839
29980
  header?: never;
@@ -35438,8 +35579,8 @@ interface operations {
35438
35579
  request_url: string;
35439
35580
  /** @description Human-readable name for this webhook (1-100 chars) */
35440
35581
  name?: string;
35441
- /** @description Per-account targeting. Required and non-empty; each id must be an acc_-prefixed id owned by the tenant. */
35442
- account_ids: string[];
35582
+ /** @description Per-account targeting, each an acc_ id you own and can operate. Omit to receive events for every account you can operate, now and later. */
35583
+ account_ids?: string[] | null;
35443
35584
  /**
35444
35585
  * @description A disabled webhook is created but delivers nothing
35445
35586
  * @default true
@@ -35469,8 +35610,8 @@ interface operations {
35469
35610
  request_url: string;
35470
35611
  /** @description Human-readable name for this webhook (1-100 chars) */
35471
35612
  name?: string;
35472
- /** @description Per-account targeting. Required and non-empty; each id must be an acc_-prefixed id owned by the tenant. */
35473
- account_ids: string[];
35613
+ /** @description Per-account targeting, each an acc_ id you own and can operate. Omit to receive events for every account you can operate, now and later. */
35614
+ account_ids?: string[] | null;
35474
35615
  /**
35475
35616
  * @description A disabled webhook is created but delivers nothing
35476
35617
  * @default true
@@ -35500,8 +35641,8 @@ interface operations {
35500
35641
  request_url: string;
35501
35642
  /** @description Human-readable name for this webhook (1-100 chars) */
35502
35643
  name?: string;
35503
- /** @description Per-account targeting. Omit to receive events for every current and future account; each id must be an acc_-prefixed id you own. */
35504
- account_ids?: string[];
35644
+ /** @description Per-account targeting, each an acc_ id you own and can operate. Omit to receive events for every account you can operate, now and later. */
35645
+ account_ids?: string[] | null;
35505
35646
  /**
35506
35647
  * @description A disabled webhook is created but delivers nothing
35507
35648
  * @default true
@@ -35526,8 +35667,8 @@ interface operations {
35526
35667
  request_url: string;
35527
35668
  /** @description Human-readable name for this webhook (1-100 chars) */
35528
35669
  name?: string;
35529
- /** @description Per-account targeting. Required and non-empty; each id must be an acc_-prefixed id owned by the tenant. */
35530
- account_ids: string[];
35670
+ /** @description Per-account targeting, each an acc_ id you own and can operate. Omit to receive events for every account you can operate, now and later. */
35671
+ account_ids?: string[] | null;
35531
35672
  /**
35532
35673
  * @description A disabled webhook is created but delivers nothing
35533
35674
  * @default true
@@ -35552,8 +35693,8 @@ interface operations {
35552
35693
  request_url: string;
35553
35694
  /** @description Human-readable name for this webhook (1-100 chars) */
35554
35695
  name?: string;
35555
- /** @description Per-account targeting. Required and non-empty; each id must be an acc_-prefixed id owned by the tenant. */
35556
- account_ids: string[];
35696
+ /** @description Per-account targeting, each an acc_ id you own and can operate. Omit to receive events for every account you can operate, now and later. */
35697
+ account_ids?: string[] | null;
35557
35698
  /**
35558
35699
  * @description A disabled webhook is created but delivers nothing
35559
35700
  * @default true
@@ -35569,8 +35710,8 @@ interface operations {
35569
35710
  }[];
35570
35711
  /** @description Only deliver events whose data.motion_id is one of these Motions (mot_ ids you own, up to 100). Events that carry no Motion are then not delivered. Default: no filter. */
35571
35712
  motion_ids?: string[];
35572
- /** @description Motion events to subscribe to (default: all but step.executed) */
35573
- events?: ("motion.status_changed" | "enrollment.started" | "enrollment.skipped" | "enrollment.finished" | "step.executed" | "step.failed" | "motion.signal")[];
35713
+ /** @description Motion events to subscribe to (default: all but the opt-ins step.executed, enrollment.seen and enrollment.reassigned). motion.signal is the old name of motion.custom_event, accepted until 2027-01-19. */
35714
+ events?: ("motion.status_changed" | "enrollment.started" | "enrollment.accepted" | "enrollment.replied" | "enrollment.seen" | "enrollment.reassigned" | "enrollment.skipped" | "enrollment.finished" | "step.executed" | "step.failed" | "motion.custom_event" | "motion.signal")[];
35574
35715
  };
35575
35716
  };
35576
35717
  };
@@ -35600,7 +35741,7 @@ interface operations {
35600
35741
  request_url?: string;
35601
35742
  /** @description Human-readable label. */
35602
35743
  name?: string | null;
35603
- /** @description Accounts targeted by this webhook (acc_ ids you own), or null when an account_status webhook covers every current and future account. */
35744
+ /** @description Accounts targeted by this webhook (acc_ ids you own), or null when it covers every account its creator can operate, now and later (any source). */
35604
35745
  account_ids?: string[] | null;
35605
35746
  /** @description When set, only events whose data.motion_id is one of these Motions (mot_ ids) are delivered. null: no Motion filter. */
35606
35747
  motion_ids?: string[] | null;
@@ -35880,7 +36021,7 @@ interface operations {
35880
36021
  request_url?: string;
35881
36022
  /** @description Human-readable label. */
35882
36023
  name?: string | null;
35883
- /** @description Accounts targeted by this webhook (acc_ ids you own), or null when an account_status webhook covers every current and future account. */
36024
+ /** @description Accounts targeted by this webhook (acc_ ids you own), or null when it covers every account its creator can operate, now and later (any source). */
35884
36025
  account_ids?: string[] | null;
35885
36026
  /** @description When set, only events whose data.motion_id is one of these Motions (mot_ ids) are delivered. null: no Motion filter. */
35886
36027
  motion_ids?: string[] | null;
@@ -36047,7 +36188,7 @@ interface operations {
36047
36188
  }[];
36048
36189
  /** @description Replace the field-remapping keys for the delivery payload (whole-array). */
36049
36190
  data?: string[];
36050
- /** @description Replace the targeted accounts (whole-array, each an acc_ id you own), or null to cover every current and future account (account_status webhooks only). */
36191
+ /** @description Replace the targeted accounts (whole-array, each an acc_ id you own), or null to cover every account you can operate, now and later. */
36051
36192
  account_ids?: string[] | null;
36052
36193
  /** @description Only deliver events whose data.motion_id is one of these Motions (mot_ ids you own, up to 100). Events that carry no Motion are then not delivered. Replaces the whole list; null removes the filter. */
36053
36194
  motion_ids?: string[] | null;
@@ -36080,7 +36221,7 @@ interface operations {
36080
36221
  request_url?: string;
36081
36222
  /** @description Human-readable label. */
36082
36223
  name?: string | null;
36083
- /** @description Accounts targeted by this webhook (acc_ ids you own), or null when an account_status webhook covers every current and future account. */
36224
+ /** @description Accounts targeted by this webhook (acc_ ids you own), or null when it covers every account its creator can operate, now and later (any source). */
36084
36225
  account_ids?: string[] | null;
36085
36226
  /** @description When set, only events whose data.motion_id is one of these Motions (mot_ ids) are delivered. null: no Motion filter. */
36086
36227
  motion_ids?: string[] | null;
@@ -39203,7 +39344,7 @@ interface operations {
39203
39344
  query?: {
39204
39345
  /** @description Only Contacts in this Contact list (cl_...). */
39205
39346
  list_id?: string;
39206
- /** @description Comma list of Tag names, any casing: Contacts with any of them. */
39347
+ /** @description Tag names, any casing: Contacts with any of them. Repeat the key, comma-separate or mix; empties ignored. */
39207
39348
  tag?: string;
39208
39349
  /** @description Only Contacts in this import's report (imp_...), while the import exists. */
39209
39350
  import_id?: string;
@@ -39219,7 +39360,7 @@ interface operations {
39219
39360
  account_id?: string;
39220
39361
  /** @description Only Contacts with an Enrollment in this Motion (mot_...). */
39221
39362
  motion_id?: string;
39222
- /** @description With motion_id: comma list of pending, active, paused, finished, skipped, Contacts whose Enrollment in that Motion has one of them. */
39363
+ /** @description With motion_id: pending, active, paused, finished, skipped. Contacts whose Enrollment there has one. Repeat the key, comma-separate or mix; empties ignored. */
39223
39364
  enrollment_status?: ("pending" | "active" | "paused" | "finished" | "skipped")[];
39224
39365
  /** @description By creation time: desc (default) or asc. */
39225
39366
  order?: "desc" | "asc";
@@ -39261,6 +39402,8 @@ interface operations {
39261
39402
  provider_id: string | null;
39262
39403
  /** @description LinkedIn's member id, when observed. */
39263
39404
  member_id: string | null;
39405
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
39406
+ profile_picture_url: string | null;
39264
39407
  /** @description Full name. */
39265
39408
  full_name: string | null;
39266
39409
  /** @description First name. */
@@ -39433,6 +39576,8 @@ interface operations {
39433
39576
  provider_id: string | null;
39434
39577
  /** @description LinkedIn's member id, when observed. */
39435
39578
  member_id: string | null;
39579
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
39580
+ profile_picture_url: string | null;
39436
39581
  /** @description Full name. */
39437
39582
  full_name: string | null;
39438
39583
  /** @description First name. */
@@ -39510,6 +39655,8 @@ interface operations {
39510
39655
  provider_id: string | null;
39511
39656
  /** @description LinkedIn's member id, when observed. */
39512
39657
  member_id: string | null;
39658
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
39659
+ profile_picture_url: string | null;
39513
39660
  /** @description Full name. */
39514
39661
  full_name: string | null;
39515
39662
  /** @description First name. */
@@ -39636,7 +39783,7 @@ interface operations {
39636
39783
  query?: {
39637
39784
  /** @description Only Contacts in this Contact list (cl_...). */
39638
39785
  list_id?: string;
39639
- /** @description Comma list of Tag names, any casing: Contacts with any of them. */
39786
+ /** @description Tag names, any casing: Contacts with any of them. Repeat the key, comma-separate or mix; empties ignored. */
39640
39787
  tag?: string;
39641
39788
  /** @description Only Contacts in this import's report (imp_...), while the import exists. */
39642
39789
  import_id?: string;
@@ -39652,11 +39799,11 @@ interface operations {
39652
39799
  account_id?: string;
39653
39800
  /** @description Only Contacts with an Enrollment in this Motion (mot_...). */
39654
39801
  motion_id?: string;
39655
- /** @description With motion_id: comma list of pending, active, paused, finished, skipped, Contacts whose Enrollment in that Motion has one of them. */
39802
+ /** @description With motion_id: pending, active, paused, finished, skipped. Contacts whose Enrollment there has one. Repeat the key, comma-separate or mix; empties ignored. */
39656
39803
  enrollment_status?: ("pending" | "active" | "paused" | "finished" | "skipped")[];
39657
39804
  /** @description csv, json or ndjson (default). */
39658
39805
  format?: "csv" | "json" | "ndjson";
39659
- /** @description Comma list of columns to include, in this order (e.g. linkedin_url,tags,extra.note). Default: all. */
39806
+ /** @description Columns to include, in this order (e.g. linkedin_url, tags, extra.note). Default: all. Repeat the key, comma-separate or mix; empties ignored. */
39660
39807
  fields?: string;
39661
39808
  };
39662
39809
  header?: never;
@@ -39691,6 +39838,8 @@ interface operations {
39691
39838
  provider_id: string | null;
39692
39839
  /** @description LinkedIn's member id, when observed. */
39693
39840
  member_id: string | null;
39841
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
39842
+ profile_picture_url: string | null;
39694
39843
  /** @description Full name. */
39695
39844
  full_name: string | null;
39696
39845
  /** @description First name. */
@@ -40596,7 +40745,7 @@ interface operations {
40596
40745
  getV1ContactsImportsIdRows: {
40597
40746
  parameters: {
40598
40747
  query?: {
40599
- /** @description Comma list of outcomes to keep: created, updated, unchanged, skipped. */
40748
+ /** @description Outcomes to keep: created, updated, unchanged, skipped. Repeat the key, comma-separate or mix; empties ignored. */
40600
40749
  outcome?: string;
40601
40750
  /** @description Max items per page (1-100, default 20). */
40602
40751
  limit?: number;
@@ -40723,6 +40872,8 @@ interface operations {
40723
40872
  provider_id: string | null;
40724
40873
  /** @description LinkedIn's member id, when observed. */
40725
40874
  member_id: string | null;
40875
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
40876
+ profile_picture_url: string | null;
40726
40877
  /** @description Full name. */
40727
40878
  full_name: string | null;
40728
40879
  /** @description First name. */
@@ -40931,6 +41082,8 @@ interface operations {
40931
41082
  provider_id: string | null;
40932
41083
  /** @description LinkedIn's member id, when observed. */
40933
41084
  member_id: string | null;
41085
+ /** @description The person's LinkedIn photo, read from the profile data your team already holds when you ask, so it costs no LinkedIn call. Read-only, and not part of exports or webhooks. Null when none is held. The link is signed and expires: show initials when it fails to load. */
41086
+ profile_picture_url: string | null;
40934
41087
  /** @description Full name. */
40935
41088
  full_name: string | null;
40936
41089
  /** @description First name. */
@@ -41730,7 +41883,7 @@ interface operations {
41730
41883
  getV1Motions: {
41731
41884
  parameters: {
41732
41885
  query?: {
41733
- /** @description Comma list of draft, scheduled, active, paused, completed, archived. Default: all but archived. */
41886
+ /** @description draft, scheduled, active, paused, completed, archived. Default: all but archived. Repeat the key, comma-separate or mix; empties ignored. */
41734
41887
  status?: ("draft" | "scheduled" | "active" | "paused" | "completed" | "archived")[];
41735
41888
  /** @description Only Motions sending from this account (acc_...). */
41736
41889
  account_id?: string;
@@ -41807,6 +41960,7 @@ interface operations {
41807
41960
  percent: number;
41808
41961
  min_invites: number;
41809
41962
  } | null;
41963
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
41810
41964
  variables: {
41811
41965
  [key: string]: string;
41812
41966
  };
@@ -41818,6 +41972,10 @@ interface operations {
41818
41972
  }[];
41819
41973
  /** @description The current Sequence version. 1 until a structural edit after start. */
41820
41974
  sequence_version: number;
41975
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
41976
+ sequence_revision: number;
41977
+ /** @description The user who saved the current Sequence revision. */
41978
+ sequence_updated_by_user_id: string | null;
41821
41979
  /** @description Enrollments by status. */
41822
41980
  counts: {
41823
41981
  pending: number;
@@ -41955,7 +42113,7 @@ interface operations {
41955
42113
  /** @description Invitations before the floor is evaluated (10 to 1000). Default 30. */
41956
42114
  min_invites?: number;
41957
42115
  } | null;
41958
- /** @description Motion variables, rendered as `{{motion.<key>}}`. Up to 50 keys matching ^[a-z][a-z0-9_]{0,39}$; values up to 2000 characters, without variables. On update a null value removes the key. */
42116
+ /** @description Deprecated: Motion variables are removed (accepted with warning W13 until 2027-01-19); write text that is the same for everyone in place, and per-Contact text in a custom field. Rendered as `{{motion.<key>}}`. Up to 50 keys matching ^[a-z][a-z0-9_]{0,39}$; values up to 2000 characters, without variables. On update a null value removes the key. */
41959
42117
  variables?: {
41960
42118
  [key: string]: string | null;
41961
42119
  };
@@ -42027,6 +42185,7 @@ interface operations {
42027
42185
  percent: number;
42028
42186
  min_invites: number;
42029
42187
  } | null;
42188
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
42030
42189
  variables: {
42031
42190
  [key: string]: string;
42032
42191
  };
@@ -42040,6 +42199,10 @@ interface operations {
42040
42199
  sequence: components["schemas"]["SequenceDocument"] | null;
42041
42200
  /** @description The current Sequence version. 1 until a structural edit after start. */
42042
42201
  sequence_version: number;
42202
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
42203
+ sequence_revision: number;
42204
+ /** @description The user who saved the current Sequence revision. */
42205
+ sequence_updated_by_user_id: string | null;
42043
42206
  /** @description Enrollments by status. */
42044
42207
  counts: {
42045
42208
  pending: number;
@@ -42050,9 +42213,20 @@ interface operations {
42050
42213
  };
42051
42214
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
42052
42215
  warnings: {
42216
+ /** @description The warning id, W1 to W13. */
42053
42217
  code: string;
42218
+ /** @description Where, as step id then field. */
42054
42219
  path: string;
42220
+ /** @description What the warning says. */
42055
42221
  rule: string;
42222
+ /** @description Equal to rule. */
42223
+ message: string;
42224
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
42225
+ pointer: string;
42226
+ /** @description One sentence saying what to do. */
42227
+ hint: string;
42228
+ /** @description The warning's entry on the Sequence rules page. */
42229
+ docs_url: string;
42056
42230
  }[];
42057
42231
  /** @description The user who created the Motion. */
42058
42232
  created_by_user_id: string | null;
@@ -42124,7 +42298,7 @@ interface operations {
42124
42298
  "application/json": components["schemas"]["Error"];
42125
42299
  };
42126
42300
  };
42127
- /** @description SEQUENCE_INVALID: the sequence breaks one or more rules. errors[] lists them as {path, rule} in step order (the first 100; the message counts them all). Nothing is saved. */
42301
+ /** @description SEQUENCE_INVALID: the sequence breaks one or more rules. errors[] lists them in step order (the first 100; the message counts them all), each compiler-style: path, rule, code (R1 to R24), message, pointer (a JSON Pointer into the document), hint and docs_url. Nothing is saved. */
42128
42302
  422: {
42129
42303
  headers: {
42130
42304
  [name: string]: unknown;
@@ -42216,6 +42390,7 @@ interface operations {
42216
42390
  percent: number;
42217
42391
  min_invites: number;
42218
42392
  } | null;
42393
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
42219
42394
  variables: {
42220
42395
  [key: string]: string;
42221
42396
  };
@@ -42229,6 +42404,10 @@ interface operations {
42229
42404
  sequence: components["schemas"]["SequenceDocument"] | null;
42230
42405
  /** @description The current Sequence version. 1 until a structural edit after start. */
42231
42406
  sequence_version: number;
42407
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
42408
+ sequence_revision: number;
42409
+ /** @description The user who saved the current Sequence revision. */
42410
+ sequence_updated_by_user_id: string | null;
42232
42411
  /** @description Enrollments by status. */
42233
42412
  counts: {
42234
42413
  pending: number;
@@ -42239,9 +42418,20 @@ interface operations {
42239
42418
  };
42240
42419
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
42241
42420
  warnings: {
42421
+ /** @description The warning id, W1 to W13. */
42242
42422
  code: string;
42423
+ /** @description Where, as step id then field. */
42243
42424
  path: string;
42425
+ /** @description What the warning says. */
42244
42426
  rule: string;
42427
+ /** @description Equal to rule. */
42428
+ message: string;
42429
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
42430
+ pointer: string;
42431
+ /** @description One sentence saying what to do. */
42432
+ hint: string;
42433
+ /** @description The warning's entry on the Sequence rules page. */
42434
+ docs_url: string;
42245
42435
  }[];
42246
42436
  /** @description The user who created the Motion. */
42247
42437
  created_by_user_id: string | null;
@@ -42434,7 +42624,7 @@ interface operations {
42434
42624
  /** @description Invitations before the floor is evaluated (10 to 1000). Default 30. */
42435
42625
  min_invites?: number;
42436
42626
  } | null;
42437
- /** @description Motion variables, rendered as `{{motion.<key>}}`. Up to 50 keys matching ^[a-z][a-z0-9_]{0,39}$; values up to 2000 characters, without variables. On update a null value removes the key. */
42627
+ /** @description Deprecated: Motion variables are removed (accepted with warning W13 until 2027-01-19); write text that is the same for everyone in place, and per-Contact text in a custom field. Rendered as `{{motion.<key>}}`. Up to 50 keys matching ^[a-z][a-z0-9_]{0,39}$; values up to 2000 characters, without variables. On update a null value removes the key. */
42438
42628
  variables?: {
42439
42629
  [key: string]: string | null;
42440
42630
  };
@@ -42445,6 +42635,8 @@ interface operations {
42445
42635
  where?: unknown[];
42446
42636
  /** @description The Sequence document (GET /schemas/sequence/v1.json), validated whole; every error comes back at once. Replaced whole on update. null clears a draft's. */
42447
42637
  sequence?: components["schemas"]["SequenceDocument"] | null;
42638
+ /** @description The sequence_revision of the Motion as you read it, which your edit is based on. When the stored Sequence has moved past it, the PATCH is refused whole with 409 SEQUENCE_CONFLICT, carrying the current document in current; merge it, or send yours again with if_sequence_revision set to current.sequence_revision to replace it. Omitted: the last write wins. */
42639
+ if_sequence_revision?: number;
42448
42640
  };
42449
42641
  };
42450
42642
  };
@@ -42506,6 +42698,7 @@ interface operations {
42506
42698
  percent: number;
42507
42699
  min_invites: number;
42508
42700
  } | null;
42701
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
42509
42702
  variables: {
42510
42703
  [key: string]: string;
42511
42704
  };
@@ -42519,6 +42712,10 @@ interface operations {
42519
42712
  sequence: components["schemas"]["SequenceDocument"] | null;
42520
42713
  /** @description The current Sequence version. 1 until a structural edit after start. */
42521
42714
  sequence_version: number;
42715
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
42716
+ sequence_revision: number;
42717
+ /** @description The user who saved the current Sequence revision. */
42718
+ sequence_updated_by_user_id: string | null;
42522
42719
  /** @description Enrollments by status. */
42523
42720
  counts: {
42524
42721
  pending: number;
@@ -42529,9 +42726,20 @@ interface operations {
42529
42726
  };
42530
42727
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
42531
42728
  warnings: {
42729
+ /** @description The warning id, W1 to W13. */
42532
42730
  code: string;
42731
+ /** @description Where, as step id then field. */
42533
42732
  path: string;
42733
+ /** @description What the warning says. */
42534
42734
  rule: string;
42735
+ /** @description Equal to rule. */
42736
+ message: string;
42737
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
42738
+ pointer: string;
42739
+ /** @description One sentence saying what to do. */
42740
+ hint: string;
42741
+ /** @description The warning's entry on the Sequence rules page. */
42742
+ docs_url: string;
42535
42743
  }[];
42536
42744
  /** @description The user who created the Motion. */
42537
42745
  created_by_user_id: string | null;
@@ -42587,7 +42795,7 @@ interface operations {
42587
42795
  "application/json": components["schemas"]["Error"];
42588
42796
  };
42589
42797
  };
42590
- /** @description MOTION_STATUS_CONFLICT: the Motion is archived and read-only. REAUTH_REQUIRED: a newly added account is disconnected. */
42798
+ /** @description MOTION_STATUS_CONFLICT: the Motion is archived and read-only. REAUTH_REQUIRED: a newly added account is disconnected. SEQUENCE_CONFLICT: if_sequence_revision is not the stored sequence_revision (someone saved since you loaded it); nothing is saved, and current carries the stored sequence, sequence_revision, sequence_version, sequence_updated_by_user_id and updated_at. */
42591
42799
  409: {
42592
42800
  headers: {
42593
42801
  [name: string]: unknown;
@@ -42605,7 +42813,7 @@ interface operations {
42605
42813
  "application/json": components["schemas"]["Error"];
42606
42814
  };
42607
42815
  };
42608
- /** @description SEQUENCE_INVALID: the sequence breaks one or more rules. errors[] lists them as {path, rule} in step order (the first 100; the message counts them all). Nothing is saved. Changing settings.variables re-checks the stored sequence, so removing a variable it uses is refused here too. MOTION_NOT_STARTABLE: on a scheduled, active or paused Motion the result must still pass what start checks; errors[] lists the gaps. */
42816
+ /** @description SEQUENCE_INVALID: the sequence breaks one or more rules. errors[] lists them in step order (the first 100; the message counts them all), each compiler-style: path, rule, code (R1 to R24), message, pointer (a JSON Pointer into the document), hint and docs_url. Nothing is saved. Changing settings.variables re-checks the stored sequence, so removing a variable it uses is refused here too. MOTION_NOT_STARTABLE: on a scheduled, active or paused Motion the result must still pass what start checks; errors[] lists the gaps. */
42609
42817
  422: {
42610
42818
  headers: {
42611
42819
  [name: string]: unknown;
@@ -42697,6 +42905,7 @@ interface operations {
42697
42905
  percent: number;
42698
42906
  min_invites: number;
42699
42907
  } | null;
42908
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
42700
42909
  variables: {
42701
42910
  [key: string]: string;
42702
42911
  };
@@ -42710,6 +42919,10 @@ interface operations {
42710
42919
  sequence: components["schemas"]["SequenceDocument"] | null;
42711
42920
  /** @description The current Sequence version. 1 until a structural edit after start. */
42712
42921
  sequence_version: number;
42922
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
42923
+ sequence_revision: number;
42924
+ /** @description The user who saved the current Sequence revision. */
42925
+ sequence_updated_by_user_id: string | null;
42713
42926
  /** @description Enrollments by status. */
42714
42927
  counts: {
42715
42928
  pending: number;
@@ -42720,9 +42933,20 @@ interface operations {
42720
42933
  };
42721
42934
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
42722
42935
  warnings: {
42936
+ /** @description The warning id, W1 to W13. */
42723
42937
  code: string;
42938
+ /** @description Where, as step id then field. */
42724
42939
  path: string;
42940
+ /** @description What the warning says. */
42725
42941
  rule: string;
42942
+ /** @description Equal to rule. */
42943
+ message: string;
42944
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
42945
+ pointer: string;
42946
+ /** @description One sentence saying what to do. */
42947
+ hint: string;
42948
+ /** @description The warning's entry on the Sequence rules page. */
42949
+ docs_url: string;
42726
42950
  }[];
42727
42951
  /** @description The user who created the Motion. */
42728
42952
  created_by_user_id: string | null;
@@ -42758,187 +42982,7 @@ interface operations {
42758
42982
  "application/json": components["schemas"]["Error"];
42759
42983
  };
42760
42984
  };
42761
- /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
42762
- 403: {
42763
- headers: {
42764
- [name: string]: unknown;
42765
- };
42766
- content: {
42767
- "application/json": components["schemas"]["Error"];
42768
- };
42769
- };
42770
- /** @description RESOURCE_NOT_FOUND: no such Motion. ACCOUNT_NOT_FOUND: an id in account_ids is not one of your accounts (the message names it). */
42771
- 404: {
42772
- headers: {
42773
- [name: string]: unknown;
42774
- };
42775
- content: {
42776
- "application/json": components["schemas"]["Error"];
42777
- };
42778
- };
42779
- /** @description MOTION_STATUS_CONFLICT: the Motion is not a draft. The message names the current status and the operations it allows. */
42780
- 409: {
42781
- headers: {
42782
- [name: string]: unknown;
42783
- };
42784
- content: {
42785
- "application/json": components["schemas"]["Error"];
42786
- };
42787
- };
42788
- /** @description MOTION_NOT_STARTABLE: the draft is not complete. errors[] lists every gap as {path, rule}, for example {path: "schedule.timezone", rule: "required to start"}. */
42789
- 422: {
42790
- headers: {
42791
- [name: string]: unknown;
42792
- };
42793
- content: {
42794
- "application/json": components["schemas"]["Error"];
42795
- };
42796
- };
42797
- /** @description Rate limited, slow down and retry after the hinted delay. */
42798
- 429: {
42799
- headers: {
42800
- "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
42801
- RateLimit: components["headers"]["RateLimit"];
42802
- "Retry-After": components["headers"]["Retry-After"];
42803
- [name: string]: unknown;
42804
- };
42805
- content: {
42806
- "application/json": components["schemas"]["Error"];
42807
- };
42808
- };
42809
- };
42810
- };
42811
- postV1MotionsIdPause: {
42812
- parameters: {
42813
- query?: never;
42814
- header?: never;
42815
- path: {
42816
- /** @description Motion id (mot_...). */
42817
- id: string;
42818
- };
42819
- cookie?: never;
42820
- };
42821
- requestBody?: never;
42822
- responses: {
42823
- /** @description The Motion, now paused with pause_reason user. */
42824
- 200: {
42825
- headers: {
42826
- "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
42827
- RateLimit: components["headers"]["RateLimit"];
42828
- [name: string]: unknown;
42829
- };
42830
- content: {
42831
- "application/json": {
42832
- /**
42833
- * @description Response type discriminator.
42834
- * @enum {string}
42835
- */
42836
- object: "motion";
42837
- /** @description Motion id (mot_...). */
42838
- id: string;
42839
- name: string;
42840
- /** @enum {string} */
42841
- status: "draft" | "scheduled" | "active" | "paused" | "completed" | "archived";
42842
- /**
42843
- * @description Why it is paused; null unless status is paused.
42844
- * @enum {string|null}
42845
- */
42846
- pause_reason: "user" | "acceptance_floor" | "no_sending_account" | "tier_required" | null;
42847
- /** @description Contact lists (cl_...) whose Contacts enroll. */
42848
- contact_list_ids: string[];
42849
- /** @description Contact lists (cl_...) whose Contacts never enroll. */
42850
- exclusion_list_ids: string[];
42851
- /** @description Sending accounts (acc_...). An account that is removed or archived leaves this list. */
42852
- account_ids: string[];
42853
- schedule: {
42854
- /** @description IANA zone. */
42855
- timezone: string | null;
42856
- days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[];
42857
- hours: {
42858
- start: string;
42859
- end: string;
42860
- };
42861
- /** @description ISO 8601. */
42862
- start_at: string | null;
42863
- /** @description ISO 8601. */
42864
- end_at: string | null;
42865
- };
42866
- settings: {
42867
- accounts_per_contact: number;
42868
- /** @enum {string} */
42869
- assign: "auto" | "even" | "already_connected";
42870
- new_enrollments_per_account_per_day: number;
42871
- exclude: {
42872
- other_motions: boolean;
42873
- known_chats: boolean;
42874
- };
42875
- /** @description null: disabled. */
42876
- acceptance_floor: {
42877
- percent: number;
42878
- min_invites: number;
42879
- } | null;
42880
- variables: {
42881
- [key: string]: string;
42882
- };
42883
- stop_on_engagement: boolean;
42884
- };
42885
- /** @description contact.* predicates a Contact must all pass to enroll. */
42886
- where: {
42887
- [key: string]: unknown;
42888
- }[];
42889
- /** @description The current Sequence document; null until one is set. */
42890
- sequence: components["schemas"]["SequenceDocument"] | null;
42891
- /** @description The current Sequence version. 1 until a structural edit after start. */
42892
- sequence_version: number;
42893
- /** @description Enrollments by status. */
42894
- counts: {
42895
- pending: number;
42896
- active: number;
42897
- paused: number;
42898
- finished: number;
42899
- skipped: number;
42900
- };
42901
- /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
42902
- warnings: {
42903
- code: string;
42904
- path: string;
42905
- rule: string;
42906
- }[];
42907
- /** @description The user who created the Motion. */
42908
- created_by_user_id: string | null;
42909
- /** @description ISO 8601. */
42910
- created_at: string;
42911
- /** @description ISO 8601. */
42912
- updated_at: string;
42913
- /** @description When it first became active. */
42914
- started_at: string | null;
42915
- /** @description When it completed. */
42916
- completed_at: string | null;
42917
- /** @description When it was archived. */
42918
- archived_at: string | null;
42919
- safety_warning?: components["schemas"]["SafetyWarning"];
42920
- };
42921
- };
42922
- };
42923
- /** @description INVALID_REQUEST: this call takes no query parameters and no request body (none, or {}). Anything else is refused, never ignored. */
42924
- 400: {
42925
- headers: {
42926
- [name: string]: unknown;
42927
- };
42928
- content: {
42929
- "application/json": components["schemas"]["Error"];
42930
- };
42931
- };
42932
- /** @description Missing or invalid API key. */
42933
- 401: {
42934
- headers: {
42935
- [name: string]: unknown;
42936
- };
42937
- content: {
42938
- "application/json": components["schemas"]["Error"];
42939
- };
42940
- };
42941
- /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. */
42985
+ /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
42942
42986
  403: {
42943
42987
  headers: {
42944
42988
  [name: string]: unknown;
@@ -42956,7 +43000,7 @@ interface operations {
42956
43000
  "application/json": components["schemas"]["Error"];
42957
43001
  };
42958
43002
  };
42959
- /** @description MOTION_STATUS_CONFLICT: the Motion is not scheduled or active. The message names the current status and the operations it allows. */
43003
+ /** @description MOTION_STATUS_CONFLICT: the Motion is not a draft. The message names the current status and the operations it allows. */
42960
43004
  409: {
42961
43005
  headers: {
42962
43006
  [name: string]: unknown;
@@ -42965,6 +43009,15 @@ interface operations {
42965
43009
  "application/json": components["schemas"]["Error"];
42966
43010
  };
42967
43011
  };
43012
+ /** @description MOTION_NOT_STARTABLE: the draft is not complete. errors[] lists every gap as {path, rule}, for example {path: "schedule.timezone", rule: "required to start"}. */
43013
+ 422: {
43014
+ headers: {
43015
+ [name: string]: unknown;
43016
+ };
43017
+ content: {
43018
+ "application/json": components["schemas"]["Error"];
43019
+ };
43020
+ };
42968
43021
  /** @description Rate limited, slow down and retry after the hinted delay. */
42969
43022
  429: {
42970
43023
  headers: {
@@ -42979,7 +43032,7 @@ interface operations {
42979
43032
  };
42980
43033
  };
42981
43034
  };
42982
- postV1MotionsIdResume: {
43035
+ postV1MotionsIdPause: {
42983
43036
  parameters: {
42984
43037
  query?: never;
42985
43038
  header?: never;
@@ -42991,7 +43044,7 @@ interface operations {
42991
43044
  };
42992
43045
  requestBody?: never;
42993
43046
  responses: {
42994
- /** @description The Motion, now active or scheduled. */
43047
+ /** @description The Motion, now paused with pause_reason user. */
42995
43048
  200: {
42996
43049
  headers: {
42997
43050
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -43048,6 +43101,7 @@ interface operations {
43048
43101
  percent: number;
43049
43102
  min_invites: number;
43050
43103
  } | null;
43104
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
43051
43105
  variables: {
43052
43106
  [key: string]: string;
43053
43107
  };
@@ -43061,6 +43115,10 @@ interface operations {
43061
43115
  sequence: components["schemas"]["SequenceDocument"] | null;
43062
43116
  /** @description The current Sequence version. 1 until a structural edit after start. */
43063
43117
  sequence_version: number;
43118
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
43119
+ sequence_revision: number;
43120
+ /** @description The user who saved the current Sequence revision. */
43121
+ sequence_updated_by_user_id: string | null;
43064
43122
  /** @description Enrollments by status. */
43065
43123
  counts: {
43066
43124
  pending: number;
@@ -43071,9 +43129,20 @@ interface operations {
43071
43129
  };
43072
43130
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
43073
43131
  warnings: {
43132
+ /** @description The warning id, W1 to W13. */
43074
43133
  code: string;
43134
+ /** @description Where, as step id then field. */
43075
43135
  path: string;
43136
+ /** @description What the warning says. */
43076
43137
  rule: string;
43138
+ /** @description Equal to rule. */
43139
+ message: string;
43140
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
43141
+ pointer: string;
43142
+ /** @description One sentence saying what to do. */
43143
+ hint: string;
43144
+ /** @description The warning's entry on the Sequence rules page. */
43145
+ docs_url: string;
43077
43146
  }[];
43078
43147
  /** @description The user who created the Motion. */
43079
43148
  created_by_user_id: string | null;
@@ -43109,7 +43178,7 @@ interface operations {
43109
43178
  "application/json": components["schemas"]["Error"];
43110
43179
  };
43111
43180
  };
43112
- /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
43181
+ /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. */
43113
43182
  403: {
43114
43183
  headers: {
43115
43184
  [name: string]: unknown;
@@ -43127,7 +43196,7 @@ interface operations {
43127
43196
  "application/json": components["schemas"]["Error"];
43128
43197
  };
43129
43198
  };
43130
- /** @description MOTION_STATUS_CONFLICT: the Motion is not paused. The message names the current status and the operations it allows. */
43199
+ /** @description MOTION_STATUS_CONFLICT: the Motion is not scheduled or active. The message names the current status and the operations it allows. */
43131
43200
  409: {
43132
43201
  headers: {
43133
43202
  [name: string]: unknown;
@@ -43136,15 +43205,6 @@ interface operations {
43136
43205
  "application/json": components["schemas"]["Error"];
43137
43206
  };
43138
43207
  };
43139
- /** @description MOTION_NOT_STARTABLE: the Motion no longer passes what start checks. errors[] lists every gap as {path, rule}, for example {path: "schedule.timezone", rule: "required to start"}. */
43140
- 422: {
43141
- headers: {
43142
- [name: string]: unknown;
43143
- };
43144
- content: {
43145
- "application/json": components["schemas"]["Error"];
43146
- };
43147
- };
43148
43208
  /** @description Rate limited, slow down and retry after the hinted delay. */
43149
43209
  429: {
43150
43210
  headers: {
@@ -43159,7 +43219,7 @@ interface operations {
43159
43219
  };
43160
43220
  };
43161
43221
  };
43162
- postV1MotionsIdArchive: {
43222
+ postV1MotionsIdResume: {
43163
43223
  parameters: {
43164
43224
  query?: never;
43165
43225
  header?: never;
@@ -43171,7 +43231,7 @@ interface operations {
43171
43231
  };
43172
43232
  requestBody?: never;
43173
43233
  responses: {
43174
- /** @description The Motion, now archived and read-only. */
43234
+ /** @description The Motion, now active or scheduled. */
43175
43235
  200: {
43176
43236
  headers: {
43177
43237
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -43228,6 +43288,7 @@ interface operations {
43228
43288
  percent: number;
43229
43289
  min_invites: number;
43230
43290
  } | null;
43291
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
43231
43292
  variables: {
43232
43293
  [key: string]: string;
43233
43294
  };
@@ -43241,6 +43302,10 @@ interface operations {
43241
43302
  sequence: components["schemas"]["SequenceDocument"] | null;
43242
43303
  /** @description The current Sequence version. 1 until a structural edit after start. */
43243
43304
  sequence_version: number;
43305
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
43306
+ sequence_revision: number;
43307
+ /** @description The user who saved the current Sequence revision. */
43308
+ sequence_updated_by_user_id: string | null;
43244
43309
  /** @description Enrollments by status. */
43245
43310
  counts: {
43246
43311
  pending: number;
@@ -43251,9 +43316,20 @@ interface operations {
43251
43316
  };
43252
43317
  /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
43253
43318
  warnings: {
43319
+ /** @description The warning id, W1 to W13. */
43254
43320
  code: string;
43321
+ /** @description Where, as step id then field. */
43255
43322
  path: string;
43323
+ /** @description What the warning says. */
43256
43324
  rule: string;
43325
+ /** @description Equal to rule. */
43326
+ message: string;
43327
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
43328
+ pointer: string;
43329
+ /** @description One sentence saying what to do. */
43330
+ hint: string;
43331
+ /** @description The warning's entry on the Sequence rules page. */
43332
+ docs_url: string;
43257
43333
  }[];
43258
43334
  /** @description The user who created the Motion. */
43259
43335
  created_by_user_id: string | null;
@@ -43289,7 +43365,7 @@ interface operations {
43289
43365
  "application/json": components["schemas"]["Error"];
43290
43366
  };
43291
43367
  };
43292
- /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. */
43368
+ /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
43293
43369
  403: {
43294
43370
  headers: {
43295
43371
  [name: string]: unknown;
@@ -43307,7 +43383,7 @@ interface operations {
43307
43383
  "application/json": components["schemas"]["Error"];
43308
43384
  };
43309
43385
  };
43310
- /** @description MOTION_STATUS_CONFLICT: the Motion is already archived. The message names the current status and the operations it allows. */
43386
+ /** @description MOTION_STATUS_CONFLICT: the Motion is not paused. The message names the current status and the operations it allows. */
43311
43387
  409: {
43312
43388
  headers: {
43313
43389
  [name: string]: unknown;
@@ -43316,6 +43392,15 @@ interface operations {
43316
43392
  "application/json": components["schemas"]["Error"];
43317
43393
  };
43318
43394
  };
43395
+ /** @description MOTION_NOT_STARTABLE: the Motion no longer passes what start checks. errors[] lists every gap as {path, rule}, for example {path: "schedule.timezone", rule: "required to start"}. */
43396
+ 422: {
43397
+ headers: {
43398
+ [name: string]: unknown;
43399
+ };
43400
+ content: {
43401
+ "application/json": components["schemas"]["Error"];
43402
+ };
43403
+ };
43319
43404
  /** @description Rate limited, slow down and retry after the hinted delay. */
43320
43405
  429: {
43321
43406
  headers: {
@@ -43330,12 +43415,9 @@ interface operations {
43330
43415
  };
43331
43416
  };
43332
43417
  };
43333
- getV1MotionsIdSequence: {
43418
+ postV1MotionsIdArchive: {
43334
43419
  parameters: {
43335
- query?: {
43336
- /** @description Sequence version. Default: the current one. */
43337
- version?: number;
43338
- };
43420
+ query?: never;
43339
43421
  header?: never;
43340
43422
  path: {
43341
43423
  /** @description Motion id (mot_...). */
@@ -43345,7 +43427,7 @@ interface operations {
43345
43427
  };
43346
43428
  requestBody?: never;
43347
43429
  responses: {
43348
- /** @description One Sequence version. */
43430
+ /** @description The Motion, now archived and read-only. */
43349
43431
  200: {
43350
43432
  headers: {
43351
43433
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -43354,20 +43436,114 @@ interface operations {
43354
43436
  };
43355
43437
  content: {
43356
43438
  "application/json": {
43439
+ /**
43440
+ * @description Response type discriminator.
43441
+ * @enum {string}
43442
+ */
43443
+ object: "motion";
43444
+ /** @description Motion id (mot_...). */
43445
+ id: string;
43446
+ name: string;
43357
43447
  /** @enum {string} */
43358
- object: "sequence_version";
43359
- motion_id: string;
43360
- version: number;
43361
- document: components["schemas"]["SequenceDocument"];
43448
+ status: "draft" | "scheduled" | "active" | "paused" | "completed" | "archived";
43449
+ /**
43450
+ * @description Why it is paused; null unless status is paused.
43451
+ * @enum {string|null}
43452
+ */
43453
+ pause_reason: "user" | "acceptance_floor" | "no_sending_account" | "tier_required" | null;
43454
+ /** @description Contact lists (cl_...) whose Contacts enroll. */
43455
+ contact_list_ids: string[];
43456
+ /** @description Contact lists (cl_...) whose Contacts never enroll. */
43457
+ exclusion_list_ids: string[];
43458
+ /** @description Sending accounts (acc_...). An account that is removed or archived leaves this list. */
43459
+ account_ids: string[];
43460
+ schedule: {
43461
+ /** @description IANA zone. */
43462
+ timezone: string | null;
43463
+ days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[];
43464
+ hours: {
43465
+ start: string;
43466
+ end: string;
43467
+ };
43468
+ /** @description ISO 8601. */
43469
+ start_at: string | null;
43470
+ /** @description ISO 8601. */
43471
+ end_at: string | null;
43472
+ };
43473
+ settings: {
43474
+ accounts_per_contact: number;
43475
+ /** @enum {string} */
43476
+ assign: "auto" | "even" | "already_connected";
43477
+ new_enrollments_per_account_per_day: number;
43478
+ exclude: {
43479
+ other_motions: boolean;
43480
+ known_chats: boolean;
43481
+ };
43482
+ /** @description null: disabled. */
43483
+ acceptance_floor: {
43484
+ percent: number;
43485
+ min_invites: number;
43486
+ } | null;
43487
+ /** @description Deprecated (warning W13): Motion variables are removed; write text in place or use a custom field. */
43488
+ variables: {
43489
+ [key: string]: string;
43490
+ };
43491
+ stop_on_engagement: boolean;
43492
+ };
43493
+ /** @description contact.* predicates a Contact must all pass to enroll. */
43494
+ where: {
43495
+ [key: string]: unknown;
43496
+ }[];
43497
+ /** @description The current Sequence document; null until one is set. */
43498
+ sequence: components["schemas"]["SequenceDocument"] | null;
43499
+ /** @description The current Sequence version. 1 until a structural edit after start. */
43500
+ sequence_version: number;
43501
+ /** @description Rises by 1 on every accepted write that changes the stored Sequence (a draft rewrite, a copy edit, a structural edit); 0 while there is none. Send it back as if_sequence_revision on PATCH so a teammate's newer save is never overwritten silently. */
43502
+ sequence_revision: number;
43503
+ /** @description The user who saved the current Sequence revision. */
43504
+ sequence_updated_by_user_id: string | null;
43505
+ /** @description Enrollments by status. */
43506
+ counts: {
43507
+ pending: number;
43508
+ active: number;
43509
+ paused: number;
43510
+ finished: number;
43511
+ skipped: number;
43512
+ };
43513
+ /** @description Lint warnings on the Sequence and the Motion. They never block a write. */
43514
+ warnings: {
43515
+ /** @description The warning id, W1 to W13. */
43516
+ code: string;
43517
+ /** @description Where, as step id then field. */
43518
+ path: string;
43519
+ /** @description What the warning says. */
43520
+ rule: string;
43521
+ /** @description Equal to rule. */
43522
+ message: string;
43523
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
43524
+ pointer: string;
43525
+ /** @description One sentence saying what to do. */
43526
+ hint: string;
43527
+ /** @description The warning's entry on the Sequence rules page. */
43528
+ docs_url: string;
43529
+ }[];
43530
+ /** @description The user who created the Motion. */
43531
+ created_by_user_id: string | null;
43362
43532
  /** @description ISO 8601. */
43363
43533
  created_at: string;
43364
- /** @description Enrollments still running on this version. */
43365
- open_enrollments: number;
43534
+ /** @description ISO 8601. */
43535
+ updated_at: string;
43536
+ /** @description When it first became active. */
43537
+ started_at: string | null;
43538
+ /** @description When it completed. */
43539
+ completed_at: string | null;
43540
+ /** @description When it was archived. */
43541
+ archived_at: string | null;
43366
43542
  safety_warning?: components["schemas"]["SafetyWarning"];
43367
43543
  };
43368
43544
  };
43369
43545
  };
43370
- /** @description version is not a whole number of 1 or more. */
43546
+ /** @description INVALID_REQUEST: this call takes no query parameters and no request body (none, or {}). Anything else is refused, never ignored. */
43371
43547
  400: {
43372
43548
  headers: {
43373
43549
  [name: string]: unknown;
@@ -43385,7 +43561,16 @@ interface operations {
43385
43561
  "application/json": components["schemas"]["Error"];
43386
43562
  };
43387
43563
  };
43388
- /** @description RESOURCE_NOT_FOUND: no such Motion, or no such version (a draft without a sequence has none). */
43564
+ /** @description In a team, for an account in account_ids (named or already held). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: team access is off for the account, also for the person who connected it. A team Owner or Manager, and the Motion's creator, may always pause it, archive it, or send an update holding only account_ids that takes accounts out. Any other Member needs every account the Motion sends from to pause or archive, and removes only their own. Not fixed by retrying. */
43565
+ 403: {
43566
+ headers: {
43567
+ [name: string]: unknown;
43568
+ };
43569
+ content: {
43570
+ "application/json": components["schemas"]["Error"];
43571
+ };
43572
+ };
43573
+ /** @description RESOURCE_NOT_FOUND: no such Motion. ACCOUNT_NOT_FOUND: an id in account_ids is not one of your accounts (the message names it). */
43389
43574
  404: {
43390
43575
  headers: {
43391
43576
  [name: string]: unknown;
@@ -43394,6 +43579,15 @@ interface operations {
43394
43579
  "application/json": components["schemas"]["Error"];
43395
43580
  };
43396
43581
  };
43582
+ /** @description MOTION_STATUS_CONFLICT: the Motion is already archived. The message names the current status and the operations it allows. */
43583
+ 409: {
43584
+ headers: {
43585
+ [name: string]: unknown;
43586
+ };
43587
+ content: {
43588
+ "application/json": components["schemas"]["Error"];
43589
+ };
43590
+ };
43397
43591
  /** @description Rate limited, slow down and retry after the hinted delay. */
43398
43592
  429: {
43399
43593
  headers: {
@@ -43408,13 +43602,11 @@ interface operations {
43408
43602
  };
43409
43603
  };
43410
43604
  };
43411
- getV1MotionsIdPreview: {
43605
+ getV1MotionsIdSequence: {
43412
43606
  parameters: {
43413
43607
  query?: {
43414
- /** @description How many Contacts to render, the first enrollable ones by list order. 1 to 20, default 5. Not with contact_ids. */
43415
- sample?: number;
43416
- /** @description Comma list of Contact ids (con_...) to render, up to 20, in the order given. Not with sample. */
43417
- contact_ids?: string[];
43608
+ /** @description Sequence version. Default: the current one. */
43609
+ version?: number;
43418
43610
  };
43419
43611
  header?: never;
43420
43612
  path: {
@@ -43425,7 +43617,7 @@ interface operations {
43425
43617
  };
43426
43618
  requestBody?: never;
43427
43619
  responses: {
43428
- /** @description The preview. Nothing is sent, nothing is saved and no budget is spent; whatever only LinkedIn can answer is unknown. Rendered text is shown here and never stored. */
43620
+ /** @description One Sequence version. */
43429
43621
  200: {
43430
43622
  headers: {
43431
43623
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -43434,90 +43626,20 @@ interface operations {
43434
43626
  };
43435
43627
  content: {
43436
43628
  "application/json": {
43437
- /**
43438
- * @description Response type discriminator.
43439
- * @enum {string}
43440
- */
43441
- object: "motion_preview";
43442
- /** @description The Sequence version previewed. */
43443
- sequence_version: number;
43444
- /** @description Every distinct route through the Sequence, from the first step and from on_reply, as step ids in order. A step that branched carries the exit taken (has_post:then). Every route ends with end. */
43445
- paths: string[][];
43446
- /** @description true when there are more routes than the 200 listed, or when some rendered text was omitted (a response carries at most 1 MiB of it). */
43447
- truncated: boolean;
43448
- samples: {
43449
- contact_id: string;
43450
- /** @description The sending account this Contact would be assigned, from stored data; null when none can act or assignment needs LinkedIn. */
43451
- account_id: string | null;
43452
- /**
43453
- * @description Why the Contact would not be enrolled, from stored data: an Exclusion list holds it, it is or was within 90 days in another Motion, or an account already chats with it. null: nothing excludes it.
43454
- * @enum {string|null}
43455
- */
43456
- excluded: "in_exclusion_list" | "in_other_motion" | "known_chat" | null;
43457
- filters: {
43458
- index: number;
43459
- /**
43460
- * @description unknown: only LinkedIn can answer it.
43461
- * @enum {string}
43462
- */
43463
- result: "pass" | "fail" | "unknown";
43464
- }[];
43465
- /** @description Every step that sends text, rendered for this Contact. */
43466
- steps: {
43467
- step_id: string;
43468
- variants: {
43469
- variant_id: string;
43470
- /** @description The text as it would go out; null when the fallback is drop or skip, or when omitted is true. */
43471
- rendered: string | null;
43472
- /** @description The InMail subject; null otherwise, and when omitted is true. */
43473
- subject: string | null;
43474
- /** @description true when the text exists but the response already carries 1 MiB of rendered text, so rendered and subject are null. used_fallback and would_skip are still judged. */
43475
- omitted: boolean;
43476
- /** @description true when a variable had no value or the text was over the account's length limit. */
43477
- used_fallback: boolean;
43478
- }[];
43479
- /** @description A reason the step would be skipped that stored data settles (inmail_unavailable, missing_variable, text_too_long), else unknown. */
43480
- would_skip: string;
43481
- }[];
43482
- }[];
43483
- /** @description An estimate of how long the list takes, from each account's current budget ceilings (warm-up applied). It splits Contacts evenly over the sending accounts that can act and ignores what other Motions spend. */
43484
- projection: {
43485
- /** @description Contacts that would enroll: in a source list and in no exclusion list. null when the Motion has no Sequence. */
43486
- contacts: number | null;
43487
- accounts: {
43488
- account_id: string;
43489
- /** @description This account's share of the Contacts. */
43490
- contacts: number;
43491
- /** @description Schedule days to enroll that share; null when a ceiling of 0 admits none. */
43492
- enroll_days: number | null;
43493
- /** @description The limit that set this account's pace: daily_cap, or a budget row such as connection_requests_no_note. */
43494
- binding: string;
43495
- }[];
43496
- /** @description Calendar days of waits and timeouts on the longest route, rounded up. null when the Motion has no Sequence. */
43497
- longest_path_days: number | null;
43498
- /** @description Schedule days until the last Contact finishes: the slowest account's enroll_days plus the longest route in schedule days. null when nothing can run. */
43499
- finish_working_days: number | null;
43500
- /** @description Whether every Contact finishes before schedule.end_at, counting schedule days from now (or schedule.start_at if later). null when the schedule has no end_at or the Motion has no Sequence. schedule.hours is not modelled: the estimate assumes each day's actions fit the daily window. */
43501
- fits_before_end_at: boolean | null;
43502
- /** @description The slowest account and its limiter; null when no sending account can act. */
43503
- binding: {
43504
- account_id: string;
43505
- limiter: string;
43506
- } | null;
43507
- /** @description One line that says it is an estimate at the account's steady-state ceiling, for example: 100 Contacts finish in 27 working days; binding row daily_cap (an estimate at each Account's steady-state ceiling). When fits_before_end_at is false it says the Motion ends first and how many Contacts can enroll by then. */
43508
- summary: string;
43509
- };
43510
- /** @description Lint warnings, as on the Motion. */
43511
- warnings: {
43512
- code: string;
43513
- path: string;
43514
- rule: string;
43515
- }[];
43629
+ /** @enum {string} */
43630
+ object: "sequence_version";
43631
+ motion_id: string;
43632
+ version: number;
43633
+ document: components["schemas"]["SequenceDocument"];
43634
+ /** @description ISO 8601. */
43635
+ created_at: string;
43636
+ /** @description Enrollments still running on this version. */
43637
+ open_enrollments: number;
43516
43638
  safety_warning?: components["schemas"]["SafetyWarning"];
43517
43639
  };
43518
43640
  };
43519
43641
  };
43520
- /** @description INVALID_REQUEST: sample is not a whole number from 1 to 20, contact_ids holds more than 20 ids, a blank or repeated id, a parameter given twice or empty, a blank unknown parameter, both sample and contact_ids, or an unknown query parameter. */
43642
+ /** @description version is not a whole number of 1 or more. */
43521
43643
  400: {
43522
43644
  headers: {
43523
43645
  [name: string]: unknown;
@@ -43535,7 +43657,168 @@ interface operations {
43535
43657
  "application/json": components["schemas"]["Error"];
43536
43658
  };
43537
43659
  };
43538
- /** @description RESOURCE_NOT_FOUND: no such Motion, or a contact_ids entry that is not one of your Contacts (a merged Contact names its survivor). */
43660
+ /** @description RESOURCE_NOT_FOUND: no such Motion, or no such version (a draft without a sequence has none). */
43661
+ 404: {
43662
+ headers: {
43663
+ [name: string]: unknown;
43664
+ };
43665
+ content: {
43666
+ "application/json": components["schemas"]["Error"];
43667
+ };
43668
+ };
43669
+ /** @description Rate limited, slow down and retry after the hinted delay. */
43670
+ 429: {
43671
+ headers: {
43672
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
43673
+ RateLimit: components["headers"]["RateLimit"];
43674
+ "Retry-After": components["headers"]["Retry-After"];
43675
+ [name: string]: unknown;
43676
+ };
43677
+ content: {
43678
+ "application/json": components["schemas"]["Error"];
43679
+ };
43680
+ };
43681
+ };
43682
+ };
43683
+ getV1MotionsIdPreview: {
43684
+ parameters: {
43685
+ query?: {
43686
+ /** @description How many Contacts to render, the first enrollable ones by list order. 1 to 20, default 5. Not with contact_ids. */
43687
+ sample?: number;
43688
+ /** @description Contact ids (con_...) to render, up to 20, in the order given. Not with sample. Repeat the key, comma-separate or mix; empties ignored. */
43689
+ contact_ids?: string[];
43690
+ };
43691
+ header?: never;
43692
+ path: {
43693
+ /** @description Motion id (mot_...). */
43694
+ id: string;
43695
+ };
43696
+ cookie?: never;
43697
+ };
43698
+ requestBody?: never;
43699
+ responses: {
43700
+ /** @description The preview. Nothing is sent, nothing is saved and no budget is spent; whatever only LinkedIn can answer is unknown. Rendered text is shown here and never stored. */
43701
+ 200: {
43702
+ headers: {
43703
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
43704
+ RateLimit: components["headers"]["RateLimit"];
43705
+ [name: string]: unknown;
43706
+ };
43707
+ content: {
43708
+ "application/json": {
43709
+ /**
43710
+ * @description Response type discriminator.
43711
+ * @enum {string}
43712
+ */
43713
+ object: "motion_preview";
43714
+ /** @description The Sequence version previewed. */
43715
+ sequence_version: number;
43716
+ /** @description Every distinct route through the Sequence, from the first step and from on_reply, as step ids in order. A step that branched carries the exit taken (has_post:then). Every route ends with end. */
43717
+ paths: string[][];
43718
+ /** @description true when there are more routes than the 200 listed, or when some rendered text was omitted (a response carries at most 1 MiB of it). */
43719
+ truncated: boolean;
43720
+ samples: {
43721
+ contact_id: string;
43722
+ /** @description The sending account this Contact would be assigned, from stored data; null when none can act or assignment needs LinkedIn. */
43723
+ account_id: string | null;
43724
+ /**
43725
+ * @description Why the Contact would not be enrolled, from stored data: an Exclusion list holds it, it is or was within 90 days in another Motion, or an account already chats with it. null: nothing excludes it.
43726
+ * @enum {string|null}
43727
+ */
43728
+ excluded: "in_exclusion_list" | "in_other_motion" | "known_chat" | null;
43729
+ filters: {
43730
+ index: number;
43731
+ /**
43732
+ * @description unknown: only LinkedIn can answer it.
43733
+ * @enum {string}
43734
+ */
43735
+ result: "pass" | "fail" | "unknown";
43736
+ }[];
43737
+ /** @description Every step that sends text, rendered for this Contact. */
43738
+ steps: {
43739
+ step_id: string;
43740
+ variants: {
43741
+ variant_id: string;
43742
+ /** @description The text as it would go out; null when the fallback is drop or skip, or when omitted is true. */
43743
+ rendered: string | null;
43744
+ /** @description The InMail subject; null otherwise, and when omitted is true. */
43745
+ subject: string | null;
43746
+ /** @description true when the text exists but the response already carries 1 MiB of rendered text, so rendered and subject are null. used_fallback and would_skip are still judged. */
43747
+ omitted: boolean;
43748
+ /** @description true when a variable had no value or the text was over the account's length limit. */
43749
+ used_fallback: boolean;
43750
+ }[];
43751
+ /** @description A reason the step would be skipped that stored data settles (inmail_unavailable, missing_variable, text_too_long), else unknown. */
43752
+ would_skip: string;
43753
+ }[];
43754
+ }[];
43755
+ /** @description An estimate of how long the list takes, from each account's current budget ceilings (warm-up applied). It splits Contacts evenly over the sending accounts that can act and ignores what other Motions spend. */
43756
+ projection: {
43757
+ /** @description Contacts that would enroll: in a source list and in no exclusion list. null when the Motion has no Sequence. */
43758
+ contacts: number | null;
43759
+ accounts: {
43760
+ account_id: string;
43761
+ /** @description This account's share of the Contacts. */
43762
+ contacts: number;
43763
+ /** @description Schedule days to enroll that share; null when a ceiling of 0 admits none. */
43764
+ enroll_days: number | null;
43765
+ /** @description The limit that set this account's pace: daily_cap, or a budget row such as connection_requests_no_note. */
43766
+ binding: string;
43767
+ }[];
43768
+ /** @description Calendar days of waits and timeouts on the longest route, rounded up. null when the Motion has no Sequence. */
43769
+ longest_path_days: number | null;
43770
+ /** @description Schedule days until the last Contact finishes: the slowest account's enroll_days plus the longest route in schedule days. null when nothing can run. */
43771
+ finish_working_days: number | null;
43772
+ /** @description Whether every Contact finishes before schedule.end_at, counting schedule days from now (or schedule.start_at if later). null when the schedule has no end_at or the Motion has no Sequence. schedule.hours is not modelled: the estimate assumes each day's actions fit the daily window. */
43773
+ fits_before_end_at: boolean | null;
43774
+ /** @description The slowest account and its limiter; null when no sending account can act. */
43775
+ binding: {
43776
+ account_id: string;
43777
+ limiter: string;
43778
+ } | null;
43779
+ /** @description One line that says it is an estimate at the account's steady-state ceiling, for example: 100 Contacts finish in 27 working days; binding row daily_cap (an estimate at each Account's steady-state ceiling). When fits_before_end_at is false it says the Motion ends first and how many Contacts can enroll by then. */
43780
+ summary: string;
43781
+ };
43782
+ /** @description Lint warnings, as on the Motion. */
43783
+ warnings: {
43784
+ /** @description The warning id, W1 to W13. */
43785
+ code: string;
43786
+ /** @description Where, as step id then field. */
43787
+ path: string;
43788
+ /** @description What the warning says. */
43789
+ rule: string;
43790
+ /** @description Equal to rule. */
43791
+ message: string;
43792
+ /** @description RFC 6901 JSON Pointer into the Sequence document; empty for the document or a Motion-level warning. */
43793
+ pointer: string;
43794
+ /** @description One sentence saying what to do. */
43795
+ hint: string;
43796
+ /** @description The warning's entry on the Sequence rules page. */
43797
+ docs_url: string;
43798
+ }[];
43799
+ safety_warning?: components["schemas"]["SafetyWarning"];
43800
+ };
43801
+ };
43802
+ };
43803
+ /** @description INVALID_REQUEST: sample is not a whole number from 1 to 20, contact_ids holds more than 20 ids, a blank or repeated id, a parameter given twice or empty, a blank unknown parameter, both sample and contact_ids, or an unknown query parameter. */
43804
+ 400: {
43805
+ headers: {
43806
+ [name: string]: unknown;
43807
+ };
43808
+ content: {
43809
+ "application/json": components["schemas"]["Error"];
43810
+ };
43811
+ };
43812
+ /** @description Missing or invalid API key. */
43813
+ 401: {
43814
+ headers: {
43815
+ [name: string]: unknown;
43816
+ };
43817
+ content: {
43818
+ "application/json": components["schemas"]["Error"];
43819
+ };
43820
+ };
43821
+ /** @description RESOURCE_NOT_FOUND: no such Motion, or a contact_ids entry that is not one of your Contacts (a merged Contact names its survivor). */
43539
43822
  404: {
43540
43823
  headers: {
43541
43824
  [name: string]: unknown;
@@ -43780,10 +44063,22 @@ interface operations {
43780
44063
  contact_id?: string;
43781
44064
  /** @description Only Enrollments on this account (acc_...). */
43782
44065
  account_id?: string;
43783
- /** @description Comma list of pending, active, paused, finished, skipped. Default: all. */
44066
+ /** @description pending, active, paused, finished, skipped. Default: all. Repeat the key, comma-separate or mix; empties ignored. */
43784
44067
  status?: ("pending" | "active" | "paused" | "finished" | "skipped")[];
43785
44068
  /** @description Only Enrollments currently at this Step. */
43786
44069
  step_id?: string;
44070
+ /** @description Only Enrollments running this Sequence version (a whole number, 1 or more). Default: every version. */
44071
+ version?: number;
44072
+ /** @description Only Enrollments with a record on this Step in their Sequence version (they reached and ran it). */
44073
+ done_step?: string;
44074
+ /** @description With done_step only: how that Step ended. The 200 response description defines each value. */
44075
+ outcome?: "executed" | "skipped" | "failed" | "accepted" | "not_accepted" | "replied" | "no_reply" | "seen";
44076
+ /** @description Catalogue reason codes: skip, finish or Step reasons (on done_step when given). Repeat the key, comma-separate or mix; empties ignored. */
44077
+ reason?: ("in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | "already_following" | "not_following" | "already_connected" | "invite_pending" | "already_invited" | "no_pending_invite" | "not_connected" | "inmail_unavailable" | "no_eligible_post" | "already_reacted" | "already_commented" | "missing_variable" | "no_endorsable_skill" | "text_too_long" | "already_attempted" | "platform_rejected" | "recipient_unreachable" | "platform_error" | "outcome_unknown" | "tag_limit")[];
44078
+ /** @description Only Enrollments whose variant on that variant's Step is this one. */
44079
+ variant_id?: string;
44080
+ /** @description Relationship to the account at the start: connected, not_connected, invite_pending, unknown. Repeat the key, comma-separate or mix; empties ignored. */
44081
+ relationship_at_enrollment?: ("connected" | "not_connected" | "invite_pending" | "unknown")[];
43787
44082
  /** @description Max items per page (1-100, default 20). */
43788
44083
  limit?: number;
43789
44084
  /** @description Pagination cursor from a previous response; pass it back verbatim with the same filters. */
@@ -43795,7 +44090,7 @@ interface operations {
43795
44090
  };
43796
44091
  requestBody?: never;
43797
44092
  responses: {
43798
- /** @description Enrollments, newest first. */
44093
+ /** @description Enrollments, newest first. Filters combine with AND. The counted unit is the Enrollment, one Contact on one account in one Motion: each Contact counts once per Account. done_step with outcome lists who did what at a Step: executed, skipped, failed (the Step's own record; a condition or wait counts as executed); accepted, not_accepted (on invite.send: its invitation was accepted, or withdrawn or never accepted before the wait for it timed out; on an until invite.accepted: its then or else exit); replied, no_reply (on message.send or inmail.send: a reply came after it, or none and the Enrollment left the following until message.replied by else or finished; on an until message.replied: its then or else exit); seen (on message.send or inmail.send: a read receipt arrived for it or the person replied after it, the same rule as the analytics seen rate). An outcome the Step's kind cannot have is a 400. */
43799
44094
  200: {
43800
44095
  headers: {
43801
44096
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -43826,11 +44121,12 @@ interface operations {
43826
44121
  status: "pending" | "active" | "paused" | "finished" | "skipped";
43827
44122
  /** @description The Step it is at; null before it starts. */
43828
44123
  current_step_id: string | null;
43829
- /** @description What it waits for; null when nothing holds it. */
44124
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
43830
44125
  waiting: {
43831
44126
  /** @enum {string} */
43832
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
43833
- step_id: string;
44127
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44128
+ /** @description The Step it waits at; null before it starts. */
44129
+ step_id: string | null;
43834
44130
  /** @description ISO 8601, when the wait ends; null when open-ended. */
43835
44131
  until: string | null;
43836
44132
  } | null;
@@ -43844,6 +44140,10 @@ interface operations {
43844
44140
  * @enum {string|null}
43845
44141
  */
43846
44142
  skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44143
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44144
+ finish_message: string | null;
44145
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44146
+ skip_message: string | null;
43847
44147
  /** @description More on the skip, for example the index of the where filter that failed. */
43848
44148
  skip_detail: string | null;
43849
44149
  /** @description True once the Contact replied. */
@@ -43852,6 +44152,11 @@ interface operations {
43852
44152
  variants: {
43853
44153
  [key: string]: string;
43854
44154
  };
44155
+ /**
44156
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44157
+ * @enum {string|null}
44158
+ */
44159
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
43855
44160
  /** @description ISO 8601. */
43856
44161
  created_at: string;
43857
44162
  /** @description When it started. */
@@ -43865,7 +44170,7 @@ interface operations {
43865
44170
  };
43866
44171
  };
43867
44172
  };
43868
- /** @description Invalid filter, a query key given twice, an empty value, or a malformed cursor. */
44173
+ /** @description Invalid filter, a query key given twice, an empty value, or a malformed cursor. outcome without done_step, or an outcome that step's kind cannot have (the message names the step and its kind). A reason that is not a code of the catalogue (https://docs.curviate.com/reference/motion-reasons). */
43869
44174
  400: {
43870
44175
  headers: {
43871
44176
  [name: string]: unknown;
@@ -43955,11 +44260,12 @@ interface operations {
43955
44260
  status: "pending" | "active" | "paused" | "finished" | "skipped";
43956
44261
  /** @description The Step it is at; null before it starts. */
43957
44262
  current_step_id: string | null;
43958
- /** @description What it waits for; null when nothing holds it. */
44263
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
43959
44264
  waiting: {
43960
44265
  /** @enum {string} */
43961
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
43962
- step_id: string;
44266
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44267
+ /** @description The Step it waits at; null before it starts. */
44268
+ step_id: string | null;
43963
44269
  /** @description ISO 8601, when the wait ends; null when open-ended. */
43964
44270
  until: string | null;
43965
44271
  } | null;
@@ -43973,6 +44279,10 @@ interface operations {
43973
44279
  * @enum {string|null}
43974
44280
  */
43975
44281
  skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44282
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44283
+ finish_message: string | null;
44284
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44285
+ skip_message: string | null;
43976
44286
  /** @description More on the skip, for example the index of the where filter that failed. */
43977
44287
  skip_detail: string | null;
43978
44288
  /** @description True once the Contact replied. */
@@ -43981,6 +44291,11 @@ interface operations {
43981
44291
  variants: {
43982
44292
  [key: string]: string;
43983
44293
  };
44294
+ /**
44295
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44296
+ * @enum {string|null}
44297
+ */
44298
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
43984
44299
  /** @description ISO 8601. */
43985
44300
  created_at: string;
43986
44301
  /** @description When it started. */
@@ -43991,10 +44306,10 @@ interface operations {
43991
44306
  /** @description The Step; null for requeued. */
43992
44307
  step_id: string | null;
43993
44308
  /**
43994
- * @description requeued: the Enrollment ended before it started and was added again.
44309
+ * @description requeued: the Enrollment ended before it started and was added again. seen: a read receipt arrived for the message of step_id; at is when the receipt arrived (LinkedIn gives no read time). reassigned: it moved to another account.
43995
44310
  * @enum {string}
43996
44311
  */
43997
- outcome: "executed" | "skipped" | "failed" | "taken" | "requeued";
44312
+ outcome: "executed" | "skipped" | "failed" | "taken" | "requeued" | "seen" | "reassigned";
43998
44313
  /**
43999
44314
  * @description The exit taken.
44000
44315
  * @enum {string|null}
@@ -44003,8 +44318,15 @@ interface operations {
44003
44318
  /** @description The variant used. */
44004
44319
  variant_id: string | null;
44005
44320
  used_fallback: boolean;
44006
- /** @description Why it was skipped or failed. */
44007
- reason: string | null;
44321
+ /**
44322
+ * @description Why it was skipped or failed: a code of the reasons catalogue, https://docs.curviate.com/reference/motion-reasons.
44323
+ * @enum {string|null}
44324
+ */
44325
+ reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | "already_following" | "not_following" | "already_connected" | "invite_pending" | "already_invited" | "no_pending_invite" | "not_connected" | "inmail_unavailable" | "no_eligible_post" | "already_reacted" | "already_commented" | "missing_variable" | "no_endorsable_skill" | "text_too_long" | "already_attempted" | "platform_rejected" | "recipient_unreachable" | "platform_error" | "outcome_unknown" | "tag_limit" | null;
44326
+ /** @description The catalogue's one-line sentence for reason; null when reason is. */
44327
+ reason_message: string | null;
44328
+ /** @description The account that ran it; null for an entry no account ran (requeued). */
44329
+ account_id: string | null;
44008
44330
  /** @description ISO 8601. */
44009
44331
  at: string;
44010
44332
  }[];
@@ -44084,11 +44406,12 @@ interface operations {
44084
44406
  status: "pending" | "active" | "paused" | "finished" | "skipped";
44085
44407
  /** @description The Step it is at; null before it starts. */
44086
44408
  current_step_id: string | null;
44087
- /** @description What it waits for; null when nothing holds it. */
44409
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
44088
44410
  waiting: {
44089
44411
  /** @enum {string} */
44090
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
44091
- step_id: string;
44412
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44413
+ /** @description The Step it waits at; null before it starts. */
44414
+ step_id: string | null;
44092
44415
  /** @description ISO 8601, when the wait ends; null when open-ended. */
44093
44416
  until: string | null;
44094
44417
  } | null;
@@ -44102,6 +44425,10 @@ interface operations {
44102
44425
  * @enum {string|null}
44103
44426
  */
44104
44427
  skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44428
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44429
+ finish_message: string | null;
44430
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44431
+ skip_message: string | null;
44105
44432
  /** @description More on the skip, for example the index of the where filter that failed. */
44106
44433
  skip_detail: string | null;
44107
44434
  /** @description True once the Contact replied. */
@@ -44110,6 +44437,11 @@ interface operations {
44110
44437
  variants: {
44111
44438
  [key: string]: string;
44112
44439
  };
44440
+ /**
44441
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44442
+ * @enum {string|null}
44443
+ */
44444
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
44113
44445
  /** @description ISO 8601. */
44114
44446
  created_at: string;
44115
44447
  /** @description When it started. */
@@ -44179,6 +44511,151 @@ interface operations {
44179
44511
  };
44180
44512
  };
44181
44513
  };
44514
+ postV1EnrollmentsIdPause: {
44515
+ parameters: {
44516
+ query?: never;
44517
+ header?: never;
44518
+ path: {
44519
+ /** @description Enrollment id (enr_...). */
44520
+ id: string;
44521
+ };
44522
+ cookie?: never;
44523
+ };
44524
+ requestBody?: never;
44525
+ responses: {
44526
+ /** @description The Enrollment, paused by you: status paused, waiting.kind paused_by_user. */
44527
+ 200: {
44528
+ headers: {
44529
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
44530
+ RateLimit: components["headers"]["RateLimit"];
44531
+ [name: string]: unknown;
44532
+ };
44533
+ content: {
44534
+ "application/json": {
44535
+ /**
44536
+ * @description Response type discriminator.
44537
+ * @enum {string}
44538
+ */
44539
+ object: "enrollment";
44540
+ /** @description Enrollment id (enr_...). */
44541
+ id: string;
44542
+ /** @description The Motion (mot_...). */
44543
+ motion_id: string;
44544
+ /** @description The Contact (con_...); null once the Contact is deleted. */
44545
+ contact_id: string | null;
44546
+ /** @description The sending account (acc_...); null until one is assigned. */
44547
+ account_id: string | null;
44548
+ /** @description The Sequence version this Enrollment runs on. */
44549
+ sequence_version: number;
44550
+ /** @enum {string} */
44551
+ status: "pending" | "active" | "paused" | "finished" | "skipped";
44552
+ /** @description The Step it is at; null before it starts. */
44553
+ current_step_id: string | null;
44554
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
44555
+ waiting: {
44556
+ /** @enum {string} */
44557
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44558
+ /** @description The Step it waits at; null before it starts. */
44559
+ step_id: string | null;
44560
+ /** @description ISO 8601, when the wait ends; null when open-ended. */
44561
+ until: string | null;
44562
+ } | null;
44563
+ /**
44564
+ * @description Why it finished; null unless status is finished.
44565
+ * @enum {string|null}
44566
+ */
44567
+ finish_reason: "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | null;
44568
+ /**
44569
+ * @description Why the Contact was not enrolled; null unless status is skipped.
44570
+ * @enum {string|null}
44571
+ */
44572
+ skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44573
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44574
+ finish_message: string | null;
44575
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44576
+ skip_message: string | null;
44577
+ /** @description More on the skip, for example the index of the where filter that failed. */
44578
+ skip_detail: string | null;
44579
+ /** @description True once the Contact replied. */
44580
+ replied: boolean;
44581
+ /** @description The variant chosen per Step: step id to variant id. */
44582
+ variants: {
44583
+ [key: string]: string;
44584
+ };
44585
+ /**
44586
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44587
+ * @enum {string|null}
44588
+ */
44589
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
44590
+ /** @description ISO 8601. */
44591
+ created_at: string;
44592
+ /** @description When it started. */
44593
+ started_at: string | null;
44594
+ /** @description When it finished. */
44595
+ finished_at: string | null;
44596
+ safety_warning?: components["schemas"]["SafetyWarning"];
44597
+ };
44598
+ };
44599
+ };
44600
+ /** @description INVALID_REQUEST: this call takes no query parameters and no request body (none, or {}). */
44601
+ 400: {
44602
+ headers: {
44603
+ [name: string]: unknown;
44604
+ };
44605
+ content: {
44606
+ "application/json": components["schemas"]["Error"];
44607
+ };
44608
+ };
44609
+ /** @description Missing or invalid API key. */
44610
+ 401: {
44611
+ headers: {
44612
+ [name: string]: unknown;
44613
+ };
44614
+ content: {
44615
+ "application/json": components["schemas"]["Error"];
44616
+ };
44617
+ };
44618
+ /** @description In a team, for the account the Enrollment runs on (before one is assigned: the accounts its Motion sends from). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: before an account is assigned, team access is off for an account its Motion sends from. Not fixed by retrying. An Enrollment on a teammate's account with team access off is not found (404) instead. */
44619
+ 403: {
44620
+ headers: {
44621
+ [name: string]: unknown;
44622
+ };
44623
+ content: {
44624
+ "application/json": components["schemas"]["Error"];
44625
+ };
44626
+ };
44627
+ /** @description RESOURCE_NOT_FOUND: no such Enrollment. */
44628
+ 404: {
44629
+ headers: {
44630
+ [name: string]: unknown;
44631
+ };
44632
+ content: {
44633
+ "application/json": components["schemas"]["Error"];
44634
+ };
44635
+ };
44636
+ /** @description ENROLLMENT_NOT_ACTIVE: already paused by a user, finished or skipped. MOTION_STATUS_CONFLICT: the Motion is archived, or its schedule.end_at has passed. STEP_IN_FLIGHT: a Step is being sent right now; try again in a minute. */
44637
+ 409: {
44638
+ headers: {
44639
+ [name: string]: unknown;
44640
+ };
44641
+ content: {
44642
+ "application/json": components["schemas"]["Error"];
44643
+ };
44644
+ };
44645
+ /** @description Rate limited, slow down and retry after the hinted delay. */
44646
+ 429: {
44647
+ headers: {
44648
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
44649
+ RateLimit: components["headers"]["RateLimit"];
44650
+ "Retry-After": components["headers"]["Retry-After"];
44651
+ [name: string]: unknown;
44652
+ };
44653
+ content: {
44654
+ "application/json": components["schemas"]["Error"];
44655
+ };
44656
+ };
44657
+ };
44658
+ };
44182
44659
  postV1EnrollmentsIdResume: {
44183
44660
  parameters: {
44184
44661
  query?: never;
@@ -44192,13 +44669,13 @@ interface operations {
44192
44669
  requestBody: {
44193
44670
  content: {
44194
44671
  "application/json": {
44195
- /** @description The Step id to continue at. It must exist in the Sequence version the Enrollment runs on. */
44196
- at: string;
44672
+ /** @description The Step id to re-enter; it must exist in the Sequence version the Enrollment runs on. A jump: it may send that Step again, even one that already sent. To retry a failed Step, use the retry action instead. Leave it out only to lift your own pause: the Enrollment continues where it was, with the time its wait had left. */
44673
+ at?: string;
44197
44674
  };
44198
44675
  };
44199
44676
  };
44200
44677
  responses: {
44201
- /** @description The Enrollment at the named Step: active, or paused while its account or Motion is. One that ended before it started is pending again. */
44678
+ /** @description The Enrollment: at the named Step, or, without at, where it was with its wait's remaining time. Active, or paused while its account or Motion is. One that ended before it started is pending again. */
44202
44679
  200: {
44203
44680
  headers: {
44204
44681
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -44226,11 +44703,334 @@ interface operations {
44226
44703
  status: "pending" | "active" | "paused" | "finished" | "skipped";
44227
44704
  /** @description The Step it is at; null before it starts. */
44228
44705
  current_step_id: string | null;
44229
- /** @description What it waits for; null when nothing holds it. */
44706
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
44230
44707
  waiting: {
44231
44708
  /** @enum {string} */
44232
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
44233
- step_id: string;
44709
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44710
+ /** @description The Step it waits at; null before it starts. */
44711
+ step_id: string | null;
44712
+ /** @description ISO 8601, when the wait ends; null when open-ended. */
44713
+ until: string | null;
44714
+ } | null;
44715
+ /**
44716
+ * @description Why it finished; null unless status is finished.
44717
+ * @enum {string|null}
44718
+ */
44719
+ finish_reason: "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | null;
44720
+ /**
44721
+ * @description Why the Contact was not enrolled; null unless status is skipped.
44722
+ * @enum {string|null}
44723
+ */
44724
+ skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44725
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44726
+ finish_message: string | null;
44727
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44728
+ skip_message: string | null;
44729
+ /** @description More on the skip, for example the index of the where filter that failed. */
44730
+ skip_detail: string | null;
44731
+ /** @description True once the Contact replied. */
44732
+ replied: boolean;
44733
+ /** @description The variant chosen per Step: step id to variant id. */
44734
+ variants: {
44735
+ [key: string]: string;
44736
+ };
44737
+ /**
44738
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44739
+ * @enum {string|null}
44740
+ */
44741
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
44742
+ /** @description ISO 8601. */
44743
+ created_at: string;
44744
+ /** @description When it started. */
44745
+ started_at: string | null;
44746
+ /** @description When it finished. */
44747
+ finished_at: string | null;
44748
+ safety_warning?: components["schemas"]["SafetyWarning"];
44749
+ };
44750
+ };
44751
+ };
44752
+ /** @description INVALID_REQUEST: at is missing on an Enrollment you did not pause, or no Step with that id exists in the Sequence version the Enrollment runs on. */
44753
+ 400: {
44754
+ headers: {
44755
+ [name: string]: unknown;
44756
+ };
44757
+ content: {
44758
+ "application/json": components["schemas"]["Error"];
44759
+ };
44760
+ };
44761
+ /** @description Missing or invalid API key. */
44762
+ 401: {
44763
+ headers: {
44764
+ [name: string]: unknown;
44765
+ };
44766
+ content: {
44767
+ "application/json": components["schemas"]["Error"];
44768
+ };
44769
+ };
44770
+ /** @description In a team, for the account the Enrollment runs on (before one is assigned: the accounts its Motion sends from). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: before an account is assigned, team access is off for an account its Motion sends from. Not fixed by retrying. An Enrollment on a teammate's account with team access off is not found (404) instead. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
44771
+ 403: {
44772
+ headers: {
44773
+ [name: string]: unknown;
44774
+ };
44775
+ content: {
44776
+ "application/json": components["schemas"]["Error"];
44777
+ };
44778
+ };
44779
+ /** @description RESOURCE_NOT_FOUND: no such Enrollment. */
44780
+ 404: {
44781
+ headers: {
44782
+ [name: string]: unknown;
44783
+ };
44784
+ content: {
44785
+ "application/json": components["schemas"]["Error"];
44786
+ };
44787
+ };
44788
+ /** @description ENROLLMENT_NOT_ACTIVE: a pending or skipped Enrollment, one whose Contact is gone, or one that finished with account_removed, account_unavailable, contact_deleted or contact_merged. MOTION_STATUS_CONFLICT: the Motion is archived, or its schedule.end_at has passed. STEP_IN_FLIGHT: a Step is being sent right now; try again in a minute. */
44789
+ 409: {
44790
+ headers: {
44791
+ [name: string]: unknown;
44792
+ };
44793
+ content: {
44794
+ "application/json": components["schemas"]["Error"];
44795
+ };
44796
+ };
44797
+ /** @description Payload too large, the request body exceeds the size limit. */
44798
+ 413: {
44799
+ headers: {
44800
+ [name: string]: unknown;
44801
+ };
44802
+ content: {
44803
+ "application/json": components["schemas"]["Error"];
44804
+ };
44805
+ };
44806
+ /** @description Rate limited, slow down and retry after the hinted delay. */
44807
+ 429: {
44808
+ headers: {
44809
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
44810
+ RateLimit: components["headers"]["RateLimit"];
44811
+ "Retry-After": components["headers"]["Retry-After"];
44812
+ [name: string]: unknown;
44813
+ };
44814
+ content: {
44815
+ "application/json": components["schemas"]["Error"];
44816
+ };
44817
+ };
44818
+ };
44819
+ };
44820
+ postV1EnrollmentsIdEvents: {
44821
+ parameters: {
44822
+ query?: never;
44823
+ header?: never;
44824
+ path: {
44825
+ /** @description Enrollment id (enr_...). */
44826
+ id: string;
44827
+ };
44828
+ cookie?: never;
44829
+ };
44830
+ requestBody: {
44831
+ content: {
44832
+ "application/json": {
44833
+ /** @description The custom event name a Step of the Enrollment's Sequence waits for (`until event.<name>`, or its deprecated spelling `until signal.<name>`). */
44834
+ name: string;
44835
+ };
44836
+ };
44837
+ };
44838
+ responses: {
44839
+ /** @description The Enrollment. The event is recorded with its time; a Step waiting for it moves on. */
44840
+ 200: {
44841
+ headers: {
44842
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
44843
+ RateLimit: components["headers"]["RateLimit"];
44844
+ [name: string]: unknown;
44845
+ };
44846
+ content: {
44847
+ "application/json": {
44848
+ /**
44849
+ * @description Response type discriminator.
44850
+ * @enum {string}
44851
+ */
44852
+ object: "enrollment";
44853
+ /** @description Enrollment id (enr_...). */
44854
+ id: string;
44855
+ /** @description The Motion (mot_...). */
44856
+ motion_id: string;
44857
+ /** @description The Contact (con_...); null once the Contact is deleted. */
44858
+ contact_id: string | null;
44859
+ /** @description The sending account (acc_...); null until one is assigned. */
44860
+ account_id: string | null;
44861
+ /** @description The Sequence version this Enrollment runs on. */
44862
+ sequence_version: number;
44863
+ /** @enum {string} */
44864
+ status: "pending" | "active" | "paused" | "finished" | "skipped";
44865
+ /** @description The Step it is at; null before it starts. */
44866
+ current_step_id: string | null;
44867
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
44868
+ waiting: {
44869
+ /** @enum {string} */
44870
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
44871
+ /** @description The Step it waits at; null before it starts. */
44872
+ step_id: string | null;
44873
+ /** @description ISO 8601, when the wait ends; null when open-ended. */
44874
+ until: string | null;
44875
+ } | null;
44876
+ /**
44877
+ * @description Why it finished; null unless status is finished.
44878
+ * @enum {string|null}
44879
+ */
44880
+ finish_reason: "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | null;
44881
+ /**
44882
+ * @description Why the Contact was not enrolled; null unless status is skipped.
44883
+ * @enum {string|null}
44884
+ */
44885
+ skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44886
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
44887
+ finish_message: string | null;
44888
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
44889
+ skip_message: string | null;
44890
+ /** @description More on the skip, for example the index of the where filter that failed. */
44891
+ skip_detail: string | null;
44892
+ /** @description True once the Contact replied. */
44893
+ replied: boolean;
44894
+ /** @description The variant chosen per Step: step id to variant id. */
44895
+ variants: {
44896
+ [key: string]: string;
44897
+ };
44898
+ /**
44899
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
44900
+ * @enum {string|null}
44901
+ */
44902
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
44903
+ /** @description ISO 8601. */
44904
+ created_at: string;
44905
+ /** @description When it started. */
44906
+ started_at: string | null;
44907
+ /** @description When it finished. */
44908
+ finished_at: string | null;
44909
+ safety_warning?: components["schemas"]["SafetyWarning"];
44910
+ };
44911
+ };
44912
+ };
44913
+ /** @description INVALID_REQUEST: name is missing, or no Step of the Enrollment's Sequence waits for it. The message lists the awaited names. */
44914
+ 400: {
44915
+ headers: {
44916
+ [name: string]: unknown;
44917
+ };
44918
+ content: {
44919
+ "application/json": components["schemas"]["Error"];
44920
+ };
44921
+ };
44922
+ /** @description Missing or invalid API key. */
44923
+ 401: {
44924
+ headers: {
44925
+ [name: string]: unknown;
44926
+ };
44927
+ content: {
44928
+ "application/json": components["schemas"]["Error"];
44929
+ };
44930
+ };
44931
+ /** @description In a team, for the account the Enrollment runs on (before one is assigned: the accounts its Motion sends from). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: before an account is assigned, team access is off for an account its Motion sends from. Not fixed by retrying. An Enrollment on a teammate's account with team access off is not found (404) instead. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
44932
+ 403: {
44933
+ headers: {
44934
+ [name: string]: unknown;
44935
+ };
44936
+ content: {
44937
+ "application/json": components["schemas"]["Error"];
44938
+ };
44939
+ };
44940
+ /** @description RESOURCE_NOT_FOUND: no such Enrollment. */
44941
+ 404: {
44942
+ headers: {
44943
+ [name: string]: unknown;
44944
+ };
44945
+ content: {
44946
+ "application/json": components["schemas"]["Error"];
44947
+ };
44948
+ };
44949
+ /** @description ENROLLMENT_NOT_ACTIVE: the Enrollment's status does not take this call; it needs active or paused. The message names the current status. */
44950
+ 409: {
44951
+ headers: {
44952
+ [name: string]: unknown;
44953
+ };
44954
+ content: {
44955
+ "application/json": components["schemas"]["Error"];
44956
+ };
44957
+ };
44958
+ /** @description Payload too large, the request body exceeds the size limit. */
44959
+ 413: {
44960
+ headers: {
44961
+ [name: string]: unknown;
44962
+ };
44963
+ content: {
44964
+ "application/json": components["schemas"]["Error"];
44965
+ };
44966
+ };
44967
+ /** @description Rate limited, slow down and retry after the hinted delay. */
44968
+ 429: {
44969
+ headers: {
44970
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
44971
+ RateLimit: components["headers"]["RateLimit"];
44972
+ "Retry-After": components["headers"]["Retry-After"];
44973
+ [name: string]: unknown;
44974
+ };
44975
+ content: {
44976
+ "application/json": components["schemas"]["Error"];
44977
+ };
44978
+ };
44979
+ };
44980
+ };
44981
+ postV1EnrollmentsIdSignal: {
44982
+ parameters: {
44983
+ query?: never;
44984
+ header?: never;
44985
+ path: {
44986
+ /** @description Enrollment id (enr_...). */
44987
+ id: string;
44988
+ };
44989
+ cookie?: never;
44990
+ };
44991
+ requestBody: {
44992
+ content: {
44993
+ "application/json": {
44994
+ /** @description The custom event name a Step of the Enrollment's Sequence waits for (`until event.<name>`, or its deprecated spelling `until signal.<name>`). */
44995
+ name: string;
44996
+ };
44997
+ };
44998
+ };
44999
+ responses: {
45000
+ /** @description Deprecated: as POST /v1/enrollments/{id}/events, plus a Deprecation header and warnings holding one W13 entry that names the new route. */
45001
+ 200: {
45002
+ headers: {
45003
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
45004
+ RateLimit: components["headers"]["RateLimit"];
45005
+ [name: string]: unknown;
45006
+ };
45007
+ content: {
45008
+ "application/json": {
45009
+ /**
45010
+ * @description Response type discriminator.
45011
+ * @enum {string}
45012
+ */
45013
+ object: "enrollment";
45014
+ /** @description Enrollment id (enr_...). */
45015
+ id: string;
45016
+ /** @description The Motion (mot_...). */
45017
+ motion_id: string;
45018
+ /** @description The Contact (con_...); null once the Contact is deleted. */
45019
+ contact_id: string | null;
45020
+ /** @description The sending account (acc_...); null until one is assigned. */
45021
+ account_id: string | null;
45022
+ /** @description The Sequence version this Enrollment runs on. */
45023
+ sequence_version: number;
45024
+ /** @enum {string} */
45025
+ status: "pending" | "active" | "paused" | "finished" | "skipped";
45026
+ /** @description The Step it is at; null before it starts. */
45027
+ current_step_id: string | null;
45028
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
45029
+ waiting: {
45030
+ /** @enum {string} */
45031
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
45032
+ /** @description The Step it waits at; null before it starts. */
45033
+ step_id: string | null;
44234
45034
  /** @description ISO 8601, when the wait ends; null when open-ended. */
44235
45035
  until: string | null;
44236
45036
  } | null;
@@ -44244,6 +45044,10 @@ interface operations {
44244
45044
  * @enum {string|null}
44245
45045
  */
44246
45046
  skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
45047
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
45048
+ finish_message: string | null;
45049
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
45050
+ skip_message: string | null;
44247
45051
  /** @description More on the skip, for example the index of the where filter that failed. */
44248
45052
  skip_detail: string | null;
44249
45053
  /** @description True once the Contact replied. */
@@ -44252,17 +45056,31 @@ interface operations {
44252
45056
  variants: {
44253
45057
  [key: string]: string;
44254
45058
  };
45059
+ /**
45060
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
45061
+ * @enum {string|null}
45062
+ */
45063
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
44255
45064
  /** @description ISO 8601. */
44256
45065
  created_at: string;
44257
45066
  /** @description When it started. */
44258
45067
  started_at: string | null;
44259
45068
  /** @description When it finished. */
44260
45069
  finished_at: string | null;
45070
+ warnings: {
45071
+ code: string;
45072
+ path: string;
45073
+ rule: string;
45074
+ message: string;
45075
+ pointer: string;
45076
+ hint: string;
45077
+ docs_url: string;
45078
+ }[];
44261
45079
  safety_warning?: components["schemas"]["SafetyWarning"];
44262
45080
  };
44263
45081
  };
44264
45082
  };
44265
- /** @description INVALID_REQUEST: at is missing, or no Step with that id exists in the Sequence version the Enrollment runs on. */
45083
+ /** @description INVALID_REQUEST: name is missing, or no Step of the Enrollment's Sequence waits for it. The message lists the awaited names. */
44266
45084
  400: {
44267
45085
  headers: {
44268
45086
  [name: string]: unknown;
@@ -44298,7 +45116,179 @@ interface operations {
44298
45116
  "application/json": components["schemas"]["Error"];
44299
45117
  };
44300
45118
  };
44301
- /** @description ENROLLMENT_NOT_ACTIVE: a pending or skipped Enrollment, one whose Contact is gone, or one that finished with account_removed, account_unavailable, contact_deleted or contact_merged. MOTION_STATUS_CONFLICT: the Motion is archived, or its schedule.end_at has passed. */
45119
+ /** @description ENROLLMENT_NOT_ACTIVE: the Enrollment's status does not take this call; it needs active or paused. The message names the current status. */
45120
+ 409: {
45121
+ headers: {
45122
+ [name: string]: unknown;
45123
+ };
45124
+ content: {
45125
+ "application/json": components["schemas"]["Error"];
45126
+ };
45127
+ };
45128
+ /** @description Payload too large, the request body exceeds the size limit. */
45129
+ 413: {
45130
+ headers: {
45131
+ [name: string]: unknown;
45132
+ };
45133
+ content: {
45134
+ "application/json": components["schemas"]["Error"];
45135
+ };
45136
+ };
45137
+ /** @description Rate limited, slow down and retry after the hinted delay. */
45138
+ 429: {
45139
+ headers: {
45140
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
45141
+ RateLimit: components["headers"]["RateLimit"];
45142
+ "Retry-After": components["headers"]["Retry-After"];
45143
+ [name: string]: unknown;
45144
+ };
45145
+ content: {
45146
+ "application/json": components["schemas"]["Error"];
45147
+ };
45148
+ };
45149
+ };
45150
+ };
45151
+ postV1EnrollmentsIdReassign: {
45152
+ parameters: {
45153
+ query?: never;
45154
+ header?: never;
45155
+ path: {
45156
+ /** @description Enrollment id (enr_...). */
45157
+ id: string;
45158
+ };
45159
+ cookie?: never;
45160
+ };
45161
+ requestBody: {
45162
+ content: {
45163
+ "application/json": {
45164
+ /** @description The sending account (acc_...) of the Motion to move the Enrollment to. */
45165
+ account_id: string;
45166
+ };
45167
+ };
45168
+ };
45169
+ responses: {
45170
+ /** @description The Enrollment on its new account: pending, to start again at the first Step of its Sequence version (paused, if you had paused it, until you resume it). warnings lists each Step that will be skipped, e.g. already_invited when your team already invited the person (an invitation goes out once per team). */
45171
+ 200: {
45172
+ headers: {
45173
+ "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
45174
+ RateLimit: components["headers"]["RateLimit"];
45175
+ [name: string]: unknown;
45176
+ };
45177
+ content: {
45178
+ "application/json": {
45179
+ /**
45180
+ * @description Response type discriminator.
45181
+ * @enum {string}
45182
+ */
45183
+ object: "enrollment";
45184
+ /** @description Enrollment id (enr_...). */
45185
+ id: string;
45186
+ /** @description The Motion (mot_...). */
45187
+ motion_id: string;
45188
+ /** @description The Contact (con_...); null once the Contact is deleted. */
45189
+ contact_id: string | null;
45190
+ /** @description The sending account (acc_...); null until one is assigned. */
45191
+ account_id: string | null;
45192
+ /** @description The Sequence version this Enrollment runs on. */
45193
+ sequence_version: number;
45194
+ /** @enum {string} */
45195
+ status: "pending" | "active" | "paused" | "finished" | "skipped";
45196
+ /** @description The Step it is at; null before it starts. */
45197
+ current_step_id: string | null;
45198
+ /** @description What it waits for; null when nothing holds it. paused_by_user: you paused this Enrollment; it holds until you resume it, whatever else returns. account_unavailable, motion_paused: its account or Motion holds it. */
45199
+ waiting: {
45200
+ /** @enum {string} */
45201
+ kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch" | "paused_by_user";
45202
+ /** @description The Step it waits at; null before it starts. */
45203
+ step_id: string | null;
45204
+ /** @description ISO 8601, when the wait ends; null when open-ended. */
45205
+ until: string | null;
45206
+ } | null;
45207
+ /**
45208
+ * @description Why it finished; null unless status is finished.
45209
+ * @enum {string|null}
45210
+ */
45211
+ finish_reason: "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | null;
45212
+ /**
45213
+ * @description Why the Contact was not enrolled; null unless status is skipped.
45214
+ * @enum {string|null}
45215
+ */
45216
+ skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
45217
+ /** @description The reasons catalogue's one-line sentence for finish_reason (https://docs.curviate.com/reference/motion-reasons); null when finish_reason is. */
45218
+ finish_message: string | null;
45219
+ /** @description The reasons catalogue's one-line sentence for skip_reason (https://docs.curviate.com/reference/motion-reasons); null when skip_reason is. */
45220
+ skip_message: string | null;
45221
+ /** @description More on the skip, for example the index of the where filter that failed. */
45222
+ skip_detail: string | null;
45223
+ /** @description True once the Contact replied. */
45224
+ replied: boolean;
45225
+ /** @description The variant chosen per Step: step id to variant id. */
45226
+ variants: {
45227
+ [key: string]: string;
45228
+ };
45229
+ /**
45230
+ * @description The Contact's relationship to the account when the Enrollment started, from stored data (the account's Connections and its pending invitations; no LinkedIn call): connected, not_connected, invite_pending, or unknown when the account's Connections are not synced. Null until it starts.
45231
+ * @enum {string|null}
45232
+ */
45233
+ relationship_at_enrollment: "connected" | "not_connected" | "invite_pending" | "unknown" | null;
45234
+ /** @description ISO 8601. */
45235
+ created_at: string;
45236
+ /** @description When it started. */
45237
+ started_at: string | null;
45238
+ /** @description When it finished. */
45239
+ finished_at: string | null;
45240
+ warnings: {
45241
+ /**
45242
+ * @description A reason code of the catalogue: the Step will be skipped with it.
45243
+ * @enum {string}
45244
+ */
45245
+ code: "already_invited";
45246
+ /** @description The Step id. */
45247
+ path: string;
45248
+ /** @description The catalogue's one-line sentence. */
45249
+ message: string;
45250
+ }[];
45251
+ safety_warning?: components["schemas"]["SafetyWarning"];
45252
+ };
45253
+ };
45254
+ };
45255
+ /** @description INVALID_REQUEST: account_id is missing, or an unknown key. */
45256
+ 400: {
45257
+ headers: {
45258
+ [name: string]: unknown;
45259
+ };
45260
+ content: {
45261
+ "application/json": components["schemas"]["Error"];
45262
+ };
45263
+ };
45264
+ /** @description Missing or invalid API key. */
45265
+ 401: {
45266
+ headers: {
45267
+ [name: string]: unknown;
45268
+ };
45269
+ content: {
45270
+ "application/json": components["schemas"]["Error"];
45271
+ };
45272
+ };
45273
+ /** @description In a team, for the account the Enrollment runs on (before one is assigned: the accounts its Motion sends from). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: before an account is assigned, team access is off for an account its Motion sends from. Not fixed by retrying. An Enrollment on a teammate's account with team access off is not found (404) instead. The same for the target account: you need to be allowed to send from it in Motions. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
45274
+ 403: {
45275
+ headers: {
45276
+ [name: string]: unknown;
45277
+ };
45278
+ content: {
45279
+ "application/json": components["schemas"]["Error"];
45280
+ };
45281
+ };
45282
+ /** @description RESOURCE_NOT_FOUND: no such Enrollment. ACCOUNT_NOT_FOUND: account_id is not a sending account of this Motion (or not one of your accounts). */
45283
+ 404: {
45284
+ headers: {
45285
+ [name: string]: unknown;
45286
+ };
45287
+ content: {
45288
+ "application/json": components["schemas"]["Error"];
45289
+ };
45290
+ };
45291
+ /** @description Nothing changed. ENROLLMENT_NOT_ACTIVE: the Enrollment finished (other than account_unavailable or account_removed) or was skipped. STEP_IN_FLIGHT: a Step is being sent right now; try again in a minute. ACCOUNT_ALREADY_ENGAGED: its account already contacted the person (more than a profile view). ALREADY_ENROLLED_ON_ACCOUNT: the target already holds this Contact in the Motion, or is its own account. KNOWN_CHAT: the Motion excludes known chats and your team already chats with the Contact. */
44302
45292
  409: {
44303
45293
  headers: {
44304
45294
  [name: string]: unknown;
@@ -44330,26 +45320,62 @@ interface operations {
44330
45320
  };
44331
45321
  };
44332
45322
  };
44333
- postV1EnrollmentsIdSignal: {
45323
+ postV1EnrollmentsBulk: {
44334
45324
  parameters: {
44335
45325
  query?: never;
44336
45326
  header?: never;
44337
- path: {
44338
- /** @description Enrollment id (enr_...). */
44339
- id: string;
44340
- };
45327
+ path?: never;
44341
45328
  cookie?: never;
44342
45329
  };
44343
45330
  requestBody: {
44344
45331
  content: {
44345
45332
  "application/json": {
44346
- /** @description The signal name a Step of the Enrollment's Sequence waits for (`until signal.<name>`). */
44347
- name: string;
45333
+ /**
45334
+ * @description What to do to each Enrollment, as its single call would: pause, resume, stop, retry (re-runs its latest failed Step, only while that is the Step's latest outcome), event or reassign.
45335
+ * @enum {string}
45336
+ */
45337
+ action: "pause" | "resume" | "stop" | "retry" | "event" | "reassign";
45338
+ /** @description Enrollment ids (enr_...), 1 to 1000, distinct. Not with filter. */
45339
+ ids?: string[];
45340
+ /** @description The GET /v1/enrollments filters as an object, motion_id required; lists as arrays. At most 1000 matches, else 400 and nothing is done. */
45341
+ filter?: {
45342
+ /** @description The Motion (mot_...) whose Enrollments to act on. Required. */
45343
+ motion_id: string;
45344
+ /** @description Only Enrollments of this Contact (con_...). */
45345
+ contact_id?: string;
45346
+ /** @description Only Enrollments on this account (acc_...). */
45347
+ account_id?: string;
45348
+ /** @description Any of pending, active, paused, finished, skipped. */
45349
+ status?: ("pending" | "active" | "paused" | "finished" | "skipped")[];
45350
+ /** @description Only Enrollments currently at this Step. */
45351
+ step_id?: string;
45352
+ /** @description Only Enrollments running this Sequence version. */
45353
+ version?: number;
45354
+ /** @description Only Enrollments with a record on this Step in their Sequence version (they reached and ran it). */
45355
+ done_step?: string;
45356
+ /**
45357
+ * @description With done_step only: how that Step ended. The 200 response description defines each value.
45358
+ * @enum {string}
45359
+ */
45360
+ outcome?: "executed" | "skipped" | "failed" | "accepted" | "not_accepted" | "replied" | "no_reply" | "seen";
45361
+ /** @description Catalogue reason codes. */
45362
+ reason?: ("in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | "already_following" | "not_following" | "already_connected" | "invite_pending" | "already_invited" | "no_pending_invite" | "not_connected" | "inmail_unavailable" | "no_eligible_post" | "already_reacted" | "already_commented" | "missing_variable" | "no_endorsable_skill" | "text_too_long" | "already_attempted" | "platform_rejected" | "recipient_unreachable" | "platform_error" | "outcome_unknown" | "tag_limit")[];
45363
+ /** @description Only Enrollments whose variant on that variant's Step is this one. */
45364
+ variant_id?: string;
45365
+ /** @description Any of connected, not_connected, invite_pending, unknown. */
45366
+ relationship_at_enrollment?: ("connected" | "not_connected" | "invite_pending" | "unknown")[];
45367
+ };
45368
+ /** @description With resume only: the Step to continue at. Without it, resume lifts your own pauses. */
45369
+ at?: string;
45370
+ /** @description With event only, and required there: the custom event name. */
45371
+ name?: string;
45372
+ /** @description With reassign only, and required there: the sending account to move each Enrollment to. */
45373
+ account_id?: string;
44348
45374
  };
44349
45375
  };
44350
45376
  };
44351
45377
  responses: {
44352
- /** @description The Enrollment. The signal is recorded with its time. */
45378
+ /** @description matched: how many Enrollments the call acted on. One result per Enrollment, oldest first: ok, or error with the code and message its single call would answer (retry: NOTHING_TO_RETRY when the Step's latest outcome is not failed; INTERNAL for a server error on that one) (an id you cannot see is RESOURCE_NOT_FOUND; a filter leaves such Enrollments out). A second identical call is a new call: a second stop answers ENROLLMENT_NOT_ACTIVE per id. */
44353
45379
  200: {
44354
45380
  headers: {
44355
45381
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -44358,62 +45384,37 @@ interface operations {
44358
45384
  };
44359
45385
  content: {
44360
45386
  "application/json": {
44361
- /**
44362
- * @description Response type discriminator.
44363
- * @enum {string}
44364
- */
44365
- object: "enrollment";
44366
- /** @description Enrollment id (enr_...). */
44367
- id: string;
44368
- /** @description The Motion (mot_...). */
44369
- motion_id: string;
44370
- /** @description The Contact (con_...); null once the Contact is deleted. */
44371
- contact_id: string | null;
44372
- /** @description The sending account (acc_...); null until one is assigned. */
44373
- account_id: string | null;
44374
- /** @description The Sequence version this Enrollment runs on. */
44375
- sequence_version: number;
44376
45387
  /** @enum {string} */
44377
- status: "pending" | "active" | "paused" | "finished" | "skipped";
44378
- /** @description The Step it is at; null before it starts. */
44379
- current_step_id: string | null;
44380
- /** @description What it waits for; null when nothing holds it. */
44381
- waiting: {
45388
+ object: "enrollment_bulk_result";
45389
+ /** @enum {string} */
45390
+ action: "pause" | "resume" | "stop" | "retry" | "event" | "reassign";
45391
+ matched: number;
45392
+ results: {
45393
+ enrollment_id: string;
44382
45394
  /** @enum {string} */
44383
- kind: "wait" | "event" | "queue" | "account_unavailable" | "motion_paused" | "halt" | "kill_switch";
44384
- step_id: string;
44385
- /** @description ISO 8601, when the wait ends; null when open-ended. */
44386
- until: string | null;
44387
- } | null;
44388
- /**
44389
- * @description Why it finished; null unless status is finished.
44390
- * @enum {string|null}
44391
- */
44392
- finish_reason: "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | null;
44393
- /**
44394
- * @description Why the Contact was not enrolled; null unless status is skipped.
44395
- * @enum {string|null}
44396
- */
44397
- skip_reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | null;
44398
- /** @description More on the skip, for example the index of the where filter that failed. */
44399
- skip_detail: string | null;
44400
- /** @description True once the Contact replied. */
44401
- replied: boolean;
44402
- /** @description The variant chosen per Step: step id to variant id. */
44403
- variants: {
44404
- [key: string]: string;
44405
- };
44406
- /** @description ISO 8601. */
44407
- created_at: string;
44408
- /** @description When it started. */
44409
- started_at: string | null;
44410
- /** @description When it finished. */
44411
- finished_at: string | null;
45395
+ outcome: "ok" | "error";
45396
+ /** @description The refusal of this Enrollment's call; null when ok. */
45397
+ error: {
45398
+ code: string;
45399
+ message: string;
45400
+ } | null;
45401
+ warnings: {
45402
+ /**
45403
+ * @description A reason code of the catalogue: the Step will be skipped with it.
45404
+ * @enum {string}
45405
+ */
45406
+ code: "already_invited";
45407
+ /** @description The Step id. */
45408
+ path: string;
45409
+ /** @description The catalogue's one-line sentence. */
45410
+ message: string;
45411
+ }[];
45412
+ }[];
44412
45413
  safety_warning?: components["schemas"]["SafetyWarning"];
44413
45414
  };
44414
45415
  };
44415
45416
  };
44416
- /** @description INVALID_REQUEST: name is missing, or no Step of the Enrollment's Sequence waits for it. The message lists the awaited names. */
45417
+ /** @description INVALID_REQUEST: not exactly one of ids or filter; more than 1000 ids or filter matches (nothing done); filter without motion_id; at with an action other than resume; event without name; reassign without account_id. */
44417
45418
  400: {
44418
45419
  headers: {
44419
45420
  [name: string]: unknown;
@@ -44431,7 +45432,7 @@ interface operations {
44431
45432
  "application/json": components["schemas"]["Error"];
44432
45433
  };
44433
45434
  };
44434
- /** @description In a team, for the account the Enrollment runs on (before one is assigned: the accounts its Motion sends from). INSUFFICIENT_ROLE: the account is a teammate's and your role is Member. ACCOUNT_NOT_SHARED: before an account is assigned, team access is off for an account its Motion sends from. Not fixed by retrying. An Enrollment on a teammate's account with team access off is not found (404) instead. TIER_REQUIRED: the team's Tier does not include Motions (Motions are part of Automate). The error carries feature, required_tier and current_tier, plus upgrade_url for a team Owner. Not fixed by retrying. */
45435
+ /** @description TIER_REQUIRED: resume, retry, event and reassign need a Tier with Motions; pause and stop always work. A refusal of one Enrollment (your role, its account's team access) is that Enrollment's result, never a 403 of the call. In a team, a call on an account a teammate connected can also answer INSUFFICIENT_ROLE (your role may not do this), ACCOUNT_NOT_SHARED (the teammate turned team access off for the account) or ACCOUNT_OWNER_ONLY (only the person who connected the account may do this). None is fixed by retrying. */
44435
45436
  403: {
44436
45437
  headers: {
44437
45438
  [name: string]: unknown;
@@ -44440,7 +45441,7 @@ interface operations {
44440
45441
  "application/json": components["schemas"]["Error"];
44441
45442
  };
44442
45443
  };
44443
- /** @description RESOURCE_NOT_FOUND: no such Enrollment. */
45444
+ /** @description ACCOUNT_NOT_FOUND: filter.account_id is not one of your accounts. */
44444
45445
  404: {
44445
45446
  headers: {
44446
45447
  [name: string]: unknown;
@@ -44449,15 +45450,6 @@ interface operations {
44449
45450
  "application/json": components["schemas"]["Error"];
44450
45451
  };
44451
45452
  };
44452
- /** @description ENROLLMENT_NOT_ACTIVE: the Enrollment's status does not take this call; it needs active or paused. The message names the current status. */
44453
- 409: {
44454
- headers: {
44455
- [name: string]: unknown;
44456
- };
44457
- content: {
44458
- "application/json": components["schemas"]["Error"];
44459
- };
44460
- };
44461
45453
  /** @description Payload too large, the request body exceeds the size limit. */
44462
45454
  413: {
44463
45455
  headers: {
@@ -44499,7 +45491,7 @@ interface operations {
44499
45491
  };
44500
45492
  requestBody?: never;
44501
45493
  responses: {
44502
- /** @description Motion results across your Motions. totals counts every visible record, archived Motions included; motions lists every Motion but drafts (archived ones only with records in the window), latest activity first, at most 100 (motions_truncated). Lags: a step counts once it settles, a reply within a minute, an acceptance about 2 hours after it happens. */
45494
+ /** @description Motion results across your Motions. Each Contact counts once per Account. totals counts every visible record, archived Motions included; motions lists every Motion but drafts (archived ones only with records in the window), latest activity first, at most 100 (motions_truncated). Lags: a step counts once it settles, a reply within a minute, an acceptance about 2 hours after it happens. */
44503
45495
  200: {
44504
45496
  headers: {
44505
45497
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -44528,7 +45520,7 @@ interface operations {
44528
45520
  /** @description UTC instant of the read; maturity is measured from it. */
44529
45521
  generated_at: string;
44530
45522
  totals: {
44531
- /** @description Enrollments by state right now; the window does not apply. A Contact enrolled with two accounts counts twice. */
45523
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
44532
45524
  enrollments: {
44533
45525
  /** @description Waiting to start (pending). */
44534
45526
  queued: number;
@@ -44597,6 +45589,17 @@ interface operations {
44597
45589
  /** @description skill.endorse steps executed. */
44598
45590
  endorsements: number;
44599
45591
  };
45592
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
45593
+ enrollment_reasons: {
45594
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45595
+ skipped: {
45596
+ [key: string]: number;
45597
+ };
45598
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45599
+ failed: {
45600
+ [key: string]: number;
45601
+ };
45602
+ };
44600
45603
  };
44601
45604
  /** @description One entry per day of the window, oldest first, zeros included. Each event on its own day; no rates. */
44602
45605
  daily: {
@@ -44629,7 +45632,7 @@ interface operations {
44629
45632
  pause_reason: string | null;
44630
45633
  /** @description The Motion's latest visible record; null when it has none. */
44631
45634
  last_activity_at: string | null;
44632
- /** @description Enrollments by state right now; the window does not apply. A Contact enrolled with two accounts counts twice. */
45635
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
44633
45636
  enrollments: {
44634
45637
  /** @description Waiting to start (pending). */
44635
45638
  queued: number;
@@ -44698,6 +45701,17 @@ interface operations {
44698
45701
  /** @description skill.endorse steps executed. */
44699
45702
  endorsements: number;
44700
45703
  };
45704
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
45705
+ enrollment_reasons: {
45706
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45707
+ skipped: {
45708
+ [key: string]: number;
45709
+ };
45710
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45711
+ failed: {
45712
+ [key: string]: number;
45713
+ };
45714
+ };
44701
45715
  }[];
44702
45716
  motions_truncated: boolean;
44703
45717
  /** @description Per account with records in the window or any Enrollment. Enrollment and window figures of totals equal the sum over these plus records with no account. */
@@ -44705,7 +45719,7 @@ interface operations {
44705
45719
  account_id: string;
44706
45720
  /** @description null once the account is removed. */
44707
45721
  account_name: string | null;
44708
- /** @description Enrollments by state right now; the window does not apply. A Contact enrolled with two accounts counts twice. */
45722
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
44709
45723
  enrollments: {
44710
45724
  /** @description Waiting to start (pending). */
44711
45725
  queued: number;
@@ -44774,6 +45788,17 @@ interface operations {
44774
45788
  /** @description skill.endorse steps executed. */
44775
45789
  endorsements: number;
44776
45790
  };
45791
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
45792
+ enrollment_reasons: {
45793
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45794
+ skipped: {
45795
+ [key: string]: number;
45796
+ };
45797
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45798
+ failed: {
45799
+ [key: string]: number;
45800
+ };
45801
+ };
44777
45802
  }[];
44778
45803
  safety_warning?: components["schemas"]["SafetyWarning"];
44779
45804
  };
@@ -44852,7 +45877,7 @@ interface operations {
44852
45877
  };
44853
45878
  requestBody?: never;
44854
45879
  responses: {
44855
- /** @description One Motion's results, with a row per step (current version first, then steps only older versions have) and per variant. Lags as for the overview. */
45880
+ /** @description One Motion's results, with a row per step (current version first, then steps only older versions have) and per variant. Each Contact counts once per Account. paths splits the Motion by the Contact's relationship to the account when the Enrollment started (provisional). Lags as for the overview. */
44856
45881
  200: {
44857
45882
  headers: {
44858
45883
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -44890,7 +45915,7 @@ interface operations {
44890
45915
  /** @description UTC instant of the read; maturity is measured from it. */
44891
45916
  generated_at: string;
44892
45917
  totals: {
44893
- /** @description Enrollments by state right now; the window does not apply. A Contact enrolled with two accounts counts twice. */
45918
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
44894
45919
  enrollments: {
44895
45920
  /** @description Waiting to start (pending). */
44896
45921
  queued: number;
@@ -44959,6 +45984,17 @@ interface operations {
44959
45984
  /** @description skill.endorse steps executed. */
44960
45985
  endorsements: number;
44961
45986
  };
45987
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
45988
+ enrollment_reasons: {
45989
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45990
+ skipped: {
45991
+ [key: string]: number;
45992
+ };
45993
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
45994
+ failed: {
45995
+ [key: string]: number;
45996
+ };
45997
+ };
44962
45998
  };
44963
45999
  /** @description One entry per day of the window, oldest first, zeros included. Each event on its own day; no rates. */
44964
46000
  daily: {
@@ -44993,6 +46029,8 @@ interface operations {
44993
46029
  in_current_version: boolean;
44994
46030
  /** @description Running or paused Enrollments at this step now. */
44995
46031
  queued: number;
46032
+ /** @description Of queued, the paused ones: waiting = queued - paused. */
46033
+ paused: number;
44996
46034
  /** @description Executions in the window. */
44997
46035
  executed: number;
44998
46036
  /** @description Skipped in the window. */
@@ -45029,15 +46067,189 @@ interface operations {
45029
46067
  /** @description True when messaged is below 30. The rate is still returned. */
45030
46068
  low_sample: boolean;
45031
46069
  } | null;
45032
- /** @description A messaging step with two or more variants: one row per variant, in document order. Never sorted by result. */
46070
+ /** @description message.send and inmail.send only, else null. Seen rate over executions of this message step at least 7 days old: seen when a read receipt arrived for the message or the person replied after it (a reply proves it was read; not last touch). The rate is a floor: people can turn read receipts off. A receipt says the message was seen, never when; the same rule as GET /v1/enrollments outcome=seen. */
46071
+ seen: {
46072
+ /** @description Numerator: the seen part of sent. */
46073
+ seen: number;
46074
+ /** @description Denominator. */
46075
+ sent: number;
46076
+ /** @description seen / sent, 4 decimals; null when sent is 0. */
46077
+ rate: number | null;
46078
+ /** @description True when sent is below 30. The rate is still returned. */
46079
+ low_sample: boolean;
46080
+ } | null;
46081
+ /** @description Why this step was skipped or failed; each map sums to skipped or failed. An until timeout is no reason: it stays in else. */
46082
+ reasons: {
46083
+ /** @description The window's skipped executions of this step, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46084
+ skipped: {
46085
+ [key: string]: number;
46086
+ };
46087
+ /** @description The window's failed executions of this step (outcome_unknown included), by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46088
+ failed: {
46089
+ [key: string]: number;
46090
+ };
46091
+ };
46092
+ /** @description A messaging step with two or more variants: one row per variant, in document order, never sorted by result. When the step has a fallback that sends something, a last row with variant_id null and fallback true counts the executions that sent the fallback, whatever variant was assigned (they also count in their variant's executed and fallback_used): the sum of own_text_executed over the variant rows plus the fallback row's executed is the step's executed. */
45033
46093
  variants: {
45034
- variant_id: string;
46094
+ /** @description The variant; null on the fallback row. */
46095
+ variant_id: string | null;
46096
+ /** @description Executions in the window. */
46097
+ executed: number;
46098
+ /** @description Skipped in the window. */
46099
+ skipped: number;
46100
+ /** @description Failed in the window; an unknown send result counts here. */
46101
+ failed: number;
46102
+ /** @description Executions that used a fallback value. */
46103
+ fallback_used: number;
46104
+ /** @description invite.send only, else null. Acceptance rate over invitations sent in the window that are at least 7 days old, each counted on its own send day (the acceptance floor's rule). Withdrawn invitations stay in the denominator. */
46105
+ acceptance: {
46106
+ /** @description Numerator: the accepted part of sent. */
46107
+ accepted: number;
46108
+ /** @description Denominator. */
46109
+ sent: number;
46110
+ /** @description accepted / sent, 4 decimals; null when sent is 0. */
46111
+ rate: number | null;
46112
+ /** @description True when sent is below 30. The rate is still returned. */
46113
+ low_sample: boolean;
46114
+ } | null;
46115
+ /** @description message.send and inmail.send only, else null. Last touch: a reply counts for the message step it followed, before the next message. Over executions at least 7 days old, with no reply before them. */
46116
+ reply: {
46117
+ /** @description Numerator: the replied part of messaged. */
46118
+ replied: number;
46119
+ /** @description Denominator. */
46120
+ messaged: number;
46121
+ /** @description replied / messaged, 4 decimals; null when messaged is 0. */
46122
+ rate: number | null;
46123
+ /** @description True when messaged is below 30. The rate is still returned. */
46124
+ low_sample: boolean;
46125
+ } | null;
46126
+ /** @description message.send and inmail.send only, else null. Seen rate over executions of this message step at least 7 days old: seen when a read receipt arrived for the message or the person replied after it (a reply proves it was read; not last touch). The rate is a floor: people can turn read receipts off. A receipt says the message was seen, never when; the same rule as GET /v1/enrollments outcome=seen. */
46127
+ seen: {
46128
+ /** @description Numerator: the seen part of sent. */
46129
+ seen: number;
46130
+ /** @description Denominator. */
46131
+ sent: number;
46132
+ /** @description seen / sent, 4 decimals; null when sent is 0. */
46133
+ rate: number | null;
46134
+ /** @description True when sent is below 30. The rate is still returned. */
46135
+ low_sample: boolean;
46136
+ } | null;
46137
+ /** @description True on the fallback row only. */
46138
+ fallback: boolean;
46139
+ /** @description Executions that sent this variant's own text (executed less fallback_used); 0 on the fallback row. */
46140
+ own_text_executed: number;
46141
+ }[];
46142
+ }[];
46143
+ /** @description Provisional: the funnel's two paths may still change. Exactly three entries, connected, not_connected (invite_pending included), unknown, by relationship_at_enrollment. Started Enrollments only: one not yet started is in no path, so totals may exceed the sum of the paths by exactly those. Same filters, window and snapshot as the rest of the body. */
46144
+ paths: {
46145
+ /** @enum {string} */
46146
+ path: "connected" | "not_connected" | "unknown";
46147
+ totals: {
46148
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
46149
+ enrollments: {
46150
+ /** @description Waiting to start (pending). */
46151
+ queued: number;
46152
+ /** @description Running (active). */
46153
+ in_progress: number;
46154
+ /** @description Paused. */
46155
+ paused: number;
46156
+ /** @description Finished, for any reason but a lost account (replied and messaged_manually included). */
46157
+ finished: number;
46158
+ /** @description Finished because the account became unavailable or was removed. */
46159
+ failed: number;
46160
+ /** @description Skipped at admission or start. */
46161
+ skipped: number;
46162
+ };
46163
+ /** @description Invitations, each on its send day. */
46164
+ invites: {
46165
+ /** @description Invitations sent in the window. One whose send result was unknown counts once it is accepted. */
46166
+ sent: number;
46167
+ /** @description Of those, accepted so far, whenever detected. */
46168
+ accepted: number;
46169
+ /** @description Of those, sent less than 7 days ago: not yet in the rate. */
46170
+ maturing: number;
46171
+ };
46172
+ /** @description Acceptance rate over invitations sent in the window that are at least 7 days old, each counted on its own send day (the acceptance floor's rule). Withdrawn invitations stay in the denominator. */
46173
+ acceptance: {
46174
+ /** @description Numerator: the accepted part of sent. */
46175
+ accepted: number;
46176
+ /** @description Denominator. */
46177
+ sent: number;
46178
+ /** @description accepted / sent, 4 decimals; null when sent is 0. */
46179
+ rate: number | null;
46180
+ /** @description True when sent is below 30. The rate is still returned. */
46181
+ low_sample: boolean;
46182
+ };
46183
+ messages: {
46184
+ /** @description message.send and inmail.send steps executed in the window (messages, not people). */
46185
+ sent: number;
46186
+ /** @description Enrollments whose first message falls in the window, with no reply before it. */
46187
+ messaged: number;
46188
+ /** @description Of those, first messaged less than 7 days ago. */
46189
+ maturing: number;
46190
+ };
46191
+ /** @description Reply rate over Enrollments first messaged in the window at least 7 days ago, with no reply before that message. replied: those that replied at or after it. */
46192
+ reply: {
46193
+ /** @description Numerator: the replied part of messaged. */
46194
+ replied: number;
46195
+ /** @description Denominator. */
46196
+ messaged: number;
46197
+ /** @description replied / messaged, 4 decimals; null when messaged is 0. */
46198
+ rate: number | null;
46199
+ /** @description True when messaged is below 30. The rate is still returned. */
46200
+ low_sample: boolean;
46201
+ };
46202
+ /** @description Enrollments whose first reply came in the window. A reply is an inbound 1:1 message from the enrolled person on the Enrollment's account, counted once per Enrollment; any other inbound message is not counted. A reply up to 30 days after the Enrollment finished still counts. */
46203
+ replies: number;
46204
+ /** @description Engagement steps executed in the window. A first-step profile visit that also identified the person counts once. */
46205
+ engagement: {
46206
+ /** @description profile.view steps executed. */
46207
+ views: number;
46208
+ /** @description post.react steps executed, any reaction. */
46209
+ reactions: number;
46210
+ /** @description profile.follow steps executed. */
46211
+ follows: number;
46212
+ /** @description post.comment steps executed. */
46213
+ comments: number;
46214
+ /** @description skill.endorse steps executed. */
46215
+ endorsements: number;
46216
+ };
46217
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
46218
+ enrollment_reasons: {
46219
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46220
+ skipped: {
46221
+ [key: string]: number;
46222
+ };
46223
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46224
+ failed: {
46225
+ [key: string]: number;
46226
+ };
46227
+ };
46228
+ };
46229
+ steps: {
46230
+ step_id: string;
46231
+ /** @enum {string} */
46232
+ kind: "do" | "wait" | "if" | "until" | "tag" | "emit";
46233
+ /** @description The action of a do step; null for the others. */
46234
+ action: string | null;
46235
+ /** @description False for a step only an older Sequence version has; it is listed after the current ones. */
46236
+ in_current_version: boolean;
46237
+ /** @description Running or paused Enrollments at this step now. */
46238
+ queued: number;
46239
+ /** @description Of queued, the paused ones: waiting = queued - paused. */
46240
+ paused: number;
45035
46241
  /** @description Executions in the window. */
45036
46242
  executed: number;
45037
46243
  /** @description Skipped in the window. */
45038
46244
  skipped: number;
45039
46245
  /** @description Failed in the window; an unknown send result counts here. */
45040
46246
  failed: number;
46247
+ /** @description wait, tag and emit passes in the window. */
46248
+ taken: number;
46249
+ /** @description if and until exits through then in the window. */
46250
+ then: number;
46251
+ /** @description if and until exits through else in the window (an until timeout). */
46252
+ else: number;
45041
46253
  /** @description Executions that used a fallback value. */
45042
46254
  fallback_used: number;
45043
46255
  /** @description invite.send only, else null. Acceptance rate over invitations sent in the window that are at least 7 days old, each counted on its own send day (the acceptance floor's rule). Withdrawn invitations stay in the denominator. */
@@ -45062,6 +46274,78 @@ interface operations {
45062
46274
  /** @description True when messaged is below 30. The rate is still returned. */
45063
46275
  low_sample: boolean;
45064
46276
  } | null;
46277
+ /** @description message.send and inmail.send only, else null. Seen rate over executions of this message step at least 7 days old: seen when a read receipt arrived for the message or the person replied after it (a reply proves it was read; not last touch). The rate is a floor: people can turn read receipts off. A receipt says the message was seen, never when; the same rule as GET /v1/enrollments outcome=seen. */
46278
+ seen: {
46279
+ /** @description Numerator: the seen part of sent. */
46280
+ seen: number;
46281
+ /** @description Denominator. */
46282
+ sent: number;
46283
+ /** @description seen / sent, 4 decimals; null when sent is 0. */
46284
+ rate: number | null;
46285
+ /** @description True when sent is below 30. The rate is still returned. */
46286
+ low_sample: boolean;
46287
+ } | null;
46288
+ /** @description Why this step was skipped or failed; each map sums to skipped or failed. An until timeout is no reason: it stays in else. */
46289
+ reasons: {
46290
+ /** @description The window's skipped executions of this step, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46291
+ skipped: {
46292
+ [key: string]: number;
46293
+ };
46294
+ /** @description The window's failed executions of this step (outcome_unknown included), by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46295
+ failed: {
46296
+ [key: string]: number;
46297
+ };
46298
+ };
46299
+ /** @description A messaging step with two or more variants: one row per variant, in document order, never sorted by result. When the step has a fallback that sends something, a last row with variant_id null and fallback true counts the executions that sent the fallback, whatever variant was assigned (they also count in their variant's executed and fallback_used): the sum of own_text_executed over the variant rows plus the fallback row's executed is the step's executed. */
46300
+ variants: {
46301
+ /** @description The variant; null on the fallback row. */
46302
+ variant_id: string | null;
46303
+ /** @description Executions in the window. */
46304
+ executed: number;
46305
+ /** @description Skipped in the window. */
46306
+ skipped: number;
46307
+ /** @description Failed in the window; an unknown send result counts here. */
46308
+ failed: number;
46309
+ /** @description Executions that used a fallback value. */
46310
+ fallback_used: number;
46311
+ /** @description invite.send only, else null. Acceptance rate over invitations sent in the window that are at least 7 days old, each counted on its own send day (the acceptance floor's rule). Withdrawn invitations stay in the denominator. */
46312
+ acceptance: {
46313
+ /** @description Numerator: the accepted part of sent. */
46314
+ accepted: number;
46315
+ /** @description Denominator. */
46316
+ sent: number;
46317
+ /** @description accepted / sent, 4 decimals; null when sent is 0. */
46318
+ rate: number | null;
46319
+ /** @description True when sent is below 30. The rate is still returned. */
46320
+ low_sample: boolean;
46321
+ } | null;
46322
+ /** @description message.send and inmail.send only, else null. Last touch: a reply counts for the message step it followed, before the next message. Over executions at least 7 days old, with no reply before them. */
46323
+ reply: {
46324
+ /** @description Numerator: the replied part of messaged. */
46325
+ replied: number;
46326
+ /** @description Denominator. */
46327
+ messaged: number;
46328
+ /** @description replied / messaged, 4 decimals; null when messaged is 0. */
46329
+ rate: number | null;
46330
+ /** @description True when messaged is below 30. The rate is still returned. */
46331
+ low_sample: boolean;
46332
+ } | null;
46333
+ /** @description message.send and inmail.send only, else null. Seen rate over executions of this message step at least 7 days old: seen when a read receipt arrived for the message or the person replied after it (a reply proves it was read; not last touch). The rate is a floor: people can turn read receipts off. A receipt says the message was seen, never when; the same rule as GET /v1/enrollments outcome=seen. */
46334
+ seen: {
46335
+ /** @description Numerator: the seen part of sent. */
46336
+ seen: number;
46337
+ /** @description Denominator. */
46338
+ sent: number;
46339
+ /** @description seen / sent, 4 decimals; null when sent is 0. */
46340
+ rate: number | null;
46341
+ /** @description True when sent is below 30. The rate is still returned. */
46342
+ low_sample: boolean;
46343
+ } | null;
46344
+ /** @description True on the fallback row only. */
46345
+ fallback: boolean;
46346
+ /** @description Executions that sent this variant's own text (executed less fallback_used); 0 on the fallback row. */
46347
+ own_text_executed: number;
46348
+ }[];
45065
46349
  }[];
45066
46350
  }[];
45067
46351
  /** @description Per account with records in the window or any Enrollment. Enrollment and window figures of totals equal the sum over these plus records with no account. */
@@ -45069,7 +46353,7 @@ interface operations {
45069
46353
  account_id: string;
45070
46354
  /** @description null once the account is removed. */
45071
46355
  account_name: string | null;
45072
- /** @description Enrollments by state right now; the window does not apply. A Contact enrolled with two accounts counts twice. */
46356
+ /** @description Enrollments by state right now; the window does not apply. The counted unit is the Enrollment: Each Contact counts once per Account. */
45073
46357
  enrollments: {
45074
46358
  /** @description Waiting to start (pending). */
45075
46359
  queued: number;
@@ -45138,6 +46422,17 @@ interface operations {
45138
46422
  /** @description skill.endorse steps executed. */
45139
46423
  endorsements: number;
45140
46424
  };
46425
+ /** @description Right now, like enrollments: why Enrollments were skipped or failed. Each map sums to its count. */
46426
+ enrollment_reasons: {
46427
+ /** @description The skipped Enrollments of enrollments.skipped, by skip_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46428
+ skipped: {
46429
+ [key: string]: number;
46430
+ };
46431
+ /** @description The failed Enrollments of enrollments.failed, by finish_reason, by reason code (https://docs.curviate.com/reference/motion-reasons); a code with zero is absent. */
46432
+ failed: {
46433
+ [key: string]: number;
46434
+ };
46435
+ };
45141
46436
  }[];
45142
46437
  safety_warning?: components["schemas"]["SafetyWarning"];
45143
46438
  };
@@ -45403,7 +46698,9 @@ interface operations {
45403
46698
  account_id?: string;
45404
46699
  /** @description Only this Motion's events (mot_...). */
45405
46700
  motion_id?: string;
45406
- /** @description Comma list of step.executed, step.failed, invite.accepted, message.replied. Default: all. */
46701
+ /** @description Only the outcome events of this Step, in any Sequence version of the Motion. Requires motion_id (step ids are unique per Motion, not per team). */
46702
+ step_id?: string;
46703
+ /** @description step.executed, step.failed, invite.accepted, message.replied. Default: all. Repeat the key, comma-separate or mix; empties ignored. */
45407
46704
  kind?: ("step.executed" | "step.failed" | "invite.accepted" | "message.replied")[];
45408
46705
  /** @description Max items per page (1-100, default 20). */
45409
46706
  limit?: number;
@@ -45452,8 +46749,13 @@ interface operations {
45452
46749
  * @enum {string|null}
45453
46750
  */
45454
46751
  outcome: "executed" | "skipped" | "failed" | null;
45455
- /** @description Why a step was skipped or failed, as a code; null otherwise. */
45456
- reason: string | null;
46752
+ /**
46753
+ * @description Why a step was skipped or failed, as a code of the reasons catalogue (https://docs.curviate.com/reference/motion-reasons); null otherwise.
46754
+ * @enum {string|null}
46755
+ */
46756
+ reason: "in_exclusion_list" | "in_other_motion" | "known_chat" | "filtered" | "profile_unavailable" | "no_connected_account" | "completed" | "stopped" | "removed" | "account_unavailable" | "account_removed" | "motion_archived" | "motion_ended" | "contact_deleted" | "contact_merged" | "replied" | "messaged_manually" | "already_following" | "not_following" | "already_connected" | "invite_pending" | "already_invited" | "no_pending_invite" | "not_connected" | "inmail_unavailable" | "no_eligible_post" | "already_reacted" | "already_commented" | "missing_variable" | "no_endorsable_skill" | "text_too_long" | "already_attempted" | "platform_rejected" | "recipient_unreachable" | "platform_error" | "outcome_unknown" | "tag_limit" | null;
46757
+ /** @description The catalogue's one-line plain-words sentence for reason; null when reason is. */
46758
+ reason_message: string | null;
45457
46759
  /** @description The person, read live; null once the Contact is deleted. */
45458
46760
  contact: {
45459
46761
  id: string;
@@ -45469,7 +46771,7 @@ interface operations {
45469
46771
  };
45470
46772
  };
45471
46773
  };
45472
- /** @description INVALID_REQUEST: an unknown query parameter or kind, a limit outside 1 to 100, or a cursor not from a prior response. */
46774
+ /** @description INVALID_REQUEST: an unknown query parameter or kind, a limit outside 1 to 100, a cursor not from a prior response, or step_id without motion_id (step_id:). */
45473
46775
  400: {
45474
46776
  headers: {
45475
46777
  [name: string]: unknown;
@@ -48070,9 +49372,10 @@ declare class TagsResource {
48070
49372
  * time.
48071
49373
  *
48072
49374
  * Vocabulary comes from the generated OpenAPI types wherever they express it
48073
- * (actions, reactions, standard fields, boolean predicates); the one union
48074
- * typed by hand (events: the generated type widens them to `string`) is
48075
- * pinned to the embedded schema by `test/sequence/types.test.ts`.
49375
+ * (actions, reactions, standard fields, boolean predicates incl.
49376
+ * `message.seen`); the one union typed by hand (events: the generated type
49377
+ * widens them to `string`) is pinned to the embedded schema by
49378
+ * `test/sequence/types.test.ts`.
48076
49379
  */
48077
49380
 
48078
49381
  /** The Sequence document as the API types it (`components["schemas"]["SequenceDocument"]`). */
@@ -48095,8 +49398,12 @@ type MessagingAction = Extract<GenDo, {
48095
49398
  }>["do"];
48096
49399
  /** `post.react` reactions. */
48097
49400
  type Reaction = NonNullable<GenWith<"post.react">["reaction"]>;
48098
- /** Events an `until` step waits for; `signal.<name>` is a custom signal. */
48099
- type SequenceEvent = "invite.accepted" | "message.replied" | "message.read" | `signal.${string}`;
49401
+ /**
49402
+ * Events an `until` step waits for; `event.<name>` is a custom event an agent
49403
+ * sends (`enrollments.events`). `signal.<name>` is its deprecated spelling,
49404
+ * accepted with warning W13 until 2027-01-19.
49405
+ */
49406
+ type SequenceEvent = "invite.accepted" | "message.replied" | "message.read" | `event.${string}` | `signal.${string}`;
48100
49407
  /** Single-key predicate members of the generated union (the standard-field and extra members excluded). */
48101
49408
  type GenSingle = GenIf extends infer P ? (P extends unknown ? (string extends keyof P ? never : keyof P extends "not" ? never : P) : never) : never;
48102
49409
  /** The standard Contact fields a predicate or a variable may name. */
@@ -48144,7 +49451,7 @@ type BasePredicate = {
48144
49451
  }[StandardField] | {
48145
49452
  [key: `contact.extra.${string}`]: FieldOperand;
48146
49453
  };
48147
- /** An `if` predicate: one key, `contact.*` or `account.*`, optionally wrapped in one `not`. */
49454
+ /** An `if` predicate: one key, `contact.*`, `account.*` or `message.seen`, optionally wrapped in one `not`. */
48148
49455
  type Predicate = BasePredicate | {
48149
49456
  not: BasePredicate;
48150
49457
  };
@@ -48193,7 +49500,11 @@ type Variant<A extends Action = Action> = A extends "inmail.send" ? {
48193
49500
  id: string;
48194
49501
  text: string;
48195
49502
  };
48196
- type Variants<A extends Action> = readonly [Variant<A>, Variant<A>, ...Variant<A>[]];
49503
+ /**
49504
+ * A/B: exactly 2. 3 to 5 still compile: the API accepts them with warning W13
49505
+ * until 2027-01-19 (never over-report).
49506
+ */
49507
+ type Variants<A extends Action> = readonly [Variant<A>, Variant<A>] | readonly [Variant<A>, Variant<A>, Variant<A>] | readonly [Variant<A>, Variant<A>, Variant<A>, Variant<A>] | readonly [Variant<A>, Variant<A>, Variant<A>, Variant<A>, Variant<A>];
48197
49508
  type Kind = "do" | "wait" | "until" | "if" | "emit" | "tag";
48198
49509
  type Only<K extends Kind> = {
48199
49510
  [P in Exclude<Kind, K>]?: never;
@@ -48203,6 +49514,7 @@ type DoStepOf<A extends Action> = {
48203
49514
  do: A;
48204
49515
  with?: ActionParams[A];
48205
49516
  variants?: A extends MessagingAction ? Variants<A> : never;
49517
+ event?: string;
48206
49518
  next?: string;
48207
49519
  else?: string;
48208
49520
  note?: string;
@@ -48236,6 +49548,7 @@ type SequenceStep = {
48236
49548
  } & Only<"emit">) | ({
48237
49549
  id: string;
48238
49550
  tag: string;
49551
+ event?: string;
48239
49552
  next?: string;
48240
49553
  note?: string;
48241
49554
  } & Only<"tag">);
@@ -48257,10 +49570,14 @@ type Trim<S extends string> = S extends `${WS}${infer R}` ? Trim<R> : S extends
48257
49570
  /** Inner text of every closed `{{...}}`; a candidate holding a brace is left to run time. */
48258
49571
  type Inners<S extends string, Acc = never> = S extends `${string}{{${infer I}}}${infer Rest}` ? Inners<Rest, I extends `${string}${"{" | "}"}${string}` ? Acc : Acc | I> : Acc;
48259
49572
  type HasVar<S> = IsLiteral<S> extends true ? ([Inners<S & string>] extends [never] ? false : true) : false;
48260
- type VarOk<I extends string> = I extends `${string}|${string}` ? false : Trim<I> extends `contact.extra.${infer K}` ? K extends "" ? false : true : Trim<I> extends `contact.${infer F}` ? F extends StandardField ? true : false : Trim<I> extends `account.${"first_name" | "last_name" | "full_name"}` ? true : Trim<I> extends `motion.${infer K}` ? K extends "" ? false : true : false;
49573
+ type Lower = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
49574
+ type ShortTail<S extends string> = S extends "" ? true : S extends `${Lower | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "_"}${infer R}` ? ShortTail<R> : false;
49575
+ /** A short variable `{{<key>}}`: a lowercase letter then `[a-z0-9_]`; `my_` only for the sending account's own name. */
49576
+ type ShortOk<S extends string> = S extends `${Lower}${infer R}` ? ShortTail<R> extends true ? S extends `my_${string}` ? S extends "my_first_name" | "my_last_name" | "my_full_name" ? true : false : true : false : false;
49577
+ type VarOk<I extends string> = I extends `${string}|${string}` ? false : Trim<I> extends `contact.extra.${infer K}` ? K extends "" ? false : true : Trim<I> extends `contact.${infer F}` ? F extends StandardField ? true : false : Trim<I> extends `account.${"first_name" | "last_name" | "full_name"}` ? true : Trim<I> extends `motion.${infer K}` ? K extends "" ? false : true : Trim<I> extends `${string}.${string}` ? false : ShortOk<Trim<I>>;
48261
49578
  type BadVar<S extends string> = Inners<S> extends infer I ? (I extends string ? (VarOk<I> extends true ? never : I) : never) : never;
48262
49579
  /** G10: every `{{...}}` of a literal text is a v1 variable. */
48263
- type CheckVars<S> = IsLiteral<S> extends true ? [BadVar<S & string>] extends [never] ? unknown : SequenceTypeError<`{{${BadVar<S & string>}}} is not a v1 variable; use contact.<field>, contact.extra.<key>, account.first_name|last_name|full_name or motion.<key>, without a default`> : unknown;
49580
+ type CheckVars<S> = IsLiteral<S> extends true ? [BadVar<S & string>] extends [never] ? unknown : SequenceTypeError<`{{${BadVar<S & string>}}} is not a v1 variable; use {{first_name}}, {{my_first_name}}, a custom field {{opener}}, or contact.<field>, contact.extra.<key>, account.first_name|last_name|full_name, without a default`> : unknown;
48264
49581
  /** G8: a literal fallback holds no variable. */
48265
49582
  type CheckFallback<S> = HasVar<S> extends true ? SequenceTypeError<"a fallback must not contain a variable"> : CheckVars<S>;
48266
49583
  /** G11: a literal duration is `<number><m|h|d>`. */
@@ -48277,7 +49594,7 @@ type AnyVar<T> = T extends unknown ? HasVar<T> : never;
48277
49594
  type Exact<T, Allowed extends PropertyKey> = {
48278
49595
  [K in Exclude<keyof T, Allowed>]: SequenceTypeError<`unknown key ${K & string}`>;
48279
49596
  };
48280
- type DoKeys = "with" | "variants" | "next" | "else" | "note";
49597
+ type DoKeys = "with" | "variants" | "event" | "next" | "else" | "note";
48281
49598
  type TextFields = "text" | "subject" | "note";
48282
49599
  /** G4, G6-G11 on the `fields` of `step.do`. */
48283
49600
  type CheckDo<A extends Action, F> = Exact<F, A extends MessagingAction ? DoKeys : Exclude<DoKeys, "variants">> & (F extends {
@@ -48316,6 +49633,8 @@ type CheckMessaging<A extends Action, F> = (Get<F, "variants"> extends readonly
48316
49633
  type DoFields<A extends Action> = {
48317
49634
  with?: ActionParams[A];
48318
49635
  variants?: A extends MessagingAction ? Variants<A> : never;
49636
+ /** Custom event sent once each time this step runs (not when skipped or failed), like `invite_sent`. */
49637
+ event?: string;
48319
49638
  next?: string;
48320
49639
  else?: string;
48321
49640
  note?: string;
@@ -48429,7 +49748,7 @@ declare class TierResource {
48429
49748
  * A code the API NEVER emitted is a different case and goes immediately, since
48430
49749
  * no deployment can be sending it: `RATE_LIMITED` went that way in 0.30.0.
48431
49750
  */
48432
- declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "CONNECTION_LOCATION_REQUIRED", "CONNECTION_LOCATION_UNAVAILABLE", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "DRAFT_LIMIT_REACHED", "MEDIA_QUOTA_EXCEEDED", "ACCOUNT_REQUIRED", "DRAFT_NOT_PUBLISHABLE", "SCHEDULE_CONFLICT", "DRAFT_PUBLISHING", "INSUFFICIENT_ROLE", "TIER_REQUIRED", "TEAM_ACCESS_DENIED", "ACCOUNT_NOT_SHARED", "ACCOUNT_OWNER_ONLY", "LAST_OWNER", "BILLING_OWNER_REQUIRED", "DEFAULT_TEAM_PROTECTED", "ALREADY_MEMBER", "INVITE_ALREADY_PENDING", "INVITE_NOT_PENDING", "INVITE_LIMIT_REACHED", "CONNECT_REQUEST_NOT_PENDING", "CONNECT_REQUEST_IN_USE", "LINKEDIN_ACCOUNT_MISMATCH", "NAME_TAKEN", "RESOURCE_IN_USE", "CONTACT_LIMIT_REACHED", "IMPORT_QUEUE_FULL", "SEQUENCE_INVALID", "MOTION_NOT_STARTABLE", "MOTION_STATUS_CONFLICT", "ENROLLMENT_NOT_ACTIVE", "CONTACT_NOT_ENROLLABLE", "CLIENT_TIMEOUT", "INTERNAL"];
49751
+ declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "CONNECTION_LOCATION_REQUIRED", "CONNECTION_LOCATION_UNAVAILABLE", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "DRAFT_LIMIT_REACHED", "MEDIA_QUOTA_EXCEEDED", "ACCOUNT_REQUIRED", "DRAFT_NOT_PUBLISHABLE", "SCHEDULE_CONFLICT", "DRAFT_PUBLISHING", "INSUFFICIENT_ROLE", "TIER_REQUIRED", "TEAM_ACCESS_DENIED", "ACCOUNT_NOT_SHARED", "ACCOUNT_OWNER_ONLY", "LAST_OWNER", "BILLING_OWNER_REQUIRED", "DEFAULT_TEAM_PROTECTED", "ALREADY_MEMBER", "INVITE_ALREADY_PENDING", "INVITE_NOT_PENDING", "INVITE_LIMIT_REACHED", "CONNECT_REQUEST_NOT_PENDING", "CONNECT_REQUEST_IN_USE", "LINKEDIN_ACCOUNT_MISMATCH", "NAME_TAKEN", "RESOURCE_IN_USE", "CONTACT_LIMIT_REACHED", "IMPORT_QUEUE_FULL", "SEQUENCE_INVALID", "SEQUENCE_CONFLICT", "MOTION_NOT_STARTABLE", "MOTION_STATUS_CONFLICT", "ENROLLMENT_NOT_ACTIVE", "STEP_IN_FLIGHT", "NOTHING_TO_RETRY", "ACCOUNT_ALREADY_ENGAGED", "ALREADY_ENROLLED_ON_ACCOUNT", "KNOWN_CHAT", "CONTACT_NOT_ENROLLABLE", "CHAT_NOT_ONE_TO_ONE", "CLIENT_TIMEOUT", "INTERNAL"];
48433
49752
  /**
48434
49753
  * The complete set of error codes observable by API callers.
48435
49754
  *
@@ -48481,11 +49800,28 @@ interface SafetyHint {
48481
49800
  parameter: string;
48482
49801
  message: string;
48483
49802
  }
48484
- /** One failure of a refused document: `path` into it, `rule` saying what to change. Wire `errors[]` entry. */
49803
+ /**
49804
+ * One failure of a refused document: `path` into it, `rule` saying what to
49805
+ * change. Wire `errors[]` entry. A Sequence rule or warning also carries the
49806
+ * compiler-style keys: `code` (`R1` to `R24`, `W1` to `W13`), `message`
49807
+ * (equal to `rule`), `pointer` (a JSON Pointer into the document you sent),
49808
+ * `hint` (the fix) and `docs_url` (the rule's docs entry). A
49809
+ * `MOTION_NOT_STARTABLE` gap is `{path, rule}` only.
49810
+ */
48485
49811
  interface CurviateErrorDetail {
48486
49812
  path: string;
48487
49813
  rule: string;
49814
+ code?: string;
49815
+ message?: string;
49816
+ pointer?: string;
49817
+ hint?: string;
49818
+ docs_url?: string;
48488
49819
  }
49820
+ /**
49821
+ * The stored Sequence a `SEQUENCE_CONFLICT` was refused against. Wire field
49822
+ * `current`, keys as the API sends them.
49823
+ */
49824
+ type SequenceConflictCurrent = NonNullable<components["schemas"]["Error"]["current"]>;
48489
49825
  /** Constructor input for {@link CurviateError}. */
48490
49826
  interface CurviateErrorInit {
48491
49827
  code: ErrorCode;
@@ -48565,11 +49901,18 @@ interface CurviateErrorInit {
48565
49901
  */
48566
49902
  connectionLocation?: ConnectionLocation;
48567
49903
  /**
48568
- * Every failure, as `{path, rule}`, on a refusal that lists them: wire field
48569
- * `errors` (`SEQUENCE_INVALID`, `MOTION_NOT_STARTABLE`), or the offline
49904
+ * Every failure, as `{path, rule}` plus the compiler-style keys of a
49905
+ * Sequence rule, on a refusal that lists them: wire field `errors`
49906
+ * (`SEQUENCE_INVALID`, `MOTION_NOT_STARTABLE`), or the offline
48570
49907
  * `SEQUENCE_INVALID` a Sequence builder throws. `message` repeats the first.
48571
49908
  */
48572
49909
  errors?: CurviateErrorDetail[];
49910
+ /**
49911
+ * On a `SEQUENCE_CONFLICT`: the stored Sequence, its `sequence_revision` and
49912
+ * who saved it. Wire field `current`. Send your edit again with
49913
+ * `if_sequence_revision: current.sequence_revision` to replace it.
49914
+ */
49915
+ current?: SequenceConflictCurrent;
48573
49916
  /**
48574
49917
  * On a `TIER_REQUIRED`: the feature the team's Tier does not include.
48575
49918
  * Wire field `feature`. A feature added later arrives as its own string,
@@ -48612,6 +49955,7 @@ interface CurviateErrorJSON {
48612
49955
  blocked?: boolean;
48613
49956
  connectionLocation?: ConnectionLocation;
48614
49957
  errors?: CurviateErrorDetail[];
49958
+ current?: SequenceConflictCurrent;
48615
49959
  feature?: TierFeature | (string & {});
48616
49960
  requiredTier?: TierName | (string & {}) | null;
48617
49961
  currentTier?: TierName | (string & {}) | null;
@@ -48653,6 +49997,8 @@ declare class CurviateError extends Error {
48653
49997
  readonly connectionLocation: ConnectionLocation | undefined;
48654
49998
  /** Every failure as `{path, rule}`. See {@link CurviateErrorInit.errors}. */
48655
49999
  readonly errors: CurviateErrorDetail[] | undefined;
50000
+ /** The stored Sequence, on `SEQUENCE_CONFLICT`. See {@link CurviateErrorInit.current}. */
50001
+ readonly current: SequenceConflictCurrent | undefined;
48656
50002
  /** The feature the Tier lacks, on `TIER_REQUIRED`. See {@link CurviateErrorInit.feature}. */
48657
50003
  readonly feature: TierFeature | (string & {}) | undefined;
48658
50004
  /** The lowest Tier with that feature; `null` when none has it. See {@link CurviateErrorInit.requiredTier}. */
@@ -48679,13 +50025,23 @@ declare class CurviateError extends Error {
48679
50025
  */
48680
50026
  declare function isCurviateError(err: unknown): err is CurviateError;
48681
50027
 
48682
- /** One reason a Sequence document is refused: `path` into the document, `rule` saying what to change. */
50028
+ /**
50029
+ * One reason a Sequence document is refused: `path` into the document, `rule`
50030
+ * saying what to change, and the compiler-style `code` (`R1` to `R24`),
50031
+ * `message` (= `rule`), `pointer`, `hint` and `docs_url`. A string the API
50032
+ * cannot store (a NUL, a lone surrogate) is refused before any rule: that one
50033
+ * entry is `{path, rule}` only, as the API's `400` names it.
50034
+ */
48683
50035
  type SequenceError = CurviateErrorDetail;
48684
- /** A non-blocking finding, `code` `W1` or `W5` to `W9`. */
50036
+ /** A non-blocking finding, `code` `W1`, `W5` to `W9` or `W11` to `W13`, with the compiler-style keys. */
48685
50037
  interface SequenceWarning {
48686
50038
  code: `W${number}`;
48687
50039
  path: string;
48688
50040
  rule: string;
50041
+ message: string;
50042
+ pointer: string;
50043
+ hint: string;
50044
+ docs_url: string;
48689
50045
  }
48690
50046
  /** What {@link validateSequence} returns: every error, in step order, and every warning. */
48691
50047
  interface SequenceValidationResult {
@@ -48694,11 +50050,14 @@ interface SequenceValidationResult {
48694
50050
  }
48695
50051
  /**
48696
50052
  * Validates a Sequence document offline: every error (rules R1-R24, in step
48697
- * order, with `<step id>.<field>` paths) and every warning (W1, W5-W9) the API
48698
- * reports, with the same `path` and `rule` text. Takes any value, never
48699
- * throws, never mutates it. Nothing is sent anywhere.
50053
+ * order, with `<step id>.<field>` paths) and every warning (W1, W5-W9,
50054
+ * W11-W13) the API reports, with the same `path`, `rule`, `code`, `pointer`,
50055
+ * `hint` and `docs_url`. Takes any value, never throws, never mutates it.
50056
+ * Nothing is sent anywhere.
48700
50057
  *
48701
- * `{{motion.<key>}}` yields warning W9 (only the server knows the Motion's
50058
+ * A deprecated form (3 to 5 variants, `until signal.<name>`,
50059
+ * `{{motion.<key>}}`) is accepted with warning W13 until 2027-01-19.
50060
+ * `{{motion.<key>}}` also yields W9 (only the server knows the Motion's
48702
50061
  * `settings.variables`). A document using vocabulary newer than this SDK is
48703
50062
  * refused here while the API accepts it: upgrade the SDK.
48704
50063
  *
@@ -48706,7 +50065,7 @@ interface SequenceValidationResult {
48706
50065
  * import { validateSequence } from "@curviate/sdk";
48707
50066
  *
48708
50067
  * const { errors, warnings } = validateSequence(JSON.parse(text));
48709
- * for (const e of errors) console.error(`${e.path}: ${e.rule}`);
50068
+ * for (const e of errors) console.error(`${e.path}: ${e.rule} (${e.code}: ${e.hint})`);
48710
50069
  */
48711
50070
  declare function validateSequence(value: unknown): SequenceValidationResult;
48712
50071
 
@@ -48784,7 +50143,7 @@ declare class Sequence<S = never, R extends string = never, O extends boolean =
48784
50143
  * Appends steps in order: constructor output or object literals.
48785
50144
  *
48786
50145
  * @example
48787
- * const next = seq.add(step.wait("pause", "2d"), step.emit("done", "sequence.done", { next: "end" }));
50146
+ * const next = seq.add(step.wait("pause", "2d"), step.tag("done", "sequence-done", { event: "sequence_done", next: "end" }));
48788
50147
  */
48789
50148
  add<const T extends readonly SequenceStep[]>(...steps: T & NoDups<T, Lit<Ids<S>>>): Sequence<S | Steps<T>, R, O>;
48790
50149
  /**
@@ -48847,7 +50206,7 @@ declare class Sequence<S = never, R extends string = never, O extends boolean =
48847
50206
 
48848
50207
  /**
48849
50208
  * Motions and Enrollments (root-scoped): `curviate.motions` (13 methods) and
48850
- * `curviate.enrollments` (5 methods).
50209
+ * `curviate.enrollments` (10 methods).
48851
50210
  *
48852
50211
  * A Motion runs one Sequence (see `Sequence`) for the Contacts of its Contact
48853
50212
  * lists, on its sending accounts, inside its schedule. It is created as a
@@ -48882,7 +50241,17 @@ type EnrollmentDetail = paths["/v1/enrollments/{id}"]["get"]["responses"]["200"]
48882
50241
  type EnrollmentListParams = NonNullable<paths["/v1/enrollments"]["get"]["parameters"]["query"]>;
48883
50242
  type EnrollmentListPage = paths["/v1/enrollments"]["get"]["responses"]["200"]["content"]["application/json"];
48884
50243
  type EnrollmentResumeBody = NonNullable<paths["/v1/enrollments/{id}/resume"]["post"]["requestBody"]>["content"]["application/json"];
50244
+ type EnrollmentEventBody = NonNullable<paths["/v1/enrollments/{id}/events"]["post"]["requestBody"]>["content"]["application/json"];
50245
+ /** @deprecated Use {@link EnrollmentEventBody} with `enrollments.events`. */
48885
50246
  type EnrollmentSignalBody = NonNullable<paths["/v1/enrollments/{id}/signal"]["post"]["requestBody"]>["content"]["application/json"];
50247
+ type EnrollmentReassignBody = NonNullable<paths["/v1/enrollments/{id}/reassign"]["post"]["requestBody"]>["content"]["application/json"];
50248
+ type EnrollmentReassignResult = paths["/v1/enrollments/{id}/reassign"]["post"]["responses"]["200"]["content"]["application/json"];
50249
+ type EnrollmentBulkBody = NonNullable<paths["/v1/enrollments/bulk"]["post"]["requestBody"]>["content"]["application/json"];
50250
+ type EnrollmentBulkResult = paths["/v1/enrollments/bulk"]["post"]["responses"]["200"]["content"]["application/json"];
50251
+ /** One Enrollment's result in a bulk call; what `enrollments.retry` resolves with. */
50252
+ type EnrollmentBulkItem = EnrollmentBulkResult["results"][number];
50253
+ /** A reason code of the catalogue (skip, finish or Step reasons), as `reason` and the list's `reason` filter carry it. */
50254
+ type EnrollmentReason = NonNullable<EnrollmentListParams["reason"]>[number];
48886
50255
  /**
48887
50256
  * What `sequence` takes: a document (sent verbatim, unvalidated), `null`
48888
50257
  * (clears a draft's), or a `Sequence` builder whose every literal target is an
@@ -48942,7 +50311,10 @@ declare class MotionsResource {
48942
50311
  * Change a Motion. Objects (`schedule`, `settings`) merge by key; arrays,
48943
50312
  * `where` and `sequence` replace whole; `null` clears. `sequence` takes a
48944
50313
  * builder or a document, as in `create`. After start, a structural Sequence
48945
- * change makes a new version; running Enrollments keep theirs.
50314
+ * change makes a new version; running Enrollments keep theirs. Send
50315
+ * `if_sequence_revision` (the `sequence_revision` you read) to refuse the
50316
+ * save when someone saved the Sequence since: `SEQUENCE_CONFLICT`, nothing
50317
+ * saved, the stored document in `err.current`. Omitted: the last write wins.
48946
50318
  * `PATCH /v1/motions/{id}`
48947
50319
  *
48948
50320
  * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
@@ -48951,6 +50323,7 @@ declare class MotionsResource {
48951
50323
  * const motion = await curviate.motions.get("mot_123");
48952
50324
  * await curviate.motions.update("mot_123", {
48953
50325
  * sequence: Sequence.fromDocument(motion.sequence).replace("pause", step.wait("pause", "3d", { next: "end" })),
50326
+ * if_sequence_revision: motion.sequence_revision,
48954
50327
  * });
48955
50328
  */
48956
50329
  update<Q extends AnySequence = SequenceDocument | null>(motionId: string, body: MotionUpdateBody<Q>): Promise<Motion>;
@@ -49052,12 +50425,15 @@ declare class EnrollmentsResource {
49052
50425
  constructor(ctx: RequestContext);
49053
50426
  /**
49054
50427
  * List Enrollments, newest first. Filters: `motion_id`, `contact_id`,
49055
- * `account_id`, `status` (any of them), `step_id`. Pages with an opaque
49056
- * `cursor` until it is `null`.
50428
+ * `account_id`, `status` (any of them), `step_id` (at that Step now),
50429
+ * `version`; by Step outcome: `done_step` with `outcome` (how that Step
50430
+ * ended), `reason` (catalogue codes, any of them), `variant_id`,
50431
+ * `relationship_at_enrollment` (any of them). Pages with an opaque `cursor`
50432
+ * until it is `null`.
49057
50433
  * `GET /v1/enrollments`
49058
50434
  *
49059
50435
  * @example
49060
- * const { items } = await curviate.enrollments.list({ motion_id: "mot_123", status: ["active"] });
50436
+ * const { items } = await curviate.enrollments.list({ motion_id: "mot_123", done_step: "opener", outcome: "failed" });
49061
50437
  */
49062
50438
  list(params?: EnrollmentListParams): Promise<EnrollmentListPage>;
49063
50439
  /**
@@ -49079,27 +50455,109 @@ declare class EnrollmentsResource {
49079
50455
  */
49080
50456
  stop(enrollmentId: string): Promise<Enrollment>;
49081
50457
  /**
49082
- * Continue an Enrollment at Step `at` of its Sequence version, `on_reply`
49083
- * re-armed: the out-of-office path. Works on `active`, `paused` and most
49084
- * `finished` Enrollments; else `ENROLLMENT_NOT_ACTIVE`.
50458
+ * Hold one `pending`, `active` or `paused` Enrollment until you `resume` it
50459
+ * (`waiting.kind: "paused_by_user"`); its waits freeze. A Step being sent
50460
+ * right now is `STEP_IN_FLIGHT`: retry in a minute. Works on every plan.
50461
+ * `POST /v1/enrollments/{id}/pause`
50462
+ *
50463
+ * @example
50464
+ * await curviate.enrollments.pause("enr_123");
50465
+ */
50466
+ pause(enrollmentId: string): Promise<Enrollment>;
50467
+ /**
50468
+ * Without `at`: lift your own pause; the Enrollment continues where it was,
50469
+ * with the time its wait had left. With `at`: an explicit jump to that Step
50470
+ * of its Sequence version, `on_reply` re-armed (the out-of-office path).
50471
+ * The jump is not guarded: it re-enters the Step you name even when that
50472
+ * Step already sent, so a message can go out again. To retry a failed Step,
50473
+ * use `enrollments.retry(id)`, which acts only on a failure. Works on
50474
+ * `active`, `paused` and most `finished` Enrollments; else
50475
+ * `ENROLLMENT_NOT_ACTIVE`.
49085
50476
  * `POST /v1/enrollments/{id}/resume`
49086
50477
  *
49087
50478
  * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
49088
50479
  *
49089
50480
  * @example
49090
- * await curviate.enrollments.resume("enr_123", { at: "bump" });
50481
+ * await curviate.enrollments.resume("enr_123"); // lift your pause
50482
+ * await curviate.enrollments.resume("enr_123", { at: "bump" }); // jump to a Step after an out-of-office reply
50483
+ */
50484
+ resume(enrollmentId: string, body?: EnrollmentResumeBody): Promise<Enrollment>;
50485
+ /**
50486
+ * Send a custom event to an `active` or `paused` Enrollment whose Sequence
50487
+ * waits for it (`until event.<name>`), for example once your agent wrote
50488
+ * the researched text to the Contact's custom fields. Input only: fires no
50489
+ * webhook. A name no Step of its version awaits is `INVALID_REQUEST`,
50490
+ * listing the awaited names.
50491
+ * `POST /v1/enrollments/{id}/events`
50492
+ *
50493
+ * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
50494
+ *
50495
+ * @example
50496
+ * await curviate.enrollments.events("enr_123", { name: "research_ready" });
49091
50497
  */
49092
- resume(enrollmentId: string, body: EnrollmentResumeBody): Promise<Enrollment>;
50498
+ events(enrollmentId: string, body: EnrollmentEventBody): Promise<Enrollment>;
49093
50499
  /**
49094
- * Send the signal a Step waits for (`until signal.<name>`), on an `active`
49095
- * or `paused` Enrollment. A name no Step of its version awaits is
49096
- * `INVALID_REQUEST`, listing the awaited names.
50500
+ * Move an Enrollment to another sending account of its Motion; it restarts
50501
+ * there at the first Step of its Sequence version (one you paused stays
50502
+ * paused until you resume it). `warnings` names each Step that will be
50503
+ * skipped. Refused, nothing changed, with `ACCOUNT_ALREADY_ENGAGED` (its
50504
+ * account already contacted the person beyond a profile view),
50505
+ * `ALREADY_ENROLLED_ON_ACCOUNT`, `KNOWN_CHAT` or `STEP_IN_FLIGHT`.
50506
+ * `POST /v1/enrollments/{id}/reassign`
50507
+ *
50508
+ * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
50509
+ *
50510
+ * @example
50511
+ * const { warnings } = await curviate.enrollments.reassign("enr_123", { account_id: "acc_456" });
50512
+ */
50513
+ reassign(enrollmentId: string, body: EnrollmentReassignBody): Promise<EnrollmentReassignResult>;
50514
+ /**
50515
+ * Pause, resume, stop, retry, send an event to or reassign up to 1,000
50516
+ * Enrollments, by `ids` or by a `filter` of the list's fields (`motion_id`
50517
+ * required). Each is decided alone, as its single call would be, with its
50518
+ * own result (`ok`, or `error` with that call's code; a server error on one
50519
+ * is `INTERNAL` for it); not atomic. List with the same filter to see the
50520
+ * matches first. Below Automate only `pause` and `stop` run.
50521
+ * `POST /v1/enrollments/bulk`
50522
+ *
50523
+ * @example
50524
+ * const { results } = await curviate.enrollments.bulk({
50525
+ * action: "retry",
50526
+ * filter: { motion_id: "mot_123", done_step: "opener", outcome: "failed" },
50527
+ * });
50528
+ */
50529
+ bulk(body: EnrollmentBulkBody): Promise<EnrollmentBulkResult>;
50530
+ /**
50531
+ * Retry the failed Step of one Enrollment: the guarded Retry. It acts only
50532
+ * while that Step's latest outcome is `failed`, so a repeated or looped
50533
+ * call never sends a delivered message again. Resolves with the
50534
+ * Enrollment's result when it was resumed; otherwise throws its refusal as
50535
+ * a `CurviateError` (`NOTHING_TO_RETRY` when nothing failed,
50536
+ * `STEP_IN_FLIGHT`, `ENROLLMENT_NOT_ACTIVE`, `RESOURCE_NOT_FOUND`, ...),
50537
+ * with no `httpStatus`. Sent as `bulk` with this one id.
50538
+ * `POST /v1/enrollments/bulk`
50539
+ *
50540
+ * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
50541
+ *
50542
+ * @example
50543
+ * try {
50544
+ * await curviate.enrollments.retry("enr_123");
50545
+ * } catch (err) {
50546
+ * if (isCurviateError(err) && err.code === "NOTHING_TO_RETRY") console.log("nothing failed");
50547
+ * }
50548
+ */
50549
+ retry(enrollmentId: string): Promise<EnrollmentBulkItem>;
50550
+ /**
50551
+ * Deprecated alias of {@link EnrollmentsResource.events}, answered the same
50552
+ * plus a `Deprecation` header and warning W13; accepted until 2027-01-19.
49097
50553
  * `POST /v1/enrollments/{id}/signal`
49098
50554
  *
49099
50555
  * Needs Automate: a Team below that Tier is refused with `TIER_REQUIRED`.
49100
50556
  *
50557
+ * @deprecated Use `enrollments.events`; `signal` stops working on 2027-01-19.
50558
+ *
49101
50559
  * @example
49102
- * await curviate.enrollments.signal("enr_123", { name: "demo_booked" });
50560
+ * await curviate.enrollments.events("enr_123", { name: "demo_booked" }); // instead of signal
49103
50561
  */
49104
50562
  signal(enrollmentId: string, body: EnrollmentSignalBody): Promise<Enrollment>;
49105
50563
  }
@@ -50614,7 +52072,7 @@ declare class Curviate {
50614
52072
  /**
50615
52073
  * Step constructors: one per kind, arguments
50616
52074
  * `(id, <kind value>, fields)`, `fields` keys exactly the document's
50617
- * (`with`, `variants`, `next`, `then`, `else`, `timeout`, `note`). Each returns
52075
+ * (`with`, `variants`, `event`, `next`, `then`, `else`, `timeout`, `note`). Each returns
50618
52076
  * the plain step object and adds no key the caller did not give: no default is
50619
52077
  * written.
50620
52078
  *
@@ -50628,6 +52086,9 @@ type Flow = {
50628
52086
  next?: string;
50629
52087
  note?: string;
50630
52088
  };
52089
+ type TagFlow = Flow & {
52090
+ event?: string;
52091
+ };
50631
52092
  type Branch = {
50632
52093
  then: string;
50633
52094
  else?: string;
@@ -50643,13 +52104,15 @@ type TimeoutOf<F> = F extends {
50643
52104
  declare const step: {
50644
52105
  /**
50645
52106
  * A `do` step: run one action. `fields.with` takes the action's parameters,
50646
- * `fields.variants` (messaging actions) 2 to 5 A/B texts, `else` the step
50647
- * taken when the action cannot run. A literal text using a variable needs
50648
- * its fallback; a comment always needs one.
52107
+ * `fields.variants` (messaging actions) exactly 2 A/B texts, `fields.event`
52108
+ * a custom event sent each time the step runs, `else` the step taken when
52109
+ * the action cannot run. A literal text using a variable needs its
52110
+ * fallback; a comment always needs one.
50649
52111
  *
50650
52112
  * @example
50651
52113
  * step.do("opener", "message.send", {
50652
- * with: { text: "Hi {{contact.first_name}}, thanks for connecting.", fallback: "Hi, thanks for connecting." },
52114
+ * with: { text: "Hi {{first_name}}, thanks for connecting.", fallback: "Hi, thanks for connecting." },
52115
+ * event: "opener_sent",
50653
52116
  * next: "end",
50654
52117
  * });
50655
52118
  */
@@ -50673,10 +52136,12 @@ declare const step: {
50673
52136
  } & F;
50674
52137
  /**
50675
52138
  * An `until` step: wait for an event, at most `timeout`; `then` on the event,
50676
- * `else` (or the next step) on timeout.
52139
+ * `else` (or the next step) on timeout. `event.<name>` waits for a custom
52140
+ * event your agent sends with `enrollments.events`.
50677
52141
  *
50678
52142
  * @example
50679
52143
  * step.until("w_accept", "invite.accepted", { timeout: "14d", then: "opener", else: "end" });
52144
+ * step.until("w_research", "event.research_ready", { timeout: "3d", then: "opener", else: "end" });
50680
52145
  */
50681
52146
  until<const Id extends string, const E extends SequenceEvent, const F extends Timed>(id: Id & CheckId<Id>, event: E, fields: F & Exact<F, keyof Timed> & {
50682
52147
  timeout: CheckDuration<TimeoutOf<F>>;
@@ -50685,17 +52150,21 @@ declare const step: {
50685
52150
  until: E;
50686
52151
  } & F;
50687
52152
  /**
50688
- * An `if` step: branch on one predicate about the Contact or the sending Account.
52153
+ * An `if` step: branch on one predicate about the Contact, the sending
52154
+ * Account, or the last message (`message.seen`).
50689
52155
  *
50690
52156
  * @example
50691
52157
  * step.if("is_connected", { "contact.connected": true }, { then: "opener", else: "invite" });
52158
+ * step.if("was_seen", { "message.seen": true }, { then: "bump", else: "end" });
50692
52159
  */
50693
52160
  if<const Id extends string, const F extends Branch>(id: Id & CheckId<Id>, predicate: Predicate, fields: F & Exact<F, keyof Branch>): {
50694
52161
  id: Id;
50695
52162
  if: Predicate;
50696
52163
  } & F;
50697
52164
  /**
50698
- * An `emit` step: send a `motion.signal` webhook with this name.
52165
+ * Legacy: an `emit` step sends a custom event (the `motion.custom_event`
52166
+ * webhook) with this name. New Sequences put `event` on the `do` or `tag`
52167
+ * step that matters instead.
50699
52168
  *
50700
52169
  * @example
50701
52170
  * step.emit("notify", "reply.received", { next: "end" });
@@ -50705,17 +52174,40 @@ declare const step: {
50705
52174
  emit: string;
50706
52175
  } & F;
50707
52176
  /**
50708
- * A `tag` step: add a Tag to the Contact.
52177
+ * A `tag` step: add a Tag to the Contact; `fields.event` sends a custom
52178
+ * event each time it runs.
50709
52179
  *
50710
52180
  * @example
50711
- * step.tag("mark", "replied", { next: "end" });
52181
+ * step.tag("mark", "replied", { event: "marked_replied", next: "end" });
50712
52182
  */
50713
- tag<const Id extends string, const F extends Flow = {}>(id: Id & CheckId<Id>, name: string, fields?: F & Exact<F, keyof Flow>): {
52183
+ tag<const Id extends string, const F extends TagFlow = {}>(id: Id & CheckId<Id>, name: string, fields?: F & Exact<F, keyof TagFlow>): {
50714
52184
  id: Id;
50715
52185
  tag: string;
50716
52186
  } & F;
50717
52187
  };
50718
52188
 
52189
+ /**
52190
+ * The id-from-kind rule the dashboard editor uses, so code and the editor name
52191
+ * new steps alike. The API never generates, renames or rewrites an id.
52192
+ */
52193
+
52194
+ /** A step kind, or the action of a `do` step. */
52195
+ type StepIdKind = Action | "wait" | "until" | "if" | "emit" | "tag";
52196
+ /**
52197
+ * The id a new step of `kind` gets in `doc`: the first free one in its kind's
52198
+ * series (`message`, `message_2`, ...), free of every step and variant id; a
52199
+ * `wait` placed before step `beforeId` is `w_<beforeId>`. At most 40
52200
+ * characters. Pure: reads `doc`, never changes it.
52201
+ *
52202
+ * @example
52203
+ * import { newStepId } from "@curviate/sdk";
52204
+ *
52205
+ * const doc = { on_reply: "end", steps: [{ id: "message", do: "message.send", with: { text: "Hi" }, next: "end" }] };
52206
+ * newStepId(doc, "message.send"); // "message_2"
52207
+ * newStepId(doc, "wait", "message"); // "w_message"
52208
+ */
52209
+ declare function newStepId(doc: unknown, kind: StepIdKind, beforeId?: string): string;
52210
+
50719
52211
  /** Where the v1 schema is published; the `$schema` value a builder writes. */
50720
52212
  declare const SEQUENCE_SCHEMA_URL: "https://docs.curviate.com/schemas/sequence/v1.json";
50721
52213
  /** A JSON Schema object, read-only. */
@@ -50857,12 +52349,23 @@ interface PostPublishFailedPayload extends EventPayloadBase {
50857
52349
  failure_message: string;
50858
52350
  }
50859
52351
  /**
50860
- * Payload of the seven `motion` events (`motion.status_changed`,
50861
- * `enrollment.started`, `enrollment.skipped`, `enrollment.finished`,
50862
- * `step.executed`, `step.failed`, `motion.signal`). Each carries `motion_id`;
50863
- * the rest varies by event and is documented at
50864
- * https://docs.curviate.com/reference/webhooks/events (`contact` is the Contact
50865
- * record, `null` once deleted).
52352
+ * Payload of the eleven `motion` events (`motion.status_changed`,
52353
+ * `enrollment.started`, `enrollment.accepted`, `enrollment.replied`,
52354
+ * `enrollment.seen`, `enrollment.reassigned`, `enrollment.skipped`,
52355
+ * `enrollment.finished`, `step.executed`, `step.failed`,
52356
+ * `motion.custom_event`). Each carries `motion_id` and is self-contained:
52357
+ * `motion_name`, `account_name`, the step keys (`step_id`, `action`,
52358
+ * `variant_id`, `step_event`: the step's custom event name, while `event` stays
52359
+ * the event type) and `reason_message` beside every `reason`. The rest varies
52360
+ * by event, with a full example per event at
52361
+ * https://docs.curviate.com/reference/webhooks/catalogue (`contact` is the
52362
+ * Contact record, `null` once deleted). No payload carries the text Curviate
52363
+ * sent.
52364
+ *
52365
+ * `motion.custom_event` fires once when a step carrying an `event` ran (or a
52366
+ * legacy `emit` step is reached). `motion.signal` is its deprecated name: a
52367
+ * webhook subscribed to it receives the same `data` under that name until
52368
+ * 2027-01-19.
50866
52369
  *
50867
52370
  * `motion.status_changed` carries `reason`, which is `tier_required` when the
50868
52371
  * Team lost the Tier that includes Motions: the Motion reads `paused` with
@@ -51024,6 +52527,18 @@ type CurviateEvent = CurviateEventEnvelope & ({
51024
52527
  } | {
51025
52528
  event: "enrollment.started";
51026
52529
  data: MotionPayload;
52530
+ } | {
52531
+ event: "enrollment.accepted";
52532
+ data: MotionPayload;
52533
+ } | {
52534
+ event: "enrollment.replied";
52535
+ data: MotionPayload;
52536
+ } | {
52537
+ event: "enrollment.seen";
52538
+ data: MotionPayload;
52539
+ } | {
52540
+ event: "enrollment.reassigned";
52541
+ data: MotionPayload;
51027
52542
  } | {
51028
52543
  event: "enrollment.skipped";
51029
52544
  data: MotionPayload;
@@ -51037,6 +52552,11 @@ type CurviateEvent = CurviateEventEnvelope & ({
51037
52552
  event: "step.failed";
51038
52553
  data: MotionPayload;
51039
52554
  } | {
52555
+ event: "motion.custom_event";
52556
+ data: MotionPayload;
52557
+ }
52558
+ /** @deprecated Renamed `motion.custom_event`; delivered under this name until 2027-01-19. */
52559
+ | {
51040
52560
  event: "motion.signal";
51041
52561
  data: MotionPayload;
51042
52562
  });
@@ -51098,4 +52618,4 @@ interface ConstructEventOptions {
51098
52618
  */
51099
52619
  declare function constructEvent(rawBody: string | Buffer, signatureHeader: string, secret: string, opts?: ConstructEventOptions): Promise<CurviateEvent>;
51100
52620
 
51101
- export { type AccountDetail, type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type AccountTeamAccessResult, type AccountUpdateBody, type AccountUpdateResult, type Activity, type ActivityParams, type AnalyticsEvent, type AnalyticsEventListPage, type AnalyticsEventListParams, type AuthIntentBody, type BudgetRow, type ConnectRequest, type ConnectRequestCancelResult, type ConnectRequestCreateBody, type ConnectRequestGetResult, type Connection, type ConnectionCountry, type ConnectionListPage, type ConnectionListParams, type ConnectionLocation, type ConnectionLocationSource, type ConnectionPayload, type ConstructEventOptions, type Contact, type ContactDeleteManyBody, type ContactDeleteManyResult, type ContactEnrichBody, type ContactEnrichResult, type ContactExportParams, type ContactImport, type ContactImportCreateBody, type ContactImportGetResult, type ContactImportListPage, type ContactImportListParams, type ContactImportRowsPage, type ContactImportRowsParams, type ContactListCreateBody, type ContactListGetResult, type ContactListListPage, type ContactListListParams, type ContactListObject, type ContactListPage, type ContactListParams, type ContactListUpdateBody, type ContactListUpdateResult, type ContactUpdateBody, type ContactUpdateManyBody, type ContactUpdateManyResult, type ContactUpdateResult, type ContactUpsertBody, type ContactUpsertResult, Curviate, type CurviateConfig, CurviateError, type CurviateErrorDetail, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, type DraftAttachmentContentType, type DraftCreateBody, type DraftCreateResult, type DraftDeleteResult, type DraftGetResult, type DraftListParams, type DraftListResult, type DraftPublishResult, type DraftUpdateBody, type DraftUpdateResult, type DraftUploadOptions, type DraftUploadResult, ERROR_CODES, type Enrollment, type EnrollmentDetail, type EnrollmentListPage, type EnrollmentListParams, type EnrollmentResumeBody, type EnrollmentSignalBody, type ErrorCode, type EventPayloadBase, type JsonSchema, type MessagePayload, type Motion, type MotionAddContactsBody, type MotionAnalyticsDetail, type MotionAnalyticsDetailParams, type MotionAnalyticsOverview, type MotionAnalyticsParams, type MotionContactsResult, type MotionCreateBody, type MotionListPage, type MotionListParams, type MotionPayload, type MotionPreview, type MotionPreviewParams, type MotionRemoveContactsBody, type MotionRemoveContactsResult, type MotionUpdateBody, type NetworkResyncBody, type NetworkResyncResult, type NetworkSyncStatus, type NetworkSyncStatusParams, type Notification, type NotificationListPage, type NotificationListQuery, type NotificationMarkAllReadBody, type NotificationMarkAllReadResult, type NotificationUnreadCount, type NotificationUpdateBody, type NotificationUpdateResult, type Pageable, type PostPublishFailedPayload, type PostPublishedPayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type RootNamespaces, SEQUENCE_SCHEMA_URL, SEQUENCE_SCHEMA_V1, type SafetyHint, type SafetyReason, type SeatList, Sequence, type Action as SequenceAction, type SequenceDocument, type SequenceDocumentOut, type Duration as SequenceDuration, type SequenceError, type SequenceEvent, type FieldOperand as SequenceFieldOperand, type SequenceInput, type Predicate as SequencePredicate, type Reaction as SequenceReaction, type SequenceStep, type SequenceTypeError, type SequenceValidationResult, type Variant as SequenceVariant, type SequenceVersion, type SequenceVersionParams, type SequenceWarning, type Tag, type TagListPage, type TagListParams, type TagUpdateBody, type Team, type TeamInviteCreateBody, type TeamInviteCreateResult, type TeamInviteListPage, type TeamInviteListParams, type TeamInviteResendResult, type TeamInviteRevokeResult, type TeamListPage, type TeamListParams, type TeamMemberListPage, type TeamMemberListParams, type TeamMemberRemoveResult, type TeamMemberUpdateBody, type TeamMemberUpdateResult, type TeamUpdateBody, type TeamUpdateResult, type TierFeature, type TierName, type TierResult, type UniboxAccount, type UniboxAccountList, type UniboxAccountUpdateBody, type UniboxChat, type UniboxChatListPage, type UniboxChatListParams, type UniboxEnrollBody, type UniboxEnrollResult, type UniboxRefreshBody, type UniboxRefreshResult, type UniboxTagContactBody, type UniboxTagContactResult, type UniboxUnreadCount, type UniboxUnreadCountParams, WebhookSignatureError, type components, constructEvent, isCurviateError, type operations, type paths, step, validateSequence };
52621
+ export { type AccountDetail, type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type AccountTeamAccessResult, type AccountUpdateBody, type AccountUpdateResult, type Activity, type ActivityParams, type AnalyticsEvent, type AnalyticsEventListPage, type AnalyticsEventListParams, type AuthIntentBody, type BudgetRow, type ConnectRequest, type ConnectRequestCancelResult, type ConnectRequestCreateBody, type ConnectRequestGetResult, type Connection, type ConnectionCountry, type ConnectionListPage, type ConnectionListParams, type ConnectionLocation, type ConnectionLocationSource, type ConnectionPayload, type ConstructEventOptions, type Contact, type ContactDeleteManyBody, type ContactDeleteManyResult, type ContactEnrichBody, type ContactEnrichResult, type ContactExportParams, type ContactImport, type ContactImportCreateBody, type ContactImportGetResult, type ContactImportListPage, type ContactImportListParams, type ContactImportRowsPage, type ContactImportRowsParams, type ContactListCreateBody, type ContactListGetResult, type ContactListListPage, type ContactListListParams, type ContactListObject, type ContactListPage, type ContactListParams, type ContactListUpdateBody, type ContactListUpdateResult, type ContactUpdateBody, type ContactUpdateManyBody, type ContactUpdateManyResult, type ContactUpdateResult, type ContactUpsertBody, type ContactUpsertResult, Curviate, type CurviateConfig, CurviateError, type CurviateErrorDetail, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, type DraftAttachmentContentType, type DraftCreateBody, type DraftCreateResult, type DraftDeleteResult, type DraftGetResult, type DraftListParams, type DraftListResult, type DraftPublishResult, type DraftUpdateBody, type DraftUpdateResult, type DraftUploadOptions, type DraftUploadResult, ERROR_CODES, type Enrollment, type EnrollmentBulkBody, type EnrollmentBulkItem, type EnrollmentBulkResult, type EnrollmentDetail, type EnrollmentEventBody, type EnrollmentListPage, type EnrollmentListParams, type EnrollmentReason, type EnrollmentReassignBody, type EnrollmentReassignResult, type EnrollmentResumeBody, type EnrollmentSignalBody, type ErrorCode, type EventPayloadBase, type JsonSchema, type MessagePayload, type Motion, type MotionAddContactsBody, type MotionAnalyticsDetail, type MotionAnalyticsDetailParams, type MotionAnalyticsOverview, type MotionAnalyticsParams, type MotionContactsResult, type MotionCreateBody, type MotionListPage, type MotionListParams, type MotionPayload, type MotionPreview, type MotionPreviewParams, type MotionRemoveContactsBody, type MotionRemoveContactsResult, type MotionUpdateBody, type NetworkResyncBody, type NetworkResyncResult, type NetworkSyncStatus, type NetworkSyncStatusParams, type Notification, type NotificationListPage, type NotificationListQuery, type NotificationMarkAllReadBody, type NotificationMarkAllReadResult, type NotificationUnreadCount, type NotificationUpdateBody, type NotificationUpdateResult, type Pageable, type PostPublishFailedPayload, type PostPublishedPayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type RootNamespaces, SEQUENCE_SCHEMA_URL, SEQUENCE_SCHEMA_V1, type SafetyHint, type SafetyReason, type SeatList, Sequence, type Action as SequenceAction, type SequenceConflictCurrent, type SequenceDocument, type SequenceDocumentOut, type Duration as SequenceDuration, type SequenceError, type SequenceEvent, type FieldOperand as SequenceFieldOperand, type SequenceInput, type Predicate as SequencePredicate, type Reaction as SequenceReaction, type SequenceStep, type SequenceTypeError, type SequenceValidationResult, type Variant as SequenceVariant, type SequenceVersion, type SequenceVersionParams, type SequenceWarning, type StepIdKind, type Tag, type TagListPage, type TagListParams, type TagUpdateBody, type Team, type TeamInviteCreateBody, type TeamInviteCreateResult, type TeamInviteListPage, type TeamInviteListParams, type TeamInviteResendResult, type TeamInviteRevokeResult, type TeamListPage, type TeamListParams, type TeamMemberListPage, type TeamMemberListParams, type TeamMemberRemoveResult, type TeamMemberUpdateBody, type TeamMemberUpdateResult, type TeamUpdateBody, type TeamUpdateResult, type TierFeature, type TierName, type TierResult, type UniboxAccount, type UniboxAccountList, type UniboxAccountUpdateBody, type UniboxChat, type UniboxChatListPage, type UniboxChatListParams, type UniboxEnrollBody, type UniboxEnrollResult, type UniboxRefreshBody, type UniboxRefreshResult, type UniboxTagContactBody, type UniboxTagContactResult, type UniboxUnreadCount, type UniboxUnreadCountParams, WebhookSignatureError, type components, constructEvent, isCurviateError, newStepId, type operations, type paths, step, validateSequence };