Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix: missed some parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
justinemmanuelmercado authored and moltar committed Jun 28, 2020
1 parent 70ab096 commit 9869be1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
4 changes: 3 additions & 1 deletion src/sections/fulfillment-inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ const canonicalizeParameters = (parameters: ListInventorySupplyRequestParameters
}
}

export type ResponseGroup = 'Basic' | 'Detailed'

export type ListInventorySupplyRequestParameters = RequireOnlyOne<
{
SellerSku?: string[]
QueryStartDateTime?: Date
ResponseGroup?: 'Basic' | 'Detailed'
ResponseGroup?: ResponseGroup
MarketplaceId?: string
},
'MarketplaceId' | 'QueryStartDateTime'
Expand Down
31 changes: 19 additions & 12 deletions src/sections/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { RequireOnlyOne } from './types'

const ORDERS_API_VERSION = '2013-09-01'

export enum OrderStatus {
export enum OrderStatusEnum {
PendingAvailability = 'PendingAvailability',
Pending = 'Pending',
Unshipped = 'Unshipped',
Expand All @@ -33,12 +33,12 @@ export enum OrderStatus {
Unfulfillable = 'Unfulfillable',
}

export enum FulfillmentChannel {
export enum FulfillmentChannelEnum {
AFN = 'AFN',
MFN = 'MFN',
}

export enum PaymentMethod {
export enum PaymentMethodEnum {
COD = 'COD',
CVS = 'CVS',
Other = 'Other',
Expand All @@ -49,7 +49,7 @@ export enum AddressType {
Residential = 'Residential',
}

export enum EasyShipShipmentStatus {
export enum EasyShipShipmentStatusEnum {
PendingPickUp = 'PendingPickUp',
LabelCanceled = 'LabelCanceled',
PickedUp = 'PickedUp',
Expand Down Expand Up @@ -89,9 +89,11 @@ export enum ConditionSubtype {
Other = 'Other',
}

const orderStatus: Codec<OrderStatus> = oneOf(Object.values(OrderStatus).map((x) => exactly(x)))
const fulfillmentChannel: Codec<FulfillmentChannel> = oneOf(
Object.values(FulfillmentChannel).map((x) => exactly(x)),
const orderStatus: Codec<OrderStatusEnum> = oneOf(
Object.values(OrderStatusEnum).map((x) => exactly(x)),
)
const fulfillmentChannel: Codec<FulfillmentChannelEnum> = oneOf(
Object.values(FulfillmentChannelEnum).map((x) => exactly(x)),
)
const adddressType: Codec<AddressType> = oneOf(Object.values(AddressType).map((x) => exactly(x)))
const condition: Codec<Condition> = oneOf(Object.values(Condition).map((x) => exactly(x)))
Expand Down Expand Up @@ -292,20 +294,25 @@ export interface GetOrderParameters {
AmazonOrderId: string[]
}

export type FulfillmentChannel = (keyof typeof FulfillmentChannelEnum)[]
export type PaymentMethod = (keyof typeof PaymentMethodEnum)[]
export type OrderStatus = (keyof typeof OrderStatusEnum)[]
export type EasyShipShipmentStatus = (keyof typeof EasyShipShipmentStatusEnum)[]

export type ListOrderParameters = RequireOnlyOne<
{
CreatedAfter?: Date
CreatedBefore?: Date
LastUpdatedAfter?: Date
LastUpdatedBefore?: Date
OrderStatus?: (keyof typeof OrderStatus)[]
MarketplaceId: string[]
FulfillmentChannel?: (keyof typeof FulfillmentChannel)[]
PaymentMethod?: (keyof typeof PaymentMethod)[]
OrderStatus?: OrderStatus
MarketplaceId: string
FulfillmentChannel?: FulfillmentChannel
PaymentMethod?: PaymentMethod
BuyerEmail?: string
SellerOrderId?: string
MaxResultsPerPage?: number
EasyShipShipmentStatus?: (keyof typeof EasyShipShipmentStatus)[]
EasyShipShipmentStatus?: EasyShipShipmentStatus
},
'CreatedAfter' | 'LastUpdatedAfter'
>
Expand Down
2 changes: 1 addition & 1 deletion src/sections/products/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface PriceToEstimateFees {
Points?: Points
}

interface FeeEstimateRequest {
export interface FeeEstimateRequest {
MarketplaceId: string
IdType: FeeEstimateIdType
IdValue: string
Expand Down
2 changes: 1 addition & 1 deletion src/sections/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const RequestReportResponse = Codec.interface({
}),
})

type ReportProcessing =
export type ReportProcessing =
| '_SUBMITTED_'
| '_IN_PROGRESS_'
| '_CANCELLED_'
Expand Down
6 changes: 3 additions & 3 deletions src/sections/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface Subscription {
IsEnabled: boolean
}

interface SubscriptionActionParameters {
export interface SubscriptionActionParameters {
MarketplaceId: string
NotificationType: NotificationType
Destination: Destination
Expand Down Expand Up @@ -111,15 +111,15 @@ const ListRegisteredDestinationsResponse = Codec.interface({
}),
})

type SendTestNotificationToDestinationParameters = MarketplaceIdAndDestinationOnlyParameters
export type SendTestNotificationToDestinationParameters = MarketplaceIdAndDestinationOnlyParameters

const SendTestNotificationToDestinationResponse = Codec.interface({
SendTestNotificationToDestinationResponse: Codec.interface({
SendTestNotificationToDestinationResult: exactly(''),
}),
})

interface CreateSubscriptionParameters {
export interface CreateSubscriptionParameters {
MarketplaceId: string
Subscription: Subscription
}
Expand Down

0 comments on commit 9869be1

Please sign in to comment.