@@ -81,16 +81,6 @@ export type RoutableChannelRouteRef = ChannelRouteRef & {
|
81 | 81 | }; |
82 | 82 | }; |
83 | 83 | |
84 | | -/** Session fields that can carry or reconstruct a channel route. */ |
85 | | -export type SessionRouteDeliveryFields = { |
86 | | -route?: ChannelRouteRef; |
87 | | -deliveryContext?: DeliveryContext; |
88 | | -lastChannel?: string; |
89 | | -lastTo?: string; |
90 | | -lastAccountId?: string; |
91 | | -lastThreadId?: string | number; |
92 | | -}; |
93 | | - |
94 | 84 | /** Normalizes a route and rejects routes that cannot address a channel target. */ |
95 | 85 | export function normalizeRoutableChannelRoute( |
96 | 86 | route?: ChannelRouteRef | null, |
@@ -132,13 +122,6 @@ export function routeFromSessionEntry(entry?: SessionEntry | null): ChannelRoute
|
132 | 122 | ); |
133 | 123 | } |
134 | 124 | |
135 | | -/** Builds session persistence fields from a channel route. */ |
136 | | -export function sessionDeliveryFieldsFromRoute( |
137 | | -route?: ChannelRouteRef, |
138 | | -): SessionRouteDeliveryFields { |
139 | | -return normalizeSessionDeliveryFields({ route }); |
140 | | -} |
141 | | - |
142 | 125 | /** Converts a persisted conversation reference into a channel route. */ |
143 | 126 | export function routeFromConversationRef( |
144 | 127 | conversation?: ConversationRef | null, |
@@ -160,27 +143,13 @@ export function routeFromConversationRef(
|
160 | 143 | }); |
161 | 144 | } |
162 | 145 | |
163 | | -/** Converts a conversation reference into a routable channel route. */ |
164 | | -export function routableRouteFromConversationRef( |
165 | | -conversation?: ConversationRef | null, |
166 | | -): RoutableChannelRouteRef | undefined { |
167 | | -return normalizeRoutableChannelRoute(routeFromConversationRef(conversation)); |
168 | | -} |
169 | | - |
170 | 146 | /** Extracts a channel route from a session binding record. */ |
171 | 147 | export function routeFromBindingRecord( |
172 | 148 | binding?: SessionBindingRecord | null, |
173 | 149 | ): ChannelRouteRef | undefined { |
174 | 150 | return routeFromConversationRef(binding?.conversation); |
175 | 151 | } |
176 | 152 | |
177 | | -/** Extracts a routable channel route from a session binding record. */ |
178 | | -export function routableRouteFromBindingRecord( |
179 | | -binding?: SessionBindingRecord | null, |
180 | | -): RoutableChannelRouteRef | undefined { |
181 | | -return normalizeRoutableChannelRoute(routeFromBindingRecord(binding)); |
182 | | -} |
183 | | - |
184 | 153 | /** Projects route fields used by older session and delivery callers. */ |
185 | 154 | export function routeToDeliveryFields(route?: ChannelRouteRef): { |
186 | 155 | deliveryContext?: DeliveryContext; |
|