@proteos/sdk 0.49.0 → 0.50.1
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.cjs +111 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +327 -2
- package/dist/index.d.ts +327 -2
- package/dist/index.js +111 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/platform-entities.ts +6 -0
- package/src/conversation/index.ts +177 -9
- package/src/conversation/types.ts +290 -0
- package/src/errors.ts +20 -3
- package/src/index.ts +49 -17
- package/src/workflow/types.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -2684,6 +2684,14 @@ interface Connection {
|
|
|
2684
2684
|
supports_reactions: boolean;
|
|
2685
2685
|
/** The capability descriptor; absent when unsupported. */
|
|
2686
2686
|
reactions?: ReactionCapability;
|
|
2687
|
+
/**
|
|
2688
|
+
* Computed on read like reactions: the channel actions the connector
|
|
2689
|
+
* performs through this connection (invitation, profile_visit, inmail, …).
|
|
2690
|
+
* A separate list from reactions — a reaction toggles an edge on a
|
|
2691
|
+
* message, an action is a performed act with its own lifecycle. Absent
|
|
2692
|
+
* when the connector performs none.
|
|
2693
|
+
*/
|
|
2694
|
+
actions?: ChannelActionCapability[];
|
|
2687
2695
|
/**
|
|
2688
2696
|
* Computed on read like supports_reactions: who operates the integration
|
|
2689
2697
|
* (native | unipile). Absent when the connector is not registered in this
|
|
@@ -3522,6 +3530,14 @@ interface Contact {
|
|
|
3522
3530
|
/** Merge tombstone redirect (set when status is 'merged'). */
|
|
3523
3531
|
merged_into_contact_id?: string;
|
|
3524
3532
|
source: ContactSource;
|
|
3533
|
+
/** IANA zone name (Europe/Berlin); absent = unknown. Filled from directory sweeps while empty. */
|
|
3534
|
+
timezone?: string;
|
|
3535
|
+
/**
|
|
3536
|
+
* BCP-47 language tag with optional region (de, de-CH, pt-BR); absent =
|
|
3537
|
+
* unknown. Named locale, not language: the region carries formatting
|
|
3538
|
+
* conventions on top of the language.
|
|
3539
|
+
*/
|
|
3540
|
+
locale?: string;
|
|
3525
3541
|
/** ContactGroup membership (one group per contact); absent = unassigned. */
|
|
3526
3542
|
group_key?: string;
|
|
3527
3543
|
/**
|
|
@@ -3628,6 +3644,10 @@ interface UpdateContactRequest {
|
|
|
3628
3644
|
name?: string;
|
|
3629
3645
|
status?: 'active' | 'archived';
|
|
3630
3646
|
has_legal_hold?: boolean;
|
|
3647
|
+
/** IANA zone name; normalized server-side, 400 contact_timezone_invalid when unparseable; '' clears. */
|
|
3648
|
+
timezone?: string;
|
|
3649
|
+
/** BCP-47 language tag; normalized server-side, 400 contact_locale_invalid when unparseable; '' clears. */
|
|
3650
|
+
locale?: string;
|
|
3631
3651
|
/**
|
|
3632
3652
|
* Assigns the contact to a contact group ('' clears). A PATCH assignment is
|
|
3633
3653
|
* stamped group_source='manual' — tone synthesis never overrides it.
|
|
@@ -3642,6 +3662,10 @@ interface UpdateContactRequest {
|
|
|
3642
3662
|
interface CreateContactRequest {
|
|
3643
3663
|
name: string;
|
|
3644
3664
|
addresses: AttachContactAddressRequest[];
|
|
3665
|
+
/** IANA zone name; optional, validated as on update. */
|
|
3666
|
+
timezone?: string;
|
|
3667
|
+
/** BCP-47 language tag; optional, validated as on update. */
|
|
3668
|
+
locale?: string;
|
|
3645
3669
|
}
|
|
3646
3670
|
interface AttachContactAddressRequest {
|
|
3647
3671
|
kind: ContactAddressKind;
|
|
@@ -3851,6 +3875,239 @@ interface DispatchMeetingBotRequest {
|
|
|
3851
3875
|
*/
|
|
3852
3876
|
language?: string;
|
|
3853
3877
|
}
|
|
3878
|
+
/**
|
|
3879
|
+
* Discriminates a sending rule: window (WHEN sending is allowed, recipient-
|
|
3880
|
+
* local weekday ranges), limit (HOW MUCH one connection may send per rolling
|
|
3881
|
+
* period), frequency_cap (HOW OFTEN one contact may be contacted per rolling
|
|
3882
|
+
* period).
|
|
3883
|
+
*/
|
|
3884
|
+
type SendingRuleType = 'window' | 'limit' | 'frequency_cap';
|
|
3885
|
+
/** Rolling lookback ("last 24 hours from now") — never a calendar day. */
|
|
3886
|
+
type SendingPeriod = 'rolling_24h' | 'rolling_7d' | 'rolling_30d';
|
|
3887
|
+
/**
|
|
3888
|
+
* ONE kind of act performed through a channel connection — shared by a
|
|
3889
|
+
* limit's `action` (what it counts), a channel action's `action_type` (what
|
|
3890
|
+
* was performed) and the eligibility check. `message` is the plain send
|
|
3891
|
+
* (valid on a limit, never on a channel action row).
|
|
3892
|
+
*/
|
|
3893
|
+
type ChannelActionType = 'message' | 'invitation' | 'inmail' | 'profile_visit';
|
|
3894
|
+
type Weekday = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
3895
|
+
/** One open range on one weekday, "HH:MM" wall-clock, from < until, same day. */
|
|
3896
|
+
interface WindowDay {
|
|
3897
|
+
day: Weekday;
|
|
3898
|
+
from: string;
|
|
3899
|
+
until: string;
|
|
3900
|
+
}
|
|
3901
|
+
interface WindowRuleConfig {
|
|
3902
|
+
days: WindowDay[];
|
|
3903
|
+
/** IANA zone used for contacts without a timezone. */
|
|
3904
|
+
fallback_timezone: string;
|
|
3905
|
+
}
|
|
3906
|
+
interface LimitRuleConfig {
|
|
3907
|
+
action: ChannelActionType;
|
|
3908
|
+
max_count: number;
|
|
3909
|
+
period: SendingPeriod;
|
|
3910
|
+
/** Minimum spacing between consecutive sends; 0/absent = none. */
|
|
3911
|
+
min_gap_seconds?: number;
|
|
3912
|
+
}
|
|
3913
|
+
interface FrequencyCapRuleConfig {
|
|
3914
|
+
max_count: number;
|
|
3915
|
+
period: SendingPeriod;
|
|
3916
|
+
}
|
|
3917
|
+
type SendingRuleConfig = WindowRuleConfig | LimitRuleConfig | FrequencyCapRuleConfig;
|
|
3918
|
+
/**
|
|
3919
|
+
* One outbound send constraint, defined once and LINKED to any number of
|
|
3920
|
+
* connections and/or channels (both empty = org-wide). Per rule type the most
|
|
3921
|
+
* specific tier wins at send time: names the connection > names the channel >
|
|
3922
|
+
* org-wide. Replies skip the rule when `is_reply_exempt`.
|
|
3923
|
+
*/
|
|
3924
|
+
interface SendingRule {
|
|
3925
|
+
id: string;
|
|
3926
|
+
org_id: string;
|
|
3927
|
+
name: string;
|
|
3928
|
+
connection_ids: string[];
|
|
3929
|
+
channels: Channel[];
|
|
3930
|
+
rule_type: SendingRuleType;
|
|
3931
|
+
rule_config?: SendingRuleConfig;
|
|
3932
|
+
is_enabled: boolean;
|
|
3933
|
+
is_reply_exempt: boolean;
|
|
3934
|
+
created_at: string;
|
|
3935
|
+
created_by: UserRef;
|
|
3936
|
+
updated_at: string;
|
|
3937
|
+
updated_by: UserRef;
|
|
3938
|
+
}
|
|
3939
|
+
interface CreateSendingRuleRequest {
|
|
3940
|
+
name?: string;
|
|
3941
|
+
connection_ids?: string[];
|
|
3942
|
+
channels?: Channel[];
|
|
3943
|
+
rule_type: SendingRuleType;
|
|
3944
|
+
rule_config: Record<string, unknown>;
|
|
3945
|
+
/** Defaults to true. */
|
|
3946
|
+
is_enabled?: boolean;
|
|
3947
|
+
/** Defaults per type: window + frequency_cap true, limit false. */
|
|
3948
|
+
is_reply_exempt?: boolean;
|
|
3949
|
+
}
|
|
3950
|
+
interface UpdateSendingRuleRequest {
|
|
3951
|
+
name?: string;
|
|
3952
|
+
/** Replaces the stored links wholesale when present. */
|
|
3953
|
+
connection_ids?: string[];
|
|
3954
|
+
channels?: Channel[];
|
|
3955
|
+
/** rule_type and rule_config must be sent together. */
|
|
3956
|
+
rule_type?: SendingRuleType;
|
|
3957
|
+
rule_config?: Record<string, unknown>;
|
|
3958
|
+
is_enabled?: boolean;
|
|
3959
|
+
is_reply_exempt?: boolean;
|
|
3960
|
+
}
|
|
3961
|
+
interface ListSendingRulesQuery extends PaginationQuery {
|
|
3962
|
+
/** Rules LINKED to this connection. */
|
|
3963
|
+
connection_id?: string;
|
|
3964
|
+
channel?: Channel;
|
|
3965
|
+
rule_type?: SendingRuleType;
|
|
3966
|
+
is_enabled?: boolean;
|
|
3967
|
+
}
|
|
3968
|
+
/** A recommended limit bundle for one class of sender account (static catalog). */
|
|
3969
|
+
interface SendingLimitPreset {
|
|
3970
|
+
key: string;
|
|
3971
|
+
name: string;
|
|
3972
|
+
description: string;
|
|
3973
|
+
connector_keys: ConnectorKey[];
|
|
3974
|
+
is_recommended: boolean;
|
|
3975
|
+
rules: {
|
|
3976
|
+
rule_type: 'limit';
|
|
3977
|
+
rule_config: LimitRuleConfig;
|
|
3978
|
+
}[];
|
|
3979
|
+
}
|
|
3980
|
+
interface ListSendingLimitPresetsQuery {
|
|
3981
|
+
connector_key?: ConnectorKey;
|
|
3982
|
+
}
|
|
3983
|
+
interface ApplySendingLimitPresetRequest {
|
|
3984
|
+
connection_ids: string[];
|
|
3985
|
+
preset_key: string;
|
|
3986
|
+
}
|
|
3987
|
+
/** Dry-run twin of SendMessageRequest: addressing only, nothing minted. */
|
|
3988
|
+
interface SendEligibilityRequest {
|
|
3989
|
+
conversation_id?: string;
|
|
3990
|
+
reply_to_message_id?: string;
|
|
3991
|
+
connection_id?: string;
|
|
3992
|
+
to?: SendRecipient[];
|
|
3993
|
+
cc?: SendRecipient[];
|
|
3994
|
+
bcc?: SendRecipient[];
|
|
3995
|
+
/**
|
|
3996
|
+
* Widens the check to a channel action (invitation, profile_visit, inmail):
|
|
3997
|
+
* originate mode only, the first `to` recipient is the target. Absent =
|
|
3998
|
+
* message.
|
|
3999
|
+
*/
|
|
4000
|
+
action_type?: ChannelActionType;
|
|
4001
|
+
}
|
|
4002
|
+
/**
|
|
4003
|
+
* "May this send go out now?" — `reason` is the error code a real send would
|
|
4004
|
+
* fail with (sending_window_closed | sending_limit_reached |
|
|
4005
|
+
* frequency_cap_reached | contact_blocked | contact_opted_out);
|
|
4006
|
+
* `earliest_allowed_at` is set for the temporal three.
|
|
4007
|
+
*/
|
|
4008
|
+
interface SendEligibility {
|
|
4009
|
+
is_allowed: boolean;
|
|
4010
|
+
reason?: string;
|
|
4011
|
+
rule_id?: string;
|
|
4012
|
+
rule_type?: SendingRuleType;
|
|
4013
|
+
earliest_allowed_at?: string;
|
|
4014
|
+
contact_id?: string;
|
|
4015
|
+
contact_address_id?: string;
|
|
4016
|
+
}
|
|
4017
|
+
/**
|
|
4018
|
+
* Lifecycle of a channel action. Execution: pending → performed | failed.
|
|
4019
|
+
* Outcome (invitations): performed → accepted | declined | withdrawn |
|
|
4020
|
+
* expired; an inbound received invitation starts pending and ends
|
|
4021
|
+
* accepted | declined | expired.
|
|
4022
|
+
*/
|
|
4023
|
+
type ChannelActionStatus = 'pending' | 'performed' | 'failed' | 'accepted' | 'declined' | 'withdrawn' | 'expired';
|
|
4024
|
+
/** Our answer to an inbound channel action (a received invitation). */
|
|
4025
|
+
type ChannelActionResponse = 'accept' | 'decline';
|
|
4026
|
+
/** What an action type acts on: a person on the channel, or an external object. */
|
|
4027
|
+
type ChannelActionTargetKind = 'contact-address' | 'external';
|
|
4028
|
+
/**
|
|
4029
|
+
* One action type a connector performs, projected onto `connection.actions`.
|
|
4030
|
+
*/
|
|
4031
|
+
interface ChannelActionCapability {
|
|
4032
|
+
action_type: ChannelActionType;
|
|
4033
|
+
target_kind: ChannelActionTargetKind;
|
|
4034
|
+
/** The act can be withdrawn after performing (an invitation). */
|
|
4035
|
+
is_cancelable: boolean;
|
|
4036
|
+
/** An inbound act of this type can be answered (accept / decline). */
|
|
4037
|
+
is_respondable: boolean;
|
|
4038
|
+
/** Performing also sends a message that lands as a Message + Conversation (InMail). */
|
|
4039
|
+
is_message_minting: boolean;
|
|
4040
|
+
/** Bound of the free-text note the act carries (LinkedIn invitation: 300). */
|
|
4041
|
+
max_note_length?: number;
|
|
4042
|
+
}
|
|
4043
|
+
interface InvitationParams {
|
|
4044
|
+
note?: string;
|
|
4045
|
+
email?: string;
|
|
4046
|
+
}
|
|
4047
|
+
type ProfileVisitParams = Record<string, never>;
|
|
4048
|
+
interface InmailParams {
|
|
4049
|
+
subject?: string;
|
|
4050
|
+
content: ContentBlock[];
|
|
4051
|
+
}
|
|
4052
|
+
type ChannelActionParams = InvitationParams | ProfileVisitParams | InmailParams;
|
|
4053
|
+
/**
|
|
4054
|
+
* One act performed through a channel connection that is neither a message
|
|
4055
|
+
* nor a reaction — a LinkedIn invitation, a profile visit, an InMail (which
|
|
4056
|
+
* ALSO mints a message, see message_id). A LEDGER row: appended, transitioned
|
|
4057
|
+
* along its lifecycle, never toggled. `direction` outbound = we acted;
|
|
4058
|
+
* inbound = someone acted on us (a received invitation you may answer).
|
|
4059
|
+
* `created_by` is the performer on outbound rows (user or agent), the system
|
|
4060
|
+
* on ingested inbound rows; `updated_by` who accepted / declined / withdrew.
|
|
4061
|
+
*/
|
|
4062
|
+
interface ChannelAction {
|
|
4063
|
+
id: string;
|
|
4064
|
+
org_id: string;
|
|
4065
|
+
connection_id: string;
|
|
4066
|
+
connector_key: ConnectorKey;
|
|
4067
|
+
channel: Channel;
|
|
4068
|
+
action_type: ChannelActionType;
|
|
4069
|
+
direction: MessageDirection;
|
|
4070
|
+
status: ChannelActionStatus;
|
|
4071
|
+
contact_id?: string;
|
|
4072
|
+
contact_address_id?: string;
|
|
4073
|
+
/** The provider-side identity acted on (a LinkedIn member id). */
|
|
4074
|
+
target_external_id: string;
|
|
4075
|
+
contact: ContactRef;
|
|
4076
|
+
/** An InMail's minted message; an invitation's note-chat once accepted. */
|
|
4077
|
+
message_id?: string;
|
|
4078
|
+
conversation_id?: string;
|
|
4079
|
+
params?: ChannelActionParams;
|
|
4080
|
+
/** The provider handle (Unipile invitation id) — cancel / respond key. */
|
|
4081
|
+
external_action_id?: string;
|
|
4082
|
+
error?: string;
|
|
4083
|
+
occurred_at: string;
|
|
4084
|
+
resolved_at?: string;
|
|
4085
|
+
/** Provider enrichment: invitation usage %, network_distance, … */
|
|
4086
|
+
metadata: Record<string, unknown>;
|
|
4087
|
+
created_at: string;
|
|
4088
|
+
created_by: UserRef;
|
|
4089
|
+
updated_at: string;
|
|
4090
|
+
updated_by: UserRef;
|
|
4091
|
+
}
|
|
4092
|
+
/** Performs one act. `target` is the person acted on (kind contact-address + the connector-side external id). */
|
|
4093
|
+
interface PerformChannelActionRequest {
|
|
4094
|
+
connection_id: string;
|
|
4095
|
+
action_type: ChannelActionType;
|
|
4096
|
+
target: SendRecipient;
|
|
4097
|
+
/** Per-type input: invitation {note?, email?}; profile_visit {}; inmail {subject?, content}. */
|
|
4098
|
+
params?: Record<string, unknown>;
|
|
4099
|
+
}
|
|
4100
|
+
interface RespondChannelActionRequest {
|
|
4101
|
+
response: ChannelActionResponse;
|
|
4102
|
+
}
|
|
4103
|
+
interface ListChannelActionsQuery extends PaginationQuery {
|
|
4104
|
+
channel?: Channel;
|
|
4105
|
+
connection_id?: string;
|
|
4106
|
+
action_type?: ChannelActionType;
|
|
4107
|
+
direction?: MessageDirection;
|
|
4108
|
+
status?: ChannelActionStatus;
|
|
4109
|
+
contact_id?: string;
|
|
4110
|
+
}
|
|
3854
4111
|
|
|
3855
4112
|
/** One normalized transcription update streamed back from the server. */
|
|
3856
4113
|
interface TranscriptResult {
|
|
@@ -3941,6 +4198,13 @@ declare class ConversationClient {
|
|
|
3941
4198
|
readonly agentListeners: AgentListenerService;
|
|
3942
4199
|
/** Ingest-time filter rules (drop-with-audit) + their event trail. */
|
|
3943
4200
|
readonly conversationFilters: ConversationFilterService;
|
|
4201
|
+
/** Outbound send constraints: windows, connection limits, frequency caps + presets. */
|
|
4202
|
+
readonly sendingRules: SendingRuleService;
|
|
4203
|
+
/**
|
|
4204
|
+
* Channel actions: acts performed through a connection that are neither a
|
|
4205
|
+
* message nor a reaction — LinkedIn invitations, profile visits, InMail.
|
|
4206
|
+
*/
|
|
4207
|
+
readonly channelActions: ChannelActionService;
|
|
3944
4208
|
/** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
|
|
3945
4209
|
readonly glossaryTerms: GlossaryTermService;
|
|
3946
4210
|
/** Conversation taxonomy: the types the pre-summary classifier assigns. */
|
|
@@ -4070,6 +4334,12 @@ interface MessageService {
|
|
|
4070
4334
|
/** One message with its read-time projections (reactions, attachments). */
|
|
4071
4335
|
get(messageId: string): Promise<Message>;
|
|
4072
4336
|
send(request: SendMessageRequest): Promise<Message>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Dry-run of the sending gate: same addressing as send, no content, nothing
|
|
4339
|
+
* minted. Answers whether the send may go out now and, when held, the
|
|
4340
|
+
* earliest instant it may (`earliest_allowed_at`).
|
|
4341
|
+
*/
|
|
4342
|
+
checkSendEligibility(request: SendEligibilityRequest): Promise<SendEligibility>;
|
|
4073
4343
|
/**
|
|
4074
4344
|
* Store an outbound message for human review (status=draft) — same request
|
|
4075
4345
|
* shape as send, nothing reaches the connector until sendDraft. Originate
|
|
@@ -4245,6 +4515,52 @@ interface CallService {
|
|
|
4245
4515
|
}>;
|
|
4246
4516
|
}
|
|
4247
4517
|
|
|
4518
|
+
/**
|
|
4519
|
+
* Sending rules — outbound send constraints (windows, connection limits,
|
|
4520
|
+
* frequency caps), the static limit-preset catalog and its apply expansion.
|
|
4521
|
+
* A denied send/reply/sendDraft fails with a ProteosError whose `details`
|
|
4522
|
+
* carry `earliest_allowed_at` (429) or the blocked contact (403).
|
|
4523
|
+
*/
|
|
4524
|
+
interface SendingRuleService {
|
|
4525
|
+
list(query?: ListSendingRulesQuery): Promise<ListResponse<SendingRule>>;
|
|
4526
|
+
get(id: string): Promise<SendingRule>;
|
|
4527
|
+
create(request: CreateSendingRuleRequest): Promise<SendingRule>;
|
|
4528
|
+
update(id: string, request: UpdateSendingRuleRequest): Promise<SendingRule>;
|
|
4529
|
+
delete(id: string): Promise<void>;
|
|
4530
|
+
/** The static preset catalog, optionally narrowed to one connector. */
|
|
4531
|
+
listPresets(query?: ListSendingLimitPresetsQuery): Promise<{
|
|
4532
|
+
data: SendingLimitPreset[];
|
|
4533
|
+
}>;
|
|
4534
|
+
/**
|
|
4535
|
+
* Expand a preset into limit rules linked to the given connections,
|
|
4536
|
+
* replacing the limit rules they were linked to before.
|
|
4537
|
+
*/
|
|
4538
|
+
applyPreset(request: ApplySendingLimitPresetRequest): Promise<{
|
|
4539
|
+
data: SendingRule[];
|
|
4540
|
+
}>;
|
|
4541
|
+
}
|
|
4542
|
+
/**
|
|
4543
|
+
* Channel actions — the ledger of acts performed through a connection that
|
|
4544
|
+
* are neither a message nor a reaction (LinkedIn invitations, profile visits,
|
|
4545
|
+
* InMail). A denied perform fails like a denied send (ProteosError with
|
|
4546
|
+
* `details.earliest_allowed_at`); a provider refusal carries its own code
|
|
4547
|
+
* (already_connected, already_invited_recently, invitation_already_received,
|
|
4548
|
+
* connection_limit_reached, insufficient_inmail_credits, inmail_not_allowed,
|
|
4549
|
+
* not_connected_with_recipient). An invitation is pre-flighted with one silent
|
|
4550
|
+
* profile read before anything is sent, so those refusals never mint a
|
|
4551
|
+
* phantom act.
|
|
4552
|
+
*/
|
|
4553
|
+
interface ChannelActionService {
|
|
4554
|
+
list(query?: ListChannelActionsQuery): Promise<ListResponse<ChannelAction>>;
|
|
4555
|
+
get(id: string): Promise<ChannelAction>;
|
|
4556
|
+
/** Performs one act; resolves to the row in its post-perform status. */
|
|
4557
|
+
perform(request: PerformChannelActionRequest): Promise<ChannelAction>;
|
|
4558
|
+
/** Withdraws a performed outbound act (an invitation). */
|
|
4559
|
+
cancel(id: string): Promise<ChannelAction>;
|
|
4560
|
+
/** Answers an inbound act (a received invitation). */
|
|
4561
|
+
respond(id: string, request: RespondChannelActionRequest): Promise<ChannelAction>;
|
|
4562
|
+
}
|
|
4563
|
+
|
|
4248
4564
|
/**
|
|
4249
4565
|
* A single row from a query result. Keys match the result-set columns
|
|
4250
4566
|
* (camelCase, with `id`/`created_at`/`updated_at` reserved). The data-service
|
|
@@ -4556,7 +4872,13 @@ declare class ProteosError extends Error {
|
|
|
4556
4872
|
readonly httpStatus: number;
|
|
4557
4873
|
/** API error code (e.g., 'not_found', 'unauthorized') */
|
|
4558
4874
|
readonly code: ErrorCodeType | string;
|
|
4559
|
-
|
|
4875
|
+
/**
|
|
4876
|
+
* Optional machine-readable payload beside the message — e.g. a denied send's
|
|
4877
|
+
* `earliest_allowed_at` / `rule_id`, the offending `contact_id`. Absent on
|
|
4878
|
+
* most errors.
|
|
4879
|
+
*/
|
|
4880
|
+
readonly details: Record<string, unknown> | undefined;
|
|
4881
|
+
constructor(message: string, httpStatus: number, code: ErrorCodeType | string, details?: Record<string, unknown>);
|
|
4560
4882
|
/**
|
|
4561
4883
|
* Returns a formatted string representation of the error.
|
|
4562
4884
|
*/
|
|
@@ -4596,6 +4918,7 @@ declare function getDefaultErrorCode(httpStatus: number): ErrorCodeType | string
|
|
|
4596
4918
|
interface ApiErrorResponse {
|
|
4597
4919
|
code?: string;
|
|
4598
4920
|
message?: string;
|
|
4921
|
+
details?: Record<string, unknown>;
|
|
4599
4922
|
}
|
|
4600
4923
|
/**
|
|
4601
4924
|
* Parses an error response from the API and creates a ProteosError.
|
|
@@ -7091,6 +7414,8 @@ interface ExecutionTriggerContext {
|
|
|
7091
7414
|
interface ExecutionError {
|
|
7092
7415
|
code: string;
|
|
7093
7416
|
message: string;
|
|
7417
|
+
/** Machine-readable payload of the node error (a held send's earliest_allowed_at / rule_id, http_status …). */
|
|
7418
|
+
details?: Record<string, unknown>;
|
|
7094
7419
|
/** Marks business failures the user can fix, vs infrastructure faults. */
|
|
7095
7420
|
is_user_error?: boolean;
|
|
7096
7421
|
}
|
|
@@ -7291,4 +7616,4 @@ declare class WorkflowClient {
|
|
|
7291
7616
|
constructor(client: ProteosClient);
|
|
7292
7617
|
}
|
|
7293
7618
|
|
|
7294
|
-
export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddTeamMemberRequest, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type ApiKey, type AppendEventRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type CallStatus, type CallTokenResponse, type Channel, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateApiKeyRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSessionRequest, type CreateSpaceRequest, type CreateTeamRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CreatedApiKey, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type KnowledgeSpace, type LabelService, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrgUserRoleAssignmentsOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSessionsOptions, type ListSkillsOptions, type ListSpacesOptions, type ListTeamMembersOptions, type ListTeamsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MintCallTokenRequest, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type Permission, type PermissionEventSource, type PermissionEventType, type PhoneNumber, type PhoneNumberRouting, type PhoneNumberStatus, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RoutingTarget, type RunWorkflowRequest, SCOPED_PLATFORM_ENTITY_SLUGS, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendMessageRequest, type SendRecipient, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type SharePermission, type ShareRow, type ShareService, type Skill, type SkillBundle, type SkillService, type SkillVersion, type SpaceService, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type Team, type TeamMember, type TeamService, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, UNASSIGNED_SPACE_SLUG, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateMeRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePhoneNumberRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateSpaceRequest, type UpdateTeamRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, type UserRoleAssignmentService, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, shareRouteFor, toQueryParams, toQueryString };
|
|
7619
|
+
export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddTeamMemberRequest, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type ApiKey, type AppendEventRequest, type ApplySendingLimitPresetRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type CallStatus, type CallTokenResponse, type Channel, type ChannelAction, type ChannelActionCapability, type ChannelActionParams, type ChannelActionResponse, type ChannelActionService, type ChannelActionStatus, type ChannelActionTargetKind, type ChannelActionType, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateApiKeyRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSendingRuleRequest, type CreateSessionRequest, type CreateSpaceRequest, type CreateTeamRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CreatedApiKey, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, type FrequencyCapRuleConfig, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InmailParams, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvitationParams, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type KnowledgeSpace, type LabelService, type LimitRuleConfig, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListChannelActionsQuery, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrgUserRoleAssignmentsOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSendingLimitPresetsQuery, type ListSendingRulesQuery, type ListSessionsOptions, type ListSkillsOptions, type ListSpacesOptions, type ListTeamMembersOptions, type ListTeamsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MintCallTokenRequest, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type PerformChannelActionRequest, type Permission, type PermissionEventSource, type PermissionEventType, type PhoneNumber, type PhoneNumberRouting, type PhoneNumberStatus, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type ProfileVisitParams, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type RespondChannelActionRequest, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RoutingTarget, type RunWorkflowRequest, SCOPED_PLATFORM_ENTITY_SLUGS, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendEligibility, type SendEligibilityRequest, type SendMessageRequest, type SendRecipient, type SendingLimitPreset, type SendingPeriod, type SendingRule, type SendingRuleConfig, type SendingRuleService, type SendingRuleType, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type SharePermission, type ShareRow, type ShareService, type Skill, type SkillBundle, type SkillService, type SkillVersion, type SpaceService, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type Team, type TeamMember, type TeamService, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, UNASSIGNED_SPACE_SLUG, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateMeRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePhoneNumberRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateSendingRuleRequest, type UpdateSpaceRequest, type UpdateTeamRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, type UserRoleAssignmentService, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Weekday, type WindowDay, type WindowRuleConfig, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, shareRouteFor, toQueryParams, toQueryString };
|
package/dist/index.js
CHANGED
|
@@ -531,11 +531,18 @@ var ProteosError = class extends Error {
|
|
|
531
531
|
httpStatus;
|
|
532
532
|
/** API error code (e.g., 'not_found', 'unauthorized') */
|
|
533
533
|
code;
|
|
534
|
-
|
|
534
|
+
/**
|
|
535
|
+
* Optional machine-readable payload beside the message — e.g. a denied send's
|
|
536
|
+
* `earliest_allowed_at` / `rule_id`, the offending `contact_id`. Absent on
|
|
537
|
+
* most errors.
|
|
538
|
+
*/
|
|
539
|
+
details;
|
|
540
|
+
constructor(message, httpStatus, code, details) {
|
|
535
541
|
super(message);
|
|
536
542
|
this.name = "ProteosError";
|
|
537
543
|
this.httpStatus = httpStatus;
|
|
538
544
|
this.code = code;
|
|
545
|
+
this.details = details;
|
|
539
546
|
const v8Capture = Error.captureStackTrace;
|
|
540
547
|
if (v8Capture) v8Capture(this, this.constructor);
|
|
541
548
|
}
|
|
@@ -584,6 +591,7 @@ async function parseErrorResponse(response) {
|
|
|
584
591
|
const httpStatus = response.status;
|
|
585
592
|
let code = getDefaultErrorCode(httpStatus);
|
|
586
593
|
let message = "Unknown error";
|
|
594
|
+
let details;
|
|
587
595
|
try {
|
|
588
596
|
const body = await response.text();
|
|
589
597
|
try {
|
|
@@ -596,13 +604,16 @@ async function parseErrorResponse(response) {
|
|
|
596
604
|
} else {
|
|
597
605
|
message = body || `HTTP ${httpStatus}`;
|
|
598
606
|
}
|
|
607
|
+
if (json.details && typeof json.details === "object") {
|
|
608
|
+
details = json.details;
|
|
609
|
+
}
|
|
599
610
|
} catch {
|
|
600
611
|
message = body.trim() || `HTTP ${httpStatus}`;
|
|
601
612
|
}
|
|
602
613
|
} catch {
|
|
603
614
|
message = `HTTP ${httpStatus}`;
|
|
604
615
|
}
|
|
605
|
-
return new ProteosError(message, httpStatus, code);
|
|
616
|
+
return new ProteosError(message, httpStatus, code, details);
|
|
606
617
|
}
|
|
607
618
|
|
|
608
619
|
// src/auth/shares.ts
|
|
@@ -866,6 +877,12 @@ var PLATFORM_ENTITIES = [
|
|
|
866
877
|
{ slug: "contact-groups", name: "Contact Groups" },
|
|
867
878
|
// Tone-of-voice synthesis: per-user setups + generated instruction profiles.
|
|
868
879
|
{ slug: "tone-profiles", name: "Tone Profiles" },
|
|
880
|
+
// Outbound send constraints (windows, connection limits, frequency caps) +
|
|
881
|
+
// their preset catalog.
|
|
882
|
+
{ slug: "sending-rules", name: "Sending Rules" },
|
|
883
|
+
// The channel_action ledger: acts through a connection that are neither a
|
|
884
|
+
// message nor a reaction (LinkedIn invitations, profile visits, InMail).
|
|
885
|
+
{ slug: "channel-actions", name: "Channel Actions" },
|
|
869
886
|
// Connectors (connector-service). `connections` above is shared; this is the
|
|
870
887
|
// manifest catalog.
|
|
871
888
|
{ slug: "connectors", name: "Connectors" }
|
|
@@ -1500,6 +1517,13 @@ var ConversationClient = class {
|
|
|
1500
1517
|
agentListeners;
|
|
1501
1518
|
/** Ingest-time filter rules (drop-with-audit) + their event trail. */
|
|
1502
1519
|
conversationFilters;
|
|
1520
|
+
/** Outbound send constraints: windows, connection limits, frequency caps + presets. */
|
|
1521
|
+
sendingRules;
|
|
1522
|
+
/**
|
|
1523
|
+
* Channel actions: acts performed through a connection that are neither a
|
|
1524
|
+
* message nor a reaction — LinkedIn invitations, profile visits, InMail.
|
|
1525
|
+
*/
|
|
1526
|
+
channelActions;
|
|
1503
1527
|
/** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
|
|
1504
1528
|
glossaryTerms;
|
|
1505
1529
|
/** Conversation taxonomy: the types the pre-summary classifier assigns. */
|
|
@@ -1523,6 +1547,8 @@ var ConversationClient = class {
|
|
|
1523
1547
|
this.messages = new MessageServiceImpl(client);
|
|
1524
1548
|
this.agentListeners = new AgentListenerServiceImpl(client);
|
|
1525
1549
|
this.conversationFilters = new ConversationFilterServiceImpl(client);
|
|
1550
|
+
this.sendingRules = new SendingRuleServiceImpl(client);
|
|
1551
|
+
this.channelActions = new ChannelActionServiceImpl(client);
|
|
1526
1552
|
this.glossaryTerms = new GlossaryTermServiceImpl(client);
|
|
1527
1553
|
this.conversationTypes = new ConversationTypeServiceImpl(client);
|
|
1528
1554
|
this.contactGroups = new ContactGroupServiceImpl(client);
|
|
@@ -1804,6 +1830,13 @@ var MessageServiceImpl = class {
|
|
|
1804
1830
|
send(request) {
|
|
1805
1831
|
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/messages/send`, request);
|
|
1806
1832
|
}
|
|
1833
|
+
checkSendEligibility(request) {
|
|
1834
|
+
return this.client.request(
|
|
1835
|
+
"POST",
|
|
1836
|
+
`${CONVERSATION_BASE_PATH}/messages/send-eligibility`,
|
|
1837
|
+
request
|
|
1838
|
+
);
|
|
1839
|
+
}
|
|
1807
1840
|
draft(request) {
|
|
1808
1841
|
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/messages/draft`, request);
|
|
1809
1842
|
}
|
|
@@ -2183,6 +2216,82 @@ var CallServiceImpl = class {
|
|
|
2183
2216
|
);
|
|
2184
2217
|
}
|
|
2185
2218
|
};
|
|
2219
|
+
var SendingRuleServiceImpl = class {
|
|
2220
|
+
constructor(client) {
|
|
2221
|
+
this.client = client;
|
|
2222
|
+
}
|
|
2223
|
+
client;
|
|
2224
|
+
list(query = {}) {
|
|
2225
|
+
return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/sending-rules`, query);
|
|
2226
|
+
}
|
|
2227
|
+
get(id) {
|
|
2228
|
+
return this.client.request(
|
|
2229
|
+
"GET",
|
|
2230
|
+
`${CONVERSATION_BASE_PATH}/sending-rules/${encodeURIComponent(id)}`
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
create(request) {
|
|
2234
|
+
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/sending-rules`, request);
|
|
2235
|
+
}
|
|
2236
|
+
update(id, request) {
|
|
2237
|
+
return this.client.request(
|
|
2238
|
+
"PATCH",
|
|
2239
|
+
`${CONVERSATION_BASE_PATH}/sending-rules/${encodeURIComponent(id)}`,
|
|
2240
|
+
request
|
|
2241
|
+
);
|
|
2242
|
+
}
|
|
2243
|
+
async delete(id) {
|
|
2244
|
+
await this.client.request(
|
|
2245
|
+
"DELETE",
|
|
2246
|
+
`${CONVERSATION_BASE_PATH}/sending-rules/${encodeURIComponent(id)}`
|
|
2247
|
+
);
|
|
2248
|
+
}
|
|
2249
|
+
listPresets(query = {}) {
|
|
2250
|
+
return this.client.requestWithQuery(
|
|
2251
|
+
"GET",
|
|
2252
|
+
`${CONVERSATION_BASE_PATH}/sending-rules/presets`,
|
|
2253
|
+
query
|
|
2254
|
+
);
|
|
2255
|
+
}
|
|
2256
|
+
applyPreset(request) {
|
|
2257
|
+
return this.client.request(
|
|
2258
|
+
"POST",
|
|
2259
|
+
`${CONVERSATION_BASE_PATH}/sending-rules/apply-preset`,
|
|
2260
|
+
request
|
|
2261
|
+
);
|
|
2262
|
+
}
|
|
2263
|
+
};
|
|
2264
|
+
var ChannelActionServiceImpl = class {
|
|
2265
|
+
constructor(client) {
|
|
2266
|
+
this.client = client;
|
|
2267
|
+
}
|
|
2268
|
+
client;
|
|
2269
|
+
list(query = {}) {
|
|
2270
|
+
return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/channel-actions`, query);
|
|
2271
|
+
}
|
|
2272
|
+
get(id) {
|
|
2273
|
+
return this.client.request(
|
|
2274
|
+
"GET",
|
|
2275
|
+
`${CONVERSATION_BASE_PATH}/channel-actions/${encodeURIComponent(id)}`
|
|
2276
|
+
);
|
|
2277
|
+
}
|
|
2278
|
+
perform(request) {
|
|
2279
|
+
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/channel-actions`, request);
|
|
2280
|
+
}
|
|
2281
|
+
cancel(id) {
|
|
2282
|
+
return this.client.request(
|
|
2283
|
+
"POST",
|
|
2284
|
+
`${CONVERSATION_BASE_PATH}/channel-actions/${encodeURIComponent(id)}/cancel`
|
|
2285
|
+
);
|
|
2286
|
+
}
|
|
2287
|
+
respond(id, request) {
|
|
2288
|
+
return this.client.request(
|
|
2289
|
+
"POST",
|
|
2290
|
+
`${CONVERSATION_BASE_PATH}/channel-actions/${encodeURIComponent(id)}/respond`,
|
|
2291
|
+
request
|
|
2292
|
+
);
|
|
2293
|
+
}
|
|
2294
|
+
};
|
|
2186
2295
|
|
|
2187
2296
|
// src/data/queries.ts
|
|
2188
2297
|
var QUERY_BASE_PATH = "/data/v1/query";
|