@ikas/storefront-api 4.0.0-alpha.48 → 4.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -7
- package/src/__api/models/Cart.ts +0 -2
- package/src/__api/models/CartStorefrontRoutingDynamicCurrencySettings.ts +0 -2
- package/src/__api/models/CartV2.ts +0 -7
- package/src/__api/models/CategoryFilterInput.ts +0 -2
- package/src/__api/models/CheckoutSettingsPrice.ts +0 -2
- package/src/__api/models/Country.ts +0 -4
- package/src/__api/models/CurrencyRate.ts +0 -4
- package/src/__api/models/LocationTranslations.ts +0 -2
- package/src/__api/models/OrderLineItem.ts +0 -12
- package/src/__api/models/OrderLineVariant.ts +0 -8
- package/src/__api/models/OrderLineVariantPrice.ts +0 -7
- package/src/__api/models/Product.ts +0 -5
- package/src/__api/models/ProductBackInStockRemind.ts +0 -2
- package/src/__api/models/ProductOptionSelectValueOtherPrice.ts +0 -2
- package/src/__api/models/ProductPrice.ts +0 -4
- package/src/__api/models/{StorefrontRaffle.ts → Raffle.ts} +16 -5
- package/src/__api/models/RafflePaginationResponse.ts +3 -5
- package/src/__api/models/RaffleParticipants.ts +10 -6
- package/src/__api/models/RaffleParticipantsInput.ts +4 -1
- package/src/__api/models/RaffleParticipantsUpdateInput.ts +24 -0
- package/src/__api/models/SearchProduct.ts +0 -5
- package/src/__api/models/SearchProductPrice.ts +0 -9
- package/src/__api/models/SearchVariant.ts +0 -3
- package/src/__api/models/StorefrontDynamicCurrencySettings.ts +0 -2
- package/src/__api/models/StorefrontOrder.ts +0 -2
- package/src/__api/models/StorefrontRouting.ts +0 -4
- package/src/__api/models/StorefrontTransaction.ts +0 -2
- package/src/__api/models/Variant.ts +0 -3
- package/src/__api/models/_base.ts +1 -2
- package/src/__api/mutations/addCouponCodeToCheckout.ts +1 -14
- package/src/__api/mutations/addItemToCart.ts +1 -34
- package/src/__api/mutations/createOrderRefundRequest.ts +1 -13
- package/src/__api/mutations/customerForgotPassword.ts +0 -3
- package/src/__api/mutations/customerLogin.ts +0 -3
- package/src/__api/mutations/customerRecoverPassword.ts +0 -3
- package/src/__api/mutations/registerCustomer.ts +0 -3
- package/src/__api/mutations/saveCart.ts +1 -34
- package/src/__api/mutations/saveCartCouponCode.ts +1 -34
- package/src/__api/mutations/saveCheckout.ts +1 -14
- package/src/__api/mutations/saveItemToCart.ts +1 -14
- package/src/__api/mutations/saveProductBackInStockRemind.ts +1 -2
- package/src/__api/mutations/saveRaffleParticipant.ts +3 -25
- package/src/__api/mutations/sendContactFormToMerchant.ts +0 -3
- package/src/__api/mutations/updateCartCampaignOffer.ts +1 -34
- package/src/__api/mutations/updateRaffleParticipant.ts +72 -0
- package/src/__api/queries/checkCustomerEmail.ts +0 -3
- package/src/__api/queries/getCart.ts +1 -14
- package/src/__api/queries/getCartById.ts +1 -34
- package/src/__api/queries/getCheckoutByCartId.ts +1 -14
- package/src/__api/queries/getCheckoutById.ts +1 -14
- package/src/__api/queries/getCurrencyRate.ts +1 -3
- package/src/__api/queries/getCustomerOrders.ts +1 -13
- package/src/__api/queries/getOrder.ts +1 -13
- package/src/__api/queries/getOrderByEmail.ts +1 -13
- package/src/__api/queries/getRaffleParticipants.ts +59 -0
- package/src/__api/queries/getRafflesByCustomerId.ts +74 -0
- package/src/__api/queries/getStorefront.ts +1 -4
- package/src/__api/queries/listCheckoutSettings.ts +1 -2
- package/src/__api/queries/listCountry.ts +1 -7
- package/src/__api/queries/listOrderTransactions.ts +1 -2
- package/src/__api/queries/listProduct.ts +1 -8
- package/src/__api/queries/listProductBackInStockRemind.ts +1 -2
- package/src/__api/queries/listProductOptionSet.ts +1 -3
- package/src/__api/queries/{listStorefrontRaffle.ts → listRaffle.ts} +10 -10
- package/src/__api/queries/searchProducts.ts +1 -10
- package/src/__api/types/index.ts +35 -183
- package/src/api/checkout/index.ts +1 -1
- package/src/api/customer/index.ts +0 -9
- package/src/api/file-upload/index.ts +29 -35
- package/src/api/location/index.ts +4 -13
- package/src/api/masterpass/index.ts +7 -7
- package/src/api/product/index.ts +3 -8
- package/src/api/raffle/index.ts +14 -12
- package/src/index.ts +7 -9
- package/src/__api/models/OrderLineBaseUnit.ts +0 -19
- package/src/__api/models/OrderLineVariantUnit.ts +0 -16
- package/src/__api/models/OrderLineVariantUnitType.ts +0 -16
- package/src/__api/models/OrderSessionInfo.ts +0 -49
- package/src/__api/models/OrderSessionInfoTrafficSource.ts +0 -18
- package/src/__api/models/OrderSessionUTM.ts +0 -21
- package/src/__api/models/OrderSessionUserAgent.ts +0 -18
- package/src/__api/models/ProductBaseUnitModel.ts +0 -21
- package/src/__api/models/SearchProductProductBaseUnit.ts +0 -23
- package/src/__api/models/SearchProductProductUnit.ts +0 -16
- package/src/__api/models/VariantUnitModel.ts +0 -17
- package/src/__api/queries/listRaffleParticipants.ts +0 -81
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
4
4
|
"author": "Umut Ozan Yıldırım",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "API functions that returns models from the ikas-storefront-models package.",
|
|
@@ -16,13 +16,12 @@
|
|
|
16
16
|
"generate": "api-generator --generate --url=https://api.myikas.dev/api/sf/graphql --modelPath=./models.json --generatePath=./src/__api && prettier --write ./src/__api"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ikas/fe-api-client": "^1.0.
|
|
20
|
-
"ts-essentials": "^7.0.1"
|
|
19
|
+
"@ikas/fe-api-client": "^1.0.13"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
24
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
25
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
23
|
+
"@ikas/storefront-config": "^4.0.0-alpha.5",
|
|
24
|
+
"@ikas/storefront-models": "^4.0.0-alpha.5",
|
|
26
25
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
27
26
|
"prettier": "^2.2.1",
|
|
28
27
|
"rollup": "^2.75.6",
|
|
@@ -32,11 +31,12 @@
|
|
|
32
31
|
"typescript": "^4.7.2",
|
|
33
32
|
"ttypescript": "^1.5.12",
|
|
34
33
|
"typescript-transform-paths": "^2.2.2",
|
|
34
|
+
"ts-essentials": "^7.0.1",
|
|
35
35
|
"axios": "^0.26.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
39
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
38
|
+
"@ikas/storefront-config": "^4.0.0-alpha.5",
|
|
39
|
+
"@ikas/storefront-models": "^4.0.0-alpha.5",
|
|
40
40
|
"axios": "^0.26.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/__api/models/Cart.ts
CHANGED
|
@@ -10,7 +10,6 @@ export class CartData extends BaseModelData {
|
|
|
10
10
|
campaignOffers: CartCampaignOfferData[] | null;
|
|
11
11
|
createdBy: CartCreatedByEnum | null;
|
|
12
12
|
currencyCode: string | null;
|
|
13
|
-
currencySymbol: string | null;
|
|
14
13
|
customerId: string | null;
|
|
15
14
|
dueDate: any;
|
|
16
15
|
itemCount: number;
|
|
@@ -34,7 +33,6 @@ export class CartData extends BaseModelData {
|
|
|
34
33
|
: null;
|
|
35
34
|
this.createdBy = data.createdBy || null;
|
|
36
35
|
this.currencyCode = data.currencyCode || null;
|
|
37
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
38
36
|
this.customerId = data.customerId || null;
|
|
39
37
|
this.dueDate = data.dueDate || null;
|
|
40
38
|
this.itemCount = data.itemCount || 0;
|
|
@@ -3,14 +3,12 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class CartStorefrontRoutingDynamicCurrencySettingsData {
|
|
4
4
|
roundingFormat: string | null;
|
|
5
5
|
targetCurrencyCode: string;
|
|
6
|
-
targetCurrencySymbol: string | null;
|
|
7
6
|
|
|
8
7
|
constructor(
|
|
9
8
|
data: Partial<CartStorefrontRoutingDynamicCurrencySettingsData> = {}
|
|
10
9
|
) {
|
|
11
10
|
this.roundingFormat = data.roundingFormat || null;
|
|
12
11
|
this.targetCurrencyCode = data.targetCurrencyCode || "";
|
|
13
|
-
this.targetCurrencySymbol = data.targetCurrencySymbol || null;
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
|
|
@@ -17,7 +17,6 @@ import { OrderCustomerData } from "./OrderCustomer";
|
|
|
17
17
|
import { OrderGiftPackageLineData } from "./OrderGiftPackageLine";
|
|
18
18
|
import { OrderAdjustmentData } from "./OrderAdjustment";
|
|
19
19
|
import { OrderLineItemData } from "./OrderLineItem";
|
|
20
|
-
import { OrderSessionInfoData } from "./OrderSessionInfo";
|
|
21
20
|
import { OrderShippingLineData } from "./OrderShippingLine";
|
|
22
21
|
import { OrderStorefrontRoutingData } from "./OrderStorefrontRouting";
|
|
23
22
|
import { OrderTaxLineData } from "./OrderTaxLine";
|
|
@@ -35,7 +34,6 @@ export class CartV2Data extends BaseModelData {
|
|
|
35
34
|
createdBy: CartCreatedByEnum | null;
|
|
36
35
|
currencyCode: string;
|
|
37
36
|
currencyRates: OrderCurrencyRateData[];
|
|
38
|
-
currencySymbol: string | null;
|
|
39
37
|
customer: OrderCustomerData | null;
|
|
40
38
|
customerId: string | null;
|
|
41
39
|
dueDate: any | null;
|
|
@@ -55,7 +53,6 @@ export class CartV2Data extends BaseModelData {
|
|
|
55
53
|
recoverEmailStatus: CheckoutRecoveryEmailStatusEnum | null;
|
|
56
54
|
recoveryStatus: CheckoutRecoveryStatusEnum | null;
|
|
57
55
|
salesChannelId: string;
|
|
58
|
-
sessionInfo: OrderSessionInfoData | null;
|
|
59
56
|
shippingAddress: OrderAddressData | null;
|
|
60
57
|
shippingLines: OrderShippingLineData[] | null;
|
|
61
58
|
shippingMethod: ShippingMethodEnum;
|
|
@@ -99,7 +96,6 @@ export class CartV2Data extends BaseModelData {
|
|
|
99
96
|
this.currencyRates = data.currencyRates
|
|
100
97
|
? data.currencyRates.map((o) => new OrderCurrencyRateData(o))
|
|
101
98
|
: [];
|
|
102
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
103
99
|
this.customer = data.customer ? new OrderCustomerData(data.customer) : null;
|
|
104
100
|
this.customerId = data.customerId || null;
|
|
105
101
|
this.dueDate = data.dueDate || null;
|
|
@@ -131,9 +127,6 @@ export class CartV2Data extends BaseModelData {
|
|
|
131
127
|
this.recoverEmailStatus = data.recoverEmailStatus || null;
|
|
132
128
|
this.recoveryStatus = data.recoveryStatus || null;
|
|
133
129
|
this.salesChannelId = data.salesChannelId || "";
|
|
134
|
-
this.sessionInfo = data.sessionInfo
|
|
135
|
-
? new OrderSessionInfoData(data.sessionInfo)
|
|
136
|
-
: null;
|
|
137
130
|
this.shippingAddress = data.shippingAddress
|
|
138
131
|
? new OrderAddressData(data.shippingAddress)
|
|
139
132
|
: null;
|
|
@@ -3,12 +3,10 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class CategoryFilterInputData {
|
|
4
4
|
eq: string | null;
|
|
5
5
|
in: string[] | null;
|
|
6
|
-
nin: string[] | null;
|
|
7
6
|
|
|
8
7
|
constructor(data: Partial<CategoryFilterInputData> = {}) {
|
|
9
8
|
this.eq = data.eq || null;
|
|
10
9
|
this.in = data.in || null;
|
|
11
|
-
this.nin = data.nin || null;
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
12
|
|
|
@@ -2,12 +2,10 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
2
2
|
|
|
3
3
|
export class CheckoutSettingsPriceData {
|
|
4
4
|
currencyCode: string;
|
|
5
|
-
currencySymbol: string | null;
|
|
6
5
|
price: number;
|
|
7
6
|
|
|
8
7
|
constructor(data: Partial<CheckoutSettingsPriceData> = {}) {
|
|
9
8
|
this.currencyCode = data.currencyCode || "";
|
|
10
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
11
9
|
this.price = data.price || 0;
|
|
12
10
|
}
|
|
13
11
|
}
|
|
@@ -5,8 +5,6 @@ import { LocationTranslationsData } from "./LocationTranslations";
|
|
|
5
5
|
export class CountryData extends BaseModelData {
|
|
6
6
|
capital: string | null;
|
|
7
7
|
currency: string | null;
|
|
8
|
-
currencyCode: string | null;
|
|
9
|
-
currencySymbol: string | null;
|
|
10
8
|
emoji: string | null;
|
|
11
9
|
emojiString: string | null;
|
|
12
10
|
iso2: string | null;
|
|
@@ -23,8 +21,6 @@ export class CountryData extends BaseModelData {
|
|
|
23
21
|
|
|
24
22
|
this.capital = data.capital || null;
|
|
25
23
|
this.currency = data.currency || null;
|
|
26
|
-
this.currencyCode = data.currencyCode || null;
|
|
27
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
28
24
|
this.emoji = data.emoji || null;
|
|
29
25
|
this.emojiString = data.emojiString || null;
|
|
30
26
|
this.iso2 = data.iso2 || null;
|
|
@@ -4,8 +4,6 @@ import { CurrencyRateDataData } from "./CurrencyRateData";
|
|
|
4
4
|
|
|
5
5
|
export class CurrencyRateData extends BaseModelData {
|
|
6
6
|
baseCurrency: string;
|
|
7
|
-
baseCurrencyCode: string | null;
|
|
8
|
-
baseCurrencySymbol: string | null;
|
|
9
7
|
date: any;
|
|
10
8
|
rates: CurrencyRateDataData[];
|
|
11
9
|
|
|
@@ -13,8 +11,6 @@ export class CurrencyRateData extends BaseModelData {
|
|
|
13
11
|
super(data);
|
|
14
12
|
|
|
15
13
|
this.baseCurrency = data.baseCurrency || "";
|
|
16
|
-
this.baseCurrencyCode = data.baseCurrencyCode || null;
|
|
17
|
-
this.baseCurrencySymbol = data.baseCurrencySymbol || null;
|
|
18
14
|
this.date = data.date || null;
|
|
19
15
|
this.rates = data.rates
|
|
20
16
|
? data.rates.map((c) => new CurrencyRateDataData(c))
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
2
|
|
|
3
3
|
export class LocationTranslationsData {
|
|
4
|
-
de: string | null;
|
|
5
4
|
en: string;
|
|
6
5
|
tr: string;
|
|
7
6
|
|
|
8
7
|
constructor(data: Partial<LocationTranslationsData> = {}) {
|
|
9
|
-
this.de = data.de || null;
|
|
10
8
|
this.en = data.en || "";
|
|
11
9
|
this.tr = data.tr || "";
|
|
12
10
|
}
|
|
@@ -7,11 +7,9 @@ import { OrderLineVariantData } from "./OrderLineVariant";
|
|
|
7
7
|
|
|
8
8
|
export class OrderLineItemData extends BaseModelData {
|
|
9
9
|
currencyCode: string | null;
|
|
10
|
-
currencySymbol: string | null;
|
|
11
10
|
discount: OrderLineDiscountData | null;
|
|
12
11
|
discountPrice: number | null;
|
|
13
12
|
finalPrice: number | null;
|
|
14
|
-
finalUnitPrice: number | null;
|
|
15
13
|
options: OrderLineOptionData[] | null;
|
|
16
14
|
originalOrderLineItemId: string | null;
|
|
17
15
|
price: number;
|
|
@@ -20,14 +18,12 @@ export class OrderLineItemData extends BaseModelData {
|
|
|
20
18
|
statusUpdatedAt: any | null;
|
|
21
19
|
stockLocationId: string | null;
|
|
22
20
|
taxValue: number | null;
|
|
23
|
-
unitPrice: number | null;
|
|
24
21
|
variant: OrderLineVariantData;
|
|
25
22
|
|
|
26
23
|
constructor(data: Partial<OrderLineItemData> = {}) {
|
|
27
24
|
super(data);
|
|
28
25
|
|
|
29
26
|
this.currencyCode = data.currencyCode || null;
|
|
30
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
31
27
|
this.discount = data.discount
|
|
32
28
|
? new OrderLineDiscountData(data.discount)
|
|
33
29
|
: null;
|
|
@@ -39,10 +35,6 @@ export class OrderLineItemData extends BaseModelData {
|
|
|
39
35
|
data.finalPrice !== undefined && data.finalPrice !== null
|
|
40
36
|
? data.finalPrice
|
|
41
37
|
: null;
|
|
42
|
-
this.finalUnitPrice =
|
|
43
|
-
data.finalUnitPrice !== undefined && data.finalUnitPrice !== null
|
|
44
|
-
? data.finalUnitPrice
|
|
45
|
-
: null;
|
|
46
38
|
this.options = data.options
|
|
47
39
|
? data.options.map((o) => new OrderLineOptionData(o))
|
|
48
40
|
: null;
|
|
@@ -56,10 +48,6 @@ export class OrderLineItemData extends BaseModelData {
|
|
|
56
48
|
data.taxValue !== undefined && data.taxValue !== null
|
|
57
49
|
? data.taxValue
|
|
58
50
|
: null;
|
|
59
|
-
this.unitPrice =
|
|
60
|
-
data.unitPrice !== undefined && data.unitPrice !== null
|
|
61
|
-
? data.unitPrice
|
|
62
|
-
: null;
|
|
63
51
|
this.variant = data.variant
|
|
64
52
|
? new OrderLineVariantData(data.variant)
|
|
65
53
|
: new OrderLineVariantData();
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
|
-
import { OrderLineBaseUnitData } from "./OrderLineBaseUnit";
|
|
3
2
|
import { OrderLineVariantBrandData } from "./OrderLineVariantBrand";
|
|
4
3
|
import { OrderLineVariantCategoryData } from "./OrderLineVariantCategory";
|
|
5
4
|
import { OrderLineVariantPriceData } from "./OrderLineVariantPrice";
|
|
6
|
-
import { OrderLineVariantUnitData } from "./OrderLineVariantUnit";
|
|
7
5
|
import { OrderLineVariantVariantValuesData } from "./OrderLineVariantVariantValues";
|
|
8
6
|
|
|
9
7
|
export class OrderLineVariantData {
|
|
10
8
|
barcodeList: string[] | null;
|
|
11
|
-
baseUnit: OrderLineBaseUnitData | null;
|
|
12
9
|
brand: OrderLineVariantBrandData | null;
|
|
13
10
|
categories: OrderLineVariantCategoryData[] | null;
|
|
14
11
|
id: string | null;
|
|
@@ -21,15 +18,11 @@ export class OrderLineVariantData {
|
|
|
21
18
|
tagIds: string[] | null;
|
|
22
19
|
taxValue: number | null;
|
|
23
20
|
type: number | null;
|
|
24
|
-
unit: OrderLineVariantUnitData | null;
|
|
25
21
|
variantValues: OrderLineVariantVariantValuesData[] | null;
|
|
26
22
|
weight: number | null;
|
|
27
23
|
|
|
28
24
|
constructor(data: Partial<OrderLineVariantData> = {}) {
|
|
29
25
|
this.barcodeList = data.barcodeList || null;
|
|
30
|
-
this.baseUnit = data.baseUnit
|
|
31
|
-
? new OrderLineBaseUnitData(data.baseUnit)
|
|
32
|
-
: null;
|
|
33
26
|
this.brand = data.brand ? new OrderLineVariantBrandData(data.brand) : null;
|
|
34
27
|
this.categories = data.categories
|
|
35
28
|
? data.categories.map((o) => new OrderLineVariantCategoryData(o))
|
|
@@ -50,7 +43,6 @@ export class OrderLineVariantData {
|
|
|
50
43
|
: null;
|
|
51
44
|
this.type =
|
|
52
45
|
data.type !== undefined && data.type !== null ? data.type : null;
|
|
53
|
-
this.unit = data.unit ? new OrderLineVariantUnitData(data.unit) : null;
|
|
54
46
|
this.variantValues = data.variantValues
|
|
55
47
|
? data.variantValues.map((o) => new OrderLineVariantVariantValuesData(o))
|
|
56
48
|
: null;
|
|
@@ -3,11 +3,9 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class OrderLineVariantPriceData {
|
|
4
4
|
buyPrice: number | null;
|
|
5
5
|
currency: string | null;
|
|
6
|
-
currencySymbol: string | null;
|
|
7
6
|
discountPrice: number | null;
|
|
8
7
|
priceListId: string | null;
|
|
9
8
|
sellPrice: number;
|
|
10
|
-
unitPrice: number | null;
|
|
11
9
|
|
|
12
10
|
constructor(data: Partial<OrderLineVariantPriceData> = {}) {
|
|
13
11
|
this.buyPrice =
|
|
@@ -15,17 +13,12 @@ export class OrderLineVariantPriceData {
|
|
|
15
13
|
? data.buyPrice
|
|
16
14
|
: null;
|
|
17
15
|
this.currency = data.currency || null;
|
|
18
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
19
16
|
this.discountPrice =
|
|
20
17
|
data.discountPrice !== undefined && data.discountPrice !== null
|
|
21
18
|
? data.discountPrice
|
|
22
19
|
: null;
|
|
23
20
|
this.priceListId = data.priceListId || null;
|
|
24
21
|
this.sellPrice = data.sellPrice || 0;
|
|
25
|
-
this.unitPrice =
|
|
26
|
-
data.unitPrice !== undefined && data.unitPrice !== null
|
|
27
|
-
? data.unitPrice
|
|
28
|
-
: null;
|
|
29
22
|
}
|
|
30
23
|
}
|
|
31
24
|
|
|
@@ -2,7 +2,6 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
2
2
|
import BaseModelData from "./_base";
|
|
3
3
|
import { ProductTypeEnum } from "../types";
|
|
4
4
|
import { ProductAttributeValueData } from "./ProductAttributeValue";
|
|
5
|
-
import { ProductBaseUnitModelData } from "./ProductBaseUnitModel";
|
|
6
5
|
import { HTMLMetaDataData } from "./HTMLMetaData";
|
|
7
6
|
import { ProductVariantTypeData } from "./ProductVariantType";
|
|
8
7
|
import { ProductTranslationData } from "./ProductTranslation";
|
|
@@ -10,7 +9,6 @@ import { VariantData } from "./Variant";
|
|
|
10
9
|
|
|
11
10
|
export class ProductData extends BaseModelData {
|
|
12
11
|
attributes: ProductAttributeValueData[] | null;
|
|
13
|
-
baseUnit: ProductBaseUnitModelData | null;
|
|
14
12
|
brandId: string | null;
|
|
15
13
|
categoryIds: string[] | null;
|
|
16
14
|
description: string | null;
|
|
@@ -35,9 +33,6 @@ export class ProductData extends BaseModelData {
|
|
|
35
33
|
this.attributes = data.attributes
|
|
36
34
|
? data.attributes.map((p) => new ProductAttributeValueData(p))
|
|
37
35
|
: null;
|
|
38
|
-
this.baseUnit = data.baseUnit
|
|
39
|
-
? new ProductBaseUnitModelData(data.baseUnit)
|
|
40
|
-
: null;
|
|
41
36
|
this.brandId = data.brandId || null;
|
|
42
37
|
this.categoryIds = data.categoryIds || null;
|
|
43
38
|
this.description = data.description || null;
|
|
@@ -6,7 +6,6 @@ export class ProductBackInStockRemindData extends BaseModelData {
|
|
|
6
6
|
email: string;
|
|
7
7
|
productId: string;
|
|
8
8
|
storefrontId: string;
|
|
9
|
-
storefrontRoutingId: string | null;
|
|
10
9
|
variantId: string;
|
|
11
10
|
|
|
12
11
|
constructor(data: Partial<ProductBackInStockRemindData> = {}) {
|
|
@@ -16,7 +15,6 @@ export class ProductBackInStockRemindData extends BaseModelData {
|
|
|
16
15
|
this.email = data.email || "";
|
|
17
16
|
this.productId = data.productId || "";
|
|
18
17
|
this.storefrontId = data.storefrontId || "";
|
|
19
|
-
this.storefrontRoutingId = data.storefrontRoutingId || null;
|
|
20
18
|
this.variantId = data.variantId || "";
|
|
21
19
|
}
|
|
22
20
|
}
|
|
@@ -2,12 +2,10 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
2
2
|
|
|
3
3
|
export class ProductOptionSelectValueOtherPriceData {
|
|
4
4
|
currencyCode: string;
|
|
5
|
-
currencySymbol: string | null;
|
|
6
5
|
price: number;
|
|
7
6
|
|
|
8
7
|
constructor(data: Partial<ProductOptionSelectValueOtherPriceData> = {}) {
|
|
9
8
|
this.currencyCode = data.currencyCode || "";
|
|
10
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
11
9
|
this.price = data.price || 0;
|
|
12
10
|
}
|
|
13
11
|
}
|
|
@@ -3,8 +3,6 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class ProductPriceData {
|
|
4
4
|
buyPrice: number | null;
|
|
5
5
|
currency: string | null;
|
|
6
|
-
currencyCode: string | null;
|
|
7
|
-
currencySymbol: string | null;
|
|
8
6
|
discountPrice: number | null;
|
|
9
7
|
priceListId: string | null;
|
|
10
8
|
sellPrice: number;
|
|
@@ -15,8 +13,6 @@ export class ProductPriceData {
|
|
|
15
13
|
? data.buyPrice
|
|
16
14
|
: null;
|
|
17
15
|
this.currency = data.currency || null;
|
|
18
|
-
this.currencyCode = data.currencyCode || null;
|
|
19
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
20
16
|
this.discountPrice =
|
|
21
17
|
data.discountPrice !== undefined && data.discountPrice !== null
|
|
22
18
|
? data.discountPrice
|
|
@@ -5,16 +5,19 @@ import { RaffleDateRangeFieldData } from "./RaffleDateRangeField";
|
|
|
5
5
|
import { RaffleMetadataData } from "./RaffleMetadata";
|
|
6
6
|
import { RaffleVariantInformationData } from "./RaffleVariantInformation";
|
|
7
7
|
|
|
8
|
-
export class
|
|
8
|
+
export class RaffleData extends BaseModelData {
|
|
9
9
|
dateRange: RaffleDateRangeFieldData | null;
|
|
10
10
|
metadata: RaffleMetadataData;
|
|
11
11
|
name: string;
|
|
12
|
+
participantCount: number | null;
|
|
13
|
+
raffleParticipantCreatedMailExtraData: string | null;
|
|
14
|
+
raffleParticipantWinnerMailExtraData: string | null;
|
|
12
15
|
requiredCustomerAccount: boolean;
|
|
13
16
|
status: boolean;
|
|
14
17
|
variants: RaffleVariantInformationData[];
|
|
15
18
|
verificationType: VerificationTypeEnum;
|
|
16
19
|
|
|
17
|
-
constructor(data: Partial<
|
|
20
|
+
constructor(data: Partial<RaffleData> = {}) {
|
|
18
21
|
super(data);
|
|
19
22
|
|
|
20
23
|
this.dateRange = data.dateRange
|
|
@@ -24,6 +27,14 @@ export class StorefrontRaffleData extends BaseModelData {
|
|
|
24
27
|
? new RaffleMetadataData(data.metadata)
|
|
25
28
|
: new RaffleMetadataData();
|
|
26
29
|
this.name = data.name || "";
|
|
30
|
+
this.participantCount =
|
|
31
|
+
data.participantCount !== undefined && data.participantCount !== null
|
|
32
|
+
? data.participantCount
|
|
33
|
+
: null;
|
|
34
|
+
this.raffleParticipantCreatedMailExtraData =
|
|
35
|
+
data.raffleParticipantCreatedMailExtraData || null;
|
|
36
|
+
this.raffleParticipantWinnerMailExtraData =
|
|
37
|
+
data.raffleParticipantWinnerMailExtraData || null;
|
|
27
38
|
this.requiredCustomerAccount = data.requiredCustomerAccount || false;
|
|
28
39
|
this.status = data.status || false;
|
|
29
40
|
this.variants = data.variants
|
|
@@ -33,6 +44,6 @@ export class StorefrontRaffleData extends BaseModelData {
|
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
|
|
36
|
-
export class
|
|
37
|
-
export type
|
|
38
|
-
export type
|
|
47
|
+
export class Raffle extends RaffleData {}
|
|
48
|
+
export type PartialRaffle = Partial<Raffle>;
|
|
49
|
+
export type ReadOnlyRaffle = DeepReadonly<Raffle>;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
|
-
import {
|
|
2
|
+
import { RaffleData } from "./Raffle";
|
|
3
3
|
|
|
4
4
|
export class RafflePaginationResponseData {
|
|
5
5
|
count: number;
|
|
6
|
-
data:
|
|
6
|
+
data: RaffleData[];
|
|
7
7
|
hasNext: boolean;
|
|
8
8
|
limit: number;
|
|
9
9
|
page: number;
|
|
10
10
|
|
|
11
11
|
constructor(data: Partial<RafflePaginationResponseData> = {}) {
|
|
12
12
|
this.count = data.count || 0;
|
|
13
|
-
this.data = data.data
|
|
14
|
-
? data.data.map((s) => new StorefrontRaffleData(s))
|
|
15
|
-
: [];
|
|
13
|
+
this.data = data.data ? data.data.map((r) => new RaffleData(r)) : [];
|
|
16
14
|
this.hasNext = data.hasNext || false;
|
|
17
15
|
this.limit = data.limit || 0;
|
|
18
16
|
this.page = data.page || 0;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
2
|
import BaseModelData from "./_base";
|
|
3
|
-
import { RaffleParticipantStatusEnum } from "../types";
|
|
4
3
|
import { AppliedProductData } from "./AppliedProduct";
|
|
5
|
-
import { StorefrontRaffleData } from "./StorefrontRaffle";
|
|
6
4
|
|
|
7
5
|
export class RaffleParticipantsData extends BaseModelData {
|
|
8
6
|
applicationDate: any;
|
|
@@ -13,11 +11,11 @@ export class RaffleParticipantsData extends BaseModelData {
|
|
|
13
11
|
firstName: string;
|
|
14
12
|
fullName: string;
|
|
15
13
|
isDeliveredCargo: boolean | null;
|
|
14
|
+
isSendEmail: boolean | null;
|
|
15
|
+
isWinner: boolean | null;
|
|
16
16
|
lastName: string;
|
|
17
17
|
phone: string | null;
|
|
18
|
-
raffle: StorefrontRaffleData | null;
|
|
19
18
|
raffleId: string;
|
|
20
|
-
status: RaffleParticipantStatusEnum | null;
|
|
21
19
|
|
|
22
20
|
constructor(data: Partial<RaffleParticipantsData> = {}) {
|
|
23
21
|
super(data);
|
|
@@ -35,11 +33,17 @@ export class RaffleParticipantsData extends BaseModelData {
|
|
|
35
33
|
data.isDeliveredCargo !== undefined && data.isDeliveredCargo !== null
|
|
36
34
|
? data.isDeliveredCargo
|
|
37
35
|
: null;
|
|
36
|
+
this.isSendEmail =
|
|
37
|
+
data.isSendEmail !== undefined && data.isSendEmail !== null
|
|
38
|
+
? data.isSendEmail
|
|
39
|
+
: null;
|
|
40
|
+
this.isWinner =
|
|
41
|
+
data.isWinner !== undefined && data.isWinner !== null
|
|
42
|
+
? data.isWinner
|
|
43
|
+
: null;
|
|
38
44
|
this.lastName = data.lastName || "";
|
|
39
45
|
this.phone = data.phone || null;
|
|
40
|
-
this.raffle = data.raffle ? new StorefrontRaffleData(data.raffle) : null;
|
|
41
46
|
this.raffleId = data.raffleId || "";
|
|
42
|
-
this.status = data.status || null;
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
2
3
|
import { AppliedProductInputData } from "./AppliedProductInput";
|
|
3
4
|
|
|
4
|
-
export class RaffleParticipantsInputData {
|
|
5
|
+
export class RaffleParticipantsInputData extends BaseModelData {
|
|
5
6
|
appliedProduct: AppliedProductInputData;
|
|
6
7
|
email: string;
|
|
7
8
|
extraData: any | null;
|
|
@@ -11,6 +12,8 @@ export class RaffleParticipantsInputData {
|
|
|
11
12
|
raffleId: string;
|
|
12
13
|
|
|
13
14
|
constructor(data: Partial<RaffleParticipantsInputData> = {}) {
|
|
15
|
+
super(data);
|
|
16
|
+
|
|
14
17
|
this.appliedProduct = data.appliedProduct
|
|
15
18
|
? new AppliedProductInputData(data.appliedProduct)
|
|
16
19
|
: new AppliedProductInputData();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
import BaseModelData from "./_base";
|
|
3
|
+
|
|
4
|
+
export class RaffleParticipantsUpdateInputData extends BaseModelData {
|
|
5
|
+
firstName: string | null;
|
|
6
|
+
lastName: string | null;
|
|
7
|
+
participantId: string;
|
|
8
|
+
phone: string | null;
|
|
9
|
+
|
|
10
|
+
constructor(data: Partial<RaffleParticipantsUpdateInputData> = {}) {
|
|
11
|
+
super(data);
|
|
12
|
+
|
|
13
|
+
this.firstName = data.firstName || null;
|
|
14
|
+
this.lastName = data.lastName || null;
|
|
15
|
+
this.participantId = data.participantId || "";
|
|
16
|
+
this.phone = data.phone || null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class RaffleParticipantsUpdateInput extends RaffleParticipantsUpdateInputData {}
|
|
21
|
+
export type PartialRaffleParticipantsUpdateInput =
|
|
22
|
+
Partial<RaffleParticipantsUpdateInput>;
|
|
23
|
+
export type ReadOnlyRaffleParticipantsUpdateInput =
|
|
24
|
+
DeepReadonly<RaffleParticipantsUpdateInput>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepReadonly } from "ts-essentials";
|
|
2
2
|
import { SearchProductAttributeValueData } from "./SearchProductAttributeValue";
|
|
3
|
-
import { SearchProductProductBaseUnitData } from "./SearchProductProductBaseUnit";
|
|
4
3
|
import { SearchProductBrandData } from "./SearchProductBrand";
|
|
5
4
|
import { SearchCategoryData } from "./SearchCategory";
|
|
6
5
|
import { SearchHTMLMetaDataData } from "./SearchHTMLMetaData";
|
|
@@ -11,7 +10,6 @@ import { SearchVariantData } from "./SearchVariant";
|
|
|
11
10
|
|
|
12
11
|
export class SearchProductData {
|
|
13
12
|
attributes: SearchProductAttributeValueData[] | null;
|
|
14
|
-
baseUnit: SearchProductProductBaseUnitData | null;
|
|
15
13
|
brand: SearchProductBrandData | null;
|
|
16
14
|
categories: SearchCategoryData[] | null;
|
|
17
15
|
deleted: boolean | null;
|
|
@@ -34,9 +32,6 @@ export class SearchProductData {
|
|
|
34
32
|
this.attributes = data.attributes
|
|
35
33
|
? data.attributes.map((s) => new SearchProductAttributeValueData(s))
|
|
36
34
|
: null;
|
|
37
|
-
this.baseUnit = data.baseUnit
|
|
38
|
-
? new SearchProductProductBaseUnitData(data.baseUnit)
|
|
39
|
-
: null;
|
|
40
35
|
this.brand = data.brand ? new SearchProductBrandData(data.brand) : null;
|
|
41
36
|
this.categories = data.categories
|
|
42
37
|
? data.categories.map((s) => new SearchCategoryData(s))
|
|
@@ -3,12 +3,9 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class SearchProductPriceData {
|
|
4
4
|
buyPrice: number | null;
|
|
5
5
|
currency: string | null;
|
|
6
|
-
currencyCode: string | null;
|
|
7
|
-
currencySymbol: string | null;
|
|
8
6
|
discountPrice: number | null;
|
|
9
7
|
priceListId: string | null;
|
|
10
8
|
sellPrice: number;
|
|
11
|
-
unitPrice: number | null;
|
|
12
9
|
|
|
13
10
|
constructor(data: Partial<SearchProductPriceData> = {}) {
|
|
14
11
|
this.buyPrice =
|
|
@@ -16,18 +13,12 @@ export class SearchProductPriceData {
|
|
|
16
13
|
? data.buyPrice
|
|
17
14
|
: null;
|
|
18
15
|
this.currency = data.currency || null;
|
|
19
|
-
this.currencyCode = data.currencyCode || null;
|
|
20
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
21
16
|
this.discountPrice =
|
|
22
17
|
data.discountPrice !== undefined && data.discountPrice !== null
|
|
23
18
|
? data.discountPrice
|
|
24
19
|
: null;
|
|
25
20
|
this.priceListId = data.priceListId || null;
|
|
26
21
|
this.sellPrice = data.sellPrice || 0;
|
|
27
|
-
this.unitPrice =
|
|
28
|
-
data.unitPrice !== undefined && data.unitPrice !== null
|
|
29
|
-
? data.unitPrice
|
|
30
|
-
: null;
|
|
31
22
|
}
|
|
32
23
|
}
|
|
33
24
|
|
|
@@ -3,7 +3,6 @@ import { SearchProductAttributeValueData } from "./SearchProductAttributeValue";
|
|
|
3
3
|
import { SearchProductImageData } from "./SearchProductImage";
|
|
4
4
|
import { SearchProductPriceData } from "./SearchProductPrice";
|
|
5
5
|
import { SearchProductStockLocationData } from "./SearchProductStockLocation";
|
|
6
|
-
import { VariantUnitModelData } from "./VariantUnitModel";
|
|
7
6
|
import { SearchVariationValueRelationData } from "./SearchVariationValueRelation";
|
|
8
7
|
|
|
9
8
|
export class SearchVariantData {
|
|
@@ -17,7 +16,6 @@ export class SearchVariantData {
|
|
|
17
16
|
sellIfOutOfStock: boolean | null;
|
|
18
17
|
sku: string | null;
|
|
19
18
|
stocks: SearchProductStockLocationData[] | null;
|
|
20
|
-
unit: VariantUnitModelData | null;
|
|
21
19
|
variantValues: SearchVariationValueRelationData[] | null;
|
|
22
20
|
weight: number | null;
|
|
23
21
|
|
|
@@ -47,7 +45,6 @@ export class SearchVariantData {
|
|
|
47
45
|
this.stocks = data.stocks
|
|
48
46
|
? data.stocks.map((s) => new SearchProductStockLocationData(s))
|
|
49
47
|
: null;
|
|
50
|
-
this.unit = data.unit ? new VariantUnitModelData(data.unit) : null;
|
|
51
48
|
this.variantValues = data.variantValues
|
|
52
49
|
? data.variantValues.map((s) => new SearchVariationValueRelationData(s))
|
|
53
50
|
: null;
|
|
@@ -3,12 +3,10 @@ import { DeepReadonly } from "ts-essentials";
|
|
|
3
3
|
export class StorefrontDynamicCurrencySettingsData {
|
|
4
4
|
roundingFormat: string | null;
|
|
5
5
|
targetCurrencyCode: string;
|
|
6
|
-
targetCurrencySymbol: string | null;
|
|
7
6
|
|
|
8
7
|
constructor(data: Partial<StorefrontDynamicCurrencySettingsData> = {}) {
|
|
9
8
|
this.roundingFormat = data.roundingFormat || null;
|
|
10
9
|
this.targetCurrencyCode = data.targetCurrencyCode || "";
|
|
11
|
-
this.targetCurrencySymbol = data.targetCurrencySymbol || null;
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
12
|
|
|
@@ -25,7 +25,6 @@ export class StorefrontOrderData extends BaseModelData {
|
|
|
25
25
|
cancelledAt: any | null;
|
|
26
26
|
currencyCode: string;
|
|
27
27
|
currencyRates: OrderCurrencyRateData[];
|
|
28
|
-
currencySymbol: string | null;
|
|
29
28
|
customer: OrderCustomerData | null;
|
|
30
29
|
customerId: string | null;
|
|
31
30
|
giftPackageLines: OrderGiftPackageLineData[] | null;
|
|
@@ -63,7 +62,6 @@ export class StorefrontOrderData extends BaseModelData {
|
|
|
63
62
|
this.currencyRates = data.currencyRates
|
|
64
63
|
? data.currencyRates.map((o) => new OrderCurrencyRateData(o))
|
|
65
64
|
: [];
|
|
66
|
-
this.currencySymbol = data.currencySymbol || null;
|
|
67
65
|
this.customer = data.customer ? new OrderCustomerData(data.customer) : null;
|
|
68
66
|
this.customerId = data.customerId || null;
|
|
69
67
|
this.giftPackageLines = data.giftPackageLines
|