@microsoft/webiq 0.1.0 → 0.1.2

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
@@ -62,6 +62,10 @@ await client.close();
62
62
 
63
63
  ## Authentication
64
64
 
65
+ ### API Key
66
+
67
+ Get an API key at [webiq.microsoft.ai](https://webiq.microsoft.ai).
68
+
65
69
  ```typescript
66
70
  import { WebIQClient } from '@microsoft/webiq';
67
71
 
@@ -95,8 +99,11 @@ const results = await client.web.search(query, {
95
99
  location: 'lat:40.7;long:-74.0', // Optional
96
100
  contentFormat: ContentFormat.HTML, // PASSAGE, TEXT, HTML, MARKDOWN
97
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)
98
105
  });
99
- // results.webResults → [{title, url, content, lastUpdatedAt, crawledAt, language, isAdult}]
106
+ // results.webResults → [{title, url, content, lastUpdatedAt, crawledAt, language, isAdult, contentTier}]
100
107
  ```
101
108
 
102
109
  ### News Search
@@ -110,7 +117,7 @@ const results = await client.news.search(query, {
110
117
  contentFormat: ContentFormat.TEXT,
111
118
  maxLength: 10000,
112
119
  });
113
- // results.newsResults → [{title, url, content, snippet, source, lastUpdatedAt, thumbnail, isAdult}]
120
+ // results.newsResults → [{title, url, content, source, lastUpdatedAt, thumbnail, isAdult}]
114
121
  ```
115
122
 
116
123
  ### Video 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,15 @@ type WebResult = {
113
119
  * Indicates whether the result includes adult content.
114
120
  */
115
121
  isAdult?: boolean;
122
+ contentTier?: ContentTier;
123
+ /**
124
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
125
+ */
126
+ clickUrl?: string | null;
127
+ /**
128
+ * Suffix to append to the instrumentation ping URL base for this result item.
129
+ */
130
+ instrumentationSuffix?: string | null;
116
131
  };
117
132
 
118
133
  type WebResponse = {
@@ -120,6 +135,14 @@ type WebResponse = {
120
135
  * List of web page results.
121
136
  */
122
137
  webResults?: Array<WebResult> | null;
138
+ /**
139
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
140
+ */
141
+ instrumentationClickBase?: string | null;
142
+ /**
143
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
144
+ */
145
+ instrumentationCitationBase?: string | null;
123
146
  /**
124
147
  * Trace ID for debugging and tracking.
125
148
  */
@@ -148,6 +171,18 @@ interface WebSearchParams {
148
171
  contentFormat?: ContentFormat;
149
172
  /** Max characters in content (1-500000, default 10000). */
150
173
  maxLength?: number;
174
+ /** Custom search configuration ID (configure at https://www.customsearch.ai/). */
175
+ customSearchConfigId?: string;
176
+ /**
177
+ * Domains to include in results (max 250). For allow-lists longer than ~20
178
+ * domains, use `customSearchConfigId` instead.
179
+ */
180
+ includeDomains?: string[];
181
+ /**
182
+ * Domains to exclude from results (max 250). For deny-lists longer than ~20
183
+ * domains, use `customSearchConfigId` instead.
184
+ */
185
+ excludeDomains?: string[];
151
186
  /** Per-request timeout in milliseconds (overrides client default). */
152
187
  timeout?: number;
153
188
  /**
@@ -205,10 +240,6 @@ type NewsItem = {
205
240
  * The detailed content of the news.
206
241
  */
207
242
  content?: string | null;
208
- /**
209
- * A snippet from the news content.
210
- */
211
- snippet?: string | null;
212
243
  thumbnail?: NewsThumbnail;
213
244
  /**
214
245
  * The last updated date of the news, in UTC ISO8601 format.
@@ -222,6 +253,14 @@ type NewsItem = {
222
253
  * Indicates if the content is adult content.
223
254
  */
224
255
  isAdult?: boolean;
256
+ /**
257
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
258
+ */
259
+ clickUrl?: string | null;
260
+ /**
261
+ * Suffix to append to the instrumentation ping URL base for this result item.
262
+ */
263
+ instrumentationSuffix?: string | null;
225
264
  };
226
265
 
227
266
  type NewsResponse = {
@@ -229,6 +268,14 @@ type NewsResponse = {
229
268
  * List of news article results.
230
269
  */
231
270
  newsResults?: Array<NewsItem> | null;
271
+ /**
272
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
273
+ */
274
+ instrumentationClickBase?: string | null;
275
+ /**
276
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
277
+ */
278
+ instrumentationCitationBase?: string | null;
232
279
  /**
233
280
  * Trace ID for debugging and tracking.
234
281
  */
@@ -420,6 +467,14 @@ type VideoItem = {
420
467
  * Indicates whether the result includes adult content.
421
468
  */
422
469
  isAdult?: boolean;
470
+ /**
471
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
472
+ */
473
+ clickUrl?: string | null;
474
+ /**
475
+ * Suffix to append to the instrumentation ping URL base for this result item.
476
+ */
477
+ instrumentationSuffix?: string | null;
423
478
  };
424
479
 
425
480
  type VideosResponse = {
@@ -431,6 +486,14 @@ type VideosResponse = {
431
486
  * List of playlist results.
432
487
  */
433
488
  playlists?: Array<PlaylistItem> | null;
489
+ /**
490
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
491
+ */
492
+ instrumentationClickBase?: string | null;
493
+ /**
494
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
495
+ */
496
+ instrumentationCitationBase?: string | null;
434
497
  /**
435
498
  * Trace ID for debugging and tracking.
436
499
  */
@@ -543,6 +606,14 @@ type ImageItem = {
543
606
  * Indicates whether the content is adult content.
544
607
  */
545
608
  isAdult?: boolean;
609
+ /**
610
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
611
+ */
612
+ clickUrl?: string | null;
613
+ /**
614
+ * Suffix to append to the instrumentation ping URL base for this result item.
615
+ */
616
+ instrumentationSuffix?: string | null;
546
617
  };
547
618
 
548
619
  type ImagesResponse = {
@@ -550,6 +621,14 @@ type ImagesResponse = {
550
621
  * List of image results.
551
622
  */
552
623
  imageResults?: Array<ImageItem> | null;
624
+ /**
625
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
626
+ */
627
+ instrumentationClickBase?: string | null;
628
+ /**
629
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
630
+ */
631
+ instrumentationCitationBase?: string | null;
553
632
  /**
554
633
  * Trace ID for debugging and tracking.
555
634
  */
@@ -736,16 +815,20 @@ type QuerySignals = {
736
815
  isFresh?: boolean | null;
737
816
  };
738
817
 
739
- /**
740
- * Response for the classic search endpoint. The spec defines this as an
741
- * open object (additionalProperties: {}) — keep the typed fields the spec
742
- * lists but allow arbitrary extra keys (webResults, imageResults, etc.)
743
- * so callers can read what the server actually returns.
744
- */
745
818
  type SearchClassicResponse = {
746
819
  querySignals?: QuerySignals;
747
- /** Trace ID for debugging and tracking. */
748
- traceId?: string;
820
+ /**
821
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
822
+ */
823
+ instrumentationClickBase?: string | null;
824
+ /**
825
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
826
+ */
827
+ instrumentationCitationBase?: string | null;
828
+ /**
829
+ * Trace ID for debugging and tracking.
830
+ */
831
+ traceId?: string | null;
749
832
  [key: string]: any;
750
833
  };
751
834
 
@@ -1100,4 +1183,4 @@ declare class HttpTransport implements Transport {
1100
1183
  close(): Promise<void>;
1101
1184
  }
1102
1185
 
1103
- 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 };
1186
+ 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,15 @@ type WebResult = {
113
119
  * Indicates whether the result includes adult content.
114
120
  */
115
121
  isAdult?: boolean;
122
+ contentTier?: ContentTier;
123
+ /**
124
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
125
+ */
126
+ clickUrl?: string | null;
127
+ /**
128
+ * Suffix to append to the instrumentation ping URL base for this result item.
129
+ */
130
+ instrumentationSuffix?: string | null;
116
131
  };
117
132
 
118
133
  type WebResponse = {
@@ -120,6 +135,14 @@ type WebResponse = {
120
135
  * List of web page results.
121
136
  */
122
137
  webResults?: Array<WebResult> | null;
138
+ /**
139
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
140
+ */
141
+ instrumentationClickBase?: string | null;
142
+ /**
143
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
144
+ */
145
+ instrumentationCitationBase?: string | null;
123
146
  /**
124
147
  * Trace ID for debugging and tracking.
125
148
  */
@@ -148,6 +171,18 @@ interface WebSearchParams {
148
171
  contentFormat?: ContentFormat;
149
172
  /** Max characters in content (1-500000, default 10000). */
150
173
  maxLength?: number;
174
+ /** Custom search configuration ID (configure at https://www.customsearch.ai/). */
175
+ customSearchConfigId?: string;
176
+ /**
177
+ * Domains to include in results (max 250). For allow-lists longer than ~20
178
+ * domains, use `customSearchConfigId` instead.
179
+ */
180
+ includeDomains?: string[];
181
+ /**
182
+ * Domains to exclude from results (max 250). For deny-lists longer than ~20
183
+ * domains, use `customSearchConfigId` instead.
184
+ */
185
+ excludeDomains?: string[];
151
186
  /** Per-request timeout in milliseconds (overrides client default). */
152
187
  timeout?: number;
153
188
  /**
@@ -205,10 +240,6 @@ type NewsItem = {
205
240
  * The detailed content of the news.
206
241
  */
207
242
  content?: string | null;
208
- /**
209
- * A snippet from the news content.
210
- */
211
- snippet?: string | null;
212
243
  thumbnail?: NewsThumbnail;
213
244
  /**
214
245
  * The last updated date of the news, in UTC ISO8601 format.
@@ -222,6 +253,14 @@ type NewsItem = {
222
253
  * Indicates if the content is adult content.
223
254
  */
224
255
  isAdult?: boolean;
256
+ /**
257
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
258
+ */
259
+ clickUrl?: string | null;
260
+ /**
261
+ * Suffix to append to the instrumentation ping URL base for this result item.
262
+ */
263
+ instrumentationSuffix?: string | null;
225
264
  };
226
265
 
227
266
  type NewsResponse = {
@@ -229,6 +268,14 @@ type NewsResponse = {
229
268
  * List of news article results.
230
269
  */
231
270
  newsResults?: Array<NewsItem> | null;
271
+ /**
272
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
273
+ */
274
+ instrumentationClickBase?: string | null;
275
+ /**
276
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
277
+ */
278
+ instrumentationCitationBase?: string | null;
232
279
  /**
233
280
  * Trace ID for debugging and tracking.
234
281
  */
@@ -420,6 +467,14 @@ type VideoItem = {
420
467
  * Indicates whether the result includes adult content.
421
468
  */
422
469
  isAdult?: boolean;
470
+ /**
471
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
472
+ */
473
+ clickUrl?: string | null;
474
+ /**
475
+ * Suffix to append to the instrumentation ping URL base for this result item.
476
+ */
477
+ instrumentationSuffix?: string | null;
423
478
  };
424
479
 
425
480
  type VideosResponse = {
@@ -431,6 +486,14 @@ type VideosResponse = {
431
486
  * List of playlist results.
432
487
  */
433
488
  playlists?: Array<PlaylistItem> | null;
489
+ /**
490
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
491
+ */
492
+ instrumentationClickBase?: string | null;
493
+ /**
494
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
495
+ */
496
+ instrumentationCitationBase?: string | null;
434
497
  /**
435
498
  * Trace ID for debugging and tracking.
436
499
  */
@@ -543,6 +606,14 @@ type ImageItem = {
543
606
  * Indicates whether the content is adult content.
544
607
  */
545
608
  isAdult?: boolean;
609
+ /**
610
+ * Redirect URL that proxies through Bing. Only present when redirect is enabled.
611
+ */
612
+ clickUrl?: string | null;
613
+ /**
614
+ * Suffix to append to the instrumentation ping URL base for this result item.
615
+ */
616
+ instrumentationSuffix?: string | null;
546
617
  };
547
618
 
548
619
  type ImagesResponse = {
@@ -550,6 +621,14 @@ type ImagesResponse = {
550
621
  * List of image results.
551
622
  */
552
623
  imageResults?: Array<ImageItem> | null;
624
+ /**
625
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
626
+ */
627
+ instrumentationClickBase?: string | null;
628
+ /**
629
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
630
+ */
631
+ instrumentationCitationBase?: string | null;
553
632
  /**
554
633
  * Trace ID for debugging and tracking.
555
634
  */
@@ -736,16 +815,20 @@ type QuerySignals = {
736
815
  isFresh?: boolean | null;
737
816
  };
738
817
 
739
- /**
740
- * Response for the classic search endpoint. The spec defines this as an
741
- * open object (additionalProperties: {}) — keep the typed fields the spec
742
- * lists but allow arbitrary extra keys (webResults, imageResults, etc.)
743
- * so callers can read what the server actually returns.
744
- */
745
818
  type SearchClassicResponse = {
746
819
  querySignals?: QuerySignals;
747
- /** Trace ID for debugging and tracking. */
748
- traceId?: string;
820
+ /**
821
+ * Base URL for click ping requests. Append an instrumentationSuffix value from a result item to form the full ping URL.
822
+ */
823
+ instrumentationClickBase?: string | null;
824
+ /**
825
+ * Base URL for LLM log ping requests. Append a DATA payload to form the full ping URL.
826
+ */
827
+ instrumentationCitationBase?: string | null;
828
+ /**
829
+ * Trace ID for debugging and tracking.
830
+ */
831
+ traceId?: string | null;
749
832
  [key: string]: any;
750
833
  };
751
834
 
@@ -1100,4 +1183,4 @@ declare class HttpTransport implements Transport {
1100
1183
  close(): Promise<void>;
1101
1184
  }
1102
1185
 
1103
- 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 };
1186
+ 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
@@ -84,6 +84,15 @@ var WebResource = class {
84
84
  if (options?.maxLength !== void 0) {
85
85
  payload.maxLength = options.maxLength;
86
86
  }
87
+ if (options?.customSearchConfigId !== void 0) {
88
+ payload.customSearchConfigId = options.customSearchConfigId;
89
+ }
90
+ if (options?.includeDomains !== void 0) {
91
+ payload.includeDomains = options.includeDomains;
92
+ }
93
+ if (options?.excludeDomains !== void 0) {
94
+ payload.excludeDomains = options.excludeDomains;
95
+ }
87
96
  const result = await this.transport.request({
88
97
  method: "POST",
89
98
  path: "/search/web",
@@ -735,6 +744,14 @@ var ContentFormat = /* @__PURE__ */ ((ContentFormat2) => {
735
744
  return ContentFormat2;
736
745
  })(ContentFormat || {});
737
746
 
747
+ // src/generated-otc/models/ContentTier.ts
748
+ var ContentTier = /* @__PURE__ */ ((ContentTier2) => {
749
+ ContentTier2["STANDARD"] = "standard";
750
+ ContentTier2["ENTITLED"] = "entitled";
751
+ ContentTier2["PREMIUM"] = "premium";
752
+ return ContentTier2;
753
+ })(ContentTier || {});
754
+
738
755
  // src/generated-otc/models/SafeSearch.ts
739
756
  var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
740
757
  SafeSearch2["OFF"] = "off";
@@ -799,6 +816,7 @@ exports.BrowseContentFormat = BrowseContentFormat;
799
816
  exports.BrowseResource = BrowseResource;
800
817
  exports.ClassicResource = ClassicResource;
801
818
  exports.ContentFormat = ContentFormat;
819
+ exports.ContentTier = ContentTier;
802
820
  exports.DEFAULT_SCOPE = DEFAULT_SCOPE;
803
821
  exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
804
822
  exports.EntraIDAuth = EntraIDAuth;
package/dist/index.mjs CHANGED
@@ -82,6 +82,15 @@ var WebResource = class {
82
82
  if (options?.maxLength !== void 0) {
83
83
  payload.maxLength = options.maxLength;
84
84
  }
85
+ if (options?.customSearchConfigId !== void 0) {
86
+ payload.customSearchConfigId = options.customSearchConfigId;
87
+ }
88
+ if (options?.includeDomains !== void 0) {
89
+ payload.includeDomains = options.includeDomains;
90
+ }
91
+ if (options?.excludeDomains !== void 0) {
92
+ payload.excludeDomains = options.excludeDomains;
93
+ }
85
94
  const result = await this.transport.request({
86
95
  method: "POST",
87
96
  path: "/search/web",
@@ -733,6 +742,14 @@ var ContentFormat = /* @__PURE__ */ ((ContentFormat2) => {
733
742
  return ContentFormat2;
734
743
  })(ContentFormat || {});
735
744
 
745
+ // src/generated-otc/models/ContentTier.ts
746
+ var ContentTier = /* @__PURE__ */ ((ContentTier2) => {
747
+ ContentTier2["STANDARD"] = "standard";
748
+ ContentTier2["ENTITLED"] = "entitled";
749
+ ContentTier2["PREMIUM"] = "premium";
750
+ return ContentTier2;
751
+ })(ContentTier || {});
752
+
736
753
  // src/generated-otc/models/SafeSearch.ts
737
754
  var SafeSearch = /* @__PURE__ */ ((SafeSearch2) => {
738
755
  SafeSearch2["OFF"] = "off";
@@ -789,4 +806,4 @@ var ImageSize = /* @__PURE__ */ ((ImageSize2) => {
789
806
  return ImageSize2;
790
807
  })(ImageSize || {});
791
808
 
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 };
809
+ 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,65 +1,67 @@
1
1
  {
2
- "name": "@microsoft/webiq",
3
- "version": "0.1.0",
4
- "description": "Web IQ API TypeScript SDK",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "README.md"
18
- ],
19
- "scripts": {
20
- "build": "tsup",
21
- "dev": "tsup --watch",
22
- "lint": "eslint src --ext .ts",
23
- "lint:fix": "eslint src --ext .ts --fix",
24
- "format": "prettier --write \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
25
- "format:check": "prettier --check \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
26
- "typecheck": "tsc --noEmit",
27
- "test": "vitest run",
28
- "test:watch": "vitest",
29
- "clean": "rimraf dist"
30
- },
31
- "keywords": [
32
- "webiq",
33
- "webiq sdk"
34
- ],
35
- "author": "Microsoft <webiqsdk@microsoft.com>",
36
- "license": "MIT",
37
- "engines": {
38
- "node": ">=22",
39
- "npm": ">=10"
40
- },
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "sideEffects": false,
45
- "devDependencies": {
46
- "@azure/identity": ">=4.13.1",
47
- "@types/node": "^20.10.0",
48
- "eslint": "^8.56.0",
49
- "openapi-typescript-codegen": "^0.30.0",
50
- "prettier": "^3.5.3",
51
- "rimraf": "^6.0.0",
52
- "tsup": "^8.0.0",
53
- "tsx": "^4.21.0",
54
- "typescript": "^5.3.0",
55
- "vitest": "^4.0.18"
56
- },
57
- "peerDependencies": {
58
- "@azure/identity": ">=4.13.1"
59
- },
60
- "peerDependenciesMeta": {
61
- "@azure/identity": {
62
- "optional": true
63
- }
2
+ "name": "@microsoft/webiq",
3
+ "version": "0.1.2",
4
+ "description": "Web IQ API TypeScript SDK",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
64
13
  }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "dev": "tsup --watch",
22
+ "lint": "eslint src --ext .ts",
23
+ "lint:fix": "eslint src --ext .ts --fix",
24
+ "format": "prettier --write \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
25
+ "format:check": "prettier --check \"src/**/*.ts\" \"*.md\" \"*.json\" --ignore-path ../../.prettierignore",
26
+ "typecheck": "tsc --noEmit",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "clean": "rimraf dist"
30
+ },
31
+ "keywords": [
32
+ "webiq",
33
+ "webiq sdk"
34
+ ],
35
+ "author": "Microsoft <webiqsdk@microsoft.com>",
36
+ "license": "MIT",
37
+ "engines": {
38
+ "node": ">=22",
39
+ "npm": ">=10"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "sideEffects": false,
45
+ "devDependencies": {
46
+ "@azure/identity": ">=4.13.1",
47
+ "@types/js-yaml": "^4.0.9",
48
+ "@types/node": "^20.10.0",
49
+ "eslint": "^8.56.0",
50
+ "js-yaml": "^5.2.0",
51
+ "openapi-typescript-codegen": "^0.30.0",
52
+ "prettier": "^3.5.3",
53
+ "rimraf": "^6.0.0",
54
+ "tsup": "^8.0.0",
55
+ "tsx": "^4.21.0",
56
+ "typescript": "^5.3.0",
57
+ "vitest": "^4.0.18"
58
+ },
59
+ "peerDependencies": {
60
+ "@azure/identity": ">=4.13.1"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "@azure/identity": {
64
+ "optional": true
65
+ }
66
+ }
65
67
  }