@shopware/api-client 1.0.0 → 1.0.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/README.md CHANGED
@@ -263,71 +263,8 @@ try {
263
263
 
264
264
  Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/api-client/CHANGELOG.md)
265
265
 
266
- ### Latest changes: 1.0.0
267
-
268
- ### Major Changes
269
-
270
- - [#871](https://github.com/shopware/frontends/pull/871) [`1566f7a`](https://github.com/shopware/frontends/commit/1566f7a3962c511b5c72e12a4a5db40c4aa5d198) Thanks [@patzick](https://github.com/patzick)! - Read more about new major release: https://github.com/shopware/frontends/discussions/965
271
-
272
- - [#1056](https://github.com/shopware/frontends/pull/1056) [`c729e70`](https://github.com/shopware/frontends/commit/c729e7014c70d7f71edf5297104065d18e482e04) Thanks [@patzick](https://github.com/patzick)! - Removed deprecations from the code:
273
-
274
- - `onContextChanged` function inside `createAPIClient` method. Use `apiClient.hook("onContextChanged", ...)` instead.
275
- - `apiType` flag from the `createAPIClient`. Use separate methods to create store and admin api clients
276
- - `onAuthChange` from the `createAdminAPIClient`. Use `adminApiClient.hook('onAuthChange',...)` instead
277
-
278
- ### Minor Changes
279
-
280
- - [#1039](https://github.com/shopware/frontends/pull/1039) [`2343012`](https://github.com/shopware/frontends/commit/2343012ad552b06557e6715055b3abc534fa2fae) Thanks [@patzick](https://github.com/patzick)! - We're exposing `fetchOptions` inside params of `invoke` method. You can now use `ofetch` features like `timeout` or `signal` with AbortController
281
-
282
- Example for the AbortController:
283
-
284
- ```ts
285
- const controller = new AbortController();
286
-
287
- const request = client.invoke("readContext get /context", {
288
- fetchOptions: {
289
- signal: controller.signal,
290
- },
291
- });
292
-
293
- controller.abort(); // At this point client will throw an error with the information, that the request has been cancelled
294
- ```
295
-
296
- - [#560](https://github.com/shopware/frontends/pull/560) [`9643e56`](https://github.com/shopware/frontends/commit/9643e56dafba9282b75c12c96b2afb3a4738f86e) Thanks [@patzick](https://github.com/patzick)! - [createAdminAPIClient] ability to pass optional field `credentials` to be used as authentication method before invoking any Admin API endpoint.
297
-
298
- - [#639](https://github.com/shopware/frontends/pull/639) [`d60d062`](https://github.com/shopware/frontends/commit/d60d0620c7114a2f26bb2faf24241e2cbabc8798) Thanks [@patzick](https://github.com/patzick)! - Management of defaultHeaders. You can now set them on apiClient init or runtime.
299
-
300
- ```ts
301
- const apiClient = createApiClient({
302
- ...,
303
- defaultHeaders: {
304
- 'sw-language-id': 'my-id',
305
- },
306
- });
307
-
308
- console.log('Debug default headers:', apiClient.defaultHeaders);
309
-
310
- // Change header runtime
311
- apiClient.defaultHeaders['sw-language-id'] = 'my-new-id';
312
-
313
- // Remove header runtime
314
- apiClient.defaultHeaders['sw-language-id'] = "";
315
-
316
- // Change multiple headers runtime
317
- apiClient.defaultHeaders.apply({
318
- 'sw-language-id': 'another-id',
319
- 'sw-currency-id': 'currency-id',
320
- })
321
- ```
322
-
323
- - [#857](https://github.com/shopware/frontends/pull/857) [`864616f`](https://github.com/shopware/frontends/commit/864616f0c9e1cbe11e434b9a04a35ff9520bcb3c) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Add error and success callbacks
266
+ ### Latest changes: 1.0.1
324
267
 
325
268
  ### Patch Changes
326
269
 
327
- - [#787](https://github.com/shopware/frontends/pull/787) [`782ef4d`](https://github.com/shopware/frontends/commit/782ef4d417dce6e6d60992bd54f876aa4bc5f45d) Thanks [@mkucmus](https://github.com/mkucmus)! - Adjust test snapshot for Shopware v6.6 response
328
-
329
- - [#567](https://github.com/shopware/frontends/pull/567) [`1583a7a`](https://github.com/shopware/frontends/commit/1583a7ae0d68b72fb362b625e1634e03bad68110) Thanks [@patzick](https://github.com/patzick)! - Export default API types to be compatible with the `bundler` mode resolution in `tsconfig`
330
-
331
- - [#557](https://github.com/shopware/frontends/pull/557) [`97d2859`](https://github.com/shopware/frontends/commit/97d2859e4dcbdc563200f2f64d1a20880b675d87) Thanks [@patzick](https://github.com/patzick)! - Added `Accept: application/json` default header to get only JSON responses.
332
-
333
- - [`89a97a4`](https://github.com/shopware/frontends/commit/89a97a45ae4a58616e41f63e9884a2a67f0a6ce8) Thanks [@patzick](https://github.com/patzick)! - fix default types
270
+ - [#1078](https://github.com/shopware/frontends/pull/1078) [`19f2800`](https://github.com/shopware/frontends/commit/19f28003cf937bcb630257cb7cfd2bd131b7cf9d) Thanks [@patzick](https://github.com/patzick)! - Patch for missing `sw-include-seo-url` in OpenAPI schema.
@@ -669,6 +669,19 @@
669
669
  "get": {
670
670
  "requestBody": "_DELETE_"
671
671
  }
672
+ },
673
+ "/search": {
674
+ "post": {
675
+ "parameters": [
676
+ {
677
+ "name": "sw-include-seo-urls",
678
+ "in": "header",
679
+ "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
680
+ "required": false,
681
+ "schema": { "type": "boolean" }
682
+ }
683
+ ]
684
+ }
672
685
  }
673
686
  }
674
687
  }
@@ -8412,6 +8412,8 @@ export type operations = {
8412
8412
  headers?: {
8413
8413
  /** Instructs Shopware to return the response in the given language. */
8414
8414
  "sw-language-id"?: string;
8415
+ /** Instructs Shopware to try and resolve SEO URLs for the given navigation item */
8416
+ "sw-include-seo-urls"?: boolean;
8415
8417
  };
8416
8418
  body: {
8417
8419
  /** Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag. */
package/dist/index.d.cts CHANGED
@@ -8433,6 +8433,8 @@ type operations$1 = {
8433
8433
  headers?: {
8434
8434
  /** Instructs Shopware to return the response in the given language. */
8435
8435
  "sw-language-id"?: string;
8436
+ /** Instructs Shopware to try and resolve SEO URLs for the given navigation item */
8437
+ "sw-include-seo-urls"?: boolean;
8436
8438
  };
8437
8439
  body: {
8438
8440
  /** Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag. */
package/dist/index.d.mts CHANGED
@@ -8433,6 +8433,8 @@ type operations$1 = {
8433
8433
  headers?: {
8434
8434
  /** Instructs Shopware to return the response in the given language. */
8435
8435
  "sw-language-id"?: string;
8436
+ /** Instructs Shopware to try and resolve SEO URLs for the given navigation item */
8437
+ "sw-include-seo-urls"?: boolean;
8436
8438
  };
8437
8439
  body: {
8438
8440
  /** Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag. */
package/dist/index.d.ts CHANGED
@@ -8433,6 +8433,8 @@ type operations$1 = {
8433
8433
  headers?: {
8434
8434
  /** Instructs Shopware to return the response in the given language. */
8435
8435
  "sw-language-id"?: string;
8436
+ /** Instructs Shopware to try and resolve SEO URLs for the given navigation item */
8437
+ "sw-include-seo-urls"?: boolean;
8436
8438
  };
8437
8439
  body: {
8438
8440
  /** Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware/api-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shopware client for API connection.",
5
5
  "author": "Shopware",
6
6
  "type": "module",