diff --git a/node/clients/mail.ts b/node/clients/mail.ts index 6c6b3f98f..8aee9ad4c 100644 --- a/node/clients/mail.ts +++ b/node/clients/mail.ts @@ -1,7 +1,11 @@ import type { InstanceOptions, IOContext } from '@vtex/api' import { JanusClient } from '@vtex/api' -import type { MailData, Template } from '../typings/mailClient' +import type { + StatusUpdateMailData, + ConfirmationMailData, + Template, +} from '../typings/mailClient' const MAIL_SERVICE_PATH = '/api/mail-service/pvt/sendmail' const TEMPLATE_RENDER_PATH = '/api/template-render/pvt/templates' @@ -16,7 +20,9 @@ export class MailClient extends JanusClient { }) } - public sendMail(mailData: MailData): Promise { + public sendMail( + mailData: StatusUpdateMailData | ConfirmationMailData + ): Promise { return this.http.post(MAIL_SERVICE_PATH, mailData, { metric: 'mail-post-send', }) diff --git a/node/package.json b/node/package.json index e56e61f65..d8e9f3fe1 100644 --- a/node/package.json +++ b/node/package.json @@ -20,11 +20,12 @@ "tslint": "^6.1.3", "tslint-config-vtex": "^2.1.0", "vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles", + "vtex.easypost": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost", "vtex.format-currency": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency", "vtex.my-account": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.25.0/public/@types/vtex.my-account", "vtex.my-account-commons": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.6.0/public/@types/vtex.my-account-commons", "vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime", - "vtex.return-app": "https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app", + "vtex.return-app": "https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app", "vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.152.2/public/@types/vtex.store-graphql", "vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide", "vtex.tenant-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.tenant-graphql@0.1.2/public/@types/vtex.tenant-graphql" diff --git a/node/yarn.lock b/node/yarn.lock index 522832bd9..a82de2885 100644 --- a/node/yarn.lock +++ b/node/yarn.lock @@ -6147,6 +6147,10 @@ verror@1.10.0: version "0.4.4" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles#8c45c6decf9acd2b944e07261686decff93d6422" +"vtex.easypost@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost": + version "0.1.1" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost#078a135b63bb4fc5e39e6ad789d0caf9ea368f35" + "vtex.format-currency@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency": version "0.4.1" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency#aaed82b498270f0bb6f37e93eff7e7f401e4d283" @@ -6163,9 +6167,9 @@ verror@1.10.0: version "8.132.4" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime#66bb41bd4d342e37c9d85172aad5f7eefebfb6dc" -"vtex.return-app@https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app": - version "3.0.0-beta.9" - resolved "https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app#f2851456ef58a2e3165b2fe3ff9bdfc2a2816f99" +"vtex.return-app@https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app": + version "3.0.0-beta.10" + resolved "https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app#4c77d0131bd0d51852fbe32de1b1abde4f58ab5c" "vtex.store-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.152.2/public/@types/vtex.store-graphql": version "2.152.2" diff --git a/react/package.json b/react/package.json index 06095a925..55ac1074f 100644 --- a/react/package.json +++ b/react/package.json @@ -27,11 +27,12 @@ "@vtex/tsconfig": "^0.6.0", "prop-types": "^15.7.2", "vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles", + "vtex.easypost": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost", "vtex.format-currency": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency", "vtex.my-account": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account@1.25.0/public/@types/vtex.my-account", "vtex.my-account-commons": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.my-account-commons@1.6.0/public/@types/vtex.my-account-commons", "vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime", - "vtex.return-app": "https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app", + "vtex.return-app": "https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app", "vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.152.2/public/@types/vtex.store-graphql", "vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide", "vtex.tenant-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.tenant-graphql@0.1.2/public/@types/vtex.tenant-graphql" diff --git a/react/store/createReturnRequest/components/OrderList.tsx b/react/store/createReturnRequest/components/OrderList.tsx index 3e8b55ebf..2139f3739 100644 --- a/react/store/createReturnRequest/components/OrderList.tsx +++ b/react/store/createReturnRequest/components/OrderList.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React, { useMemo, useState } from 'react' import type { OrdersToReturnList, OrderToReturnSummary } from 'vtex.return-app' import { FormattedMessage, FormattedDate } from 'react-intl' import { useRuntime } from 'vtex.render-runtime/' @@ -90,6 +90,11 @@ export const OrderList = ({ orders, handlePagination }: Props) => { 'IDLE' ) + const orderlListTableSchema = useMemo( + () => OrderlListTableSchema({ navigate }), + [navigate] + ) + const { paging } = orders const currentPage = paging?.currentPage ?? 1 const perPage = paging?.perPage ?? 0 @@ -118,9 +123,7 @@ export const OrderList = ({ orders, handlePagination }: Props) => { emptyStateLabel={ } - schema={OrderlListTableSchema({ - navigate, - })} + schema={orderlListTableSchema} items={orders.list} loading={fetchMoreState === 'LOADING'} pagination={{ diff --git a/react/yarn.lock b/react/yarn.lock index 202577de8..d637a6931 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -5182,6 +5182,10 @@ verror@1.10.0: version "0.4.4" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles#8c45c6decf9acd2b944e07261686decff93d6422" +"vtex.easypost@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost": + version "0.1.1" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.easypost@0.1.1/public/@types/vtex.easypost#078a135b63bb4fc5e39e6ad789d0caf9ea368f35" + "vtex.format-currency@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency": version "0.4.1" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.4.1/public/@types/vtex.format-currency#aaed82b498270f0bb6f37e93eff7e7f401e4d283" @@ -5198,9 +5202,9 @@ verror@1.10.0: version "8.132.4" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime#66bb41bd4d342e37c9d85172aad5f7eefebfb6dc" -"vtex.return-app@https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app": - version "3.0.0-beta.9" - resolved "https://rmav3requestlistendpoint--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.9+build1657923944/public/@types/vtex.return-app#f2851456ef58a2e3165b2fe3ff9bdfc2a2816f99" +"vtex.return-app@https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app": + version "3.0.0-beta.10" + resolved "https://performance--powerplanet.myvtex.com/_v/private/typings/linked/v1/vtex.return-app@3.0.0-beta.10+build1658662160/public/@types/vtex.return-app#4c77d0131bd0d51852fbe32de1b1abde4f58ab5c" "vtex.store-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.152.2/public/@types/vtex.store-graphql": version "2.152.2"