getricky 0.1.38 → 0.1.40

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.
@@ -3318,9 +3318,9 @@ export type Workflow = {
3318
3318
  type: 'conversation' | 'scheduled';
3319
3319
  definition: {
3320
3320
  /**
3321
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
3321
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
3322
3322
  */
3323
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
3323
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
3324
3324
  /**
3325
3325
  * Channels it listens to. See `GET /channels`.
3326
3326
  */
@@ -3334,7 +3334,7 @@ export type Workflow = {
3334
3334
  */
3335
3335
  message_filters?: {
3336
3336
  /**
3337
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
3337
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
3338
3338
  */
3339
3339
  first_message?: boolean;
3340
3340
  /**
@@ -3360,30 +3360,9 @@ export type Workflow = {
3360
3360
  text_contains?: string;
3361
3361
  };
3362
3362
  /**
3363
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
3363
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
3364
3364
  */
3365
- coverage?: {
3366
- /**
3367
- * When the team goes away, for one period; with `ends_at`.
3368
- */
3369
- starts_at?: string;
3370
- /**
3371
- * When the team is back, for one period; with `starts_at`.
3372
- */
3373
- ends_at?: string;
3374
- /**
3375
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
3376
- */
3377
- team_hours?: BusinessHours;
3378
- /**
3379
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
3380
- */
3381
- assigned_user_ids?: Array<string>;
3382
- /**
3383
- * What the agent tells customers meanwhile.
3384
- */
3385
- notice: string | null;
3386
- };
3365
+ assigned_user_ids?: Array<string>;
3387
3366
  /**
3388
3367
  * When it runs; null runs at any hour.
3389
3368
  */
@@ -3403,7 +3382,7 @@ export type Workflow = {
3403
3382
  */
3404
3383
  entry: string;
3405
3384
  /**
3406
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
3385
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
3407
3386
  */
3408
3387
  steps: Array<{
3409
3388
  /**
@@ -3590,6 +3569,20 @@ export type Workflow = {
3590
3569
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
3591
3570
  */
3592
3571
  text: string;
3572
+ } | {
3573
+ /**
3574
+ * Step ID: letters, digits, `_` or `-`, up to 64.
3575
+ */
3576
+ id: string;
3577
+ /**
3578
+ * Step to run next; null ends the flow.
3579
+ */
3580
+ next: string | null;
3581
+ kind: 'turn_on_ai';
3582
+ /**
3583
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
3584
+ */
3585
+ agent_id: string;
3593
3586
  }>;
3594
3587
  };
3595
3588
  } | {
@@ -4991,9 +4984,9 @@ export type CreateWorkflow = {
4991
4984
  */
4992
4985
  definition: {
4993
4986
  /**
4994
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
4987
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
4995
4988
  */
4996
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
4989
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
4997
4990
  /**
4998
4991
  * Channels it listens to. See `GET /channels`.
4999
4992
  */
@@ -5007,7 +5000,7 @@ export type CreateWorkflow = {
5007
5000
  */
5008
5001
  message_filters?: {
5009
5002
  /**
5010
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
5003
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
5011
5004
  */
5012
5005
  first_message?: boolean;
5013
5006
  /**
@@ -5033,30 +5026,9 @@ export type CreateWorkflow = {
5033
5026
  text_contains?: string;
5034
5027
  };
5035
5028
  /**
5036
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
5029
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
5037
5030
  */
5038
- coverage?: {
5039
- /**
5040
- * When the team goes away, for one period; with `ends_at`.
5041
- */
5042
- starts_at?: string;
5043
- /**
5044
- * When the team is back, for one period; with `starts_at`.
5045
- */
5046
- ends_at?: string;
5047
- /**
5048
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
5049
- */
5050
- team_hours?: BusinessHoursInput;
5051
- /**
5052
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
5053
- */
5054
- assigned_user_ids?: Array<string>;
5055
- /**
5056
- * What the agent tells customers meanwhile.
5057
- */
5058
- notice: string | null;
5059
- };
5031
+ assigned_user_ids?: Array<string>;
5060
5032
  /**
5061
5033
  * When it runs; null runs at any hour.
5062
5034
  */
@@ -5076,7 +5048,7 @@ export type CreateWorkflow = {
5076
5048
  */
5077
5049
  entry: string;
5078
5050
  /**
5079
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
5051
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
5080
5052
  */
5081
5053
  steps: Array<{
5082
5054
  /**
@@ -5263,6 +5235,20 @@ export type CreateWorkflow = {
5263
5235
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
5264
5236
  */
5265
5237
  text: string;
5238
+ } | {
5239
+ /**
5240
+ * Step ID: letters, digits, `_` or `-`, up to 64.
5241
+ */
5242
+ id: string;
5243
+ /**
5244
+ * Step to run next; null ends the flow.
5245
+ */
5246
+ next: string | null;
5247
+ kind: 'turn_on_ai';
5248
+ /**
5249
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
5250
+ */
5251
+ agent_id: string;
5266
5252
  }>;
5267
5253
  };
5268
5254
  };
@@ -5280,9 +5266,9 @@ export type UpdateWorkflow = {
5280
5266
  */
5281
5267
  definition?: {
5282
5268
  /**
5283
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
5269
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
5284
5270
  */
5285
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
5271
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
5286
5272
  /**
5287
5273
  * Channels it listens to. See `GET /channels`.
5288
5274
  */
@@ -5296,7 +5282,7 @@ export type UpdateWorkflow = {
5296
5282
  */
5297
5283
  message_filters?: {
5298
5284
  /**
5299
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
5285
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
5300
5286
  */
5301
5287
  first_message?: boolean;
5302
5288
  /**
@@ -5322,30 +5308,9 @@ export type UpdateWorkflow = {
5322
5308
  text_contains?: string;
5323
5309
  };
5324
5310
  /**
5325
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
5311
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
5326
5312
  */
5327
- coverage?: {
5328
- /**
5329
- * When the team goes away, for one period; with `ends_at`.
5330
- */
5331
- starts_at?: string;
5332
- /**
5333
- * When the team is back, for one period; with `starts_at`.
5334
- */
5335
- ends_at?: string;
5336
- /**
5337
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
5338
- */
5339
- team_hours?: BusinessHoursInput;
5340
- /**
5341
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
5342
- */
5343
- assigned_user_ids?: Array<string>;
5344
- /**
5345
- * What the agent tells customers meanwhile.
5346
- */
5347
- notice: string | null;
5348
- };
5313
+ assigned_user_ids?: Array<string>;
5349
5314
  /**
5350
5315
  * When it runs; null runs at any hour.
5351
5316
  */
@@ -5365,7 +5330,7 @@ export type UpdateWorkflow = {
5365
5330
  */
5366
5331
  entry: string;
5367
5332
  /**
5368
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
5333
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
5369
5334
  */
5370
5335
  steps: Array<{
5371
5336
  /**
@@ -5552,6 +5517,20 @@ export type UpdateWorkflow = {
5552
5517
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
5553
5518
  */
5554
5519
  text: string;
5520
+ } | {
5521
+ /**
5522
+ * Step ID: letters, digits, `_` or `-`, up to 64.
5523
+ */
5524
+ id: string;
5525
+ /**
5526
+ * Step to run next; null ends the flow.
5527
+ */
5528
+ next: string | null;
5529
+ kind: 'turn_on_ai';
5530
+ /**
5531
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
5532
+ */
5533
+ agent_id: string;
5555
5534
  }>;
5556
5535
  };
5557
5536
  };
@@ -3318,9 +3318,9 @@ export type Workflow = {
3318
3318
  type: 'conversation' | 'scheduled';
3319
3319
  definition: {
3320
3320
  /**
3321
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
3321
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
3322
3322
  */
3323
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
3323
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
3324
3324
  /**
3325
3325
  * Channels it listens to. See `GET /channels`.
3326
3326
  */
@@ -3334,7 +3334,7 @@ export type Workflow = {
3334
3334
  */
3335
3335
  message_filters?: {
3336
3336
  /**
3337
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
3337
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
3338
3338
  */
3339
3339
  first_message?: boolean;
3340
3340
  /**
@@ -3360,30 +3360,9 @@ export type Workflow = {
3360
3360
  text_contains?: string;
3361
3361
  };
3362
3362
  /**
3363
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
3363
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
3364
3364
  */
3365
- coverage?: {
3366
- /**
3367
- * When the team goes away, for one period; with `ends_at`.
3368
- */
3369
- starts_at?: string;
3370
- /**
3371
- * When the team is back, for one period; with `starts_at`.
3372
- */
3373
- ends_at?: string;
3374
- /**
3375
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
3376
- */
3377
- team_hours?: BusinessHours;
3378
- /**
3379
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
3380
- */
3381
- assigned_user_ids?: Array<string>;
3382
- /**
3383
- * What the agent tells customers meanwhile.
3384
- */
3385
- notice: string | null;
3386
- };
3365
+ assigned_user_ids?: Array<string>;
3387
3366
  /**
3388
3367
  * When it runs; null runs at any hour.
3389
3368
  */
@@ -3403,7 +3382,7 @@ export type Workflow = {
3403
3382
  */
3404
3383
  entry: string;
3405
3384
  /**
3406
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
3385
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
3407
3386
  */
3408
3387
  steps: Array<{
3409
3388
  /**
@@ -3590,6 +3569,20 @@ export type Workflow = {
3590
3569
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
3591
3570
  */
3592
3571
  text: string;
3572
+ } | {
3573
+ /**
3574
+ * Step ID: letters, digits, `_` or `-`, up to 64.
3575
+ */
3576
+ id: string;
3577
+ /**
3578
+ * Step to run next; null ends the flow.
3579
+ */
3580
+ next: string | null;
3581
+ kind: 'turn_on_ai';
3582
+ /**
3583
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
3584
+ */
3585
+ agent_id: string;
3593
3586
  }>;
3594
3587
  };
3595
3588
  } | {
@@ -4991,9 +4984,9 @@ export type CreateWorkflow = {
4991
4984
  */
4992
4985
  definition: {
4993
4986
  /**
4994
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
4987
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
4995
4988
  */
4996
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
4989
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
4997
4990
  /**
4998
4991
  * Channels it listens to. See `GET /channels`.
4999
4992
  */
@@ -5007,7 +5000,7 @@ export type CreateWorkflow = {
5007
5000
  */
5008
5001
  message_filters?: {
5009
5002
  /**
5010
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
5003
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
5011
5004
  */
5012
5005
  first_message?: boolean;
5013
5006
  /**
@@ -5033,30 +5026,9 @@ export type CreateWorkflow = {
5033
5026
  text_contains?: string;
5034
5027
  };
5035
5028
  /**
5036
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
5029
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
5037
5030
  */
5038
- coverage?: {
5039
- /**
5040
- * When the team goes away, for one period; with `ends_at`.
5041
- */
5042
- starts_at?: string;
5043
- /**
5044
- * When the team is back, for one period; with `starts_at`.
5045
- */
5046
- ends_at?: string;
5047
- /**
5048
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
5049
- */
5050
- team_hours?: BusinessHoursInput;
5051
- /**
5052
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
5053
- */
5054
- assigned_user_ids?: Array<string>;
5055
- /**
5056
- * What the agent tells customers meanwhile.
5057
- */
5058
- notice: string | null;
5059
- };
5031
+ assigned_user_ids?: Array<string>;
5060
5032
  /**
5061
5033
  * When it runs; null runs at any hour.
5062
5034
  */
@@ -5076,7 +5048,7 @@ export type CreateWorkflow = {
5076
5048
  */
5077
5049
  entry: string;
5078
5050
  /**
5079
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
5051
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
5080
5052
  */
5081
5053
  steps: Array<{
5082
5054
  /**
@@ -5263,6 +5235,20 @@ export type CreateWorkflow = {
5263
5235
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
5264
5236
  */
5265
5237
  text: string;
5238
+ } | {
5239
+ /**
5240
+ * Step ID: letters, digits, `_` or `-`, up to 64.
5241
+ */
5242
+ id: string;
5243
+ /**
5244
+ * Step to run next; null ends the flow.
5245
+ */
5246
+ next: string | null;
5247
+ kind: 'turn_on_ai';
5248
+ /**
5249
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
5250
+ */
5251
+ agent_id: string;
5266
5252
  }>;
5267
5253
  };
5268
5254
  };
@@ -5280,9 +5266,9 @@ export type UpdateWorkflow = {
5280
5266
  */
5281
5267
  definition?: {
5282
5268
  /**
5283
- * `conversation_opened` runs when a conversation opens; `first_message_received` when the first message from the contact in a conversation arrives; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `team_away` runs nothing: during `coverage` the agent of its only `assign_agent` step answers the conversations of its channels (only those assigned to `coverage.assigned_user_ids` when given) and no assignee moves; when each period starts it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
5269
+ * `conversation_opened` runs when a conversation opens; `first_message_received` when the contact writes first in a conversation, before any message from the business; `message_received` on every incoming message; `message_sent` within 15 minutes of an outgoing message that passes `sent_message_filters`, unless the contact replied first. `assigned_to` runs nothing: while a conversation of its channels is assigned to one of `assigned_user_ids` and its `condition` holds, the agent of its only `turn_on_ai` step answers it and no assignee moves; when the hours begin to hold it answers those already waiting for a reply. `call_received` decides who answers a WhatsApp call on its channels (WhatsApp numbers with AI calls on): its flow takes only `answer_call`, `decline_call` and a `branch` on `business_hours`, and the first active one that reaches a call step decides, over whoever holds the conversation.
5284
5270
  */
5285
- trigger: 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_away' | 'team_message_unanswered' | 'call_received';
5271
+ trigger: 'assigned_to' | 'conversation_inactive' | 'conversation_opened' | 'first_message_received' | 'message_received' | 'message_sent' | 'team_message_unanswered' | 'call_received';
5286
5272
  /**
5287
5273
  * Channels it listens to. See `GET /channels`.
5288
5274
  */
@@ -5296,7 +5282,7 @@ export type UpdateWorkflow = {
5296
5282
  */
5297
5283
  message_filters?: {
5298
5284
  /**
5299
- * Match the first inbound message OR only_unassigned. Neither selected matches every message.
5285
+ * Match the contact writing first, before any message from the business, OR only_unassigned. Neither selected matches every message.
5300
5286
  */
5301
5287
  first_message?: boolean;
5302
5288
  /**
@@ -5322,30 +5308,9 @@ export type UpdateWorkflow = {
5322
5308
  text_contains?: string;
5323
5309
  };
5324
5310
  /**
5325
- * When a `team_away` workflow covers: one period, or every week outside the team's hours.
5311
+ * Members whose conversations an `assigned_to` workflow reaches. See `GET /members`.
5326
5312
  */
5327
- coverage?: {
5328
- /**
5329
- * When the team goes away, for one period; with `ends_at`.
5330
- */
5331
- starts_at?: string;
5332
- /**
5333
- * When the team is back, for one period; with `starts_at`.
5334
- */
5335
- ends_at?: string;
5336
- /**
5337
- * The team's hours, instead of `starts_at` and `ends_at`: the agent covers every week outside them, each closing starting a period.
5338
- */
5339
- team_hours?: BusinessHoursInput;
5340
- /**
5341
- * Covers only the conversations assigned to these members; omitted, every conversation of its channels. See `GET /members`.
5342
- */
5343
- assigned_user_ids?: Array<string>;
5344
- /**
5345
- * What the agent tells customers meanwhile.
5346
- */
5347
- notice: string | null;
5348
- };
5313
+ assigned_user_ids?: Array<string>;
5349
5314
  /**
5350
5315
  * When it runs; null runs at any hour.
5351
5316
  */
@@ -5365,7 +5330,7 @@ export type UpdateWorkflow = {
5365
5330
  */
5366
5331
  entry: string;
5367
5332
  /**
5368
- * One step. `close_conversation`, `end`, `answer_call` and `decline_call` finish the flow; every other step continues at its target.
5333
+ * One step. `close_conversation`, `end`, `answer_call`, `decline_call` and `turn_on_ai` finish the flow; every other step continues at its target.
5369
5334
  */
5370
5335
  steps: Array<{
5371
5336
  /**
@@ -5552,6 +5517,20 @@ export type UpdateWorkflow = {
5552
5517
  * In a `call_received` workflow: Ricky rejects the call and sends this text to the caller's WhatsApp chat.
5553
5518
  */
5554
5519
  text: string;
5520
+ } | {
5521
+ /**
5522
+ * Step ID: letters, digits, `_` or `-`, up to 64.
5523
+ */
5524
+ id: string;
5525
+ /**
5526
+ * Step to run next; null ends the flow.
5527
+ */
5528
+ next: string | null;
5529
+ kind: 'turn_on_ai';
5530
+ /**
5531
+ * The only step of an `assigned_to` workflow: this AI agent answers the chats it reaches while its hours hold. Nobody is reassigned.
5532
+ */
5533
+ agent_id: string;
5555
5534
  }>;
5556
5535
  };
5557
5536
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getricky",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Official TypeScript SDK for the Ricky REST API",
5
5
  "keywords": [
6
6
  "api",