Skip to content

Commit

Permalink
ci: release (#1510)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Apr 3, 2024
1 parent 817ef2a commit 5268b15
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 27 deletions.
5 changes: 0 additions & 5 deletions .changeset/nine-berries-move.md

This file was deleted.

37 changes: 31 additions & 6 deletions docs/content/5.api/magento-api.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -3080,7 +3089,7 @@
"name": "generateCustomerToken",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 12
"endIndex": 14
}
},
{
Expand Down Expand Up @@ -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",
Expand All @@ -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?: "
Expand Down Expand Up @@ -4946,8 +4964,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 15
"startIndex": 9,
"endIndex": 17
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -4967,11 +4985,18 @@
}
},
{
"parameterName": "customHeaders",
"parameterName": "customQuery",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
},
{
"parameterName": "customHeaders",
"parameterTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
}
}
],
"name": "route"
Expand Down
50 changes: 38 additions & 12 deletions docs/content/5.api/magento-sdk.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -4804,8 +4817,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 9
"startIndex": 10,
"endIndex": 12
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -4821,7 +4834,7 @@
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
"endIndex": 9
}
}
],
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -8921,8 +8947,8 @@
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 9
"startIndex": 10,
"endIndex": 12
},
"releaseTag": "Public",
"overloadIndex": 1,
Expand All @@ -8938,7 +8964,7 @@
"parameterName": "options",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
"endIndex": 9
}
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/content/5.api/magento-types.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -101236,11 +101236,11 @@
"excerptTokens": [
{
"kind": "Content",
"text": "getAvailablePaymentMethods(params: "
"text": "getAvailablePaymentMethods(cartId: "
},
{
"kind": "Content",
"text": "{\n cartId: string;\n }"
"text": "string"
},
{
"kind": "Content",
Expand Down Expand Up @@ -101305,7 +101305,7 @@
"overloadIndex": 1,
"parameters": [
{
"parameterName": "params",
"parameterName": "cartId",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
Expand Down
51 changes: 51 additions & 0 deletions docs/content/6.reference/changelogs/vue-storefront-magento-api.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
37 changes: 37 additions & 0 deletions docs/content/6.reference/changelogs/vue-storefront-magento-sdk.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 5268b15

Please sign in to comment.