@microsoft/webiq 0.1.1 → 0.1.3

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 CHANGED
@@ -99,8 +99,11 @@ const results = await client.web.search(query, {
99
99
  location: 'lat:40.7;long:-74.0', // Optional
100
100
  contentFormat: ContentFormat.HTML, // PASSAGE, TEXT, HTML, MARKDOWN
101
101
  maxLength: 10000, // 1-500000
102
+ customSearchConfigId: 'my-config', // Optional custom search config
103
+ includeDomains: ['example.com'], // Optional allowlist (max 250)
104
+ excludeDomains: ['spam.example'], // Optional blocklist (max 250)
102
105
  });
103
- // results.webResults → [{title, url, content, lastUpdatedAt, crawledAt, language, isAdult}]
106
+ // results.webResults → [{title, url, content, lastUpdatedAt, crawledAt, language, isAdult, contentTier}]
104
107
  ```
105
108
 
106
109
  ### News Search
package/dist/index.d.mts CHANGED
@@ -84,6 +84,12 @@ declare enum ContentFormat {
84
84
  MARKDOWN = "markdown"
85
85
  }
86
86
 
87
+ declare enum ContentTier {
88
+ STANDARD = "standard",
89
+ ENTITLED = "entitled",
90
+ PREMIUM = "premium"
91
+ }
92
+
87
93
  type WebResult = {
88
94
  /**
89
95
  * The title of the webpage.
@@ -113,6 +119,7 @@ type WebResult = {
113
119
  * Indicates whether the result includes adult content.
114
120
  */
115
121
  isAdult?: boolean;
122
+ contentTier?: ContentTier;
116
123
  /**
117
124
  * Redirect URL that proxies through Bing. Only present when redirect is enabled.
118
125
  */
@@ -1164,4 +1171,4 @@ declare class HttpTransport implements Transport {
1164
1171
  close(): Promise<void>;
1165
1172
  }
1166
1173
 
1167
- export { APIConnectionError, APIStatusError, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, BrowseResource, type BrowseResponse, ClassicResource, type ClassicSearchOptions, type ClassicSearchParams, ContentFormat, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, ImagesResource, type ImagesResponse, type ImagesSearchParams, type NewsItem, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, type QuerySignals, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SafeSearchMode, type SearchClassicResponse, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
1174
+ export { APIConnectionError, APIStatusError, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, BrowseResource, type BrowseResponse, ClassicResource, type ClassicSearchOptions, type ClassicSearchParams, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, ImagesResource, type ImagesResponse, type ImagesSearchParams, type NewsItem, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, type QuerySignals, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SafeSearchMode, type SearchClassicResponse, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
package/dist/index.d.ts CHANGED
@@ -84,6 +84,12 @@ declare enum ContentFormat {
84
84
  MARKDOWN = "markdown"
85
85
  }
86
86
 
87
+ declare enum ContentTier {
88
+ STANDARD = "standard",
89
+ ENTITLED = "entitled",
90
+ PREMIUM = "premium"
91
+ }
92
+
87
93
  type WebResult = {
88
94
  /**
89
95
  * The title of the webpage.
@@ -113,6 +119,7 @@ type WebResult = {
113
119
  * Indicates whether the result includes adult content.
114
120
  */
115
121
  isAdult?: boolean;
122
+ contentTier?: ContentTier;
116
123
  /**
117
124
  * Redirect URL that proxies through Bing. Only present when redirect is enabled.
118
125
  */
@@ -1164,4 +1171,4 @@ declare class HttpTransport implements Transport {
1164
1171
  close(): Promise<void>;
1165
1172
  }
1166
1173
 
1167
- export { APIConnectionError, APIStatusError, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, BrowseResource, type BrowseResponse, ClassicResource, type ClassicSearchOptions, type ClassicSearchParams, ContentFormat, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, ImagesResource, type ImagesResponse, type ImagesSearchParams, type NewsItem, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, type QuerySignals, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SafeSearchMode, type SearchClassicResponse, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
1174
+ export { APIConnectionError, APIStatusError, ApiKeyAuth, type AuthProvider, AuthenticationError, BrowseContentFormat, type BrowseFetchOptions, type BrowseParams, BrowseResource, type BrowseResponse, ClassicResource, type ClassicSearchOptions, type ClassicSearchParams, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, type FetchFunction, HttpTransport, type HttpTransportOptions, ImageAspectRatio, ImageColor, type ImageItem, type ImageSearchOptions, ImageSize, ImagesResource, type ImagesResponse, type ImagesSearchParams, type NewsItem, NewsResource, type NewsResponse, type NewsSearchOptions, type NewsSearchParams, type NewsThumbnail, PermissionDeniedError, type PlaylistItem, type PlaylistVideo, type QuerySignals, RateLimitError, RetryPolicy, type RetryPolicyOptions, SafeSearch, SafeSearchMode, type SearchClassicResponse, type TelemetryEvent, type TelemetryHook, type TokenCredential, type Transport, type TransportRequestOptions, VideoDuration, type VideoItem, type VideoMoment, VideoResolution, type VideoSearchOptions, VideosResource, type VideosResponse, type VideosSearchParams, WebIQClient, type WebIQClientOptions, WebIQError, WebResource, type WebResponse, type WebResult, type WebSearchOptions, type WebSearchParams, createAuth, createClient, createTelemetryEvent, safeCall };
package/dist/index.js CHANGED
@@ -735,6 +735,14 @@ var ContentFormat = /* @__PURE__ */ ((ContentFormat2) => {
735
735
  return ContentFormat2;
736
736
  })(ContentFormat || {});
737
737
 
738
+ // src/generated-otc/models/ContentTier.ts
739
+ var ContentTier = /* @__PURE__ */ ((ContentTier2) => {
740
+ ContentTier2["STANDARD"] = "standard";
741
+ ContentTier2["ENTITLED"] = "entitled";
742
+ ContentTier2["PREMIUM"] = "premium";
743
+ return ContentTier2;
744
+ })(ContentTier || {});
745
+
738
746
  // src/generated-otc/models/SafeSearch.ts
739
747
  var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
740
748
  SafeSearch2["OFF"] = "off";
@@ -799,6 +807,7 @@ exports.BrowseContentFormat = BrowseContentFormat;
799
807
  exports.BrowseResource = BrowseResource;
800
808
  exports.ClassicResource = ClassicResource;
801
809
  exports.ContentFormat = ContentFormat;
810
+ exports.ContentTier = ContentTier;
802
811
  exports.DEFAULT_SCOPE = DEFAULT_SCOPE;
803
812
  exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
804
813
  exports.EntraIDAuth = EntraIDAuth;
package/dist/index.mjs CHANGED
@@ -733,6 +733,14 @@ var ContentFormat = /* @__PURE__ */ ((ContentFormat2) => {
733
733
  return ContentFormat2;
734
734
  })(ContentFormat || {});
735
735
 
736
+ // src/generated-otc/models/ContentTier.ts
737
+ var ContentTier = /* @__PURE__ */ ((ContentTier2) => {
738
+ ContentTier2["STANDARD"] = "standard";
739
+ ContentTier2["ENTITLED"] = "entitled";
740
+ ContentTier2["PREMIUM"] = "premium";
741
+ return ContentTier2;
742
+ })(ContentTier || {});
743
+
736
744
  // src/generated-otc/models/SafeSearch.ts
737
745
  var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
738
746
  SafeSearch2["OFF"] = "off";
@@ -789,4 +797,4 @@ var ImageSize = /* @__PURE__ */ ((ImageSize2) => {
789
797
  return ImageSize2;
790
798
  })(ImageSize || {});
791
799
 
792
- export { APIConnectionError, APIStatusError, ApiKeyAuth, AuthenticationError, BrowseContentFormat, BrowseResource, ClassicResource, ContentFormat, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, HttpTransport, ImageAspectRatio, ImageColor, ImageSize, ImagesResource, NewsResource, PermissionDeniedError, RateLimitError, RetryPolicy, SafeSearch, SafeSearchMode, VideoDuration, VideoResolution, VideosResource, WebIQClient, WebIQError, WebResource, createAuth, createClient, createTelemetryEvent, safeCall };
800
+ export { APIConnectionError, APIStatusError, ApiKeyAuth, AuthenticationError, BrowseContentFormat, BrowseResource, ClassicResource, ContentFormat, ContentTier, DEFAULT_SCOPE, DEFAULT_TIMEOUT, EntraIDAuth, HttpTransport, ImageAspectRatio, ImageColor, ImageSize, ImagesResource, NewsResource, PermissionDeniedError, RateLimitError, RetryPolicy, SafeSearch, SafeSearchMode, VideoDuration, VideoResolution, VideosResource, WebIQClient, WebIQError, WebResource, createAuth, createClient, createTelemetryEvent, safeCall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/webiq",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Web IQ API TypeScript SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",