@deadair/plugin-sdk 0.96.4 → 0.97.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/README.md +6 -0
- package/dist/boundary.json.safe.d.ts +5 -3
- package/dist/boundary.json.safe.d.ts.map +1 -1
- package/dist/capabilities/enrichment.d.ts +33 -5
- package/dist/capabilities/enrichment.d.ts.map +1 -1
- package/dist/capabilities/weather.d.ts +35 -0
- package/dist/capabilities/weather.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -936,6 +936,12 @@ has that the right town was found.
|
|
|
936
936
|
one thing, and mapping them is yours. Your service's own word survives beside it
|
|
937
937
|
as `description`, which nothing deterministic reads and a model may use.
|
|
938
938
|
|
|
939
|
+
**An hourly outlook is a span, and each row says when it starts.** `query.hours`
|
|
940
|
+
asks for the next that-many hours, and `reading.hours` answers with whatever rows
|
|
941
|
+
your service has inside them, an hour or three hours apart. Put the place's offset
|
|
942
|
+
on every `at`: a caller says "by midnight" from it, and a bare UTC instant cannot
|
|
943
|
+
say what the clock reads there.
|
|
944
|
+
|
|
939
945
|
`undefined` is an answer, on the same terms as a search plugin's empty array: an
|
|
940
946
|
unconfigured plugin, a place nothing could resolve and a service that is down are
|
|
941
947
|
one outcome to every caller. Throw only for something the operator must fix.
|
|
@@ -50,8 +50,8 @@ import type { OutputDevice, OutputMetadata, OutputMetadataRequest, OutputPlayReq
|
|
|
50
50
|
import type { ScrobblePlay, ScrobbleRejection, ScrobbleResult } from './capabilities/scrobble.js';
|
|
51
51
|
import type { SearchQuery, SearchResult } from './capabilities/search.js';
|
|
52
52
|
import type { ArtistTrack, SimilarArtist, TagQuery } from './capabilities/similarity.js';
|
|
53
|
-
import type { WeatherConditions, WeatherDay, WeatherQuery, WeatherReading } from './capabilities/weather.js';
|
|
54
|
-
import type { AlbumEnrichment, AlbumRef, ArtistEnrichment, ArtistRef, ExternalId, ExternalLink, SourceDocument, TopicEnrichment, TopicRef, TrackEnrichment, TrackRef } from './capabilities/enrichment.js';
|
|
53
|
+
import type { WeatherConditions, WeatherDay, WeatherHour, WeatherQuery, WeatherReading } from './capabilities/weather.js';
|
|
54
|
+
import type { AlbumEnrichment, AlbumRef, ArtistEnrichment, ArtistRef, EnrichmentUnanswered, ExternalId, ExternalLink, SourceDocument, TopicEnrichment, TopicRef, TrackEnrichment, TrackRef } from './capabilities/enrichment.js';
|
|
55
55
|
import type { GetPlaylistTracksOptions, ListPlaylistsOptions, PlaybackReport, PlaybackState, ProviderArtist, GetTopArtistsOptions, ProviderPlay, GetRecentPlaysOptions, ProviderPlaylist, ProviderStream, ProviderTrack, SearchTracksOptions } from './capabilities/music.provider.js';
|
|
56
56
|
import type { LlmMessage, LlmModelInfo, LlmRequest, LlmResult, LlmToolCall, LlmToolDeclaration, LlmUsage } from './capabilities/llm.js';
|
|
57
57
|
import type { SpeechLimits, SpeechRequest, SpeechVoice } from './capabilities/speech.js';
|
|
@@ -145,6 +145,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
145
145
|
ExternalLink: IsJsonSafe<ExternalLink>;
|
|
146
146
|
SourceDocument: IsJsonSafe<SourceDocument>;
|
|
147
147
|
TrackEnrichment: IsJsonSafe<TrackEnrichment>;
|
|
148
|
+
EnrichmentUnanswered: IsJsonSafe<EnrichmentUnanswered>;
|
|
148
149
|
ArtistEnrichment: IsJsonSafe<ArtistEnrichment>;
|
|
149
150
|
AlbumEnrichment: IsJsonSafe<AlbumEnrichment>;
|
|
150
151
|
TopicRef: IsJsonSafe<TopicRef>;
|
|
@@ -193,6 +194,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
193
194
|
WeatherQuery: IsJsonSafe<WeatherQuery>;
|
|
194
195
|
WeatherConditions: IsJsonSafe<WeatherConditions>;
|
|
195
196
|
WeatherDay: IsJsonSafe<WeatherDay>;
|
|
197
|
+
WeatherHour: IsJsonSafe<WeatherHour>;
|
|
196
198
|
WeatherReading: IsJsonSafe<WeatherReading>;
|
|
197
199
|
ConcertQuery: IsJsonSafe<ConcertQuery>;
|
|
198
200
|
Concert: IsJsonSafe<Concert>;
|
|
@@ -228,7 +230,7 @@ export type AssertAllBoundaryPayloadsAreJsonSafe = AssertAllTrue<{
|
|
|
228
230
|
* registry-coverage test can compare it against what is actually exported
|
|
229
231
|
* from the boundary source files.
|
|
230
232
|
*/
|
|
231
|
-
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderArtist", "GetTopArtistsOptions", "ProviderPlay", "GetRecentPlaysOptions", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlayerFetchRequest", "PlaylistTracksRequest", "PluginSocketOptions", "PluginTlsOptions", "DiscoveryOptions", "DiscoveredService", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackReport", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "ArtistEnrichment", "AlbumEnrichment", "TopicRef", "TopicEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "AudioTranscode", "TrackCuePoints", "TrackLoudness", "TrackTaggedLoudness", "TrackBeats", "TrackAnalysis", "ChartDescriptor", "ChartQuery", "ChartEntry", "NewsFeedDescriptor", "NewsQuery", "NewsItem", "NarrationSeries", "NarrationPiece", "NarrationPart", "NarrationText", "NarrationPiecesQuery", "NarrationTextQuery", "PodcastShow", "PodcastAudio", "PodcastEpisode", "PodcastEpisodesQuery", "PodcastDirectoryQuery", "PodcastDirectoryEntry", "SimilarArtist", "ArtistTrack", "TagQuery", "SearchQuery", "SearchResult", "WeatherQuery", "WeatherConditions", "WeatherDay", "WeatherReading", "ConcertQuery", "Concert", "AlmanacQuery", "AlmanacSubject", "AlmanacEntry", "AlmanacDay", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult", "MessagingSender", "MessagingAction", "MessagingButton", "InboundMessage", "MessagingReceiveQuery", "MessagingReceiveResult", "OutboundMessage", "MessagingSendResult", "MessagingAnnounceTarget", "MessagingCommand", "OutputDevice", "OutputMetadata", "OutputPlayRequest", "OutputMetadataRequest", "OutputStatus", "LyricLine", "LyricWord", "TrackLyrics", "SpeechLimits"];
|
|
233
|
+
export declare const JSON_SAFE_PAYLOAD_TYPES: readonly ["PluginConnectionResult", "PluginPermissions", "NetworkPermissionHost", "NetworkPermissionFromConfig", "PluginGrantRequest", "ConfigField", "ConfigFieldOption", "ConfigFieldColumn", "ConfigFieldPreset", "PluginManifest", "ProviderTrack", "ProviderPlaylist", "ProviderArtist", "GetTopArtistsOptions", "ProviderPlay", "GetRecentPlaysOptions", "ProviderStream", "TrackFetchSession", "TrackFetchRequest", "PlayerFetchRequest", "PlaylistTracksRequest", "PluginSocketOptions", "PluginTlsOptions", "DiscoveryOptions", "DiscoveredService", "SearchTracksOptions", "ListPlaylistsOptions", "GetPlaylistTracksOptions", "PlaybackReport", "PlaybackState", "TrackRef", "ArtistRef", "AlbumRef", "ExternalId", "ExternalLink", "SourceDocument", "TrackEnrichment", "EnrichmentUnanswered", "ArtistEnrichment", "AlbumEnrichment", "TopicRef", "TopicEnrichment", "SpeechRequest", "SpeechVoice", "LlmMessage", "LlmToolDeclaration", "LlmToolCall", "LlmUsage", "LlmRequest", "LlmResult", "LlmModelInfo", "AnalysisRef", "AudioJoin", "AudioOverlay", "AudioTranscode", "TrackCuePoints", "TrackLoudness", "TrackTaggedLoudness", "TrackBeats", "TrackAnalysis", "ChartDescriptor", "ChartQuery", "ChartEntry", "NewsFeedDescriptor", "NewsQuery", "NewsItem", "NarrationSeries", "NarrationPiece", "NarrationPart", "NarrationText", "NarrationPiecesQuery", "NarrationTextQuery", "PodcastShow", "PodcastAudio", "PodcastEpisode", "PodcastEpisodesQuery", "PodcastDirectoryQuery", "PodcastDirectoryEntry", "SimilarArtist", "ArtistTrack", "TagQuery", "SearchQuery", "SearchResult", "WeatherQuery", "WeatherConditions", "WeatherDay", "WeatherHour", "WeatherReading", "ConcertQuery", "Concert", "AlmanacQuery", "AlmanacSubject", "AlmanacEntry", "AlmanacDay", "ScrobblePlay", "ScrobbleRejection", "ScrobbleResult", "MessagingSender", "MessagingAction", "MessagingButton", "InboundMessage", "MessagingReceiveQuery", "MessagingReceiveResult", "OutboundMessage", "MessagingSendResult", "MessagingAnnounceTarget", "MessagingCommand", "OutputDevice", "OutputMetadata", "OutputPlayRequest", "OutputMetadataRequest", "OutputStatus", "LyricLine", "LyricWord", "TrackLyrics", "SpeechLimits"];
|
|
232
234
|
/**
|
|
233
235
|
* Boundary interfaces that are deliberately NOT payloads: they describe
|
|
234
236
|
* methods, so they carry functions by definition and can never be JSON-safe.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundary.json.safe.d.ts","sourceRoot":"","sources":["../src/boundary.json.safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC7I,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACl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;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,mtBAsCxB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,2FAmB7B,CAAC"}
|
|
@@ -250,12 +250,21 @@ export interface EnrichmentProvider {
|
|
|
250
250
|
* one query that identifies twenty-five tracks costs a second, where
|
|
251
251
|
* twenty-five `enrichTrack` calls cost twenty-five.
|
|
252
252
|
*
|
|
253
|
-
* Index-aligned with `refs`: entry `i` is the answer about `refs[i]`,
|
|
254
|
-
* returned array is the same length
|
|
255
|
-
*
|
|
256
|
-
*
|
|
253
|
+
* Index-aligned with `refs`: entry `i` is the answer about `refs[i]`, and
|
|
254
|
+
* the returned array is the same length. Each entry is one of two things:
|
|
255
|
+
*
|
|
256
|
+
* - an answer, where `{}` is a miss exactly as it is for `enrichTrack`:
|
|
257
|
+
* the source looked and does not have this track;
|
|
258
|
+
* - {@link unanswered}, where the source never got an answer about this
|
|
259
|
+
* ref at all: its lookup threw, or the call ran out of time before
|
|
260
|
+
* reaching it.
|
|
261
|
+
*
|
|
262
|
+
* The difference is what the host does next. A miss is believed for a week;
|
|
263
|
+
* an unanswered ref is filed as a failure and asked again within the hour,
|
|
264
|
+
* as a throw from `enrichTrack` would be. So never return `{}` for a ref you
|
|
265
|
+
* did not actually look up: that tells the host the track is not there.
|
|
257
266
|
*/
|
|
258
|
-
enrichTracks?(refs: TrackRef[]): Promise<
|
|
267
|
+
enrichTracks?(refs: TrackRef[]): Promise<TrackBatchAnswer[]>;
|
|
259
268
|
/**
|
|
260
269
|
* Optional, the way a music provider's `resolveStreamUrl` is: a source
|
|
261
270
|
* that only knows recordings is still a valid enrichment plugin, and the
|
|
@@ -281,6 +290,25 @@ export interface EnrichmentProvider {
|
|
|
281
290
|
*/
|
|
282
291
|
enrichTopic?(topic: TopicRef): Promise<Partial<TopicEnrichment>>;
|
|
283
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* One entry of an {@link EnrichmentProvider.enrichTracks} answer that says
|
|
295
|
+
* "this ref was not answered", as opposed to `{}`, which says "not found".
|
|
296
|
+
*
|
|
297
|
+
* An object with a reason rather than `undefined`, because the batch is a
|
|
298
|
+
* JSON-safe payload and `undefined` in an array comes back from JSON as `null`.
|
|
299
|
+
* The reason is what the host files against the track, the way it files the
|
|
300
|
+
* message of a thrown `enrichTrack`. Build it with {@link unanswered}.
|
|
301
|
+
*/
|
|
302
|
+
export interface EnrichmentUnanswered {
|
|
303
|
+
/** Why there is no answer: the lookup's error, or that the budget ran out. */
|
|
304
|
+
unanswered: string;
|
|
305
|
+
}
|
|
306
|
+
/** What one position of an {@link EnrichmentProvider.enrichTracks} answer holds. */
|
|
307
|
+
export type TrackBatchAnswer = Partial<TrackEnrichment> | EnrichmentUnanswered;
|
|
308
|
+
/** The {@link EnrichmentUnanswered} entry for a ref a batch could not answer about. */
|
|
309
|
+
export declare const unanswered: (reason: string) => EnrichmentUnanswered;
|
|
310
|
+
/** Whether a batch entry is {@link unanswered} rather than an answer. */
|
|
311
|
+
export declare const isUnanswered: (entry: unknown) => entry is EnrichmentUnanswered;
|
|
284
312
|
/** How an enrichment plugin is asked about a subject that is not a record. */
|
|
285
313
|
export interface TopicRef {
|
|
286
314
|
/** What the programme is about, in the operator's words. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrichment.d.ts","sourceRoot":"","sources":["../../src/capabilities/enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACrB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,IAAI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AQ,MAAM,KAAG,oBAAgD,CAAC;AAE7F,yEAAyE;AACzE,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,oBAC8D,CAAC;AAEtH,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACrB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC5B,0DAA0D;IAC1D,SAAS,EAAE,cAAc,EAAE,CAAC;CAC/B"}
|
|
@@ -89,6 +89,16 @@ export interface WeatherQuery {
|
|
|
89
89
|
* being optimistic, not a caller being wrong.
|
|
90
90
|
*/
|
|
91
91
|
days?: number;
|
|
92
|
+
/**
|
|
93
|
+
* How many hours ahead to include an hourly outlook for, counted from the hour the service is in.
|
|
94
|
+
*
|
|
95
|
+
* `0` or absent asks for none, which is what every caller asked before this existed. A SPAN of
|
|
96
|
+
* hours rather than a count of rows, because services publish at different steps: one answers
|
|
97
|
+
* every hour and one every three, and a caller asking "the next six hours" wants six hours of
|
|
98
|
+
* either. A plugin answers with the rows its service has inside that span, and caps it where the
|
|
99
|
+
* service stops, on {@link days}' rule.
|
|
100
|
+
*/
|
|
101
|
+
hours?: number;
|
|
92
102
|
/**
|
|
93
103
|
* The language the station broadcasts in, as a BCP 47 tag, or absent for English.
|
|
94
104
|
*
|
|
@@ -146,6 +156,23 @@ export interface WeatherDay extends WeatherConditions {
|
|
|
146
156
|
/** ISO-8601. Never a `Date`. */
|
|
147
157
|
sunset?: string;
|
|
148
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* What one moment ahead is expected to be like.
|
|
161
|
+
*
|
|
162
|
+
* A row of the hourly outlook. The moment is the START of the period the row describes, which for
|
|
163
|
+
* most services is an hour and for some is three: a caller works out how far away a row is from
|
|
164
|
+
* {@link at} and never from the row's position, because a reading handed out of a cache is a reading
|
|
165
|
+
* whose first row may already be in the past.
|
|
166
|
+
*/
|
|
167
|
+
export interface WeatherHour extends WeatherConditions {
|
|
168
|
+
/**
|
|
169
|
+
* When this row begins, as an ISO-8601 instant WITH the place's offset on it. Never a `Date`.
|
|
170
|
+
*
|
|
171
|
+
* The offset is load-bearing rather than tidy: a caller saying "by midnight" needs the hour on
|
|
172
|
+
* the PLACE's clock, and an instant in UTC alone cannot say what that is.
|
|
173
|
+
*/
|
|
174
|
+
at: string;
|
|
175
|
+
}
|
|
149
176
|
/** What one place is like. */
|
|
150
177
|
export interface WeatherReading {
|
|
151
178
|
/**
|
|
@@ -176,6 +203,14 @@ export interface WeatherReading {
|
|
|
176
203
|
* the difference belongs in the plugin's own log.
|
|
177
204
|
*/
|
|
178
205
|
days?: WeatherDay[];
|
|
206
|
+
/**
|
|
207
|
+
* The hours ahead, earliest first, as the service forecast them.
|
|
208
|
+
*
|
|
209
|
+
* Absent or empty when {@link WeatherQuery.hours} asked for none, and when the service has no
|
|
210
|
+
* hourly forecast to give, on {@link days}' terms. The first row may be the hour already under
|
|
211
|
+
* way, and its {@link WeatherHour.at} says so.
|
|
212
|
+
*/
|
|
213
|
+
hours?: WeatherHour[];
|
|
179
214
|
}
|
|
180
215
|
/**
|
|
181
216
|
* Implemented by a `weather` plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/capabilities/weather.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;AAEzI,sCAAsC;AACtC,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,MAAM,CAA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;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CACxE"}
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var JSON_SAFE_PAYLOAD_TYPES = [
|
|
|
41
41
|
"ExternalLink",
|
|
42
42
|
"SourceDocument",
|
|
43
43
|
"TrackEnrichment",
|
|
44
|
+
"EnrichmentUnanswered",
|
|
44
45
|
"ArtistEnrichment",
|
|
45
46
|
"AlbumEnrichment",
|
|
46
47
|
"TopicRef",
|
|
@@ -89,6 +90,7 @@ var JSON_SAFE_PAYLOAD_TYPES = [
|
|
|
89
90
|
"WeatherQuery",
|
|
90
91
|
"WeatherConditions",
|
|
91
92
|
"WeatherDay",
|
|
93
|
+
"WeatherHour",
|
|
92
94
|
"WeatherReading",
|
|
93
95
|
"ConcertQuery",
|
|
94
96
|
"Concert",
|
|
@@ -195,6 +197,10 @@ var KNOWN_ENRICHMENT_MATCH_KEYS = [
|
|
|
195
197
|
ENRICHMENT_MATCH_KEY_ISRC,
|
|
196
198
|
ENRICHMENT_MATCH_KEY_ARTIST_TITLE
|
|
197
199
|
];
|
|
200
|
+
var unanswered = /* @__PURE__ */ __name((reason) => ({
|
|
201
|
+
unanswered: reason
|
|
202
|
+
}), "unanswered");
|
|
203
|
+
var isUnanswered = /* @__PURE__ */ __name((entry) => typeof entry === "object" && entry !== null && typeof entry.unanswered === "string", "isUnanswered");
|
|
198
204
|
|
|
199
205
|
// src/plugin.error.ts
|
|
200
206
|
var PLUGIN_ERROR_CODES = [
|
|
@@ -1718,6 +1724,7 @@ export {
|
|
|
1718
1724
|
isResourceScopedCode,
|
|
1719
1725
|
isRowSecretKey,
|
|
1720
1726
|
isSpeechDelivery,
|
|
1727
|
+
isUnanswered,
|
|
1721
1728
|
isZodSchema,
|
|
1722
1729
|
jsonBody,
|
|
1723
1730
|
networkPermissionSchema,
|
|
@@ -1746,6 +1753,7 @@ export {
|
|
|
1746
1753
|
truncateUpstreamMessage,
|
|
1747
1754
|
truncateWords,
|
|
1748
1755
|
tryJsonBody,
|
|
1756
|
+
unanswered,
|
|
1749
1757
|
upstreamDetail,
|
|
1750
1758
|
upstreamField,
|
|
1751
1759
|
variadicLogger,
|