From 124ac682a9bceb07a2afd88fb8876a62f4ea9375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Gaudencio=20do=20R=C3=AAgo?= Date: Tue, 18 Feb 2025 17:02:22 -0300 Subject: [PATCH] lint --- linx/manifest.gen.ts | 68 +-- shopify/loaders/shop.ts | 6 +- shopify/utils/transform.ts | 2 +- vtex/utils/openapi/vcs.openapi.json | 724 ++++++++++++++-------------- 4 files changed, 400 insertions(+), 400 deletions(-) diff --git a/linx/manifest.gen.ts b/linx/manifest.gen.ts index 69bf836ff..32815393c 100644 --- a/linx/manifest.gen.ts +++ b/linx/manifest.gen.ts @@ -17,45 +17,45 @@ import * as $$$$$$$$$11 from "./actions/wishlist/removeWishlist.ts"; import * as $$$$$$$$$12 from "./actions/wishlist/shareWishlist.ts"; import * as $$$$$$$$$13 from "./actions/wishlist/updateWishlist.ts"; import * as $$$$0 from "./handlers/sitemap.ts"; -import * as $$$1 from "./loaders/auction/detailsPage.ts"; -import * as $$$2 from "./loaders/auction/list.ts"; +import * as $$$1 from "./loaders/auction/apiList.ts"; +import * as $$$2 from "./loaders/auction/detailsPage.ts"; +import * as $$$3 from "./loaders/auction/list.ts"; import * as $$$0 from "./loaders/auction/ListBids.ts"; -import * as $$$100000 from "./loaders/auction/apiList.ts"; -import * as $$$3 from "./loaders/cart.ts"; -import * as $$$4 from "./loaders/page.ts"; -import * as $$$5 from "./loaders/pages.ts"; -import * as $$$6 from "./loaders/path.ts"; -import * as $$$7 from "./loaders/product/associations.ts"; -import * as $$$8 from "./loaders/product/byId.ts"; -import * as $$$9 from "./loaders/product/detailsPage.ts"; -import * as $$$10 from "./loaders/product/list.ts"; -import * as $$$11 from "./loaders/product/listingPage.ts"; -import * as $$$12 from "./loaders/product/suggestions.ts"; -import * as $$$13 from "./loaders/proxy.ts"; -import * as $$$14 from "./loaders/user.ts"; -import * as $$$15 from "./loaders/widget.ts"; -import * as $$$16 from "./loaders/wishlist/search.ts"; +import * as $$$4 from "./loaders/cart.ts"; +import * as $$$5 from "./loaders/page.ts"; +import * as $$$6 from "./loaders/pages.ts"; +import * as $$$7 from "./loaders/path.ts"; +import * as $$$8 from "./loaders/product/associations.ts"; +import * as $$$9 from "./loaders/product/byId.ts"; +import * as $$$10 from "./loaders/product/detailsPage.ts"; +import * as $$$11 from "./loaders/product/list.ts"; +import * as $$$12 from "./loaders/product/listingPage.ts"; +import * as $$$13 from "./loaders/product/suggestions.ts"; +import * as $$$14 from "./loaders/proxy.ts"; +import * as $$$15 from "./loaders/user.ts"; +import * as $$$16 from "./loaders/widget.ts"; +import * as $$$17 from "./loaders/wishlist/search.ts"; const manifest = { "loaders": { - "linx/loaders/auction/detailsPage.ts": $$$1, - "linx/loaders/auction/list.ts": $$$2, + "linx/loaders/auction/apiList.ts": $$$1, + "linx/loaders/auction/detailsPage.ts": $$$2, + "linx/loaders/auction/list.ts": $$$3, "linx/loaders/auction/ListBids.ts": $$$0, - "linx/loaders/auction/apiList.ts": $$$100000, - "linx/loaders/cart.ts": $$$3, - "linx/loaders/page.ts": $$$4, - "linx/loaders/pages.ts": $$$5, - "linx/loaders/path.ts": $$$6, - "linx/loaders/product/associations.ts": $$$7, - "linx/loaders/product/byId.ts": $$$8, - "linx/loaders/product/detailsPage.ts": $$$9, - "linx/loaders/product/list.ts": $$$10, - "linx/loaders/product/listingPage.ts": $$$11, - "linx/loaders/product/suggestions.ts": $$$12, - "linx/loaders/proxy.ts": $$$13, - "linx/loaders/user.ts": $$$14, - "linx/loaders/widget.ts": $$$15, - "linx/loaders/wishlist/search.ts": $$$16, + "linx/loaders/cart.ts": $$$4, + "linx/loaders/page.ts": $$$5, + "linx/loaders/pages.ts": $$$6, + "linx/loaders/path.ts": $$$7, + "linx/loaders/product/associations.ts": $$$8, + "linx/loaders/product/byId.ts": $$$9, + "linx/loaders/product/detailsPage.ts": $$$10, + "linx/loaders/product/list.ts": $$$11, + "linx/loaders/product/listingPage.ts": $$$12, + "linx/loaders/product/suggestions.ts": $$$13, + "linx/loaders/proxy.ts": $$$14, + "linx/loaders/user.ts": $$$15, + "linx/loaders/widget.ts": $$$16, + "linx/loaders/wishlist/search.ts": $$$17, }, "handlers": { "linx/handlers/sitemap.ts": $$$$0, diff --git a/shopify/loaders/shop.ts b/shopify/loaders/shop.ts index 67d8e1017..1498e0c85 100644 --- a/shopify/loaders/shop.ts +++ b/shopify/loaders/shop.ts @@ -25,9 +25,9 @@ const loader = async ( const { metafields = [] } = props; const shop = await storefront.query<{ shop: Shop }, ShopMetafieldsArgs>({ - variables: { identifiers: metafields }, - ...GetShopInfo, - }).then((data) => data.shop); + variables: { identifiers: metafields }, + ...GetShopInfo, + }).then((data) => data.shop); return shop; }; diff --git a/shopify/utils/transform.ts b/shopify/utils/transform.ts index 090eb7e90..c7157f082 100644 --- a/shopify/utils/transform.ts +++ b/shopify/utils/transform.ts @@ -155,7 +155,7 @@ export const toProduct = ( "@type": "PropertyValue", "name": "productType", "value": productType, - } + }; const metafields = (product.metafields ?? []) .filter((metafield) => metafield && metafield.key && metafield.value) diff --git a/vtex/utils/openapi/vcs.openapi.json b/vtex/utils/openapi/vcs.openapi.json index c691e1a6e..e8a08bafa 100644 --- a/vtex/utils/openapi/vcs.openapi.json +++ b/vtex/utils/openapi/vcs.openapi.json @@ -1599,266 +1599,266 @@ } }, "patch": { - "tags": [ - "Documents" - ], - "summary": "Create partial document", - "description": "Creates a partial document, sending only some of the fields.\r\n\r\n> You can use this request to create documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", - "operationId": "Createorupdatepartialdocument", - "parameters": [ - { - "$ref": "#/components/parameters/Content-Type" - }, - { - "$ref": "#/components/parameters/Accept" - }, - { - "$ref": "#/components/parameters/acronym" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the document to be created.", - "example": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e" - }, - "{fieldName}": { - "type": "string", - "description": "Field(s) to be filled in and its respective value(s).", - "example": "{fieldValue}" - } - } - }, - "example": { - "id": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e", - "addressName": "4726026151251" - } + "tags": [ + "Documents" + ], + "summary": "Create partial document", + "description": "Creates a partial document, sending only some of the fields.\r\n\r\n> You can use this request to create documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "operationId": "Createorupdatepartialdocument", + "parameters": [ + { + "$ref": "#/components/parameters/Content-Type" + }, + { + "$ref": "#/components/parameters/Accept" + }, + { + "$ref": "#/components/parameters/acronym" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the document to be created.", + "example": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e" + }, + "{fieldName}": { + "type": "string", + "description": "Field(s) to be filled in and its respective value(s).", + "example": "{fieldValue}" } + } }, - "required": true - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IdHrefDocumentID" - }, - "example": { - "Id": "CL-be30ed0b-78ec-11ee-83ab-0eca8d1868e1", - "Href": "http://apiexamples.vtexcommercestable.com.br/api/dataentities/CL/documents/be30ed0b-78ec-11ee-83ab-0eca8d1868e1", - "DocumentId": "be30ed0b-78ec-11ee-83ab-0eca8d1868e1" - } - } - } + "example": { + "id": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e", + "addressName": "4726026151251" } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdHrefDocumentID" + }, + "example": { + "Id": "CL-be30ed0b-78ec-11ee-83ab-0eca8d1868e1", + "Href": "http://apiexamples.vtexcommercestable.com.br/api/dataentities/CL/documents/be30ed0b-78ec-11ee-83ab-0eca8d1868e1", + "DocumentId": "be30ed0b-78ec-11ee-83ab-0eca8d1868e1" + } + } + } } + } } }, "/api/dataentities/{acronym}/documents/{id}": { - "get": { - "tags": [ - "Documents" - ], - "summary": "Get document", - "description": "Retrieves a document.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", - "operationId": "Getdocument", - "parameters": [ - { - "$ref": "#/components/parameters/Content-Type" - }, - { - "$ref": "#/components/parameters/Accept" - }, - { - "$ref": "#/components/parameters/acronym" - }, - { - "$ref": "#/components/parameters/id" - }, - { - "$ref": "#/components/parameters/fields" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Document" - }, - "example": { - "id": "2f5dde81-1613-11ea-82ee-12f868feb457", - "accountId": "a8b27fb4-6516-4cc0-82b6-a5f2b011e6e2", - "accountName": "apiexamples", - "dataEntityId": "AS" - } - } - } + "get": { + "tags": [ + "Documents" + ], + "summary": "Get document", + "description": "Retrieves a document.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "operationId": "Getdocument", + "parameters": [ + { + "$ref": "#/components/parameters/Content-Type" + }, + { + "$ref": "#/components/parameters/Accept" + }, + { + "$ref": "#/components/parameters/acronym" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "description": "Error response body.", - "type": "object", - "properties": { - "Message": { - "description": "Error message.", - "type": "string" - } - } - }, - "example": { - "Message": "Cannot read private fields" - } - } - } + "example": { + "id": "2f5dde81-1613-11ea-82ee-12f868feb457", + "accountId": "a8b27fb4-6516-4cc0-82b6-a5f2b011e6e2", + "accountName": "apiexamples", + "dataEntityId": "AS" } + } } - }, - "put": { - "tags": [ - "Documents" - ], - "summary": "Create document with custom ID or update entire document", - "description": "Creates a new document with a custom ID, or updates an entire document if there is already a document with the informed ID.\r\n\r\n>ℹ️ You can use this request to create or update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update.\r\n\r\n## Custom field types\r\n\r\nThe table below presents the types of custom fields you can use when creating or updating documents in Master Data v1 and example values.\r\n\r\n| Field Type| Example value |\r\n| - | - |\r\n| Boolean | `true` |\r\n| Currency | `2.5` |\r\n| Date | `1992-11-17` |\r\n| Date_Time | `2016-09-14T19:21:01.3163733Z` |\r\n| Decimal | `2.5` |\r\n| Email | `meu@email.com` |\r\n| Integer | `1000000` |\r\n| Long | `1000000000` |\r\n| Percent | `85.42` |\r\n| Time | `23:50` |\r\n| URL | `https://www.vtex.com` |\r\n| Varchar10 | `Lorem ipsu` |\r\n| Varchar50 | `Lorem ipsum dolor sit amet, consectetur adipiscing` |\r\n| Varchar750 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Varchar100 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Relationship | `5eb31afb-7ab0-11e6-94b4-0a44686e393f` |\r\n| Text | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", - "operationId": "Updateentiredocument", - "parameters": [ - { - "$ref": "#/components/parameters/Content-Type" - }, - { - "$ref": "#/components/parameters/Accept" - }, - { - "$ref": "#/components/parameters/acronym" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Object with document fields and their respective values.", - "additionalProperties": true, - "properties": { - "{fieldName}": { - "type": "string", - "description": "Field name and value.", - "example": "{fieldValue}" - } - } - }, - "example": { - "Boolean": true, - "Currency": 2.5, - "Date": "1992-11-17", - "Date_Time": "2016-09-14T19:21:01.3163733Z", - "Decimal": 2.5, - "Email": "meu@email.com", - "Integer": 1000000, - "Long": 1000000000, - "Percent": 85.42, - "Time": "23:50", - "URL": "http://www.vtex.com", - "Varchar10": "Lorem ipsu", - "Varchar50": "Lorem ipsum dolor sit amet, consectetur adipiscing", - "Varchar750": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...", - "Varchar100": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...", - "Relationship": "5eb31afb-7ab0-11e6-94b4-0a44686e393f", - "Text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit..." - } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "description": "Error response body.", + "type": "object", + "properties": { + "Message": { + "description": "Error message.", + "type": "string" } + } }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" + "example": { + "Message": "Cannot read private fields" } + } } - }, - "patch": { - "tags": [ - "Documents" - ], - "summary": "Update partial document", - "description": "Updates a subset of fields of a document, without impacting the other fields.\r\n\r\n>ℹ️ You can use this request to update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", - "operationId": "Updatepartialdocument", - "parameters": [ - { - "$ref": "#/components/parameters/Content-Type" - }, - { - "$ref": "#/components/parameters/Accept" - }, - { - "$ref": "#/components/parameters/acronym" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Object with the fields to be updated and their respective values." - }, - "example": { - "addressName": "4726026151253" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "No Content" + } + } + }, + "put": { + "tags": [ + "Documents" + ], + "summary": "Create document with custom ID or update entire document", + "description": "Creates a new document with a custom ID, or updates an entire document if there is already a document with the informed ID.\r\n\r\n>ℹ️ You can use this request to create or update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update.\r\n\r\n## Custom field types\r\n\r\nThe table below presents the types of custom fields you can use when creating or updating documents in Master Data v1 and example values.\r\n\r\n| Field Type| Example value |\r\n| - | - |\r\n| Boolean | `true` |\r\n| Currency | `2.5` |\r\n| Date | `1992-11-17` |\r\n| Date_Time | `2016-09-14T19:21:01.3163733Z` |\r\n| Decimal | `2.5` |\r\n| Email | `meu@email.com` |\r\n| Integer | `1000000` |\r\n| Long | `1000000000` |\r\n| Percent | `85.42` |\r\n| Time | `23:50` |\r\n| URL | `https://www.vtex.com` |\r\n| Varchar10 | `Lorem ipsu` |\r\n| Varchar50 | `Lorem ipsum dolor sit amet, consectetur adipiscing` |\r\n| Varchar750 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Varchar100 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Relationship | `5eb31afb-7ab0-11e6-94b4-0a44686e393f` |\r\n| Text | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "operationId": "Updateentiredocument", + "parameters": [ + { + "$ref": "#/components/parameters/Content-Type" + }, + { + "$ref": "#/components/parameters/Accept" + }, + { + "$ref": "#/components/parameters/acronym" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Object with document fields and their respective values.", + "additionalProperties": true, + "properties": { + "{fieldName}": { + "type": "string", + "description": "Field name and value.", + "example": "{fieldValue}" + } } + }, + "example": { + "Boolean": true, + "Currency": 2.5, + "Date": "1992-11-17", + "Date_Time": "2016-09-14T19:21:01.3163733Z", + "Decimal": 2.5, + "Email": "meu@email.com", + "Integer": 1000000, + "Long": 1000000000, + "Percent": 85.42, + "Time": "23:50", + "URL": "http://www.vtex.com", + "Varchar10": "Lorem ipsu", + "Varchar50": "Lorem ipsum dolor sit amet, consectetur adipiscing", + "Varchar750": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...", + "Varchar100": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...", + "Relationship": "5eb31afb-7ab0-11e6-94b4-0a44686e393f", + "Text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit..." + } } + }, + "required": true }, - "delete": { - "tags": [ - "Documents" - ], - "summary": "Delete document", - "description": "Deletes a document. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", - "operationId": "Deletedocument", - "parameters": [ - { - "$ref": "#/components/parameters/Content-Type" - }, - { - "$ref": "#/components/parameters/Accept" - }, - { - "$ref": "#/components/parameters/acronym" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "204": { - "description": "No Content" - } + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "tags": [ + "Documents" + ], + "summary": "Update partial document", + "description": "Updates a subset of fields of a document, without impacting the other fields.\r\n\r\n>ℹ️ You can use this request to update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "operationId": "Updatepartialdocument", + "parameters": [ + { + "$ref": "#/components/parameters/Content-Type" + }, + { + "$ref": "#/components/parameters/Accept" + }, + { + "$ref": "#/components/parameters/acronym" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Object with the fields to be updated and their respective values." + }, + "example": { + "addressName": "4726026151253" + } } + }, + "required": true + }, + "responses": { + "204": { + "description": "No Content" + } } + }, + "delete": { + "tags": [ + "Documents" + ], + "summary": "Delete document", + "description": "Deletes a document. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "operationId": "Deletedocument", + "parameters": [ + { + "$ref": "#/components/parameters/Content-Type" + }, + { + "$ref": "#/components/parameters/Accept" + }, + { + "$ref": "#/components/parameters/acronym" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } }, "/api/catalog/pvt/product/{productId}": { "get": { @@ -39049,83 +39049,83 @@ }, "components": { "parameters": { - "Content-Type": { - "name": "Content-Type", - "in": "header", - "description": "Type of the content being sent.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/json" - } - }, - "Content-Type-img": { - "name": "Content-Type", - "in": "header", - "description": "Type of the content being sent. If you are uploading an image, use `image/jpg` or `image/png`. When using JavaScript, use `multipart/form-data`.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "example": "image/jpg" - } - }, - "Accept": { - "name": "Accept", - "in": "header", - "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "default": "application/vnd.vtex.ds.v10+json" - } - }, - "acronym": { - "name": "acronym", - "in": "path", - "description": "Two-letter string that identifies the data entity.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "example": "SP" - } - }, - "id": { - "name": "id", - "in": "path", - "description": "Unique identifier of the document.", - "required": true, - "style": "simple", - "schema": { - "type": "string", - "example": "SP-b818cbda-e489-11e6-94f4-0ac138d2d42e" - } - }, - "fields": { - "name": "_fields", - "in": "query", - "description": "Names of the fields that will be returned per document, separated by a comma `,`. It is possible to fetch all fields using `_all` as the value of this query parameter. However, in order to avoid permission errors, we strongly recommend informing only the names of the exact fields that will be used.", - "required": false, - "style": "form", - "schema": { - "type": "string", - "example": "email,firstName,document" - } - }, - "_schema": { - "name": "_schema", - "in": "query", - "description": "Name of the [schema](https://developers.vtex.com/docs/guides/master-data-schema-lifecycle) that the document complies with. This field is required when using `_where` or `_fields` query parameters.", - "required": false, - "style": "form", - "schema": { - "type": "string", - "example": "schema" - } + "Content-Type": { + "name": "Content-Type", + "in": "header", + "description": "Type of the content being sent.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "default": "application/json" + } + }, + "Content-Type-img": { + "name": "Content-Type", + "in": "header", + "description": "Type of the content being sent. If you are uploading an image, use `image/jpg` or `image/png`. When using JavaScript, use `multipart/form-data`.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "image/jpg" + } + }, + "Accept": { + "name": "Accept", + "in": "header", + "description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "default": "application/vnd.vtex.ds.v10+json" } + }, + "acronym": { + "name": "acronym", + "in": "path", + "description": "Two-letter string that identifies the data entity.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "SP" + } + }, + "id": { + "name": "id", + "in": "path", + "description": "Unique identifier of the document.", + "required": true, + "style": "simple", + "schema": { + "type": "string", + "example": "SP-b818cbda-e489-11e6-94f4-0ac138d2d42e" + } + }, + "fields": { + "name": "_fields", + "in": "query", + "description": "Names of the fields that will be returned per document, separated by a comma `,`. It is possible to fetch all fields using `_all` as the value of this query parameter. However, in order to avoid permission errors, we strongly recommend informing only the names of the exact fields that will be used.", + "required": false, + "style": "form", + "schema": { + "type": "string", + "example": "email,firstName,document" + } + }, + "_schema": { + "name": "_schema", + "in": "query", + "description": "Name of the [schema](https://developers.vtex.com/docs/guides/master-data-schema-lifecycle) that the document complies with. This field is required when using `_where` or `_fields` query parameters.", + "required": false, + "style": "form", + "schema": { + "type": "string", + "example": "schema" + } + } }, "schemas": { "PickupPoint": { @@ -40687,55 +40687,55 @@ } }, "IdHrefDocumentID": { - "type": "object", - "description": "Document information.", - "properties": { - "Id": { - "type": "string", - "description": "ID of the document that was created, with data entity prefix." - }, - "Href": { - "type": "string", - "description": "Document reference URL." - }, - "DocumentId": { - "type": "string", - "description": "Unique identifier of the document." - } + "type": "object", + "description": "Document information.", + "properties": { + "Id": { + "type": "string", + "description": "ID of the document that was created, with data entity prefix." + }, + "Href": { + "type": "string", + "description": "Document reference URL." + }, + "DocumentId": { + "type": "string", + "description": "Unique identifier of the document." } + } }, "Document": { - "title": "Document", - "required": [ - "id", - "dataEntityId", - "accountId", - "accountName" - ], - "type": "object", - "description": "Object representing each document.", - "properties": { - "{customProperty}": { - "type": "string", - "description": "Custom property." - }, - "id": { - "type": "string", - "description": "Unique identifier of the document." - }, - "accountId": { - "type": "string", - "description": "Unique identifier of the account." - }, - "accountName": { - "type": "string", - "description": "Account name." - }, - "dataEntityId": { - "type": "string", - "description": "Two-letter string that identifies the data entity." - } + "title": "Document", + "required": [ + "id", + "dataEntityId", + "accountId", + "accountName" + ], + "type": "object", + "description": "Object representing each document.", + "properties": { + "{customProperty}": { + "type": "string", + "description": "Custom property." + }, + "id": { + "type": "string", + "description": "Unique identifier of the document." + }, + "accountId": { + "type": "string", + "description": "Unique identifier of the account." + }, + "accountName": { + "type": "string", + "description": "Account name." + }, + "dataEntityId": { + "type": "string", + "description": "Two-letter string that identifies the data entity." } + } }, "SkuSeller": { "required": [