From 5268b156503290a283488b15608a86ecbe402e7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:13:45 +0200 Subject: [PATCH] ci: release (#1510) Co-authored-by: github-actions[bot] --- .changeset/nine-berries-move.md | 5 -- docs/content/5.api/magento-api.api.json | 37 +++++++++++--- docs/content/5.api/magento-sdk.api.json | 50 +++++++++++++----- docs/content/5.api/magento-types.api.json | 6 +-- .../changelogs/vue-storefront-magento-api.md | 51 +++++++++++++++++++ .../changelogs/vue-storefront-magento-sdk.md | 37 ++++++++++++++ .../vue-storefront-magento-types.md | 7 +++ packages/sdk/CHANGELOG.md | 6 +++ packages/sdk/package.json | 2 +- 9 files changed, 174 insertions(+), 27 deletions(-) delete mode 100644 .changeset/nine-berries-move.md diff --git a/.changeset/nine-berries-move.md b/.changeset/nine-berries-move.md deleted file mode 100644 index ec2fb64c2..000000000 --- a/.changeset/nine-berries-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@vue-storefront/magento-sdk": patch ---- - -[FIXED] Correctly passing properties and options to `customQuery` and `customMutation` SDK methods. Previously, the `customHeaders` option was not being passed properly. Now, all options will be properly passed to the `customQuery` and `customMutation` methods. diff --git a/docs/content/5.api/magento-api.api.json b/docs/content/5.api/magento-api.api.json index ca0c1376c..ce052a521 100644 --- a/docs/content/5.api/magento-api.api.json +++ b/docs/content/5.api/magento-api.api.json @@ -3037,7 +3037,16 @@ }, { "kind": "Content", - "text": ", params: {\n email: string;\n password: string;\n recaptchaToken: string;\n}, customHeaders?: " + "text": ", params: {\n email: string;\n password: string;\n recaptchaToken: string;\n}, customQuery?: " + }, + { + "kind": "Reference", + "text": "CustomQuery", + "canonicalReference": "@vue-storefront/magento-types!CustomQuery:type" + }, + { + "kind": "Content", + "text": ", customHeaders?: " }, { "kind": "Reference", @@ -3080,7 +3089,7 @@ "name": "generateCustomerToken", "variableTypeTokenRange": { "startIndex": 1, - "endIndex": 12 + "endIndex": 14 } }, { @@ -4872,7 +4881,7 @@ { "kind": "Function", "canonicalReference": "@vue-storefront/magento-api!route:function(1)", - "docComment": "/**\n * Returns the canonical URL for a specified product, category, or CMS page\n *\n * @param context - VSF Context\n *\n * @param url - the URL to be resolved\n *\n * @param customHeaders - (optional) - custom headers that extends the default headers\n */\n", + "docComment": "/**\n * Returns the canonical URL for a specified product, category, or CMS page\n *\n * @param context - VSF Context\n *\n * @param url - the URL to be resolved\n *\n * @param customQuery - (optional) - custom GraphQL query that extends the default one\n *\n * @param customHeaders - (optional) - custom headers that extends the default headers\n */\n", "excerptTokens": [ { "kind": "Content", @@ -4891,6 +4900,15 @@ "kind": "Content", "text": "string" }, + { + "kind": "Content", + "text": ", customQuery?: " + }, + { + "kind": "Reference", + "text": "CustomQuery", + "canonicalReference": "@vue-storefront/magento-types!CustomQuery:type" + }, { "kind": "Content", "text": ", customHeaders?: " @@ -4946,8 +4964,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 15 + "startIndex": 9, + "endIndex": 17 }, "releaseTag": "Public", "overloadIndex": 1, @@ -4967,11 +4985,18 @@ } }, { - "parameterName": "customHeaders", + "parameterName": "customQuery", "parameterTypeTokenRange": { "startIndex": 5, "endIndex": 6 } + }, + { + "parameterName": "customHeaders", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } } ], "name": "route" diff --git a/docs/content/5.api/magento-sdk.api.json b/docs/content/5.api/magento-sdk.api.json index 232032466..5e734cf51 100644 --- a/docs/content/5.api/magento-sdk.api.json +++ b/docs/content/5.api/magento-sdk.api.json @@ -4756,7 +4756,7 @@ { "kind": "Function", "canonicalReference": "@vue-storefront/magento-sdk!generateCustomerToken:function(1)", - "docComment": "/**\n * Method to generate customer token\n *\n * @remarks\n *\n * This method sends a POST request to the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/generateCustomerToken | generateCustomerToken} endpoint of the Vue Storefront API Middleware. The default GraphQL query used by this method can be found {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/generateCustomerToken | here}.\n *\n * @param params - Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.\n *\n * @param options - Options that can be passed to additionally configure the request or customize the logic in a plugin.\n *\n * @typeParam Res - Customizable response interface to be used with custom queries.\n *\n * @returns Returns a representation of the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/GenerateCustomerTokenResponse | GenerateCustomerTokenResponse}.\n *\n * @example\n *\n * Simple usage:\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // fetch token\n * const result = await sdk.magento.generateCustomerToken({\n * email: 'some-email',\n * password: 'some-password'\n * });\n *\n * // Token is now available in result.data.generateCustomerToken.token\n * ```\n *\n */\n", + "docComment": "/**\n * Method to generate customer token\n *\n * @remarks\n *\n * This method sends a POST request to the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/generateCustomerToken | generateCustomerToken} endpoint of the Vue Storefront API Middleware. The default GraphQL query used by this method can be found {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/generateCustomerToken | here}.\n *\n * @param params - Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.\n *\n * @param options - Options that can be passed to additionally configure the request or customize the logic in a plugin.\n *\n * @typeParam Res - Customizable response interface to be used with custom queries.\n *\n * @returns Returns a representation of the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/GenerateCustomerTokenResponse | GenerateCustomerTokenResponse}.\n *\n * @example\n *\n * Simple usage:\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // fetch token\n * const result = await sdk.magento.generateCustomerToken({\n * email: 'some-email',\n * password: 'some-password'\n * });\n *\n * // Token is now available in result.data.generateCustomerToken.token\n * ```\n *\n * *\n *\n * @example\n *\n * Creating a custom GraphQL query to fetch additional data:\n * ```ts\n * module.exports = {\n * integrations: {\n * magento: {\n * customQueries: {\n * 'generate-customer-token-custom-query': ({ variables, metadata }) => ({\n * variables,\n * query: `\n * mutation generateCustomerToken($email: String!, $password: String!) {\n * generateCustomerToken(email: $email, password: $password) {\n * ${metadata.fields}\n * }\n * }\n * }`\n * }),\n * },\n * }\n * }\n * };\n * ```\n *\n * @example\n *\n * Using a custom GraphQL query created in the previous example.\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // reduce the amount of fields returned by the query, when compared to the default query\n * const customQuery = {\n * route: 'generate-customer-token-custom-query',\n * metadata: {\n * fields: 'token additional_field'\n * }\n * };\n *\n * // data will contain only the fields specified in the custom query.\n * const result = await sdk.magento.generateCustomerToken({\n * email: 'some-email',\n * password: 'some-password'\n * }, { customQuery });\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", @@ -4782,8 +4782,21 @@ }, { "kind": "Reference", - "text": "MethodBaseOptions", - "canonicalReference": "@vue-storefront/magento-sdk!MethodBaseOptions:type" + "text": "MethodOptions", + "canonicalReference": "@vue-storefront/magento-sdk!MethodOptions:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CustomQuery", + "canonicalReference": "@vue-storefront/magento-sdk!CustomQuery:type" + }, + { + "kind": "Content", + "text": "<'generateCustomerToken'>>" }, { "kind": "Content", @@ -4804,8 +4817,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 + "startIndex": 10, + "endIndex": 12 }, "releaseTag": "Public", "overloadIndex": 1, @@ -4821,7 +4834,7 @@ "parameterName": "options", "parameterTypeTokenRange": { "startIndex": 5, - "endIndex": 6 + "endIndex": 9 } } ], @@ -8873,7 +8886,7 @@ { "kind": "Function", "canonicalReference": "@vue-storefront/magento-sdk!route:function(1)", - "docComment": "/**\n * Method to resolve a route object data\n *\n * @remarks\n *\n * This method sends a GET request to the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/route | route} endpoint of the Vue Storefront API Middleware. The default GraphQL query used by this method can be found {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/route | here}.\n *\n * @param params - Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.\n *\n * @param options - Options that can be passed to additionally configure the request or customize the logic in a plugin.\n *\n * @typeParam Res - Customizable response interface to be used with custom queries.\n *\n * @returns Returns a representation of the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/RouteResponse | RouteResponse}.\n *\n * @example\n *\n * Simple usage:\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // fetch route object data\n * const result = await sdk.magento.route({\n * url: 'aether-gym-pant.html'\n * });\n *\n * // Example result:\n * {\n * data: {\n * route: { type: 'PRODUCT', sku: 'MP11', __typename: 'ConfigurableProduct' }\n * },\n * loading: false,\n * networkStatus: 7\n * }\n * ```\n *\n */\n", + "docComment": "/**\n * Method to resolve a route object data\n *\n * @remarks\n *\n * This method sends a GET request to the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/route | route} endpoint of the Vue Storefront API Middleware. The default GraphQL query used by this method can be found {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/route | here}.\n *\n * @param params - Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.\n *\n * @param options - Options that can be passed to additionally configure the request or customize the logic in a plugin.\n *\n * @typeParam Res - Customizable response interface to be used with custom queries.\n *\n * @returns Returns a representation of the {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/RouteResponse | RouteResponse}.\n *\n * @example\n *\n * Simple usage:\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // fetch route object data\n * const result = await sdk.magento.route({\n * url: 'aether-gym-pant.html'\n * });\n *\n * // Example result:\n * {\n * data: {\n * route: { type: 'PRODUCT', sku: 'MP11', __typename: 'ConfigurableProduct' }\n * },\n * loading: false,\n * networkStatus: 7\n * }\n * ```\n *\n * *\n *\n * @example\n *\n * Creating a custom GraphQL query to fetch additional data:\n * ```ts\n * module.exports = {\n * integrations: {\n * magento: {\n * customQueries: {\n * 'route-custom-query': ({ variables, metadata }) => ({\n * variables,\n * query: `\n * query route($url: String!) {\n * route(url: $url) {\n * ${metadata?.fields}\n * }\n * }\n * }`\n * }),\n * },\n * }\n * }\n * };\n * ```\n *\n * @example\n *\n * Using a custom GraphQL query created in the previous example.\n * ```ts\n * import { sdk } from '~/sdk.config.ts';\n *\n * // reduce the amount of fields returned by the query, when compared to the default query\n * const customQuery = {\n * route: 'route-custom-query',\n * metadata: {\n * fields: 'type ... on CategoryInterface { uid name image}' // fetch additional name and image fields\n * }\n * };\n *\n * // data will contain only the fields specified in the custom query.\n * const { data } = await sdk.magento.route({ url: 'women.html' }, { customQuery });\n * ```\n *\n */\n", "excerptTokens": [ { "kind": "Content", @@ -8899,8 +8912,21 @@ }, { "kind": "Reference", - "text": "MethodBaseOptions", - "canonicalReference": "@vue-storefront/magento-sdk!MethodBaseOptions:type" + "text": "MethodOptions", + "canonicalReference": "@vue-storefront/magento-sdk!MethodOptions:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CustomQuery", + "canonicalReference": "@vue-storefront/magento-sdk!CustomQuery:type" + }, + { + "kind": "Content", + "text": "<'route'>>" }, { "kind": "Content", @@ -8921,8 +8947,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 + "startIndex": 10, + "endIndex": 12 }, "releaseTag": "Public", "overloadIndex": 1, @@ -8938,7 +8964,7 @@ "parameterName": "options", "parameterTypeTokenRange": { "startIndex": 5, - "endIndex": 6 + "endIndex": 9 } } ], diff --git a/docs/content/5.api/magento-types.api.json b/docs/content/5.api/magento-types.api.json index 7929d13e1..0a3615ed4 100644 --- a/docs/content/5.api/magento-types.api.json +++ b/docs/content/5.api/magento-types.api.json @@ -101236,11 +101236,11 @@ "excerptTokens": [ { "kind": "Content", - "text": "getAvailablePaymentMethods(params: " + "text": "getAvailablePaymentMethods(cartId: " }, { "kind": "Content", - "text": "{\n cartId: string;\n }" + "text": "string" }, { "kind": "Content", @@ -101305,7 +101305,7 @@ "overloadIndex": 1, "parameters": [ { - "parameterName": "params", + "parameterName": "cartId", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 diff --git a/docs/content/6.reference/changelogs/vue-storefront-magento-api.md b/docs/content/6.reference/changelogs/vue-storefront-magento-api.md index 7275c3e54..915416cba 100644 --- a/docs/content/6.reference/changelogs/vue-storefront-magento-api.md +++ b/docs/content/6.reference/changelogs/vue-storefront-magento-api.md @@ -1,5 +1,56 @@ # @vue-storefront/magento-api +## 2.4.3 + +### Patch Changes + +- adc748ef: \* Updated @apollo/client dependency from version `^3.6.9` to version `3.8.7` in the api-client package. +- adc748ef: \* Fixed a bug in the GraphQL mutation in the generateCustomerToken API. Replaced the ${generateCustomerToken} template string with ${generateCustomerTokenGQL.query} in the mutation to address the bug. + +## 2.4.2 + +### Patch Changes + +- Updated dependencies [045784a6] + - @vue-storefront/magento-types@1.0.2 + +## 2.4.1 + +### Patch Changes + +- 78edfd5c: \* Fixed a bug in the GraphQL mutation in the generateCustomerToken API. Replaced the ${generateCustomerToken} template string with ${generateCustomerTokenGQL.query} in the mutation to address the bug. + +## 2.4.0 + +### Minor Changes + +- d634cdbe: ## Changes + + This change adds support for custom queries in the `route` method of both the `api-client` and `sdk` modules. The `route` query has also been extended with a `CategoryInterface` fragment. These changes improve the flexibility and functionality of the `route` method, allowing for more customization and control over the data returned. + + ### api-client + + - Expanded the route query to include a `CategoryInterface` fragment. + - Introduced support for `customQueries` within the route API method. + + ### sdk + + - Now includes support for `customQueries` in the route SDK method. + +### Patch Changes + +- 992734bf: ## Changes + + This change adds support for custom queries in the `generateCustomerToken` method of both the `api-client` and `sdk` modules. + + ### api-client + + - Introduced support for `customQueries` within the route API method. + + ### sdk + + - Now includes support for `customQueries` in the route SDK method. + ## 2.3.0 ### Minor Changes diff --git a/docs/content/6.reference/changelogs/vue-storefront-magento-sdk.md b/docs/content/6.reference/changelogs/vue-storefront-magento-sdk.md index 4c3bed4e2..43bfdb3be 100644 --- a/docs/content/6.reference/changelogs/vue-storefront-magento-sdk.md +++ b/docs/content/6.reference/changelogs/vue-storefront-magento-sdk.md @@ -1,5 +1,42 @@ # @vue-storefront/magento-sdk +## 2.1.1 + +### Patch Changes + +- c5d63066: [FIXED] Correctly passing properties and options to `customQuery` and `customMutation` SDK methods. Previously, the `customHeaders` option was not being passed properly. Now, all options will be properly passed to the `customQuery` and `customMutation` methods. + +## 2.1.0 + +### Minor Changes + +- d634cdbe: ## Changes + + This change adds support for custom queries in the `route` method of both the `api-client` and `sdk` modules. The `route` query has also been extended with a `CategoryInterface` fragment. These changes improve the flexibility and functionality of the `route` method, allowing for more customization and control over the data returned. + + ### api-client + + - Expanded the route query to include a `CategoryInterface` fragment. + - Introduced support for `customQueries` within the route API method. + + ### sdk + + - Now includes support for `customQueries` in the route SDK method. + +### Patch Changes + +- 992734bf: ## Changes + + This change adds support for custom queries in the `generateCustomerToken` method of both the `api-client` and `sdk` modules. + + ### api-client + + - Introduced support for `customQueries` within the route API method. + + ### sdk + + - Now includes support for `customQueries` in the route SDK method. + ## 2.0.0 ### Major Changes diff --git a/docs/content/6.reference/changelogs/vue-storefront-magento-types.md b/docs/content/6.reference/changelogs/vue-storefront-magento-types.md index fa7652185..f40114687 100644 --- a/docs/content/6.reference/changelogs/vue-storefront-magento-types.md +++ b/docs/content/6.reference/changelogs/vue-storefront-magento-types.md @@ -1,5 +1,12 @@ # @vue-storefront/magento-types +## 1.0.2 + +### Patch Changes + +- 045784a6: Fixes + - Fixed `getAvailablePaymentMethods` type definition. Parameter `cartId` is now properly typed as `string`. + ## 1.0.1 ### Patch Changes diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index a2652db14..43bfdb3be 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,11 @@ # @vue-storefront/magento-sdk +## 2.1.1 + +### Patch Changes + +- c5d63066: [FIXED] Correctly passing properties and options to `customQuery` and `customMutation` SDK methods. Previously, the `customHeaders` option was not being passed properly. Now, all options will be properly passed to the `customQuery` and `customMutation` methods. + ## 2.1.0 ### Minor Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2b7c39a01..76b8b09ea 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/magento-sdk", - "version": "2.1.0", + "version": "2.1.1", "main": "lib/index.cjs.js", "module": "lib/index.es.js", "types": "lib/index.d.ts",