Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoints public changes #221

Open
wants to merge 93 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
0cece63
changes for setup in obidev
Kin3Xc Feb 27, 2023
d852daf
preparing app for using vtex vendor
Kin3Xc Feb 27, 2023
6a82d4e
added field 'sellerName' on MasterData
Kin3Xc Feb 27, 2023
9866e7f
added support for create, update and get return request with field se…
Kin3Xc Mar 1, 2023
4095e09
feat: preparing services for app settings
Kin3Xc Mar 2, 2023
885964c
feat: added seller name to return request payload
Kin3Xc Mar 3, 2023
0b272fc
feat: add support for get and update setting of seller
Kin3Xc Mar 7, 2023
0e0c74f
fix: seller setting response
Kin3Xc Mar 7, 2023
a162e8c
feat: added support for update status from seller
Kin3Xc Mar 7, 2023
8d000ff
fix: validation update config to seller
Kin3Xc Mar 7, 2023
a9bfda6
fix: return message error
Kin3Xc Mar 7, 2023
c49c673
feat: preparing seller validation
Kin3Xc Mar 7, 2023
9b90bb6
feat: added middleware for seller validation
Kin3Xc Mar 8, 2023
f7cfeb6
feature add seller settings
Mar 14, 2023
a6f9afa
feat: added support for list and update config to sellers
Kin3Xc Mar 14, 2023
cef21d9
Merge pull request #1 from ITGlobers/settings-develop
Kin3Xc Mar 14, 2023
abd6bec
fix: seller validation
Kin3Xc Mar 16, 2023
7ad1a0b
Fix : validation service and create return by post
Mar 17, 2023
4f44bdf
Merge pull request #2 from ITGlobers/develop
Nmanrique Mar 22, 2023
5494002
Release v3.5.7-beta.0
Kin3Xc Mar 22, 2023
b928fb4
Feature/new return in admin (#3)
johnmartinez93 Mar 27, 2023
39906ae
Fix- save return seller
Mar 27, 2023
77786bd
Merge branch 'develop' of https://github.com/ITGlobers/return-app int…
Mar 27, 2023
093db01
removed console logs
Kin3Xc Mar 27, 2023
36f2f2b
fix: query to get pick ponint address
Kin3Xc Mar 27, 2023
e4d3f78
fix: id translations
Kin3Xc Mar 27, 2023
1b31440
Fix - API post orders to list and save new request
Mar 28, 2023
05fc438
Merge branch 'develop' of https://github.com/ITGlobers/return-app int…
Mar 28, 2023
3d8d9cf
Feature API post create giftcard
Mar 30, 2023
8511bd3
feat(ListTableFilter.tsx): add UsersAutocomplete component to filter …
johnmartinez93 Apr 4, 2023
fccfbad
Feature StatusOption
Mar 31, 2023
1105547
Feature - setting status option
Apr 5, 2023
4edcd9f
Develop merge (#6)
Nmanrique Apr 12, 2023
2116b7b
Fix types to news features
Apr 12, 2023
13e76d7
Merge relative paths changes (#7)
Kin3Xc Apr 18, 2023
653e60c
added support for admin v4
Kin3Xc Apr 18, 2023
c97f70c
removed innnecessary dependecies
Kin3Xc Apr 19, 2023
482947f
fix filters (#8)
Kin3Xc Apr 20, 2023
4a76c8c
fix filter status option field for orders
Kin3Xc Apr 25, 2023
64b6604
🔧 chore(en.json): add export button to return-request-list table filt…
johnmartinez93 Apr 25, 2023
543dfc1
fix messages
Kin3Xc Apr 25, 2023
4786ac9
fix types
Kin3Xc Apr 25, 2023
2a324ba
changes for publish `itglobers`
Kin3Xc Apr 25, 2023
009ff00
removed menu item `Sellers Returns Settings`
Kin3Xc Apr 25, 2023
7ae5b91
fix queries
Kin3Xc Apr 25, 2023
ee57fde
fix `QA-007` (#9)
Kin3Xc Apr 26, 2023
18f63c7
fix: termsAndConditions button updated
Susanlotuss Apr 26, 2023
7c0fee7
fix: return request filters update
Susanlotuss Apr 26, 2023
3c1c381
Merge branch 'feature/termsAndcondButton' into itglobers
johnmartinez93 Apr 26, 2023
e952f49
changed version
Kin3Xc Apr 26, 2023
c20edea
fix filter by seller id
Kin3Xc Apr 27, 2023
4a8cfa5
changed version
Kin3Xc May 4, 2023
a49f5cc
Feature/partial invoice (#10)
Kin3Xc May 16, 2023
ba64c0d
Fix enableHighlightFormMessage issue (#11)
Kin3Xc May 16, 2023
d01448c
fix messages data
Kin3Xc May 16, 2023
b46e7e6
added support for `issuanceDate`
Kin3Xc May 17, 2023
7c31d3d
added changes for seller validation
Kin3Xc May 17, 2023
356caec
fix: create a new request using API
Kin3Xc May 25, 2023
62d1ef5
fix save return request using API
Kin3Xc May 30, 2023
04c2152
added new field master data called `sellerOrderId`
Kin3Xc Jun 5, 2023
b4b819f
fix get orders by user
Kin3Xc Jun 9, 2023
0366ce6
renamed columns name to export .csv
Kin3Xc Jun 22, 2023
34a4b48
fix shippingdata.state null validation
Kin3Xc Jun 26, 2023
820809d
change label cancelled to canceled
Kin3Xc Jul 5, 2023
5277745
fix removed validation for field state
Kin3Xc Jul 5, 2023
1eb4590
fixed: canceled variable
johnmartinez93 Jul 20, 2023
0640a89
fix(exportRequests.ts): replace Papa library with XLSX library for ge…
johnmartinez93 Jul 23, 2023
e4c7a35
fix(exportRequests.ts): add support for _onlyData query parameter to …
johnmartinez93 Jul 24, 2023
accab79
fix(index.ts): add PUT method to the settings endpoint to allow updat…
johnmartinez93 Aug 2, 2023
89e7b5e
chore(manifest.json): update version to 3.15.2-hkignore for the retur…
johnmartinez93 Aug 28, 2023
b18977b
feature goodwill
johnmartinez93 Sep 11, 2023
ac1408e
add keep a live
johnmartinez93 Sep 12, 2023
33fbbfc
chore(manifest.json): update version to 3.16.1-hkignore for return-app
johnmartinez93 Oct 6, 2023
555ce6e
Fix validation of 'There's already a request or goodwill for this ord…
Sep 20, 2023
d42d92d
remove old implementation for goodwill and add new schema on masterda…
johnmartinez93 Oct 5, 2023
4d90245
Add remaining refundable amount service
johnmartinez93 Oct 11, 2023
d86f3d2
add goodwill services and improve remaining refuend
johnmartinez93 Nov 7, 2023
1e90439
Merge branch 'feat/remaining-refundable' of https://github.com/ITGlob…
Nmanrique Nov 8, 2023
61a6d3f
remove client payment
johnmartinez93 Nov 8, 2023
04e16cf
Merge branch 'feat/remaining-refundable' of https://github.com/ITGlob…
Nmanrique Nov 9, 2023
58ba17a
Adeed refundableAmount field to the Request List Service
Nov 21, 2023
5cfc752
Merge branch 'feat/remaining-refundable' of https://github.com/ITGlob…
Nmanrique Nov 21, 2023
4fc6ecf
Feat validate schema
Nmanrique Nov 22, 2023
260eb3e
Merge pull request #12 from ITGlobers/feat/schema
johnmartinez93 Nov 24, 2023
cea893e
Feat/Add service and middleware invoice
Nmanrique Nov 28, 2023
c69617c
Feat new autorization method
Nmanrique Dec 4, 2023
d53585a
Fix: last changes to push
Nmanrique Dec 4, 2023
a3397d8
Add last changes tested
Nmanrique Dec 6, 2023
b63b3a3
Merge pull request #13 from ITGlobers/feat/api-invoice
johnmartinez93 Dec 7, 2023
b45768f
Merge branch 'feat/Autorization' into feat/remaining-refundable
johnmartinez93 Dec 7, 2023
810da36
Merge branch 'feat/remaining-refundable' into obi/develop
johnmartinez93 Dec 7, 2023
2604207
The url of the public endpoints have been changed.
alanortiz-dev Dec 18, 2023
ef04329
Added service.json file
alanortiz-dev Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
49 changes: 34 additions & 15 deletions admin/navigation.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
{
"section": "orders",
"titleId": "admin/return-app.navigation.label",
"path": "/admin/returns/requests",
"subSectionItems": [
{
"labelId": "navigation.labelRequests",
"path": "/admin/returns/requests"
},
{
"labelId": "admin/return-app.settings.navigation.label",
"path": "/admin/returns/settings"
}
]
}
[
{
"section": "orders",
"titleId": "admin/return-app.navigation.label",
"path": "/admin/returns/requests",
"subSectionItems": [
{
"labelId": "navigation.labelRequests",
"path": "/admin/returns/requests"
},
{
"labelId": "admin/return-app.settings.navigation.label",
"path": "/admin/returns/settings"
}
]
},
{
"section": "orders",
"subSection": "Return",
"adminVersion": 4,
"titleId": "admin/return-app.navigation.label",
"path": "/admin/returns/requests",
"subSectionItems": [
{
"labelId": "navigation.labelRequests",
"path": "/admin/returns/requests"
},
{
"labelId": "admin/return-app.settings.navigation.label",
"path": "/admin/returns/settings"
}
]
}
]
16 changes: 16 additions & 0 deletions admin/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@
"component": "AdminReturnList",
"path": "/admin/app/returns/requests/"
},
"admin.app.return-settings-list": {
"component": "AdminSettingReturnList",
"path": "/admin/app/returns/sellers/settings/"
},
"admin.app.return-setting-details": {
"component": "AdminSettingDetail",
"path": "/admin/app/returns/sellers/settings/:id/details/"
},
"admin.app.return-settings": {
"component": "AdminReturnSettings",
"path": "/admin/app/returns/settings/"
},
"admin.app.return-add": {
"component": "AdminReturnAdd",
"path": "/admin/app/returns/orders/add/:orderId/"
},
"admin.app.order-list": {
"component": "AdminReturnOrderList",
"path": "/admin/app/returns/orders/"
},
"admin.app.return-details": {
"component": "AdminReturnDetails",
"path": "/admin/app/returns/:id/details/"
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ with the following example body:

|Field|Description|isRequired|
|----|----|----|
|status|`enum` possible values: new, processing, pickedUpFromClient,pendingVerification, packageVerified, amountRefunded, denied, cancelled |true|
|status|`enum` possible values: new, processing, pickedUpFromClient,pendingVerification, packageVerified, amountRefunded, denied, canceled |true|
|comment| `object` only required if not updating status | false|
|comment value|`string` only required if not updating status|true|
|comment visibleForCustomer|`boolean` the comment will be shown to the customer. Default false|false|
Expand Down
17 changes: 17 additions & 0 deletions graphql/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
type Query {
returnAppSettings: ReturnAppSettings @cacheControl(maxAge: ZERO)
returnSellerSettings(sellerId: String!): SellerSetting
@withUserProfile
@cacheControl(maxAge: ZERO)
categoryTreeName: [CategoryInfo]! @cacheControl(maxAge: MEDIUM)
"""
storeUserEmail: If not passed, resolver will try to parse it from session cookie.
"""
ordersAvailableToReturn(
page: Int!
storeUserEmail: String
isAdmin: Boolean
filter: OrdersFilters
): OrdersToReturnList
@withUserProfile
@cacheControl(scope: PRIVATE, maxAge: SHORT)
Expand All @@ -30,14 +35,26 @@ type Query {
@withUserProfile
@cacheControl(scope: PRIVATE, maxAge: SHORT)
nearestPickupPoints(lat: String!, long: String!): NearPickupPointQueryResponse
sellerSetting(sellerId: String!): SellerSetting
sellerSettingList: SellerSettingResponseList @cacheControl(maxAge: ZERO)
returnSettingsList(
filter: ReturnSettingsFilters
page: Int!
perPage: Int
): ReturnSettingsList
@withUserProfile
@cacheControl(scope: PRIVATE, maxAge: SHORT)
}

type Mutation {
createReturnRequest(returnRequest: ReturnRequestInput!): returnRequestCreated
@withUserProfile
saveReturnAppSettings(settings: ReturnAppSettingsInput!): Boolean
saveSellerSetting(settings: SellerSettingInput!): Boolean
updateSellerSetting(id: ID!, settings: SellerSettingInput!): Boolean
updateReturnRequestStatus(
requestId: ID!
sellerName: String
status: Status!
comment: ReturnRequestCommentInput
refundData: RefundDataInput
Expand Down
15 changes: 14 additions & 1 deletion graphql/types/OrderToReturn.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type OrdersToReturnList {

type OrderToReturnSummary {
orderId: String!
sellerName: String!
creationDate: String!
"""
Items invoiced / sent to costumer with items details.
Expand All @@ -23,6 +24,7 @@ type OrderToReturnSummary {
clientProfileData: ClientProfileData!
shippingData: ShippingData!
paymentData: PaymentData!
availableAmountsToRefund: AvailableAmountsToRefund
}

type Pagination {
Expand Down Expand Up @@ -79,7 +81,7 @@ type ShippingData {
addressId: String!
address: String!
city: String!
state: String!
state: String
country: String!
zipCode: String!
addressType: AddressType!
Expand All @@ -89,3 +91,14 @@ type ShippingData {
type PaymentData {
canRefundCard: Boolean!
}

input CreatedInInput {
from: String!
to: String!
}

input OrdersFilters {
createdIn: CreatedInInput
orderId: String
sellerName: String
}
2 changes: 1 addition & 1 deletion graphql/types/PickupPoints.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CheckoutAddress {
isDisposable: Boolean!
postalCode: String!
city: String!
state: String!
state: String
country: String!
street: String!
number: String!
Expand Down
8 changes: 8 additions & 0 deletions graphql/types/ReturnAppSettings.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ type ReturnAppSettings {
termsUrl: String!
customReturnReasons: [CustomReturnReason!]
options: ReturnOption
orderStatus: String
sellerId: String
}

type PaymentOptions {
Expand Down Expand Up @@ -35,6 +37,8 @@ type ReturnOption {
enablePickupPoints: Boolean
enableProportionalShippingValue: Boolean
enableSelectItemCondition: Boolean
enableHighlightFormMessage: Boolean
enableGoodwill: Boolean
}

input ReturnAppSettingsInput {
Expand All @@ -44,6 +48,8 @@ input ReturnAppSettingsInput {
termsUrl: String!
customReturnReasons: [CustomReturnReasonInput!]
options: ReturnOptionInput
orderStatus: String
sellerId: String
}

input PaymentOptionsInput {
Expand Down Expand Up @@ -74,4 +80,6 @@ input ReturnOptionInput {
enablePickupPoints: Boolean
enableProportionalShippingValue: Boolean
enableSelectItemCondition: Boolean
enableHighlightFormMessage: Boolean
enableGoodwill: Boolean
}
21 changes: 18 additions & 3 deletions graphql/types/ReturnRequest.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
input ReturnRequestInput {
orderId: String!
sellerName: String
items: [ReturnRequestItemInput!]!
customerProfileData: CustomerProfileDataInput!
pickupReturnData: PickupReturnDataInput!
Expand Down Expand Up @@ -41,7 +42,7 @@ input PickupReturnDataInput {
addressId: String!
address: String!
city: String!
state: String!
state: String
country: String!
zipCode: String!
addressType: AddressType!
Expand All @@ -65,8 +66,20 @@ enum RefundPaymentMethod {
sameAsPurchase
}

type AvailableAmountsToRefund {
initialInvoicedAmount: Int
amountToBeRefundedInProcess: Int
totalRefunded: Int
remainingRefundableAmount: Int
initialShippingCost: Int
shippingCostToBeRefundedInProcess: Int
totalShippingCostRefunded: Int
remainingRefundableShippingCost: Int
}

type ReturnRequestResponse {
id: ID!
sellerName: String
orderId: String!
refundableAmount: Int!
sequenceNumber: String!
Expand All @@ -82,6 +95,7 @@ type ReturnRequestResponse {
refundData: RefundData
refundStatusData: [RefundStatusData!]!
cultureInfoData: CultureInfoData!
availableAmountsToRefund: AvailableAmountsToRefund
}

enum Status {
Expand All @@ -92,7 +106,7 @@ enum Status {
packageVerified
amountRefunded
denied
cancelled
canceled
}

type CustomerProfileData {
Expand All @@ -106,7 +120,7 @@ type PickupReturnData {
addressId: String!
address: String!
city: String!
state: String!
state: String
country: String!
zipCode: String!
addressType: AddressType!
Expand Down Expand Up @@ -186,6 +200,7 @@ input ReturnRequestFilters {
status: Status
sequenceNumber: String
id: String
sellerName: String
"""
createdIn: It uses the field dateSubmitted in the return request schema to search for documents.
The field createdIn is auto generated when the document is created, not reflecting the real value for documents migrated from older versions.
Expand Down
23 changes: 23 additions & 0 deletions graphql/types/ReturnSettings.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
input ReturnSettingsFilters {
id: String
sellerName: String

}

type ReturnSettingsList {
list: [ReturnSettingsResponse!]!
paging: Pagination!
}


type ReturnSettingsResponse {
id: ID!
sellerId: String
maxDays: Int!
excludedCategories: [String!]!
paymentOptions: PaymentOptions!
termsUrl: String!
customReturnReasons: [CustomReturnReason!]
options: ReturnOption
orderStatus: String
}
29 changes: 29 additions & 0 deletions graphql/types/SellerSetting.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
type SellerSetting {
id: String
sellerId: String!
parentAccount: String
maxDays: Int!
excludedCategories: [String!]!
paymentOptions: PaymentOptions!
termsUrl: String!
customReturnReasons: [CustomReturnReason!]
options: ReturnOption
orderStatus: String
}

type SellerSettingResponseList {
sellers: [SellerSetting]
}

input SellerSettingInput {
id: String
sellerId: String!
parentAccount: String
maxDays: Int!
excludedCategories: [String!]!
paymentOptions: PaymentOptionsInput!
termsUrl: String!
customReturnReasons: [CustomReturnReasonInput!]
options: ReturnOptionInput
orderStatus: String
}
8 changes: 6 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"vendor": "vtex",
"name": "return-app",
"version": "3.5.6",
"version": "3.16.1-hkignore",
"title": "Return app",
"description": "Return app",
"dependencies": {
Expand All @@ -13,7 +13,8 @@
"vtex.css-handles": "0.x",
"vtex.easypost": "0.x",
"vtex.tenant-graphql": "0.x",
"vtex.catalog-graphql": "1.x"
"vtex.catalog-graphql": "1.x",
"vtex.sellers-graphql": "8.x"
},
"builders": {
"admin": "0.x",
Expand All @@ -37,6 +38,9 @@
"path": "/api/*"
}
},
{
"name": "colossus-fire-event"
},
{
"name": "outbound-access",
"attrs": {
Expand Down
Loading